/* ══════════════════════════════════════════════════════════════
   Netra — Documentation Page
   ══════════════════════════════════════════════════════════════ */

.docs-layout {
  display: flex;
  min-height: 100vh;
  padding-top: 72px;
}

/* ── Sidebar ── */
.docs-sidebar {
  width: 260px;
  position: fixed;
  top: 72px;
  left: 0;
  bottom: 0;
  overflow-y: auto;
  padding: 32px 20px;
  border-right: 1px solid var(--border);
  background: var(--bg-alt);
}

.docs-sidebar-header {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-3);
  margin-bottom: 16px;
  padding: 0 12px;
}

.docs-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.docs-nav-item {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: var(--text-2);
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}

.docs-nav-item:hover {
  background: var(--surface);
  color: var(--text);
}

.docs-nav-item.active {
  background: rgba(59, 130, 246, 0.12);
  color: var(--blue-strong);
  font-weight: 500;
}

/* ── Content ── */
.docs-content {
  flex: 1;
  margin-left: 260px;
  padding: 40px 56px 80px;
  max-width: 860px;
}

.docs-section {
  margin-bottom: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid var(--border);
}

.docs-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.docs-section h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}

.docs-section h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 28px;
  margin-bottom: 10px;
  color: var(--text);
}

.docs-section h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-top: 20px;
  margin-bottom: 8px;
  color: var(--text);
}

.docs-section p {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 12px;
}

.docs-section ul,
.docs-section ol {
  margin-bottom: 12px;
  padding-left: 22px;
}

.docs-section li {
  font-size: 14.5px;
  color: var(--text-2);
  line-height: 1.65;
  margin-bottom: 4px;
}

.docs-section li strong {
  color: var(--text);
}

.docs-section code {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(59, 130, 246, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--blue-strong);
}

.docs-section pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 16px;
  overflow-x: auto;
}

.docs-section pre code {
  background: none;
  padding: 0;
  border-radius: 0;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}

/* ── Tables ── */
.docs-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
  font-size: 13.5px;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.docs-table th,
.docs-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.docs-table th {
  font-weight: 600;
  color: var(--text);
  font-size: 11.5px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--surface);
}

.docs-table td {
  color: var(--text-2);
}

.docs-table td code {
  font-size: 12px;
}

/* ── Responsive ── */
@media (max-width: 1024px) {
  .docs-content {
    padding: 40px 32px 80px;
  }
}

@media (max-width: 768px) {
  .docs-sidebar {
    display: none;
  }

  .docs-content {
    margin-left: 0;
    padding: 32px 20px 60px;
  }

  .docs-section h1 {
    font-size: 1.5rem;
  }

  .docs-section h2 {
    font-size: 1.1rem;
  }

  .docs-section pre {
    padding: 16px;
    font-size: 12px;
  }

  .docs-table th,
  .docs-table td {
    padding: 8px 10px;
    font-size: 13px;
    white-space: nowrap;
  }
}

/* ── Footer offset — prevent sidebar from covering the footer ── */
.docs-layout + .footer {
  margin-left: 260px;
}

@media (max-width: 768px) {
  .docs-layout + .footer {
    margin-left: 0;
  }
}
