

:root {
  --bg:           #0f1117;
  --bg-sidebar:   #161922;
  --bg-card:      #1a1d28;
  --bg-code:      #1e2130;
  --border:       #2a2d3a;
  --text:         #c9cdd8;
  --text-muted:   #7a7f8e;
  --text-heading: #e8eaf0;
  --accent:       #5b8def;
  --accent-hover: #7ba5f7;
  --green:        #4ade80;
  --yellow:       #fbbf24;
  --red:          #f87171;
  --orange:       #fb923c;
  --purple:       #a78bfa;
  --cyan:         #22d3ee;
  --sidebar-w:    280px;
}

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

html { font-size: 15px; scroll-behavior: smooth; }

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

/* ── Sidebar ─────────────────────────────────────────────── */

.sidebar {
  position: fixed;
  top: 0; left: 0;
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  overflow-y: auto;
  padding: 1.5rem 0;
  z-index: 100;
}

.sidebar-logo {
  padding: 0 1.5rem 1.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}

.sidebar-logo h1 {
  font-size: 1.2rem;
  color: var(--accent);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sidebar-logo span {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
  margin-top: 0.25rem;
}

.sidebar-section {
  padding: 0.5rem 1.5rem;
}

.sidebar-section h3 {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.sidebar-section a {
  display: block;
  padding: 0.35rem 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-radius: 6px;
  transition: all 0.15s;
  margin-bottom: 2px;
}

.sidebar-section a:hover {
  background: rgba(91, 141, 239, 0.1);
  color: var(--accent-hover);
}

.sidebar-section a.active {
  background: rgba(91, 141, 239, 0.15);
  color: var(--accent);
  font-weight: 500;
}

/* ── Main Content ────────────────────────────────────────── */

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 3rem 4rem;
  max-width: 960px;
}

h1 {
  font-size: 2.2rem;
  color: var(--text-heading);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

h2 {
  font-size: 1.5rem;
  color: var(--text-heading);
  font-weight: 600;
  margin-top: 3rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.15rem;
  color: var(--text-heading);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  color: var(--text-heading);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p { margin-bottom: 1rem; }

.subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Code Blocks ─────────────────────────────────────────── */

code {
  font-family: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.85rem;
  background: var(--bg-code);
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  color: var(--cyan);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

pre code {
  background: none;
  padding: 0;
  font-size: 0.85rem;
  color: var(--text);
}

/* ── Method Badges ───────────────────────────────────────── */

.endpoint {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1.5rem;
}

.endpoint-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.method {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 0.03em;
}

.method-get    { background: rgba(74, 222, 128, 0.15); color: var(--green); }
.method-post   { background: rgba(91, 141, 239, 0.15); color: var(--accent); }
.method-put    { background: rgba(251, 191, 36, 0.15); color: var(--yellow); }
.method-patch  { background: rgba(251, 146, 60, 0.15); color: var(--orange); }
.method-delete { background: rgba(248, 113, 113, 0.15); color: var(--red); }

.endpoint-path {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.95rem;
  color: var(--text-heading);
  font-weight: 500;
}

.endpoint-desc {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.endpoint-auth {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--purple);
  font-weight: 500;
}

/* ── Tables ──────────────────────────────────────────────── */

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

th {
  text-align: left;
  padding: 0.6rem 1rem;
  background: var(--bg-card);
  color: var(--text-heading);
  font-weight: 600;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

tr:last-child td { border-bottom: none; }

/* ── Cards Grid ──────────────────────────────────────────── */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.2s;
  text-decoration: none;
  color: inherit;
  display: block;
}

.card:hover {
  border-color: var(--accent);
  text-decoration: none;
}

.card h3 {
  margin-top: 0;
  font-size: 1.05rem;
  color: var(--text-heading);
}

.card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0;
}

/* ── Alerts / Callouts ───────────────────────────────────── */

.callout {
  border-left: 3px solid var(--accent);
  background: rgba(91, 141, 239, 0.06);
  padding: 1rem 1.25rem;
  border-radius: 0 6px 6px 0;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.callout-warn {
  border-left-color: var(--yellow);
  background: rgba(251, 191, 36, 0.06);
}

.callout-danger {
  border-left-color: var(--red);
  background: rgba(248, 113, 113, 0.06);
}

.callout strong {
  color: var(--text-heading);
}

/* ── Event Cards ─────────────────────────────────────────── */

.event {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.event-name {
  font-family: 'JetBrains Mono', monospace;
  color: var(--green);
  font-weight: 600;
  font-size: 0.95rem;
}

.event-dir {
  font-size: 0.75rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 500;
  margin-left: 0.5rem;
}

.dir-in  { background: rgba(91, 141, 239, 0.15); color: var(--accent); }
.dir-out { background: rgba(74, 222, 128, 0.15); color: var(--green); }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 2rem 1.5rem; }
}
