/* ap-doc: o conteúdo vem do Markdown renderizado no servidor; aqui só a apresentação (Tabler por baixo). */
:root { --doc-sidebar-w: 17.5rem; --doc-top-h: 3.5rem; }

/* Cabeçalho */
.doc-topbar { position: sticky; top: 0; z-index: 1030; min-height: var(--doc-top-h);
	background: var(--tblr-bg-surface); border-bottom: 1px solid var(--tblr-border-color); }
.doc-brand { display: flex; align-items: baseline; gap: .4rem; margin-right: 0; }
.doc-brand-mark { font-weight: 700; color: var(--tblr-primary); letter-spacing: -.01em; }
.doc-brand-name { font-weight: 500; color: var(--tblr-secondary); }
.doc-search { max-width: 34rem; }
.doc-avatar { background: var(--tblr-primary-lt); color: var(--tblr-primary); font-weight: 600; }

/* Disposição: menu lateral fixo + conteúdo */
.doc-layout { display: flex; align-items: flex-start; }
.doc-sidebar { width: var(--doc-sidebar-w); flex: 0 0 var(--doc-sidebar-w); position: sticky; top: var(--doc-top-h);
	height: calc(100vh - var(--doc-top-h)); overflow-y: auto; border-right: 1px solid var(--tblr-border-color);
	background: var(--tblr-bg-surface); }
.doc-sidebar-inner { padding: .75rem 0 2rem; }
.doc-main { flex: 1 1 auto; min-width: 0; }
@media (max-width: 767.98px) {
	.doc-layout { display: block; }
	.doc-sidebar { position: static; width: 100%; height: auto; max-height: 70vh; border-right: 0;
		border-bottom: 1px solid var(--tblr-border-color); }
	.doc-search { order: 3; width: 100%; max-width: none; margin-top: .5rem; }
}

/* Árvore */
.doc-tree, .doc-tree ul { list-style: none; margin: 0; padding: 0; }
.doc-tree ul { padding-left: .85rem; border-left: 1px solid var(--tblr-border-color); margin-left: 1.05rem; }
.doc-tree li.collapsed > ul { display: none; }
.doc-node { display: flex; align-items: center; gap: .15rem; padding: 0 .5rem 0 .4rem; }
.doc-node a { flex: 1 1 auto; min-width: 0; padding: .28rem .45rem; border-radius: 4px; color: var(--tblr-body-color);
	text-decoration: none; font-size: .875rem; line-height: 1.3; overflow-wrap: anywhere; }
.doc-node a:hover { background: var(--tblr-bg-surface-secondary); }
.doc-node a.active { background: var(--tblr-primary-lt); color: var(--tblr-primary); font-weight: 600; }
.doc-node .doc-dirlabel { flex: 1 1 auto; padding: .28rem .45rem; font-size: .875rem; font-weight: 600;
	color: var(--tblr-body-color); cursor: pointer; }
.doc-node.is-dir > a { font-weight: 600; }
.doc-toggle { border: 0; background: transparent; width: 1.3rem; height: 1.3rem; padding: 0; color: var(--tblr-secondary);
	flex: 0 0 auto; line-height: 1; border-radius: 3px; }
.doc-toggle:hover { background: var(--tblr-bg-surface-secondary); }
.doc-toggle::before { content: "▾"; display: inline-block; transition: transform .1s; }
li.collapsed > .doc-node .doc-toggle::before { transform: rotate(-90deg); }
.doc-toggle-spacer { width: 1.3rem; flex: 0 0 auto; }

/* Título e origem */
.doc-title { font-size: 1.6rem; line-height: 1.25; }
.doc-source code { font-size: .8rem; background: var(--tblr-bg-surface-secondary); padding: .15rem .4rem;
	border-radius: 4px; overflow-wrap: anywhere; }

/* Conteúdo */
.doc-content { line-height: 1.65; font-size: .95rem; overflow-wrap: break-word; }
.doc-content > :first-child { margin-top: 0; }
.doc-content h1, .doc-content h2, .doc-content h3, .doc-content h4, .doc-content h5, .doc-content h6 {
	position: relative; scroll-margin-top: calc(var(--doc-top-h) + .75rem); }
