/* Public documentation (docs.notemfiscal.com.br). Uses the notem tokens from src/styles.css; every rule is scoped to .docs-*. */
.docs-body { font-size: 15px; line-height: 1.65; --docs-top: 60px; --docs-code-bg: oklch(0.13 0.02 267); --docs-code-fg: oklch(0.93 0.01 260); --docs-get: var(--cyan); --docs-post: var(--primary); --docs-put: var(--warning); --docs-patch: var(--warning); --docs-delete: var(--destructive); }
:root[data-theme="light"] .docs-body { --docs-code-bg: oklch(0.2 0.025 267); }
.docs-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--primary); color: var(--primary-foreground); padding: 8px 14px; border-radius: 6px; }
.docs-skip:focus { left: 12px; }
.docs-body a { color: inherit; }
.docs-body :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

/* Top bar */
.docs-top { position: sticky; top: 0; z-index: 40; height: var(--docs-top); display: flex; align-items: center; gap: 14px; padding: 0 20px; background: color-mix(in oklch, var(--background) 92%, transparent); backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.docs-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; flex-shrink: 0; }
.docs-brand img { height: 22px; width: auto; }
.docs-logo-light { display: none; }
:root[data-theme="light"] .docs-logo-dark { display: none; }
:root[data-theme="light"] .docs-logo-light { display: block; }
.docs-brand-label { font-size: 13px; color: var(--muted-foreground); border-left: 1px solid var(--border); padding-left: 10px; }
.docs-search-btn { margin-left: 16px; display: flex; align-items: center; gap: 8px; height: 36px; width: min(340px, 40vw); padding: 0 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--secondary); color: var(--muted-foreground); font: inherit; font-size: 13px; cursor: pointer; }
.docs-search-btn:hover { color: var(--foreground); }
.docs-search-btn kbd { margin-left: auto; font: 11px/1 ui-monospace, monospace; border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px; }
.docs-top-links { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.docs-top-link { font-size: 13px; font-weight: 600; text-decoration: none; padding: 7px 12px; border-radius: 6px; border: 1px solid var(--border); }
.docs-top-link:hover { background: var(--accent); }
.docs-icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--foreground); cursor: pointer; }
.docs-icon-btn:hover { background: var(--accent); }
.docs-icon-sun { display: none; }
:root[data-theme="light"] .docs-icon-sun { display: block; }
:root[data-theme="light"] .docs-icon-moon { display: none; }
.docs-menu-btn { display: none; }

/* Shell */
.docs-shell { display: flex; align-items: flex-start; }
.docs-nav { position: sticky; top: var(--docs-top); width: 272px; flex-shrink: 0; height: calc(100svh - var(--docs-top)); overflow-y: auto; padding: 22px 14px 40px 20px; border-right: 1px solid var(--border); background: var(--background); }
.docs-nav-section { margin-bottom: 22px; }
.docs-nav-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); margin: 0 0 6px 10px; }
.docs-nav-link { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 6px; font-size: 13.5px; line-height: 1.35; text-decoration: none; color: var(--muted-foreground); }
.docs-nav-link:hover { background: var(--accent); color: var(--foreground); }
.docs-nav-link[aria-current="page"] { background: color-mix(in oklch, var(--primary) 16%, transparent); color: var(--foreground); font-weight: 600; box-shadow: inset 2px 0 0 var(--primary); }
.docs-nav-group summary { cursor: pointer; list-style: none; padding: 6px 10px; font-size: 13.5px; font-weight: 600; border-radius: 6px; display: flex; align-items: center; justify-content: space-between; }
.docs-nav-group summary::-webkit-details-marker { display: none; }
.docs-nav-group summary::after { content: "›"; color: var(--muted-foreground); transition: transform .15s; }
.docs-nav-group[open] summary::after { transform: rotate(90deg); }
.docs-nav-group summary:hover { background: var(--accent); }
.docs-nav-group .docs-nav-link { padding-left: 16px; }
.docs-backdrop { display: none; }

.docs-main { flex: 1; min-width: 0; display: flex; gap: 48px; padding: 36px 40px 80px; justify-content: center; }
.docs-article { width: 100%; max-width: 780px; min-width: 0; }
.docs-main-ref .docs-article { max-width: 700px; }
.docs-eyebrow { font-size: 12px; font-weight: 600; color: var(--primary); margin: 0 0 8px; letter-spacing: .02em; }
:root[data-theme="light"] .docs-eyebrow { color: oklch(0.5 0.15 135); }
.docs-article h1 { font-size: 32px; line-height: 1.2; font-weight: 700; margin: 0 0 18px; letter-spacing: -.01em; }

