:root {
  --bg: #ffffff;
  --sidebar-bg: #f8fafc;
  --border: #e2e8f0;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --code-bg: #0f172a;
  --code-text: #f8fafc;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Monaco, Consolas, monospace;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

header {
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  position: sticky;
  top: 0;
  z-index: 50;
  height: 4rem;
  display: flex;
  align-items: center;
  padding: 0 2rem;
  justify-content: space-between;
}

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

.brand img, .brand svg {
  width: 1.75rem;
  height: 1.75rem;
}

.version-pill {
  font-size: 0.75rem;
  background: #eef2ff;
  color: var(--primary);
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  font-weight: 600;
}

.header-nav {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  list-style: none;
}

.header-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}

.header-nav a:hover, .header-nav a.active {
  color: var(--primary);
}

.docs-layout {
  display: flex;
  min-height: calc(100vh - 4rem);
}

.sidebar {
  width: 260px;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
  padding: 2rem 1.5rem;
  flex-shrink: 0;
}

.sidebar-group {
  margin-bottom: 2rem;
}

.sidebar-title {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.sidebar-menu {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.sidebar-menu a {
  text-decoration: none;
  color: #334155;
  font-size: 0.9rem;
  display: block;
  padding: 0.35rem 0.6rem;
  border-radius: 0.375rem;
  transition: all 0.15s ease;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
  background: #e0e7ff;
  color: var(--primary);
  font-weight: 600;
}

.content {
  flex: 1;
  max-width: 900px;
  padding: 3rem 4rem;
}

.content h1 {
  font-size: 2.25rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 2.5rem 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.content h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 1.75rem 0 0.75rem;
}

.content p {
  color: #334155;
  margin-bottom: 1.25rem;
  font-size: 1rem;
}

.code-block {
  background: var(--code-bg);
  color: var(--code-text);
  border-radius: 0.5rem;
  padding: 1.25rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.25rem;
  text-transform: uppercase;
}

.badge-get { background: #dcfce7; color: #15803d; }
.badge-post { background: #dbeafe; color: #1d4ed8; }
.badge-delete { background: #fee2e2; color: #b91c1c; }

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

th, td {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  text-align: left;
}

th {
  background: var(--sidebar-bg);
  font-weight: 600;
}

.endpoint-card {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  margin-bottom: 2rem;
  overflow: hidden;
}

.endpoint-header {
  padding: 1rem 1.25rem;
  background: var(--sidebar-bg);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
}

.endpoint-path {
  font-family: var(--font-mono);
  font-weight: 600;
  font-size: 0.95rem;
}

.endpoint-body {
  padding: 1.25rem;
}

.callout {
  border-left: 4px solid var(--primary);
  background: #f5f3ff;
  padding: 1rem 1.25rem;
  border-radius: 0 0.375rem 0.375rem 0;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

@media (max-width: 768px) {
  .docs-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .content {
    padding: 2rem 1.5rem;
  }
}
