/* ============================================
   Docs Layout
   ============================================ */
.docs-body {
  background: var(--bg);
}
.docs-layout {
  display: flex;
  padding-top: var(--nav-height);
  min-height: 100vh;
}

/* Sidebar */
.docs-sidebar {
  width: 260px;
  flex-shrink: 0;
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  border-right: 1px solid var(--border-light);
  background: var(--bg-subtle);
}
.docs-sidebar-inner {
  padding: 24px 20px;
}
.docs-section {
  margin-bottom: 24px;
}
.docs-section h4 {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 8px;
  padding: 0 8px;
}
.docs-link {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: 4px;
  transition: all 0.15s;
}
.docs-link:hover {
  color: var(--text);
  background: var(--bg-card);
}
.docs-link.active {
  color: var(--primary-light);
  background: rgba(99,102,241,0.08);
  font-weight: 500;
}

/* Main Content */
.docs-content {
  flex: 1;
  max-width: 800px;
  padding: 40px 48px 80px;
}
.docs-content h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}
.docs-content h2 {
  font-size: 1.5rem;
  font-weight: 800;
  margin-bottom: 12px;
  letter-spacing: -0.01em;
  margin-top: 8px;
}
.docs-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 8px;
  margin-top: 24px;
}
.docs-content p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 16px;
}
.docs-content ul, .docs-content ol {
  margin-bottom: 16px;
  padding-left: 20px;
}
.docs-content li {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 4px;
  list-style: disc;
}
.docs-content ol li {
  list-style: decimal;
}
.docs-content li strong {
  color: var(--text);
}
.docs-content hr {
  border: none;
  border-top: 1px solid var(--border-light);
  margin: 40px 0;
}
.docs-content code {
  background: var(--bg-elevated);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.85rem;
  color: var(--primary-light);
  font-family: 'JetBrains Mono', 'SF Mono', 'Fira Code', monospace;
}
.docs-content a {
  color: var(--primary-light);
}
.docs-content a:hover {
  text-decoration: underline;
}
.docs-lead {
  font-size: 1.1rem !important;
  color: var(--text) !important;
  line-height: 1.8 !important;
}

/* Callouts */
.docs-callout {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 24px;
}
.docs-callout strong {
  display: block;
  margin-bottom: 4px;
  color: var(--text);
}
.docs-callout p {
  margin-bottom: 0;
  font-size: 0.9rem;
}
.docs-callout.info {
  border-left-color: var(--accent);
}

/* Code Blocks */
.code-block {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  overflow: hidden;
}
.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-light);
}
.code-header span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.copy-btn {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-family: var(--font);
  transition: all 0.15s;
}
.copy-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
}
.code-block pre {
  padding: 16px;
  overflow-x: auto;
  margin: 0;
}
.code-block code {
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.6;
}

/* Tables */
.docs-table-wrap {
  overflow-x: auto;
  margin-bottom: 24px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.docs-table {
  width: 100%;
  border-collapse: collapse;
}
.docs-table th,
.docs-table td {
  padding: 10px 16px;
  text-align: left;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-light);
}
.docs-table th {
  background: var(--bg-card);
  font-weight: 600;
  color: var(--text-muted);
}
.docs-table td {
  color: var(--text-secondary);
}
.docs-table td code {
  font-size: 0.8rem;
}

/* Tabs */
.docs-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
}
.docs-tab {
  font-family: var(--font);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  padding: 8px 16px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s;
}
.docs-tab:hover { color: var(--text); }
.docs-tab.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}
.docs-tab-content {
  display: none;
}
.docs-tab-content.active {
  display: block;
}

/* Nav active state for docs */
.nav-links a.active {
  color: var(--primary-light);
}

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