/* Cores da marca (capa da especificação) */
:root {
  --allmini-vermelho: #C10018;
  --allmini-vermelho-escuro: #9A0013;
  --allmini-vermelho-rgb: 193, 0, 24;
  --allmini-amarelo: #FFEB33;
  --allmini-preto: #111111;
  --allmini-branco: #FFFFFF;
  --bs-link-color: var(--allmini-vermelho);
  --bs-link-hover-color: var(--allmini-vermelho-escuro);
}

body { background: #F7F7F7; color: var(--allmini-preto); }

.barra-marca { background: var(--allmini-vermelho); border-bottom: 4px solid var(--allmini-amarelo); }
.barra-unidade { background: var(--allmini-branco); border-bottom: 1px solid #dee2e6; padding: .35rem 0; }
.barra-unidade .btn { max-width: 100%; }

/* Espaço do logo no topo (docs/marcas.md 4): tamanho fixo, sem margem, e a imagem corta para preencher (o logo aparece maior). */
.logo-topo { display: block; width: 140px; height: 40px; object-fit: cover; object-position: center; }
@media (max-width: 575.98px) { .logo-topo { width: 112px; height: 32px; } }
.selo-marca { display: inline-flex; align-items: center; gap: .3rem; font-size: .7rem; line-height: 1.4; color: #555; background: #f2f2f2; border-radius: 999px; padding: 0 .5rem; white-space: nowrap; vertical-align: middle; }
.selo-marca-ponto { width: .5rem; height: .5rem; border-radius: 50%; flex: none; }
.recorte-area { max-width: 100%; overflow: auto; }
.recorte-tela { display: block; max-width: 100%; touch-action: none; cursor: crosshair; border: 1px solid #ccc; background: #fff repeating-conic-gradient(#e8e8e8 0% 25%, #fff 0% 50%) 50% / 16px 16px; }
.logo-topo-claro { background: #fff; border-radius: 4px; }
.logo-login { width: 100%; max-width: 260px; height: auto; }
.marca-rh { background: var(--allmini-amarelo); color: var(--allmini-preto); font-weight: 800; padding: 0 .4em; border-radius: 3px; font-size: 1rem; }

.btn-marca { background: var(--allmini-vermelho); border-color: var(--allmini-vermelho); color: var(--allmini-branco); }
.btn-marca:hover, .btn-marca:focus { background: var(--allmini-vermelho-escuro); border-color: var(--allmini-vermelho-escuro); color: var(--allmini-branco); }

.titulo-secao { border-left: 5px solid var(--allmini-amarelo); padding-left: .5rem; margin-bottom: 1rem; }

/* O servidor grava em maiúsculas; aqui o usuário já vê assim enquanto digita. */
.maiusculo { text-transform: uppercase; }

.cartao-login { max-width: 400px; margin-top: 6vh; }

.form-control:focus, .form-select:focus { border-color: var(--allmini-vermelho); box-shadow: 0 0 0 .2rem rgba(var(--allmini-vermelho-rgb), .15); }

/* Quadro de jornada: campos de hora não encolhem (em tela estreita, a tabela rola para o lado). */
.quadro-jornada input.hora { min-width: 4.75rem; text-align: center; }

/* Foto 3x4 na lista e na ficha */
.foto-lista { width: 36px; height: 48px; object-fit: cover; border-radius: 4px; border: 1px solid #ccc; display: inline-block; }
.foto-vazia { background: #e9ecef; }
.foto-ficha { width: 90px; height: 120px; object-fit: cover; border-radius: 6px; border: 1px solid #ccc; }

/* Recorte da foto 3x4 */
.recorte-area { max-width: 480px; max-height: 60vh; }
.recorte-area img { display: block; max-width: 100%; }

/* Alça ☰ para ordenar linhas arrastando (Tipos de documento). */
.alca-arrastar { cursor: grab; touch-action: none; user-select: none; font-size: 1.25rem; padding: .25rem .5rem; color: var(--bs-secondary-color); }
.alca-arrastar:hover { color: var(--bs-body-color); }
tr.arrastando > td { background: #fff3cd; }
tr.arrastando .alca-arrastar { cursor: grabbing; }

/* QR da verificação em 2 etapas: ocupa a largura da caixa. */
.qr-2fa svg { width: 100%; height: auto; background: #fff; }

/* Ficha → Documentos mensais (v4.0): colunas iguais, conteúdo centralizado, botões do mesmo tamanho. */
.tabela-mensal { table-layout: fixed; min-width: 760px; }
.tabela-mensal col.mensal-competencia { width: 7.5rem; }
.tabela-mensal th { font-size: .85rem; text-align: center; vertical-align: bottom; white-space: normal; }
.tabela-mensal th:first-child { text-align: left; }
.tabela-mensal td { vertical-align: middle; padding-top: .5rem; padding-bottom: .5rem; }
.mensal-celula { display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.mensal-botao { min-width: 6.5rem; padding: .1rem .5rem; font-size: .8rem; }
.mensal-anexado { min-width: 6.5rem; font-weight: 500; }
.dependente-anexar > summary { list-style: none; cursor: pointer; }
.dependente-anexar > summary::-webkit-details-marker { display: none; }
.mensal-item { display: flex; flex-direction: column; align-items: center; gap: .1rem; }
.mensal-lista { text-align: center; }
.mensal-lista > summary { list-style: none; cursor: pointer; }
.mensal-lista > summary::-webkit-details-marker { display: none; }
.mensal-lista[open] > summary { margin-bottom: .3rem; }
.mensal-lista-itens { display: flex; flex-direction: column; align-items: center; gap: .4rem; padding: .35rem .5rem; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: var(--bs-tertiary-bg); }
.mensal-pagamento { display: flex; flex-direction: column; align-items: center; gap: .15rem; line-height: 1.15; }

/* Lista de funcionários: títulos que ordenam a coluna */
.btn-ordenar { background: none; border: 0; padding: 0; font: inherit; font-weight: inherit; color: inherit; text-align: left; cursor: pointer; }
.btn-ordenar:hover { text-decoration: underline; }
/* Resultado (DRE) e Fluxo de cofre no formato de demonstrativo financeiro: sem grade, totais em negrito entre linhas pretas, links discretos (16/10/2026) */
table.dre { --dre-linha: #212529; font-size: .95rem; }
table.dre th, table.dre td { border-bottom-width: 0; }
table.dre thead th { font-weight: 700; border-top: 1px solid var(--dre-linha); border-bottom: 1px solid var(--dre-linha); }
table.dre tbody td { padding-top: .22rem; padding-bottom: .22rem; }
table.dre tr.dre-total td { font-weight: 700; border-top: 1px solid var(--dre-linha); border-bottom: 1px solid var(--dre-linha); }
table.dre tr.dre-bloco td { font-weight: 700; padding-top: .6rem; }
table.dre tr.dre-subtotal td { font-weight: 700; border-top: 1px solid var(--dre-linha); }
table.dre .dre-n1 td:first-child { padding-left: 1.5rem; }
table.dre .dre-n2 td:first-child { padding-left: 3rem; }
table.dre .dre-n2 td { font-size: .85rem; color: var(--bs-secondary-color); }
table.dre a { color: inherit; text-decoration: none; }
table.dre a:hover, table.dre a:focus { text-decoration: underline; }

/* Tela "Escolha o sistema" (portal) */
.icone-modulo { color: var(--allmini-vermelho); }
.cartao-modulo { transition: border-color .15s, box-shadow .15s; }
.cartao-modulo:hover, .cartao-modulo:focus { border-color: var(--allmini-vermelho); box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .08); }


/* Quadro de poderes por bloco (usuários e perfis modelo) */
.seta-bloco { display: inline-block; width: 1rem; font-size: 1.25rem; line-height: 1; transition: transform .15s; }
.js-bloco-poderes.aberto .seta-bloco { transform: rotate(90deg); }
.js-bloco-estado { min-width: 4.5rem; }

/* Fechamento do dia: blocos que abrem e fecham, quadros por PDV/máquina e resumo (à direita no computador; barra fixa
   embaixo no celular) */
.bloco-fechamento > summary { cursor: pointer; list-style: none; }
.bloco-fechamento > summary::-webkit-details-marker { display: none; }
.bloco-fechamento[open] > summary .seta-bloco { transform: rotate(90deg); }
.quadro { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .75rem; background: var(--bs-body-bg); height: 100%; }
.tabela-cedulas th { font-size: .75rem; font-weight: 600; color: var(--bs-secondary-color); }
.tabela-cedulas td { padding-top: .2rem; padding-bottom: .2rem; }
.campo-qtd { width: 4.5rem; margin: 0 auto; }
.conta-pdv { background: var(--bs-tertiary-bg); border-radius: .375rem; padding: .5rem .6rem; }
.linha-despesa { border: 1px solid var(--bs-border-color); border-radius: .5rem; padding: .35rem .6rem .45rem; margin-bottom: .4rem; }
/* Saídas do fechamento: uma linha por saída; os rótulos só aparecem na primeira linha da lista (nas outras ficam só para leitor de tela). */
.js-lista > .linha-despesa ~ .linha-despesa .form-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.linha-despesa-acoes { min-height: 31px; }
@media (min-width: 992px) {
  .resumo-fechamento { position: sticky; top: 1rem; }
}
@media (max-width: 991.98px) {
  .form-fechamento { padding-bottom: 7.5rem; }
  .resumo-fechamento { position: fixed; left: .5rem; right: .5rem; bottom: .5rem; z-index: 1020;
    border-color: var(--allmini-vermelho); }
  .resumo-fechamento .card-body { padding: .6rem .75rem !important; }
}

.campo-cofre { max-width: 9.5rem; }

/* Poderes em colunas (como no Finder) */
.colunas-poderes { display: grid; grid-template-columns: minmax(10rem, 1fr) minmax(12rem, 1.2fr) minmax(16rem, 2fr); min-height: 18rem; background: var(--bs-body-bg); }
.coluna-poderes { border-right: 1px solid var(--bs-border-color); overflow-y: auto; max-height: 26rem; }
.coluna-poderes:last-child { border-right: 0; }
.coluna-titulo { font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--bs-secondary-color); padding: .5rem .75rem; border-bottom: 1px solid var(--bs-border-color); background: var(--bs-tertiary-bg); }
.item-coluna { display: flex; align-items: center; gap: .5rem; padding: .45rem .75rem; cursor: pointer; border-bottom: 1px solid var(--bs-border-color-translucent); }
.item-coluna:hover { background: var(--bs-tertiary-bg); }
.item-coluna.ativo { background: var(--allmini-vermelho); color: var(--allmini-branco); }
.item-coluna.ativo .seta-coluna { color: var(--allmini-branco); }
.seta-coluna { color: var(--bs-secondary-color); font-size: 1.1rem; line-height: 1; }
@media (max-width: 767.98px) {
  .colunas-poderes { grid-template-columns: 1fr; }
  .coluna-poderes { border-right: 0; border-bottom: 1px solid var(--bs-border-color); max-height: none; }
}
.subbloco { border-bottom: 1px dashed var(--bs-border-color); padding-bottom: .75rem; margin-bottom: .75rem; }
.subbloco:last-child { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

/* Dias para vencer (painel do Financeiro): cor do vermelho (vence hoje) ao verde (longe). */
.dias-vencimento { display: inline-block; min-width: 4.5rem; padding: .1rem .5rem; border: 1px solid; border-radius: 1rem;
  font-size: .8rem; font-weight: 700; text-align: center; }

/* Painel do Financeiro: gráfico de barras dinheiro + cartões (SVG do servidor). */
.grafico-barras { height: auto; min-width: 560px; font-size: 11px; }  /* no celular, rola para o lado */
.grafico-barras .grade { stroke: #eceae5; stroke-width: 1; }
.grafico-barras .base { stroke: #b9b8b2; stroke-width: 1; }
.grafico-barras .eixo { fill: #6b6a65; font-variant-numeric: tabular-nums; }
.grafico-barras .seg { stroke: #fff; stroke-width: 1; }  /* respiro de 2 px entre os segmentos empilhados */
.grafico-barras .fim-de-semana { fill: var(--allmini-vermelho); }
.grafico-barras .alvo { fill: transparent; }
.grafico-barras a:hover .alvo { fill: rgba(0, 0, 0, .05); }
.grafico-barras .seg-dinheiro, .legenda-dinheiro { fill: #2E7D32; }
.grafico-barras .seg-debito, .legenda-debito { fill: #1565C0; }
.grafico-barras .seg-credito_vista, .legenda-credito_vista { fill: #5E35B1; }
.grafico-barras .seg-credito_parcelado, .legenda-credito_parcelado { fill: #E65100; }
.grafico-barras .seg-pix_maquina, .legenda-pix_maquina { fill: #00838F; }
.grafico-barras .seg-metrica { fill: #2a78d6; }  /* barra única do gráfico da Logística: azul padrão dos painéis (o vermelho é só de atraso e problema) */
.grafico-barras .total-barra { fill: #3d3c39; font-size: 10px; font-weight: 600; font-variant-numeric: tabular-nums; }
.grafico-barras .barra-grupo:hover .seg, .grafico-barras .barra-grupo:focus .seg { filter: brightness(1.15); }
.grafico-barras .barra-grupo:hover .alvo, .grafico-barras .barra-grupo:focus .alvo { fill: rgba(0, 0, 0, .06); }
.grafico-barras .barra-grupo { outline: none; }
.grafico-barras a.barra-grupo { text-decoration: none; }  /* o número da barra não vem sublinhado como link */
.legenda { display: inline-block; width: .7rem; height: .7rem; border-radius: 2px; vertical-align: -1px; }
.legenda-dinheiro { background: #2E7D32; } .legenda-debito { background: #1565C0; }
.legenda-credito_vista { background: #5E35B1; } .legenda-credito_parcelado { background: #E65100; }
.legenda-pix_maquina { background: #00838F; }
/* Gráfico de composição (rosca) dos painéis: services/composicao.py e templates/composicao.html. */
.rosca { width: 11rem; height: 11rem; flex: none; }
.rosca-total { font-size: 13px; font-weight: 700; fill: #343a40; }
/* Quadro que acompanha o mouse sobre uma barra (static/js/fin_painel.js e log_painel.js). */
.tooltip-grafico { position: fixed; z-index: 1080; pointer-events: none; min-width: 15rem; max-width: 20rem; background: #212529; color: #fff;
  border-radius: .5rem; padding: .6rem .75rem; font-size: .8rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.tooltip-grafico .titulo { font-weight: 700; margin-bottom: .3rem; }
.tooltip-grafico .linha { display: flex; justify-content: space-between; gap: 1rem; }
.tooltip-grafico .linha .marca { display: inline-block; width: .6rem; height: .6rem; border-radius: 2px; margin-right: .35rem; }
.tooltip-grafico .total { border-top: 1px solid rgba(255, 255, 255, .25); margin-top: .3rem; padding-top: .3rem; font-weight: 700; }
.tooltip-grafico .abrir { margin-top: .35rem; color: #adb5bd; font-size: .72rem; }

/* Fechamento do dia: cada PDV com o número em destaque e uma cor própria (6 cores que se repetem). */
.quadro.js-pdv[class*="pdv-cor-"] { border-top: 5px solid var(--pdv-cor); }
.pdv-cor-0 { --pdv-cor: #c00018; } .pdv-cor-1 { --pdv-cor: #0b5ed7; } .pdv-cor-2 { --pdv-cor: #198754; }
.pdv-cor-3 { --pdv-cor: #b35c00; } .pdv-cor-4 { --pdv-cor: #6f42c1; } .pdv-cor-5 { --pdv-cor: #0a7f8f; }
.pdv-cabecalho { display: flex; align-items: center; gap: .6rem; }
.pdv-selo { background: var(--pdv-cor, #444); color: #fff; font-weight: 800; font-size: 1.25rem; line-height: 1; padding: .35rem .75rem; border-radius: .4rem; letter-spacing: .5px; }
.pdv-nome { font-weight: 600; color: var(--bs-secondary-color); text-transform: uppercase; }

/* Menu em grupos (RH): abre ao passar o mouse ou ao focar pelo teclado; no celular os itens ficam abertos, recuados. */
.menu-grupo > .dropdown-menu { margin-top: 0; min-width: 12rem; }
@media (min-width: 768px) {
  .menu-grupo:hover > .dropdown-menu, .menu-grupo:focus-within > .dropdown-menu { display: block; }
}
@media (max-width: 767.98px) {
  .menu-grupo > .dropdown-menu { display: block; background: transparent; border: 0; padding: 0 0 .25rem 1rem; }
  .menu-grupo > .dropdown-menu .dropdown-item { color: rgba(255, 255, 255, .8); padding: .25rem .5rem; }
  .menu-grupo > .nav-link.dropdown-toggle::after { display: none; }
}

/* Rotina mensal: VA ajustado à mão */
.va-campo.va-editado { border-color: #d39e00; background: #fff8e1; }

/* Importar recibos da contabilidade: as colunas ficam alinhadas entre as seções (folha, adiantamento, VT) */
.tabela-recibos { table-layout: fixed; min-width: 56rem; }
.tabela-recibos th:nth-child(1) { width: 2.2rem; }
.tabela-recibos th:nth-child(2) { width: 3.2rem; }
.tabela-recibos th:nth-child(3) { width: 11rem; }
.tabela-recibos th:nth-child(4) { width: 13rem; }
.tabela-recibos th:nth-child(5) { width: 12rem; }

/* Calendário dos campos de data e de mês (data-mascara="data" | "competencia"; 16/10/2026) */
.calendario { position: absolute; z-index: 2000; width: 17rem; padding: .6rem; background: var(--bs-body-bg, #fff); color: var(--bs-body-color, #212529);
  border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .5rem; box-shadow: 0 .5rem 1.25rem rgba(0, 0, 0, .18); }
.calendario-cab { display: flex; align-items: center; justify-content: space-between; gap: .3rem; margin-bottom: .4rem; }
.calendario-titulo { flex: 1; text-align: center; }
.calendario-sel { flex: 1; min-width: 0; padding: .15rem .25rem; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .25rem; background: transparent; color: inherit; text-transform: capitalize; }
.calendario-nav { width: 2rem; height: 2rem; line-height: 1; border: 1px solid var(--bs-border-color, #dee2e6); border-radius: .25rem; background: transparent; color: inherit; font-size: 1.1rem; }
.calendario-nav:hover, .calendario-dia:hover { background: rgba(193, 0, 24, .1); }
.calendario-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: .15rem; text-align: center; }
.calendario-meses { grid-template-columns: repeat(3, 1fr); }
.calendario-dia-semana { font-size: .75rem; color: var(--bs-secondary-color, #6c757d); padding: .15rem 0; }
.calendario-dia { padding: .3rem 0; border: 0; border-radius: .25rem; background: transparent; color: inherit; }
.calendario-meses .calendario-dia { padding: .55rem 0; }
.calendario-dia.hoje { box-shadow: inset 0 0 0 1px var(--allmini-vermelho, #c10018); }
.calendario-dia.escolhido { background: var(--allmini-vermelho, #c10018); color: #fff; }
.calendario-pe { display: flex; justify-content: space-between; margin-top: .4rem; }
.calendario-link { border: 0; background: transparent; color: var(--allmini-vermelho, #c10018); padding: .1rem .2rem; font-size: .9rem; }
.calendario-link:hover { text-decoration: underline; }
input[data-mascara="data"], input[data-mascara="competencia"] { cursor: pointer; }
/* Lançar várias entradas e saídas de uma vez: os rótulos só aparecem na primeira linha (nas outras ficam só para leitor de tela). */
.linhas-outros .linha-outro + .linha-outro .form-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Despesas: os quadros de total por origem são o filtro (clicar filtra a lista). */
.filtro-origem { cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.filtro-origem:hover { border-color: var(--allmini-vermelho, #c10018); }
.filtro-origem-ativo { border-color: var(--allmini-vermelho, #c10018); box-shadow: 0 0 0 1px var(--allmini-vermelho, #c10018); background: rgba(193, 0, 24, .04); }
/* Lista de unidades: os sistemas são botões (verde = a unidade usa, branco = não usa). */
button.chip-liga { cursor: pointer; font-size: .8em; }
button.chip-liga.text-bg-light { color: #6c757d !important; }
button.chip-liga:hover { filter: brightness(.95); }
/* Fechamento do dia: cartões em tabelas por fornecedor (como a planilha das lojas). */
.tabela-cartoes thead th { background: #e2efda; text-align: center; font-weight: 600; white-space: nowrap; }
.tabela-cartoes thead th:first-child { text-align: left; }
.tabela-cartoes tbody th { background: transparent; font-weight: 600; }
.tabela-cartoes tfoot th, .tabela-cartoes tfoot td { background: #f1f6ee; border-top: 2px solid #9bbb8e; }
.tabela-cartoes td { vertical-align: middle; }
.tabela-cartoes tr.linha-comprovante td { background: #fafafa; border-top: 0; padding-top: .2rem; padding-bottom: .3rem; }
.tabela-cartoes tr.js-maquina > th, .tabela-cartoes tr.js-maquina > td { border-bottom: 0; }

/* Gráficos em SVG do sistema (templates/graficos.html, services/graficos.py): linha de 2 px, coluna fina de ponta arredondada, grade de 1 px discreta; os textos usam as cores de texto, nunca a da série. */
.grafico-viz { --viz-texto: #52514e; --viz-grade: #e6e5e1; --viz-fundo: #fff; display: block; overflow: visible; }
.grafico-viz .grade { stroke: var(--viz-grade); stroke-width: 1; }
.grafico-viz .base { stroke: #b9b8b2; stroke-width: 1; }
.grafico-viz .eixo { fill: var(--viz-texto); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.grafico-viz .linha { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.grafico-viz .linha.tracejada { stroke-dasharray: 5 4; }
.grafico-viz .area { opacity: .1; }
.grafico-viz .meta { fill: none; stroke: #52514e; stroke-width: 1.5; stroke-dasharray: 5 4; }
.grafico-viz line.meta { stroke-linecap: butt; }
.grafico-viz .ponto-final, .grafico-viz .ponto { stroke: var(--viz-fundo); stroke-width: 2; }  /* anel de 2 px da cor do fundo: a bolinha não se perde sobre a linha */
.grafico-viz .ponto { opacity: 0; }
.grafico-viz .col-grupo { outline: none; }
.grafico-viz .col-grupo .alvo { fill: transparent; }
.grafico-viz .col-grupo .cruzeta { stroke: #8c8b85; stroke-width: 1; opacity: 0; pointer-events: none; }
.grafico-viz .col-grupo:hover .cruzeta, .grafico-viz .col-grupo:focus .cruzeta { opacity: 1; }
.grafico-viz .col-grupo:hover .ponto, .grafico-viz .col-grupo:focus .ponto { opacity: 1; }
.grafico-viz .col-grupo:hover .alvo, .grafico-viz .col-grupo:focus .alvo { fill: rgba(0, 0, 0, .04); }
.grafico-legenda .chave { display: inline-block; vertical-align: middle; margin-right: .35rem; background: var(--cor); }
.grafico-legenda .chave-caixa { width: .7rem; height: .7rem; border-radius: 2px; }
.grafico-legenda .chave-linha { width: 1.1rem; height: 0; border-top: 2px solid var(--cor); background: none; }
.grafico-legenda .chave-linha.tracejada { border-top-style: dashed; }
.grafico-tabela summary { cursor: pointer; color: var(--bs-secondary-color); }
.tooltip-viz { position: fixed; z-index: 1080; pointer-events: none; min-width: 12rem; max-width: 20rem; background: #212529; color: #fff; border-radius: .5rem; padding: .55rem .7rem;
  font-size: .8rem; box-shadow: 0 6px 20px rgba(0, 0, 0, .3); }
.tooltip-viz .titulo { font-weight: 700; margin-bottom: .3rem; }
.tooltip-viz .linha { display: flex; align-items: baseline; gap: .5rem; }
.tooltip-viz .linha .chave { flex: none; width: 1rem; height: 0; border-top: 2px solid var(--cor); align-self: center; }  /* chave em traço, não em caixa */
.tooltip-viz .linha .chave.tracejada { border-top-style: dashed; }
.tooltip-viz .linha .valor { font-weight: 700; font-variant-numeric: tabular-nums; }
.tooltip-viz .linha .nome { color: #c3c2b7; margin-left: auto; }
.tooltip-viz .linha.total { border-top: 1px solid rgba(255, 255, 255, .25); margin-top: .3rem; padding-top: .3rem; }
.kpi-mkt .valor { font-size: 1.35rem; font-weight: 600; line-height: 1.2; }

/* Painéis (docs/paineis.md): cartões de indicador, faixa de atenção, filtros segmentados, barras horizontais. A página do painel vem dentro de `.dash`. */
.dash { --dash-azul: #2a78d6; --dash-borda: #e6e5e1; --dash-texto2: #6b6a65; --dash-bom: #14683c; --dash-ruim: #a31f1f; --dash-aviso: #8a5300; }
.dash .card { border-color: var(--dash-borda); border-radius: .85rem; box-shadow: none; }
.dash .card-header { background: transparent; border-bottom-color: var(--dash-borda); font-size: .78rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dash-texto2); padding: .7rem 1rem; }
.dash .list-group-item { border-color: var(--dash-borda); }
.dash-secao { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem; margin: 1.6rem 0 .6rem; }
.dash-secao h2 { margin: 0; font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--dash-texto2); }
.dash-secao .contagem { font-weight: 600; letter-spacing: 0; margin-left: .35rem; padding: .05rem .5rem; border-radius: 999px; background: #efeeea; color: #52514e; }
.dash-subtitulo { font-size: .85rem; color: var(--dash-texto2); }
.dash-barra { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.dash-segmento { display: inline-flex; background: #efeeea; border-radius: .65rem; padding: 3px; gap: 2px; }
.dash-segmento .btn-check + .btn, .dash-segmento .btn { border: 0; background: transparent; color: #52514e; border-radius: .5rem; padding: .22rem .75rem; font-size: .82rem; }
.dash-segmento .btn-check:checked + .btn { background: #fff; color: #111; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .14); }
.dash-segmento .btn:hover { color: #111; }
.dash .form-select-sm, .dash .form-control-sm { border-radius: .6rem; border-color: var(--dash-borda); background-color: #fff; }
.dash .dropdown .btn-outline-secondary { border-color: var(--dash-borda); color: #3d3c39; border-radius: .6rem; background: #fff; }
.dash .dropdown .btn-outline-secondary.active, .dash .dropdown .btn-outline-secondary.show { background: #fff; color: #111; border-color: var(--dash-azul); }

.dash-kpi { position: relative; display: flex; flex-direction: column; gap: .2rem; height: 100%; padding: .85rem 1rem .8rem 1.1rem; overflow: hidden; background: #fff; border: 1px solid var(--dash-borda); border-radius: .85rem; color: inherit; text-decoration: none; }
a.dash-kpi:hover, a.dash-kpi:focus-visible { border-color: #c4c3bc; box-shadow: 0 2px 10px rgba(0, 0, 0, .07); color: inherit; }
.dash-kpi::before { content: ""; position: absolute; left: 0; top: .9rem; bottom: .9rem; width: 3px; border-radius: 0 3px 3px 0; background: transparent; }
.dash-kpi.tom-ruim::before { background: #d33a3a; } .dash-kpi.tom-aviso::before { background: #e0a000; } .dash-kpi.tom-bom::before { background: #1baf7a; } .dash-kpi.tom-destaque::before { background: var(--dash-azul); }
.dash-kpi.selecionado { border-color: var(--dash-azul); box-shadow: 0 0 0 1px var(--dash-azul); }
.dash-kpi-topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.dash-kpi-rotulo { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--dash-texto2); }
.dash-kpi-meio { display: flex; justify-content: space-between; align-items: flex-end; gap: .5rem; }
.dash-kpi-valor { font-size: 1.6rem; font-weight: 650; line-height: 1.15; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dash-kpi.grande .dash-kpi-valor { font-size: 1.85rem; }
.dash-kpi-apoio { font-size: .78rem; color: var(--dash-texto2); }
.dash-comp { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; font-size: .76rem; color: var(--dash-texto2); line-height: 1.7; }
.dash-spark { flex: none; width: 88px; height: 30px; overflow: visible; }
.dash-spark-linha { fill: none; stroke: var(--dash-azul); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.dash-spark-area { fill: var(--dash-azul); opacity: .1; stroke: none; }
.dash-spark-ponto { fill: var(--dash-azul); stroke: #fff; stroke-width: 1.5; }
.dash-pilula { display: inline-flex; align-items: center; gap: .2rem; padding: .08rem .5rem; border-radius: 999px; font-size: .72rem; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.dash-pilula-boa { color: var(--dash-bom); background: #e3f4ea; } .dash-pilula-ruim { color: var(--dash-ruim); background: #fbe6e6; }
.dash-pilula-aviso { color: var(--dash-aviso); background: #fdf0d5; } .dash-pilula-neutra { color: #6b6a65; background: #efeeea; }

.dash-alerta { display: flex; align-items: center; gap: .75rem; height: 100%; padding: .65rem .9rem; background: #fff; border: 1px solid var(--dash-borda); border-radius: .85rem; color: inherit; text-decoration: none; }
a.dash-alerta:hover, a.dash-alerta:focus-visible { border-color: #c4c3bc; box-shadow: 0 2px 10px rgba(0, 0, 0, .07); color: inherit; }
.dash-alerta-num { flex: none; min-width: 2.4rem; padding: .2rem .5rem; border-radius: .65rem; text-align: center; font-size: 1.25rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; background: #efeeea; color: #52514e; }
.dash-alerta.vermelho { border-color: #f0c9c9; } .dash-alerta.vermelho .dash-alerta-num { background: #fbe6e6; color: var(--dash-ruim); }
.dash-alerta.ambar { border-color: #f1dfb4; } .dash-alerta.ambar .dash-alerta-num { background: #fdf0d5; color: var(--dash-aviso); }
.dash-alerta-rotulo { font-size: .86rem; font-weight: 600; line-height: 1.25; }
.dash-alerta-apoio { font-size: .75rem; color: var(--dash-texto2); }

.dash-hbar { display: grid; grid-template-columns: minmax(6rem, 11rem) 1fr auto; align-items: center; gap: .3rem .75rem; padding: .32rem 0; font-size: .86rem; }
.dash-hbar + .dash-hbar { border-top: 1px solid #f0efeb; }
.dash-hbar-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-hbar-trilho { height: 8px; border-radius: 999px; background: #efeeea; overflow: hidden; }
.dash-hbar-barra { height: 100%; border-radius: 999px; background: var(--dash-azul); min-width: 0; }
.dash-hbar-valor { text-align: right; white-space: nowrap; font-weight: 600; font-variant-numeric: tabular-nums; }
.dash-hbar-valor small { font-weight: 400; color: var(--dash-texto2); margin-left: .35rem; }

.dash-avatar { flex: none; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 50%; background: #e8f0fb; color: #1f5fae; font-size: .72rem; font-weight: 700; letter-spacing: .02em; }
.dash-lista { background: #fff; border: 1px solid var(--dash-borda); border-radius: .85rem; overflow: hidden; }
.dash-linha { display: flex; align-items: center; gap: .75rem; padding: .6rem 1rem; color: inherit; text-decoration: none; }
.dash-linha + .dash-linha { border-top: 1px solid #f0efeb; }
a.dash-linha:hover { background: #faf9f7; color: inherit; }
.dash-linha .corpo { flex: 1 1 auto; min-width: 0; }
.dash-linha .pessoa { flex: 0 0 15rem; }
.dash-linha .nome { font-weight: 600; }
@media (max-width: 767.98px) { .dash-linha { flex-wrap: wrap; } .dash-linha .pessoa { flex: 1 1 calc(100% - 4rem); } }
.dash-linha .detalhe { font-size: .78rem; color: var(--dash-texto2); }
.dash-ponto { flex: none; width: .6rem; height: .6rem; border-radius: 50%; background: #b9b8b2; }
.dash-ponto.vermelho { background: #d33a3a; } .dash-ponto.ambar { background: #e0a000; } .dash-ponto.verde { background: #1baf7a; }
.dash-prazo { flex: none; text-align: right; font-size: .78rem; color: var(--dash-texto2); white-space: nowrap; }
.dash-prazo strong { display: block; font-size: .82rem; color: #111; }
.dash-prazo.vermelho strong { color: var(--dash-ruim); }
.dash .list-group { background: #fff; border: 1px solid var(--dash-borda); border-radius: .85rem; overflow: hidden; }
.dash .list-group-item { border-width: 0 0 1px; padding: .7rem 1rem; }
.dash .list-group-item:last-child { border-bottom: 0; }
.dash .list-group-item-action:hover, .dash .list-group-item-action:focus-visible { background: #faf9f7; }
.dash .badge { font-weight: 600; border-radius: 999px; padding: .3em .7em; }
.dash .badge.text-bg-danger { background: #fbe6e6 !important; color: var(--dash-ruim) !important; }
.dash .badge.text-bg-warning { background: #fdf0d5 !important; color: var(--dash-aviso) !important; }
.dash .badge.text-bg-success { background: #e3f4ea !important; color: var(--dash-bom) !important; }
.dash .badge.text-bg-secondary { background: #efeeea !important; color: #52514e !important; }
.dash .badge.text-bg-info { background: #e8f0fb !important; color: #1f5fae !important; }
.dash .badge.text-bg-light { background: #fff !important; color: #52514e !important; }
.dash-tipo { display: grid; grid-template-columns: minmax(7rem, 11rem) 1fr auto; align-items: center; gap: .75rem; width: 100%; padding: .38rem .5rem; margin: 0 -.5rem; border: 0; border-radius: .6rem; background: transparent; text-align: left; font-size: .86rem; }
.dash-tipo:hover { background: #faf9f7; }
.dash-tipo[aria-pressed="true"] { background: #e8f0fb; }
.dash-tipo-trilho { display: flex; height: 8px; border-radius: 999px; background: #efeeea; overflow: hidden; gap: 2px; }
.dash-tipo-v { background: #d33a3a; } .dash-tipo-a { background: #e0a000; }
.dash-tipo-qtd { display: inline-flex; gap: .25rem; justify-content: flex-end; min-width: 4.5rem; }
@media (max-width: 575.98px) { .dash-kpi-valor { font-size: 1.4rem; } .dash-kpi.grande .dash-kpi-valor { font-size: 1.5rem; } }

/* ---------- Planta do mapa do estoque (docs/estoque.md 6.4): SVG em centímetros; as classes pl-* dão a cor de cada espécie ---------- */
.planta-quadro { overflow: auto; max-height: 75vh; border: 1px solid var(--bs-border-color); border-radius: .375rem; background: #f1f3f5; }
.planta-quadro:focus { outline: 2px solid var(--bs-primary); outline-offset: -2px; }
.planta-svg { display: block; touch-action: none; user-select: none; -webkit-user-select: none; }
.planta-desenhando .planta-svg { cursor: crosshair; }
.pl-fundo { fill: #fff; }
.pl-linha-grade { fill: none; stroke: #d5dbe1; stroke-width: 1; vector-effect: non-scaling-stroke; }
.pl .pl-forma { stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: move; }
.pl-texto { font-family: "Courier New", monospace; font-weight: 700; fill: #111; pointer-events: none; }
.pl-bloco .pl-forma { fill: rgba(13,110,253,.10); stroke: #0d6efd; }
.pl-lugar .pl-forma { fill: #fff; stroke: #0d6efd; }
.pl-area .pl-forma { fill: #e9ecef; stroke: #6c757d; }
.pl-area-recebimento .pl-forma { fill: #d1e7dd; stroke: #198754; }
.pl-area-conferencia .pl-forma { fill: #fff3cd; stroke: #ffc107; }
.pl-area-garagem .pl-forma { fill: #e2d9f3; stroke: #6f42c1; }
.pl-area-avaria .pl-forma { fill: #f8d7da; stroke: #dc3545; }
.pl-parede .pl-forma { fill: #343a40; stroke: #343a40; }
.pl-porta .pl-forma { fill: #fd7e14; stroke: #d9690f; }
.pl-coluna .pl-forma { fill: #6c757d; stroke: #495057; }
.pl-vaga .pl-forma { fill: #cff4fc; stroke: #0aa2c0; }
.pl-corredor .pl-forma { fill: rgba(255,255,255,.7); stroke: #adb5bd; stroke-dasharray: 8 5; }
.pl-escritorio .pl-forma { fill: #f5e6d3; stroke: #a0522d; }
.pl-outro .pl-forma { fill: #adb5bd; stroke: #6c757d; }
.pl-inativo .pl-forma { stroke-dasharray: 6 4; opacity: .5; }
.pl-contorno .pl-forma { fill: rgba(255,243,205,.35); stroke: #664d03; stroke-width: 3; }
.pl-selecionado .pl-forma { stroke: #dc3545; stroke-width: 3; }
.pl-alca { fill: #fff; stroke: #dc3545; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.pl-guia { fill: rgba(220,53,69,.12); stroke: #dc3545; stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.pl-vertice { fill: #fff; stroke: #dc3545; stroke-width: 1.5; vector-effect: non-scaling-stroke; cursor: pointer; }
.pl-vertice-sel { fill: #dc3545; }
.pl-meio { fill: #dc3545; opacity: .45; cursor: copy; }
.pl-medida { fill: #212529; paint-order: stroke; stroke: #fff; stroke-width: 3px; stroke-linejoin: round; pointer-events: none; font-weight: 600; }
.pl-guia-linha { fill: none; stroke: #dc3545; stroke-width: 1.5; stroke-dasharray: 6 4; vector-effect: non-scaling-stroke; pointer-events: none; }
.pl-vertices { max-height: 12rem; overflow: auto; margin-bottom: .25rem; }
.pl-vertice-linha { display: grid; grid-template-columns: 1.4rem 1fr 1fr; gap: .25rem; align-items: center; margin-bottom: .15rem; font-size: .75rem; }
.pl-vertice-linha.ativo input { border-color: #dc3545; }
.pl-campos { display: grid; gap: .25rem; }
.pl-campo { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .8rem; }
.pl-campo input, .pl-campo select { max-width: 7rem; }
.pl-lista li + li { margin-top: .15rem; }
.pl-legenda { display: inline-flex; align-items: center; gap: .3rem; margin-right: .8rem; font-size: .78rem; }
.pl-legenda i { display: inline-block; width: .9rem; height: .9rem; border: 2px solid; border-radius: 2px; }
@media print {
  .navbar, .planta-nao-imprime, .planta-lateral, .planta-ferramentas, #planta-msg { display: none !important; }
  .planta-quadro { max-height: none; overflow: visible; border: 0; background: #fff; }
  .planta-svg { width: 100% !important; height: auto !important; }
}