/* Content */
.docs-content > :first-child { margin-top: 0; }
.docs-content h2 { font-size: 22px; font-weight: 700; margin: 44px 0 12px; padding-top: 8px; scroll-margin-top: 80px; line-height: 1.3; }
.docs-content h3 { font-size: 17px; font-weight: 650; margin: 28px 0 10px; scroll-margin-top: 80px; }
.docs-content h4 { font-size: 15px; margin: 22px 0 8px; }
.docs-content p, .docs-content ul, .docs-content ol { margin: 0 0 14px; }
.docs-content ul, .docs-content ol { padding-left: 22px; }
.docs-content li { margin: 4px 0; }
.docs-content li > ul { margin: 4px 0; }
.docs-content a { color: var(--foreground); text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 2px; }
.docs-content a:hover { color: var(--primary); }
:root[data-theme="light"] .docs-content a:hover { color: oklch(0.45 0.15 135); }
.docs-content strong { font-weight: 650; }
.docs-content :not(pre) > code { font: 0.86em/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--secondary); border: 1px solid var(--border); padding: 1px 5px; border-radius: 4px; overflow-wrap: anywhere; }
.docs-anchor { float: left; margin-left: -20px; width: 20px; color: var(--muted-foreground); text-decoration: none !important; opacity: 0; font-weight: 400; }
.docs-content h2:hover .docs-anchor, .docs-content h3:hover .docs-anchor { opacity: 1; }
.docs-content input[type="checkbox"] { margin-right: 8px; accent-color: var(--primary); }
.docs-content li:has(> input[type="checkbox"]) { list-style: none; margin-left: -22px; }

.docs-table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--border); border-radius: 8px; }
.docs-table table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.docs-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted-foreground); background: var(--card); padding: 10px 14px; white-space: nowrap; }
.docs-table td { padding: 10px 14px; border-top: 1px solid var(--border); vertical-align: top; }
.docs-fields { margin: 0 0 18px; border: 1px solid var(--border); border-radius: 8px; }
.docs-field { padding: 11px 14px; }
.docs-field + .docs-field { border-top: 1px solid var(--border); }
.docs-field-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; }
.docs-field-head code { font-weight: 600; }
.docs-field-meta { font-size: 12.5px; color: var(--muted-foreground); }
.docs-field-req { color: var(--warning-foreground, var(--foreground)); font-weight: 600; }
.docs-field-desc { margin-top: 4px; font-size: 13.5px; color: var(--foreground); }
.docs-field-desc p { margin: 0; }
.docs-table tr[hidden] { display: none; }
.docs-filter { display: flex; align-items: center; gap: 10px; margin: 6px 0 14px; }
.docs-filter label { font-size: 13px; color: var(--muted-foreground); }
.docs-filter input { flex: 1; max-width: 380px; height: 38px; padding: 0 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--background); color: var(--foreground); font: inherit; font-size: 14px; }

.docs-callout { margin: 18px 0; padding: 14px 16px; border-radius: 8px; border: 1px solid var(--border); border-left: 3px solid var(--cyan); background: color-mix(in oklch, var(--cyan) 7%, var(--background)); }
.docs-callout p { margin: 0 0 8px; } .docs-callout p:last-child { margin: 0; }
.docs-callout-title { font-weight: 700; font-size: 13px; }
.docs-callout[data-kind="atencao"] { border-left-color: var(--warning); background: var(--warning-surface); }
.docs-callout[data-kind="importante"] { border-left-color: var(--primary); background: color-mix(in oklch, var(--primary) 8%, var(--background)); }

.docs-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 22px 0 28px; }
.docs-card { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px 18px; border: 1px solid var(--border); border-radius: 10px; background: var(--card); text-decoration: none !important; color: var(--foreground); font: inherit; cursor: pointer; transition: border-color .15s, transform .15s; }
.docs-card:hover { border-color: var(--primary); transform: translateY(-1px); }
.docs-card strong { font-size: 15px; }
.docs-card span { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }

.docs-flow { display: flex; flex-direction: column; gap: 10px; margin: 18px 0 24px; padding: 18px; border: 1px dashed var(--border); border-radius: 10px; overflow-x: auto; }
.docs-flow-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.docs-flow-box { padding: 7px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--card); font-size: 13px; font-weight: 600; white-space: nowrap; }
.docs-flow-arrow { color: var(--primary); font-weight: 700; }
:root[data-theme="light"] .docs-flow-arrow { color: oklch(0.5 0.15 135); }

