/* Documentação de integração da API — CSS próprio, sem build, sem script. Tema claro/escuro automático. */
:root {
  --bg: #f4f5f7; --surface: #ffffff; --surface-2: #f6f8fa; --border: #e3e6eb; --text: #1b2330; --muted: #657084;
  --accent: #1f5fd6; --accent-soft: #e8f0fd; --code-bg: #f1f3f6; --pre-bg: #0f1726; --pre-text: #e6eaf2; --quote: #94600a; --quote-bg: #fdf1d8;
  --side: #121a2b; --side-text: #b8c2d6; --side-active: #ffffff; --side-active-bg: #22304d;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e131d; --surface: #141b29; --surface-2: #1a2233; --border: #2a3448; --text: #e6eaf2; --muted: #93a0b8;
    --accent: #7aa7ff; --accent-soft: #1b2a47; --code-bg: #212b3f; --pre-bg: #0a0f19; --pre-text: #e6eaf2; --quote: #f0b955; --quote-bg: #33270d;
    --side: #0a0f19; --side-active-bg: #1a2640;
  }
}
* { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; scroll-padding-top: 1rem; }
body { margin: 0; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }

.shell { display: flex; min-height: 100vh; }
.side { width: 260px; background: var(--side); color: var(--side-text); padding: 1.2rem .8rem; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
.brand { display: block; color: #fff; font-weight: 700; font-size: 1.1rem; padding: .2rem .7rem 1rem; } .brand:hover { text-decoration: none; }
.brand small { display: block; font-weight: 400; color: var(--side-text); font-size: .78rem; }
.side nav a { display: block; padding: .45rem .7rem; border-radius: 8px; color: var(--side-text); margin-bottom: 2px; font-size: .93rem; line-height: 1.35; }
.side nav a:hover { background: var(--side-active-bg); color: #fff; text-decoration: none; }
.side nav a.on { background: var(--side-active-bg); color: var(--side-active); font-weight: 600; }
.tools { margin-top: auto; padding: 1rem .7rem 0; font-size: .82rem; border-top: 1px solid var(--side-active-bg); }
.tools a { display: block; color: var(--side-text); padding: .15rem 0; } .tools a:hover { color: #fff; }

.main { flex: 1; min-width: 0; display: flex; align-items: flex-start; justify-content: center; gap: 2rem; padding: 2rem 1.6rem 4rem; }
.doc { flex: 1; min-width: 0; max-width: 860px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.6rem 2rem 2rem; }
.toc { width: 210px; flex-shrink: 0; position: sticky; top: 1.5rem; max-height: calc(100vh - 3rem); overflow-y: auto; font-size: .84rem; border-left: 2px solid var(--border); padding-left: .9rem; }
.toc strong { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: .4rem; }
.toc a { display: block; color: var(--muted); padding: .18rem 0; line-height: 1.35; } .toc a:hover { color: var(--accent); }

/* Texto da documentação */
.doc h1 { font-size: 1.9rem; line-height: 1.2; margin: 0 0 1rem; }
.doc h2 { font-size: 1.4rem; margin: 2.2rem 0 .8rem; padding-top: 1.2rem; border-top: 1px solid var(--border); line-height: 1.25; }
.doc h3 { font-size: 1.12rem; margin: 1.7rem 0 .6rem; }
.doc h1 + h2, .doc h1 + p + h2 { margin-top: 1.4rem; }
.doc .anchor { margin-left: .4rem; opacity: 0; font-weight: 400; } .doc :is(h2, h3):hover .anchor, .doc .anchor:focus { opacity: .6; }
.doc p, .doc li { overflow-wrap: anywhere; } .doc li { margin: .2rem 0; }
.doc ul, .doc ol { padding-left: 1.4rem; }
.doc code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .86em; background: var(--code-bg); padding: .12em .38em; border-radius: 5px; }
.doc pre { background: var(--pre-bg); color: var(--pre-text); border-radius: 10px; padding: 1rem 1.1rem; overflow-x: auto; line-height: 1.5; margin: 1rem 0; }
.doc pre code { background: none; padding: 0; font-size: .84rem; color: inherit; border-radius: 0; }
.doc blockquote { margin: 1.1rem 0; padding: .7rem 1rem; background: var(--quote-bg); color: var(--quote); border-radius: 8px; border-left: 4px solid var(--quote); }
.doc blockquote p { margin: .2rem 0; }
.doc table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1rem 0; font-size: .92rem; }
.doc th, .doc td { border: 1px solid var(--border); padding: .45rem .7rem; text-align: left; vertical-align: top; }
.doc th { background: var(--surface-2); white-space: nowrap; }
.doc td code { white-space: nowrap; }
.doc hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.doc input[type=checkbox] { margin-right: .4rem; }
.doc ul:has(> li > input[type=checkbox]) { list-style: none; padding-left: .2rem; }

.pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.2rem; border-top: 1px solid var(--border); }
.pager a { display: block; border: 1px solid var(--border); border-radius: 10px; padding: .6rem .9rem; max-width: 48%; font-weight: 600; } .pager a:hover { background: var(--accent-soft); text-decoration: none; }
.pager small { display: block; color: var(--muted); font-weight: 400; font-size: .75rem; } .pager .next { margin-left: auto; text-align: right; }

@media (max-width: 1180px) { .toc { display: none; } }
@media (max-width: 860px) {
  .shell { display: block; }
  .side { position: static; width: auto; height: auto; padding: .8rem; }
  .side nav { display: flex; flex-wrap: nowrap; gap: 2px; overflow-x: auto; padding-bottom: .3rem; }
  .side nav a { white-space: nowrap; flex-shrink: 0; }
  .brand { padding-bottom: .6rem; }
  .tools { display: flex; flex-wrap: wrap; gap: .3rem 1rem; margin-top: .4rem; padding: .5rem .3rem 0; }
  .main { padding: 1rem .6rem 3rem; }
  .doc { padding: 1.1rem 1rem 1.5rem; border-radius: 10px; }
  .doc h1 { font-size: 1.5rem; }
}
@media print { .side, .toc, .pager { display: none; } .main { padding: 0; } .doc { border: 0; max-width: none; } .doc pre { white-space: pre-wrap; } }
