/* Escopos da API — chips horizontais compactos */
.api-scopes-ui {
  margin-top: 8px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}
.api-scopes-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.api-scopes-group {
  display: grid;
  grid-template-columns: minmax(140px, 200px) 1fr;
  gap: 8px 14px;
  align-items: start;
  padding: 8px 0;
  border-top: 1px solid #dbe3ee;
}
.api-scopes-group:first-of-type { border-top: 0; padding-top: 0; }
.api-scopes-group-title {
  font-weight: 700;
  color: #0a1628;
  font-size: 0.84rem;
  line-height: 1.3;
  padding-top: 6px;
}
.api-scopes-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.api-scopes-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 8px 12px;
  border: 1.5px solid #94a3b8;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  user-select: none;
  transition: border-color .12s, background .12s, box-shadow .12s, color .12s;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.api-scopes-chip:hover {
  border-color: #0a4d8c;
  background: #f0f7ff;
}
.api-scopes-chip input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: #0a4d8c;
  flex: 0 0 auto;
  cursor: pointer;
}
.api-scopes-chip-text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.api-scopes-chip-label {
  font-weight: 700;
  font-size: 0.88rem;
  color: #0f172a;
  white-space: nowrap;
}
.api-scopes-chip-code {
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 999px;
  white-space: nowrap;
}
.api-scopes-chip.is-checked {
  border-color: #0a4d8c;
  background: #dbeafe;
  box-shadow: 0 0 0 2px rgba(10, 77, 140, 0.18);
}
.api-scopes-chip.is-checked .api-scopes-chip-label { color: #082f49; }
.api-scopes-chip.is-checked .api-scopes-chip-code {
  background: #0a4d8c;
  color: #fff;
}

@media (max-width: 720px) {
  .api-scopes-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .api-scopes-group-title { padding-top: 0; }
}

.docs-api {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 64px;
  color: #0f172a;
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.55;
}
.docs-api h1 { font-size: 1.75rem; margin: 0 0 8px; }
.docs-api h2 {
  font-size: 1.2rem;
  margin: 28px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}
.docs-api h3 { font-size: 1rem; margin: 18px 0 8px; }
.docs-api .lead { color: #475569; margin-bottom: 18px; }
.docs-api .callout {
  background: #f1f5f9;
  border-left: 4px solid #0a1628;
  padding: 12px 14px;
  margin: 14px 0;
  border-radius: 0 8px 8px 0;
}
.docs-api table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 10px 0 16px;
}
.docs-api th, .docs-api td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: top;
}
.docs-api th { color: #64748b; font-weight: 600; }
.docs-api pre, .docs-api code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.docs-api pre {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: 0.82rem;
  line-height: 1.5;
}
.docs-api code:not(pre code) {
  background: #e2e8f0;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
}
.docs-api .toc a { color: #0a4d8c; text-decoration: none; }
.docs-api .toc a:hover { text-decoration: underline; }
.docs-api .toc ul { margin: 0; padding-left: 1.2rem; }
.docs-api .topbar {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  justify-content: space-between; margin-bottom: 18px;
}
.docs-api .btn {
  display: inline-block;
  padding: 8px 12px;
  border-radius: 8px;
  background: #0a1628;
  color: #fff;
  text-decoration: none;
  font-size: 0.9rem;
}
.docs-api .btn.secondary { background: #e2e8f0; color: #0f172a; }
