:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent: #7c3aed;
  --accent-light: #a78bfa;
  --gradient: linear-gradient(135deg, #2563eb, #7c3aed);
  --bg: #09090b;
  --bg-alt: #0a0a12;
  --bg-card: #111118;
  --bg-elevated: #1a1a24;
  --bg-hover: #1f1f2e;
  --text: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --green: #22c55e;
  --yellow: #eab308;
  --red: #ef4444;
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.1);
  --radius: 0.75rem;
  --radius-sm: 0.5rem;
  --radius-full: 9999px;
  --shadow: 0 1px 3px rgba(0,0,0,0.3), 0 1px 2px rgba(0,0,0,0.2);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

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

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: var(--primary-light); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-light); }

::selection { background: rgba(37,99,235,0.3); color: #fff; }

/* ── Nav ── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(9,9,11,0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1280px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 3.5rem; padding: 0 1.5rem;
}

.nav-brand {
  display: flex; align-items: center; gap: 0.5rem;
  font-weight: 700; font-size: 1rem; color: var(--text); text-decoration: none;
}

.nav-brand-icon {
  width: 2rem; height: 2rem; border-radius: var(--radius-sm);
  background: var(--gradient);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 0.8rem;
}

.nav-links { display: flex; gap: 0.25rem; }
.nav-links a {
  color: var(--text-muted); text-decoration: none;
  padding: 0.4rem 0.75rem; border-radius: var(--radius-sm);
  font-size: 0.8rem; font-weight: 500; transition: all 0.2s;
}

.nav-links a:hover { color: var(--text); background: var(--bg-hover); }
.nav-links a.active { color: #fff; background: rgba(37,99,235,0.15); }

.nav-spacer { height: 3.5rem; }

/* ── Layout ── */
.wrapper {
  flex: 1; max-width: 1280px; margin: 0 auto;
  padding: 2rem 1.5rem; width: 100%;
}

.page-header { margin-bottom: 2rem; }
.page-title {
  font-size: 1.5rem; font-weight: 800; color: var(--text);
  letter-spacing: -0.025em;
}

.page-title-icon { margin-right: 0.5rem; opacity: 0.7; }
.page-sub { color: var(--text-muted); font-size: 0.875rem; margin-top: 0.25rem; }

/* ── Cards ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--border-hover); }

.card-title {
  font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--primary-light); margin-bottom: 1rem;
}

/* ── Grid ── */
.grid { display: grid; gap: 1rem; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: 1fr 1fr 1fr; }
.grid-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

@media (max-width: 900px) { .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ── Status Banner ── */
.status-banner {
  text-align: center; padding: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); margin-bottom: 1.5rem;
}

.status-banner-inner {
  display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.status-banner-label {
  font-weight: 600; font-size: 0.9rem;
}

.status-banner-uptime {
  color: var(--text-muted); font-size: 0.8rem;
}

/* ── Pulse Dot ── */
.pulse-dot {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block;
}

.pulse-dot.green {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34,197,94,0.6);
  animation: pulse-green 2s infinite;
}

.pulse-dot.yellow {
  background: var(--yellow);
  box-shadow: 0 0 0 0 rgba(234,179,8,0.6);
  animation: pulse-yellow 2s infinite;
}

@keyframes pulse-green { 0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.6); } 70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); } 100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); } }
@keyframes pulse-yellow { 0% { box-shadow: 0 0 0 0 rgba(234,179,8,0.6); } 70% { box-shadow: 0 0 0 8px rgba(234,179,8,0); } 100% { box-shadow: 0 0 0 0 rgba(234,179,8,0); } }

/* ── Stats Cards ── */
.stat { text-align: center; padding: 1rem; }
.stat-value { font-size: 1.75rem; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; }
.stat-label { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.25rem; }
.stat-sub { font-size: 0.7rem; color: var(--text-muted); margin-top: 0.15rem; }

/* ── Info Rows ── */
.info-row {
  display: flex; justify-content: space-between;
  padding: 0.5rem 0; border-bottom: 1px solid rgba(255,255,255,0.04);
  font-size: 0.825rem;
}

.info-row:last-child { border-bottom: none; }
.info-label { color: var(--text-muted); }
.info-value { color: var(--text); }

/* ── Badges ── */
.badge {
  display: inline-flex; align-items: center; gap: 0.25rem;
  padding: 0.15rem 0.5rem; border-radius: var(--radius-full);
  font-size: 0.7rem; font-weight: 500; border: 1px solid transparent;
}

.badge-green { background: rgba(34,197,94,0.1); color: var(--green); border-color: rgba(34,197,94,0.2); }
.badge-yellow { background: rgba(234,179,8,0.1); color: var(--yellow); border-color: rgba(234,179,8,0.2); }
.badge-blue { background: rgba(37,99,235,0.1); color: var(--primary-light); border-color: rgba(37,99,235,0.2); }
.badge-red { background: rgba(239,68,68,0.1); color: var(--red); border-color: rgba(239,68,68,0.2); }

/* ── Tags ── */
.tag {
  display: inline-block; padding: 0.2rem 0.5rem; border-radius: var(--radius-sm);
  font-size: 0.7rem; background: rgba(37,99,235,0.08); color: var(--primary-light);
  border: 1px solid rgba(37,99,235,0.15);
}

/* ── Code / Pre ── */
code, .mono { font-family: 'SF Mono', 'Fira Code', 'Roboto Mono', monospace; }
pre {
  background: rgba(0,0,0,0.3); padding: 1rem; border-radius: var(--radius-sm);
  font-size: 0.75rem; line-height: 1.6; color: var(--primary-light);
  overflow-x: auto; border: 1px solid var(--border);
}

/* ── CTA / Button ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 1.25rem; border-radius: var(--radius-sm);
  font-size: 0.825rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s; border: none;
}

.btn-primary { background: var(--gradient); color: #fff; }
.btn-primary:hover { opacity: 0.9; }

.btn-outline {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-outline:hover { border-color: var(--border-hover); color: var(--text); }

/* ── Footer ── */
.footer {
  text-align: center; padding: 1.5rem; margin-top: 2rem;
  color: var(--text-muted); font-size: 0.75rem;
  border-top: 1px solid var(--border);
}

/* ── Lists ── */
.ul-clean { list-style: none; font-size: 0.825rem; line-height: 2; }

/* ── Section BG ── */
.section-bg { background: var(--bg-alt); margin: 1.5rem -1.5rem; padding: 1.5rem; }
@media (min-width: 1280px) { .section-bg { border-radius: var(--radius); margin-left: 0; margin-right: 0; } }

/* ── Pre-suffixed ── */
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.825rem; }
.text-xs { font-size: 0.7rem; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