/* Code */
.docs-code { margin: 0 0 18px; border-radius: 10px; overflow: hidden; background: var(--docs-code-bg); border: 1px solid var(--border); }
.docs-code-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 8px 6px 14px; font-size: 12px; color: oklch(0.75 0.02 260); border-bottom: 1px solid oklch(1 0 0 / 8%); }
.docs-copy { font: inherit; font-size: 12px; color: oklch(0.85 0.02 260); background: transparent; border: 1px solid oklch(1 0 0 / 14%); border-radius: 5px; padding: 3px 9px; cursor: pointer; }
.docs-copy:hover { background: oklch(1 0 0 / 8%); }
.docs-code pre { margin: 0; padding: 14px 16px; overflow-x: auto; font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; color: var(--docs-code-fg); }
/* Long lines wrap (indentation kept) so nothing is cut off in either column or on phones; the visible scrollbar is only a fallback for unbreakable runs. */
.docs-code pre { white-space: pre-wrap; overflow-wrap: break-word; scrollbar-width: thin; scrollbar-color: oklch(0.62 0.02 260 / 75%) oklch(1 0 0 / 6%); }
.docs-code pre code { white-space: inherit; }
.docs-code pre::-webkit-scrollbar { height: 10px; width: 10px; }
.docs-code pre::-webkit-scrollbar-track { background: oklch(1 0 0 / 6%); }
.docs-code pre::-webkit-scrollbar-thumb { background: oklch(0.62 0.02 260 / 70%); border-radius: 6px; border: 2px solid var(--docs-code-bg); }
.docs-code pre:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }
.docs-code, .docs-tabs, .docs-tabpanel { min-width: 0; max-width: 100%; }
.docs-tabs { margin: 0 0 18px; }
.docs-tabs .docs-code { margin: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.docs-tablist { display: flex; gap: 2px; }
.docs-tab { font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 14px; border: 1px solid var(--border); border-bottom: 0; border-radius: 8px 8px 0 0; background: var(--secondary); color: var(--muted-foreground); cursor: pointer; }
.docs-tab[aria-selected="true"] { background: var(--docs-code-bg); color: oklch(0.97 0 0); }
.docs-tabpanel[hidden] { display: none; }
.hljs-keyword, .hljs-built_in, .hljs-literal { color: oklch(0.78 0.14 300); }
.hljs-string, .hljs-attr + .hljs-string { color: oklch(0.85 0.17 130); }
.hljs-number { color: oklch(0.8 0.13 60); }
.hljs-attr, .hljs-name, .hljs-attribute { color: oklch(0.8 0.11 210); }
.hljs-comment { color: oklch(0.6 0.02 260); font-style: italic; }
.hljs-variable, .hljs-template-variable, .hljs-subst { color: oklch(0.85 0.1 30); }
.hljs-title, .hljs-title.function_ { color: oklch(0.82 0.12 250); }
.hljs-meta, .hljs-tag { color: oklch(0.72 0.05 260); }

/* Reference */
.docs-endpoint { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 18px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--card); }
.docs-endpoint code { font: 14px ui-monospace, monospace; overflow-wrap: anywhere; }
.docs-method { display: inline-block; min-width: 52px; text-align: center; font: 700 11px/1 ui-monospace, monospace; padding: 5px 7px; border-radius: 5px; color: var(--primary-foreground); background: var(--docs-get); }
.docs-method[data-method="post"] { background: var(--docs-post); }
.docs-method[data-method="put"], .docs-method[data-method="patch"] { background: var(--docs-put); }
.docs-method[data-method="delete"] { background: var(--docs-delete); color: var(--on-status); }
.docs-method-sm { min-width: 38px; font-size: 9.5px; padding: 3px 4px; flex-shrink: 0; }
.docs-status { display: inline-block; font: 700 12px/1 ui-monospace, monospace; padding: 4px 7px; border-radius: 5px; margin-right: 6px; background: var(--secondary); }
.docs-status[data-status="2"] { color: var(--success); }
.docs-status[data-status="4"] { color: var(--warning-foreground); }
.docs-status[data-status="5"] { color: var(--destructive); }
.docs-details { margin: 0 0 16px; }
.docs-details summary { cursor: pointer; font-size: 13.5px; font-weight: 600; margin-bottom: 10px; }
.docs-examples { position: sticky; top: calc(var(--docs-top) + 20px); width: 460px; flex-shrink: 0; max-height: calc(100svh - var(--docs-top) - 40px); overflow-y: auto; }
.docs-examples .docs-code pre { max-height: 460px; }
.docs-aside-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); margin: 0 0 8px; }
.docs-example-title { font-size: 12px; color: var(--muted-foreground); margin: 0; padding: 8px 14px; background: var(--docs-code-bg); border: 1px solid var(--border); border-bottom: 0; }
.docs-examples .docs-tabpanel .docs-code { border-top-left-radius: 0; border-top-right-radius: 0; }
.docs-examples .docs-tablist { flex-wrap: wrap; }

