/* Documentação da API — NF Integrada */
.page-docs {
  background: #f4f7fb;
}

.page-docs .site-footer {
  margin-top: 0;
}

.docs-shell {
  padding: calc(var(--header-h) + 1.25rem) 0 0;
}

.docs-layout {
  width: min(100% - 2rem, 1180px);
  margin: 0 auto;
  display: grid;
  gap: 1.5rem;
  padding-bottom: 4rem;
}

.docs-sidebar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  padding: 1rem;
}

.docs-nav-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 44px;
  padding: 0.7rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--navy);
  font-weight: 700;
  cursor: pointer;
}

.docs-nav-toggle span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.docs-search {
  width: 100%;
  margin: 0 0 0.75rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  background: #f8fafc;
  color: var(--ink);
}

.docs-search:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.docs-nav {
  display: none;
  padding-top: 0.35rem;
}

.docs-sidebar.is-open .docs-nav {
  display: block;
}

.docs-nav-group {
  margin-top: 0.85rem;
}

.docs-nav-group:first-child {
  margin-top: 0.25rem;
}

.docs-nav-group h2 {
  margin: 0 0 0.35rem;
  padding: 0.35rem 0.65rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.docs-nav a,
.docs-nav .docs-nav-soon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border-radius: 0.7rem;
  color: #334155;
  font-size: 0.92rem;
  font-weight: 600;
}

.docs-nav a:hover {
  background: #f1f5f9;
  color: var(--navy);
}

.docs-nav a.is-active {
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
}

.docs-nav-soon {
  color: #94a3b8;
  font-weight: 600;
  cursor: default;
}

.docs-badge-soon {
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.15rem 0.45rem;
}

.docs-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
  z-index: 80;
}

.docs-overlay.is-visible {
  display: block;
}

.docs-content {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 1.25rem;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.05);
  padding: 1.5rem 1.25rem 2.25rem;
}

.docs-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.docs-breadcrumb a:hover {
  color: var(--accent);
}

.docs-breadcrumb .sep {
  color: #cbd5e1;
}

.docs-kicker {
  margin: 0 0 0.55rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.docs-content > h1,
.docs-article > h1 {
  margin: 0 0 0.85rem;
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.docs-lead {
  margin: 0 0 1.5rem;
  color: var(--muted);
  font-size: 1.05rem;
  max-width: 46rem;
}

.docs-article h2 {
  margin: 2.4rem 0 0.75rem;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.docs-article h3 {
  margin: 1.5rem 0 0.6rem;
  font-size: 1.05rem;
}

.docs-article p,
.docs-article ul,
.docs-article ol {
  color: #334155;
}

.docs-article ul,
.docs-article ol {
  padding-left: 1.2rem;
}

.docs-article li + li {
  margin-top: 0.35rem;
}

.docs-article a {
  color: var(--accent);
  font-weight: 700;
}

.docs-article a:hover {
  text-decoration: underline;
}

.docs-article code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88em;
  background: #f1f5f9;
  padding: 0.08rem 0.35rem;
  border-radius: 0.35rem;
  color: var(--navy);
}

.docs-steps p {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-weight: 500;
}

.docs-grid-cards {
  display: grid;
  gap: 0.85rem;
  margin: 1.25rem 0 1.75rem;
}

.docs-mini-card {
  display: block;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #f8fafc;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.docs-mini-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
  text-decoration: none;
}

.docs-mini-card strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.docs-mini-card span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 500;
}

.docs-callout {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 0.95rem;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.docs-callout strong {
  display: block;
  margin-bottom: 0.25rem;
  color: var(--navy);
}

.docs-callout p:last-child {
  margin-bottom: 0;
}

.docs-callout-info {
  border-color: rgba(37, 99, 235, 0.22);
  background: #eff6ff;
}

.docs-callout-warn {
  border-color: rgba(245, 158, 11, 0.35);
  background: #fffbeb;
}

.docs-callout-ok {
  border-color: rgba(5, 150, 105, 0.25);
  background: #ecfdf5;
}

.docs-endpoint {
  margin: 1.75rem 0 2.5rem;
  padding-top: 0.25rem;
  scroll-margin-top: calc(var(--header-h) + 18px);
}

.docs-endpoint-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.85rem;
}

.docs-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  padding: 0.28rem 0.55rem;
  border-radius: 0.55rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.docs-method-get { background: #0284c7; }
.docs-method-post { background: #059669; }
.docs-method-delete { background: #dc2626; }

.docs-path {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--navy);
  word-break: break-all;
}

.docs-path-copy {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 0.55rem;
  padding: 0.28rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
}

.docs-path-copy:hover {
  color: var(--navy);
  border-color: rgba(37, 99, 235, 0.35);
}

.docs-table-wrap {
  overflow-x: auto;
  margin: 0.85rem 0 1.25rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
}

.docs-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.docs-table th,
.docs-table td {
  padding: 0.7rem 0.85rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
}

.docs-table th {
  background: #f8fafc;
  color: #475569;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.docs-table tr:last-child td {
  border-bottom: 0;
}

.docs-table code {
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  color: var(--navy);
  background: #f1f5f9;
  padding: 0.1rem 0.35rem;
  border-radius: 0.35rem;
}

.docs-table .docs-method {
  min-width: 58px;
  font-size: 0.68rem;
}

.docs-req {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.docs-req-yes { color: #dc2626; }
.docs-req-no { color: #64748b; }

.docs-http {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
}

.docs-http-2 { background: #dcfce7; color: #166534; }
.docs-http-4 { background: #fee2e2; color: #991b1b; }
.docs-http-5 { background: #ffedd5; color: #9a3412; }

.docs-code {
  margin: 0.85rem 0 1.25rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #07111f;
  overflow: hidden;
}

.docs-code .code-toolbar {
  padding: 0.7rem 0.9rem;
}

.docs-code pre {
  margin: 0;
  padding: 1rem 1.1rem 1.15rem;
  overflow-x: auto;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.84rem;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre;
}

.docs-steps {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}

.docs-steps li {
  display: grid;
  grid-template-columns: 2rem 1fr;
  gap: 0.75rem;
  align-items: start;
  margin: 0;
}

.docs-step-num {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(37, 99, 235, 0.1);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
}

.docs-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.docs-pager a {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  min-width: min(100%, 220px);
  color: inherit;
  font-weight: 500;
}

.docs-pager a:hover {
  border-color: rgba(37, 99, 235, 0.35);
  text-decoration: none;
  background: #f8fafc;
}

.docs-pager small {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.docs-pager strong {
  color: var(--navy);
}

.docs-pager-next {
  margin-left: auto;
  text-align: right;
}

@media (min-width: 900px) {
  .docs-layout {
    grid-template-columns: 250px minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
  }

  .docs-nav-toggle {
    display: none;
  }

  .docs-nav {
    display: block;
  }

  .docs-sidebar {
    position: sticky;
    top: calc(var(--header-h) + 16px);
    max-height: calc(100vh - var(--header-h) - 32px);
    overflow: auto;
  }

  .docs-content {
    padding: 2rem 2.1rem 2.75rem;
  }

  .docs-grid-cards {
    grid-template-columns: repeat(2, 1fr);
  }

  .docs-overlay {
    display: none !important;
  }
}

@media (min-width: 1100px) {
  .docs-grid-cards {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 899px) {
  .docs-sidebar.is-open {
    position: relative;
    z-index: 90;
  }
}