.doc-content h1 { font-size: 1.5rem; margin: 0 0 1rem; }
.doc-content h2 { font-size: 1.25rem; margin-top: 2rem; padding-bottom: .3rem; border-bottom: 1px solid var(--tblr-border-color); }
.doc-content h3 { font-size: 1.08rem; margin-top: 1.6rem; }
.doc-content h4, .doc-content h5, .doc-content h6 { font-size: 1rem; margin-top: 1.25rem; }
.doc-content .doc-anchor { margin-left: .4rem; color: var(--tblr-secondary); opacity: 0; text-decoration: none;
	font-weight: 400; }
.doc-content :is(h1, h2, h3, h4, h5, h6):hover .doc-anchor, .doc-content .doc-anchor:focus { opacity: .8; }
.doc-content .doc-target { background: var(--tblr-yellow-lt); border-radius: 4px; }
.doc-sec-tools { float: right; display: none; gap: .25rem; }
.doc-content :is(h2, h3, h4):hover > .doc-sec-tools, .doc-sec-tools:focus-within { display: inline-flex; }
.doc-sec-tools .btn { padding: .05rem .4rem; font-size: .7rem; font-weight: 400; }
.doc-content pre.doc-code { background: var(--tblr-bg-surface-secondary); color: var(--tblr-body-color);
	padding: .75rem 1rem; border-radius: 6px; overflow-x: auto; font-size: .82rem; line-height: 1.5; }
.doc-content pre.doc-code code { color: inherit; background: transparent; padding: 0; font-size: inherit; }
.doc-content code { font-size: .85em; }
.doc-content pre.mermaid { background: transparent; text-align: center; overflow-x: auto; margin: 1rem 0; }
.doc-content pre.mermaid:not([data-processed]) { color: var(--tblr-secondary); font-size: .8rem; text-align: left; }
.doc-content pre.mermaid svg { max-width: 100%; height: auto; }
.doc-content .doc-table { font-size: .875rem; margin-bottom: 1rem; }
.doc-content .table-responsive { margin-bottom: 1rem; }
.doc-content blockquote.doc-quote { border-left: 3px solid var(--tblr-border-color); padding: .1rem 0 .1rem .9rem;
	color: var(--tblr-secondary); margin: 1rem 0; }
.doc-content blockquote.doc-note { border: 0; padding: .75rem 1rem; color: var(--tblr-body-color); }
.doc-content blockquote.doc-note > :last-child { margin-bottom: 0; }
.doc-note-title { font-weight: 600; margin-bottom: .25rem; }
.doc-content img.doc-img { max-width: 100%; height: auto; border-radius: 4px; }
.doc-content li.doc-task { list-style: none; margin-left: -1.25rem; }
.doc-content li.doc-task input { margin-right: .4rem; vertical-align: middle; }
.doc-content hr { margin: 2rem 0; }
.doc-broken { text-decoration: underline wavy var(--tblr-red); text-underline-offset: 3px; cursor: help; }

/* Índice da página */
.doc-toc-wrap { position: sticky; top: calc(var(--doc-top-h) + 1rem); max-height: calc(100vh - var(--doc-top-h) - 2rem);
	overflow-y: auto; }
.doc-toc li { margin: .15rem 0; font-size: .82rem; line-height: 1.35; }
.doc-toc li.lvl-3 { padding-left: .8rem; }
.doc-toc li.lvl-4, .doc-toc li.lvl-5, .doc-toc li.lvl-6 { padding-left: 1.6rem; }
.doc-toc a { color: var(--tblr-secondary); text-decoration: none; }
.doc-toc a:hover, .doc-toc a.active { color: var(--tblr-primary); }

/* Busca e listas */
.doc-search-hit { padding: .75rem 0; border-bottom: 1px solid var(--tblr-border-color); }
.doc-search-hit:last-child { border-bottom: 0; }
.doc-snippet { font-size: .875rem; color: var(--tblr-secondary); }
.doc-snippet mark { padding: 0 .1rem; background: var(--tblr-yellow-lt); color: var(--tblr-body-color); }

/* Login */
.doc-login-error:empty { display: none; }

@media print {
	.doc-sidebar, .doc-topbar, .doc-toc-wrap, .doc-source .btn-list, .doc-sec-tools { display: none !important; }
	.doc-content { font-size: 11pt; }
}
