/* ==========================================
   Página de documentação da API
   ========================================== */

.api-docs-page {
  max-width: 100%;
}

.docs-hero {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 20px;
}

.docs-hero h1 {
  margin: 8px 0 10px;
  font-size: clamp(30px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.docs-hero p {
  color: var(--muted);
  max-width: 760px;
  line-height: 1.6;
}

.eyebrow {
  display: inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(139, 92, 246, .15);
  color: #c4b5fd;
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.docs-hero-card,
.docs-alert,
.endpoint-card,
.step-card,
.docs-nav {
  background: rgba(15, 23, 42, .72);
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 18px;
  box-shadow: 0 18px 45px rgba(2, 6, 23, .18);
}

.docs-hero-card {
  padding: 20px;
  display: grid;
  align-content: center;
  gap: 8px;
}

.hero-card-label {
  color: var(--muted);
  font-size: 13px;
}

.docs-hero-card code,
.docs-alert code,
.endpoint-url,
pre code {
  font-family: Consolas, "Courier New", monospace;
}

.docs-hero-card code {
  display: block;
  padding: 12px;
  border-radius: 12px;
  background: rgba(2, 6, 23, .42);
  color: #e2e8f0;
  overflow-wrap: anywhere;
}

.docs-hero-card small {
  color: var(--muted);
}

.docs-alert {
  padding: 16px 18px;
  color: #e2e8f0;
  margin-bottom: 22px;
  line-height: 1.6;
}

.docs-nav {
  position: sticky;
  top: 24px;
  padding: 16px;
}

.docs-nav h2 {
  font-size: 15px;
  margin: 0 0 10px;
  color: #fff;
}

.docs-nav a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  text-decoration: none;
  color: var(--muted);
  padding: 10px 12px;
  border-radius: 12px;
  transition: .2s;
}

.docs-nav a:hover {
  background: rgba(255, 255, 255, .06);
  color: #fff;
}

.docs-nav span {
  color: #c4b5fd;
}

.doc-section {
  margin-bottom: 26px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.section-title p {
  margin: 0;
  color: var(--muted);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.step-card {
  padding: 18px;
}

.step-card span {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--info));
  color: #fff;
  font-weight: 800;
  margin-bottom: 12px;
}

.step-card h3 {
  margin: 0 0 8px;
}

.step-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.endpoint-list {
  display: grid;
  gap: 14px;
}

.endpoint-card {
  padding: 18px;
}

.endpoint-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.endpoint-head h3 {
  margin: 4px 0 0;
  font-size: 18px;
}

.route-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 22px;
}

.route-subgroup,
.status-maint {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 700;
}

.route-subgroup {
  color: #bae6fd;
  background: rgba(14, 165, 233, .13);
}

.status-maint {
  color: #fde68a;
  background: rgba(245, 158, 11, .14);
}

.method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .04em;
}

.method.get { background: rgba(34,197,94,.14); color: #86efac; }
.method.post { background: rgba(59,130,246,.14); color: #93c5fd; }
.method.put { background: rgba(245,158,11,.14); color: #fcd34d; }
.method.delete { background: rgba(239,68,68,.14); color: #fca5a5; }
.method.default { background: rgba(148,163,184,.14); color: #cbd5e1; }

.endpoint-url {
  padding: 12px 14px;
  background: rgba(2, 6, 23, .42);
  border: 1px solid rgba(148, 163, 184, .12);
  border-radius: 12px;
  color: #e2e8f0;
  overflow-wrap: anywhere;
  margin-bottom: 14px;
}

.endpoint-grid {
  display: grid;
  gap: 12px;
}

.doc-code-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
  margin: 8px 0;
}

pre {
  margin: 0;
  padding: 14px;
  border-radius: 12px;
  background: #020617;
  border: 1px solid rgba(148, 163, 184, .14);
  color: #dbeafe;
  overflow: auto;
  max-height: 360px;
}

pre code {
  white-space: pre;
  font-size: 13px;
  line-height: 1.55;
}

.dialog-content {
  width: min(460px, 100%);
}

@media (max-width: 980px) {
  .docs-hero,
  .docs-layout,
  .steps-grid {
    grid-template-columns: 1fr;
  }

  .docs-nav {
    position: relative;
    top: 0;
  }
}

.docs-layout {
  display: block;
}

.docs-nav {
  position: relative;
  top: 0;
  margin-bottom: 22px;
  padding: 16px;
}

.docs-nav a {
  display: inline-flex;
  margin-right: 10px;
  margin-bottom: 8px;
  min-width: 150px;
}

.docs-content {
  width: 100%;
  min-width: 0;
}

.endpoint-card,
.endpoint-grid,
pre {
  max-width: 100%;
}