/* "Nesta página" */
.docs-toc { position: sticky; top: calc(var(--docs-top) + 28px); width: 220px; flex-shrink: 0; max-height: calc(100svh - var(--docs-top) - 60px); overflow-y: auto; font-size: 13px; }
.docs-toc-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-foreground); margin: 0 0 10px; }
.docs-toc-link { display: block; padding: 4px 0 4px 12px; border-left: 1px solid var(--border); color: var(--muted-foreground); text-decoration: none; line-height: 1.4; }
.docs-toc-link[data-level="3"] { padding-left: 24px; }
.docs-toc-link:hover, .docs-toc-link[data-active="true"] { color: var(--foreground); border-left-color: var(--primary); }

/* Pager and footer */
.docs-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 48px 0 18px; }
.docs-pager a { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; text-decoration: none; }
.docs-pager a:hover { border-color: var(--primary); }
.docs-pager small { font-size: 12px; color: var(--muted-foreground); }
.docs-pager span { font-weight: 600; }
.docs-pager-next { text-align: right; grid-column: 2; }
.docs-foot { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 12.5px; color: var(--muted-foreground); }
.docs-foot a { text-decoration: underline; text-underline-offset: 3px; }

/* Search */
.docs-search { position: fixed; inset: 0; z-index: 60; background: oklch(0.1 0.02 264 / 55%); display: flex; justify-content: center; align-items: flex-start; padding: 10vh 16px 16px; }
.docs-search[hidden] { display: none; }
.docs-search-box { width: 100%; max-width: 640px; background: var(--background); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--glass-shadow); overflow: hidden; }
.docs-search-field { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--border); color: var(--muted-foreground); }
.docs-search-field input { flex: 1; height: 52px; border: 0; outline: 0; background: transparent; color: var(--foreground); font: inherit; font-size: 16px; }
.docs-search-close { font: 11px ui-monospace, monospace; border: 1px solid var(--border); border-radius: 4px; padding: 3px 6px; background: transparent; color: var(--muted-foreground); cursor: pointer; }
.docs-search-results { list-style: none; margin: 0; padding: 6px; max-height: 60vh; overflow-y: auto; }
.docs-search-results a { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 8px; text-decoration: none; }
.docs-search-results li[aria-selected="true"] a, .docs-search-results a:hover { background: var(--accent); }
.docs-search-results strong { font-size: 14px; }
.docs-search-results small { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.45; }
.docs-search-sec { font-size: 11px; color: var(--muted-foreground); text-transform: uppercase; letter-spacing: .05em; }
.docs-search-empty { margin: 0; padding: 22px; text-align: center; color: var(--muted-foreground); }
.docs-search-active { overflow: hidden; }

.docs-notfound h1 { font-size: 36px; }

@media (max-width: 1280px) { .docs-toc { display: none; } .docs-examples { width: 400px; } .docs-main { gap: 32px; } }
@media (max-width: 1100px) {
  .docs-main-ref { flex-direction: column; align-items: stretch; }
  .docs-main-ref .docs-article { max-width: 780px; margin: 0 auto; }
  .docs-examples { position: static; width: 100%; max-width: 780px; margin: 0 auto; max-height: none; overflow: visible; }
}
@media (max-width: 900px) {
  .docs-menu-btn { display: inline-flex; }
  .docs-nav { position: fixed; z-index: 50; top: var(--docs-top); left: 0; transform: translateX(-100%); transition: transform .2s; width: min(300px, 86vw); box-shadow: var(--glass-shadow); }
  .docs-nav-open .docs-nav { transform: none; }
  .docs-nav-open .docs-backdrop { display: block; position: fixed; inset: var(--docs-top) 0 0 0; z-index: 45; background: oklch(0.1 0.02 264 / 45%); }
  .docs-main { padding: 26px 18px 64px; }
  .docs-search-btn { width: auto; flex: 1; margin-left: 4px; }
  .docs-brand-label { display: none; }
}
@media (max-width: 560px) {
  .docs-top { padding: 0 10px; gap: 6px; }
  .docs-search-btn span, .docs-search-btn kbd { display: none; }
  .docs-search-btn { flex: 0 0 36px; width: 36px; justify-content: center; padding: 0; }
  .docs-top-link { padding: 6px 10px; }
  .docs-article h1 { font-size: 26px; }
  .docs-content h2 { font-size: 20px; }
  .docs-pager { grid-template-columns: 1fr; }
  .docs-pager-next { grid-column: 1; }
  .docs-anchor { display: none; }
  .docs-code pre { font-size: 12.5px; padding: 12px 13px; }
}
@media (prefers-reduced-motion: reduce) { .docs-nav, .docs-card, .docs-nav-group summary::after { transition: none; } }
.docs-content ul { list-style: disc; } .docs-content ol { list-style: decimal; } .docs-content li::marker { color: var(--muted-foreground); }
.docs-endpoint code { background: none !important; border: 0 !important; padding: 0 !important; }
.docs-tabs .docs-code-head span { visibility: hidden; }
.docs-content .docs-lead { font-size: 17px; color: var(--muted-foreground); margin: -6px 0 18px; }
