/* ── API docs layout ──────────────────────────────────────────────── */
.api-layout {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* ── Sidebar ──────────────────────────────────────────────────────── */
.api-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  padding: 32px 0;
  position: sticky;
  top: 60px;
  height: calc(100vh - 60px);
  overflow-y: auto;
}
.sidebar-title {
  padding: 0 20px 16px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}
.sidebar-nav { display: flex; flex-direction: column; }
.sidebar-group {
  padding: 14px 20px 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}
.sidebar-link {
  padding: 7px 20px;
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.12s;
  font-family: var(--mono);
}
.sidebar-link:hover {
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

/* ── Method badges ────────────────────────────────────────────────── */
.method-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-family: var(--mono);
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.65rem;
  padding: 2px 5px;
  flex-shrink: 0;
  min-width: 36px;
}
.method-badge.lg { font-size: 0.75rem; padding: 4px 10px; min-width: 52px; }
.method-badge.get    { background: rgba(61,214,140,0.15); color: var(--green); }
.method-badge.post   { background: rgba(91,141,239,0.15); color: var(--accent); }
.method-badge.put    { background: rgba(251,191,36,0.12);  color: #fbbf24; }
.method-badge.delete { background: rgba(248,113,113,0.12); color: var(--red); }

/* ── Content area ─────────────────────────────────────────────────── */
.api-content {
  flex: 1;
  padding: 40px 48px;
  max-width: 760px;
}
.api-header { margin-bottom: 48px; }
.api-header h1 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}
.api-header p { color: var(--text-muted); max-width: 560px; }

/* ── Sections ─────────────────────────────────────────────────────── */
.api-section {
  margin-bottom: 56px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--border);
}
.api-section:last-child { border-bottom: none; }
.api-section h2 {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.api-section h3 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 20px 0 8px;
}
.api-section p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 8px;
}

/* ── Endpoint header ──────────────────────────────────────────────── */
.endpoint-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 16px;
}
.endpoint-path {
  font-family: var(--mono);
  font-size: 0.92rem;
  color: var(--text);
  background: none;
  padding: 0;
}

/* ── API code blocks ──────────────────────────────────────────────── */
.api-code {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 20px;
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  color: var(--text);
  margin: 8px 0 16px;
}
.code-comment { color: var(--text-dim); }

/* ── Error table ──────────────────────────────────────────────────── */
.err-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 0.88rem;
  margin-top: 8px;
}
.err-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
}
.err-table td:first-child {
  font-family: var(--mono);
  color: var(--red);
  font-weight: 600;
  width: 60px;
}

/* ── Info box ─────────────────────────────────────────────────────── */
.info-box {
  background: rgba(91,141,239,0.08);
  border: 1px solid rgba(91,141,239,0.2);
  border-radius: var(--radius);
  padding: 14px 18px;
  font-size: 0.88rem;
  color: var(--text-muted);
  margin: 12px 0;
  line-height: 1.6;
}
.info-box strong { color: var(--accent); }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .api-sidebar { display: none; }
  .api-content { padding: 24px; }
}
