/* Tema do painel Fluxo: escuro suave, fonte compacta para aproveitar a tela */

[data-bs-theme="dark"] {
    --bs-body-bg: #2b3036;
    --bs-body-color: #d5d9de;
    --bs-secondary-bg: #343a41;
    --bs-tertiary-bg: #30363c;
    --bs-border-color: #444c55;
    --bs-body-font-size: .875rem;
}

body { min-height: 100vh; }

/* barra superior */
.topo { background: #24292e; border-bottom: 1px solid var(--bs-border-color); min-height: 48px; }
.topo .navbar-brand { font-size: 1rem; color: var(--bs-body-color); }

/* menu lateral */
.menu-lateral { background: #262b30; border-right: 1px solid var(--bs-border-color); }
@media (min-width: 992px) {
    .menu-lateral { width: 210px; min-height: calc(100vh - 48px); flex-shrink: 0; }
}
.menu-lateral .nav-link { color: var(--bs-body-color); padding: .35rem .75rem; border-radius: .25rem; }
.menu-lateral .nav-link:hover { background: var(--bs-secondary-bg); }
.menu-lateral .nav-link.active { background: #3d6fa3; color: #fff; }

/* seta do submenu: aponta para baixo quando aberto */
.submenu-toggle::after { content: '▾'; float: right; transition: transform .15s; }
.submenu-toggle.collapsed::after { transform: rotate(-90deg); }

/* conteúdo */
.conteudo { min-width: 0; }
.conteudo h1 { font-size: 1.15rem; margin-bottom: .75rem; }
.card { background: var(--bs-tertiary-bg); }
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .4rem .6rem; }
.form-label { margin-bottom: .2rem; }

/* login */
.login-caixa { max-width: 320px; }

/* fluxos: editor JSON e quadro de ajuda */
.editor-json { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: .8rem; line-height: 1.45; tab-size: 4; white-space: pre; min-height: 60vh; }
.ajuda-fluxo { font-size: .8rem; }
.ajuda-fluxo code { font-size: .78rem; }

/* fluxos: árvore do desenho (lib/fluxo-arvore.php) dentro do card escuro */
.arvore-painel .fluxo-arvore { --fundo: var(--bs-tertiary-bg); --linha: #6b7785; color: var(--bs-body-color); }
.arvore-painel .fluxo-arvore .chip { background: #1f2428; }
.legenda-fluxo span[class] { display: inline-block; padding: 0 .5rem; border-radius: .25rem; border: 1px solid; margin-right: .25rem; }
.legenda-fluxo .inicial  { background: #d1fae5; border-color: #059669; color: #064e3b; }
.legenda-fluxo .menu     { background: #dbeafe; border-color: #2563eb; color: #1e3a8a; }
.legenda-fluxo .pergunta { background: #ede9fe; border-color: #7c3aed; color: #4c1d95; }
.legenda-fluxo .desvio   { background: #e2e8f0; border-color: #475569; color: #1e293b; border-style: dashed !important; }
.legenda-fluxo .final    { background: #fef3c7; border-color: #d97706; color: #78350f; }
.legenda-fluxo .atalho   { background: #f1f5f9; border-color: #94a3b8; color: #334155; border-style: dashed !important; }
.legenda-fluxo .erro     { background: #fee2e2; border-color: #dc2626; color: #7f1d1d; }
