:root {
  --bg: #07111f;
  --bg2: #0d1728;
  --panel: rgba(14, 25, 44, 0.8);
  --panel-2: rgba(20, 35, 58, 0.9);
  --line: rgba(255, 255, 255, 0.08);
  --text: #eaf2ff;
  --muted: #9cb0cf;
  --primary: #59d0ff;
  --primary-2: #4fffb3;
  --danger: #ff5f7a;
  --ok: #56f39a;
  --shadow: 0 12px 35px rgba(0, 0, 0, 0.35);
  --radius: 22px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(circle at top left, rgba(89, 208, 255, 0.12), transparent 30%),
    radial-gradient(circle at bottom right, rgba(79, 255, 179, 0.09), transparent 25%),
    linear-gradient(135deg, var(--bg), var(--bg2), #050b14);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  min-height: 100%;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: rgba(6, 12, 22, 0.82);
  backdrop-filter: blur(14px);
  padding: 24px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 28px;
}

.brand-badge {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-weight: bold;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #04101a;
}

.brand h1 { margin: 0; font-size: 1.15rem; }
.brand p { margin: 4px 0 0; color: var(--muted); font-size: 0.9rem; }

.nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.nav-btn {
  width: 100%;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  text-align: left;
}

.nav-btn.active,
.nav-btn:hover {
  background: linear-gradient(135deg, rgba(89, 208, 255, 0.15), rgba(79, 255, 179, 0.08));
  border-color: rgba(89, 208, 255, 0.3);
}

.sidebar-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}

.mini-status {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  margin-bottom: 10px;
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 12px var(--ok);
}

.main { padding: 22px; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-left h2 { margin: 0; font-size: 1.5rem; }
.topbar-left p { margin: 6px 0 0; color: var(--muted); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.menu-toggle,
.action-btn {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  border-radius: 14px;
  padding: 12px 16px;
  cursor: pointer;
}

.menu-toggle { display: none; }

.live-clock {
  padding: 12px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  min-width: 110px;
  text-align: center;
}

.glass {
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.content { display: none; }
.content.active { display: block; }

.hero-card {
  border-radius: 28px;
  padding: 26px;
  margin-bottom: 22px;
}

.eyebrow {
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 0.76rem;
  margin: 0 0 10px;
}

.hero-card h3 {
  margin: 0;
  font-size: 1.8rem;
}

.hero-text {
  margin-top: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.stat-card,
.panel {
  border-radius: var(--radius);
}

.stat-card {
  padding: 22px;
}

.stat-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.stat-card h4 {
  margin: 0;
  font-size: 2rem;
}

.muted {
  display: inline-block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.9rem;
}

.panel {
  padding: 20px;
}

.panel-header,
.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-head h3,
.panel-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--muted);
}

.badge {
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(89, 208, 255, 0.12);
  color: var(--primary);
  font-size: 0.82rem;
}

.site-list {
  display: grid;
  gap: 12px;
}

.site-item,
.event-item {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
}

.site-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.site-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.chip {
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
  font-size: 0.83rem;
  border: 1px solid var(--line);
}

.status {
  font-weight: bold;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 0.85rem;
}

.status.online {
  color: var(--ok);
  background: rgba(86, 243, 154, 0.12);
}

.status.offline {
  color: var(--danger);
  background: rgba(255, 95, 122, 0.12);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
}

tbody td {
  padding: 14px 10px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

code {
  color: var(--primary-2);
}

@media (max-width: 980px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: 280px;
    transform: translateX(-100%);
    z-index: 50;
    transition: 0.3s ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .menu-toggle {
    display: inline-flex;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
}