/* =====================================================================
   VISUAL DE SISTEMA (07/10) — denso, alinhado e com cara de aplicativo:
   barra de topo com trilha, menu lateral compacto e recolhível, barra de
   status, cartões retos, controles de 34px e tabelas de planilha.
   Tudo preso em .app: as páginas públicas e o login não mudam.
   ===================================================================== */

.app {
  --raio: 8px; --raio-sm: 6px; --raio-lg: 10px;
  --lateral: 228px; --topo-h: 52px; --status-h: 30px;
  --fundo: #f1f4f8;
  font-size: 14px;
  grid-template-columns: var(--lateral) minmax(0, 1fr);
  transition: grid-template-columns .18s ease;
}
:root[data-theme="dark"] .app { --fundo: #131b2b; }
.app, .app .principal { background: var(--fundo); }

/* ---------- tipografia: títulos de sistema, não de site ---------- */
.app h1 { font: 700 1.3rem/1.25 var(--fonte); letter-spacing: -.01em; }
.app h2 { font: 650 .98rem/1.3 var(--fonte); letter-spacing: 0; }
.app h3 { font: 650 .9rem/1.3 var(--fonte); letter-spacing: 0; }

/* ---------- botões e campos: 34px, retos, sem brilho ---------- */
.app .btn { height: 34px; padding: 0 .85rem; border-radius: 6px; font: 600 .84rem var(--fonte); gap: .4rem; }
.app .btn svg { width: 16px; height: 16px; }
.app .btn-sm { height: 28px; padding: 0 .6rem; font-size: .8rem; border-radius: 5px; }
.app .btn-grande { height: 40px; padding: 0 1.1rem; font-size: .9rem; border-radius: 7px; }
.app .btn-primario { background: var(--marca-forte); box-shadow: 0 1px 0 rgba(0,0,0,.08), inset 0 1px 0 rgba(255,255,255,.12); border-color: color-mix(in srgb, var(--marca-forte) 80%, #000); }
.app .btn-primario::after { display: none; }
.app .btn-primario:hover { filter: none; transform: none; background: #047857; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.app .btn-secundario { box-shadow: 0 1px 0 rgba(11,19,36,.04); }
.app .btn-secundario:hover { border-color: var(--borda-forte); background: var(--superficie-2); }

.app .campo { gap: .25rem; }
.app .campo > label, .app .rotulo { font-size: .76rem; font-weight: 600; color: var(--texto-2); }
.app .entrada, .app .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .app .campo select {
  height: 34px; border-radius: 6px; font-size: .88rem; padding: 0 .65rem;
}
.app .campo textarea { border-radius: 6px; font-size: .88rem; min-height: 72px; }
.app .campo input:focus, .app .campo select:focus, .app .campo textarea:focus, .app .entrada:focus { box-shadow: 0 0 0 3px var(--marca-suave); }
.app .com-icone > svg { top: 17px; width: 15px; height: 15px; left: .65rem; }
.app .campo .com-icone input:not([type=checkbox]):not([type=radio]), .app .campo .com-icone select, .app .campo .auto.com-icone input { padding-left: 2.1rem; }
.app .grade { gap: .75rem 1rem; }
.app .filtro .entrada, .app .limpar-filtros, .app .btn-filtros { height: 34px; }
.app .filtro > span { font-size: .68rem; }
.app .segmentado { border-radius: 8px; padding: 3px; }
.app .segmentado label { padding: .3rem .7rem; font-size: .82rem; border-radius: 6px; }

/* ---------- cartões: painéis retos, sem sombra flutuante ---------- */
.app .cartao { border-radius: var(--raio-lg); box-shadow: none; }
.app .cartao-cab { padding: .6rem 1rem; min-height: 44px; background: var(--superficie); border-radius: var(--raio-lg) var(--raio-lg) 0 0; }
.app .cartao-cab h2 { font-size: .9rem; }
.app .cartao-corpo { padding: 1rem; }
.app section.cartao + section.cartao, .app form + section.cartao { margin-top: .9rem; }
.app .cartao-cab:has(.titulo-secao) { background: var(--superficie); }
.app .titulo-secao { gap: .55rem; }
.app .titulo-secao h2, .app .titulo-secao { font-size: .9rem; }
.app .titulo-secao .ic { width: 26px; height: 26px; border-radius: 7px; box-shadow: none; background: var(--cs); color: var(--c); }
.app .titulo-secao .ic svg { width: 15px; height: 15px; }
.app .aviso { border-radius: 8px; padding: .6rem .8rem; font-size: .86rem; }
.app .etiqueta { border-radius: 5px; padding: .1rem .45rem; font-size: .72rem; }

/* ---------- tabelas: planilha com cabeçalho fixo ---------- */
.app table.tabela { font-size: .85rem; }
.app .tabela th { position: sticky; top: 0; z-index: 2; padding: .5rem .9rem; font-size: .68rem; letter-spacing: .05em; background: var(--superficie-2); }
.app .tabela td { padding: .5rem .9rem; }
.app .tabela tbody tr:hover { background: color-mix(in srgb, var(--marca-suave) 55%, transparent); }
.app .barra-lista { padding: .6rem 1rem; gap: .6rem 1rem; }
.app .paginacao { padding: .5rem 1rem; font-size: .8rem; }
.app .vazio { padding: 2rem 1rem; font-size: .88rem; }
.app .vazio .icone-grande { width: 40px; height: 40px; border-radius: 10px; margin-bottom: .6rem; }
.app .vazio .icone-grande svg { width: 20px; height: 20px; }
.app .vazio h3 { font-size: .92rem; margin-bottom: .25rem; }

/* =====================================================================
   MENU LATERAL compacto (e recolhível só com os ícones)
   ===================================================================== */
.app .lateral { padding: 0 .55rem .6rem; gap: 1px; background: #0f1a2e; box-shadow: none; }
.app .lateral::after { background: rgba(255,255,255,.06); }
.lateral-cab { display: flex; align-items: center; gap: .4rem; height: var(--topo-h); margin: 0 -.55rem .35rem; padding: 0 .55rem 0 .75rem; border-bottom: 1px solid rgba(255,255,255,.07); flex: none; }
.lateral-marca { display: flex; align-items: center; gap: .55rem; min-width: 0; flex: 1; text-decoration: none !important; }
.lateral-marca img { width: 30px; height: 30px; border-radius: 8px; flex: none; }
.lateral-marca span { display: flex; flex-direction: column; line-height: 1.05; min-width: 0; }
.lateral-marca b { color: #fff; font: 700 .92rem var(--fonte); white-space: nowrap; }
.lateral-marca small { color: #6ee7b7; font-size: .6rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; }
.btn-recolher { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; border-radius: 6px; background: none; color: rgba(226,232,240,.55); cursor: pointer; }
.btn-recolher:hover { background: rgba(255,255,255,.08); color: #fff; }
.btn-recolher svg { width: 17px; height: 17px; }

.app .lateral .nav-grupo { padding: .8rem .6rem .25rem; font-size: .62rem; letter-spacing: .12em; }
.app .lateral .nav-item { height: 32px; padding: 0 .55rem; gap: .6rem; border-radius: 6px; font-size: .84rem; font-weight: 500; white-space: nowrap; }
.app .lateral .nav-item svg { width: 17px; height: 17px; padding: 0; background: none; box-shadow: none; border-radius: 0; color: rgba(226,232,240,.6); }
.app .lateral .nav-item:hover svg { background: none; }
.app .lateral .nav-item.active { background: rgba(16,185,129,.16); box-shadow: none; color: #fff; }
.app .lateral .nav-item.active svg { background: none; box-shadow: none; color: #34d399; }
.app .lateral .nav-item.active::before { left: -.55rem; top: 6px; bottom: 6px; width: 3px; box-shadow: none; background: #34d399; }
.nav-txt { overflow: hidden; text-overflow: ellipsis; }
.app .lateral .lateral-rodape { padding-top: .5rem; }
.app .lateral .usuario-mini { padding: .35rem .4rem; border-radius: 8px; gap: .5rem; }
.app .lateral .avatar { width: 28px; height: 28px; font-size: .72rem; box-shadow: none; }
.app .lateral .usuario-mini .nome { font-size: .8rem; }
.app .lateral .usuario-mini .papel { font-size: .68rem; }
.app .btn-lateral { width: 28px; height: 28px; border-radius: 6px; }
.app .btn-lateral svg { width: 15px; height: 15px; }

@media (min-width: 961px) {
  :root[data-lateral="recolhida"] .app { --lateral: 60px; }
  :root[data-lateral="recolhida"] .app .lateral { padding-left: .5rem; padding-right: .5rem; overflow-x: hidden; }
  :root[data-lateral="recolhida"] .lateral-cab { flex-direction: column; justify-content: center; padding: 0; gap: 0; height: auto; min-height: var(--topo-h); }
  :root[data-lateral="recolhida"] .lateral-marca span { display: none; }
  :root[data-lateral="recolhida"] .lateral-marca { flex: none; padding-top: .45rem; }
  :root[data-lateral="recolhida"] .btn-recolher { margin: .15rem 0 .3rem; }
  :root[data-lateral="recolhida"] .app .lateral .nav-item { justify-content: center; padding: 0; }
  :root[data-lateral="recolhida"] .nav-txt { display: none; }
  :root[data-lateral="recolhida"] .app .lateral .nav-grupo { font-size: 0; padding: .45rem 0 .2rem; }
  :root[data-lateral="recolhida"] .app .lateral .nav-grupo::before { content: ""; display: block; height: 1px; margin: 0 .4rem; background: rgba(255,255,255,.08); }
  :root[data-lateral="recolhida"] .app .lateral .nav-item.active::before { left: -.5rem; }
  :root[data-lateral="recolhida"] .app .lateral .usuario-mini { flex-direction: column; padding: .3rem 0; background: none; box-shadow: none; }
  :root[data-lateral="recolhida"] .app .lateral .usuario-mini > div { display: none; }
}

/* =====================================================================
   TOPO: trilha (onde estou), Ctrl+K, selo de ambiente e empresa
   ===================================================================== */
.app .topo { height: var(--topo-h); padding: 0 1.25rem; gap: .65rem; background: var(--superficie); backdrop-filter: none; border-bottom: 1px solid var(--borda); }
.trilha { display: flex; align-items: center; gap: .45rem; min-width: 0; font-size: .84rem; color: var(--texto-3); white-space: nowrap; overflow: hidden; }
.trilha a { color: var(--texto-2); font-weight: 500; }
.trilha a:hover { color: var(--texto); text-decoration: none; }
.trilha .atual { color: var(--texto); font-weight: 650; overflow: hidden; text-overflow: ellipsis; }
.trilha-sep { color: var(--borda-forte); }
.btn-paleta {
  display: inline-flex; align-items: center; gap: .5rem; height: 32px; padding: 0 .4rem 0 .65rem; min-width: 200px;
  border: 1px solid var(--borda); border-radius: 7px; background: var(--superficie-2); color: var(--texto-3); font: 500 .82rem var(--fonte); cursor: pointer;
}
.btn-paleta:hover { border-color: var(--borda-forte); color: var(--texto-2); }
.btn-paleta svg { width: 15px; height: 15px; }
.btn-paleta .longo { flex: 1; text-align: left; }
.app kbd, .paleta kbd {
  display: inline-block; padding: .05rem .35rem; border: 1px solid var(--borda); border-bottom-width: 2px; border-radius: 4px;
  background: var(--superficie); color: var(--texto-3); font: 600 .66rem var(--fonte); line-height: 1.4;
}
.app .seletor-botao { height: 34px; min-width: 220px; max-width: 320px; border-radius: 7px; padding: 0 .55rem 0 .35rem; gap: .5rem; }
.app .seletor-botao .ini { width: 24px; height: 24px; border-radius: 5px; font-size: .66rem; }
.app .seletor-botao .txt b { font-size: .8rem; }
.app .seletor-botao .txt small { font-size: .68rem; }
.app .seletor-lista { left: auto; right: 0; min-width: 300px; border-radius: 8px; }
.app .selo-homologacao { height: 30px; padding: 0 .7rem 0 .55rem; gap: .4rem; border-radius: 6px; box-shadow: none; animation: none; }
.app .selo-homologacao svg { width: 15px; height: 15px; }
.app .selo-homologacao b { font-size: .74rem; letter-spacing: .06em; }
.app .selo-homologacao small { display: none; }
.app.em-homologacao .topo { box-shadow: inset 0 3px 0 #dc2626; }

/* =====================================================================
   CONTEÚDO: largura total, cabeçalho de página compacto
   ===================================================================== */
.app .conteudo { max-width: 1680px; margin: 0; padding: 1rem 1.25rem 1.5rem; flex: 1; }
.app .cabecalho-pagina, .app .painel-topo, .app .assist-topo {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
  margin: -1rem -1.25rem 1rem; padding: .7rem 1.25rem; background: var(--superficie); border-bottom: 1px solid var(--borda);
}
.app .cabecalho-pagina h1, .app .painel-topo h1, .app .assist-topo h1 { font-size: 1.15rem; margin: 0; }
.app .cabecalho-pagina p, .app .painel-data, .app .assist-topo p { margin: .1rem 0 0; font-size: .8rem; color: var(--texto-3); font-weight: 400; }
.app .cabecalho-pagina .acoes, .app .painel-acoes { gap: .45rem; }
.app .titulo-com-icone { display: flex; align-items: center; gap: .5rem; }
.app .titulo-com-icone img { width: 24px; height: 24px; filter: none; }
.app .assist-topo > a:first-child, .app .cabecalho-pagina .voltar { font-size: .78rem; }
.app .faixa-homolog { border-radius: 6px; padding: .45rem .75rem; font-size: .82rem; box-shadow: none; margin-bottom: .8rem; }

/* passos do assistente: barra de etapas compacta */
.app .assist-passos { margin-bottom: .9rem; padding: .6rem 1rem; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-lg); }
.app .assist-passos .bolinha { width: 26px; height: 26px; font-size: .78rem; }
.app .assist-passos button { font-size: .74rem; gap: .2rem; }
.app .assist-trilho { top: calc(.6rem + 12px); left: calc(1rem + 13px); right: calc(1rem + 13px); height: 2px; }
.app .assist-passos .atual .bolinha { box-shadow: 0 0 0 3px color-mix(in srgb, var(--marca) 20%, transparent); }
.app .barra-acoes-cte { border-radius: var(--raio-lg); padding: .5rem .75rem; background: var(--superficie); backdrop-filter: none; box-shadow: 0 -6px 16px -12px rgba(11,19,36,.25); }

/* painel: indicadores compactos */
.app .kpis { gap: .75rem; margin-bottom: .9rem; }
.app .kpi2, .app .kpi { padding: .8rem 1rem; }
.app .kpi2-val, .app .kpi .val { font: 700 1.45rem var(--fonte) !important; letter-spacing: -.01em; margin-top: .3rem; }
.app .duas-colunas { gap: .9rem; }
.app .faixa-trial { border-radius: var(--raio-lg); padding: .6rem 1rem; margin-bottom: .9rem; }
.app .faixa-trial .num { font: 700 1.3rem var(--fonte); }

/* =====================================================================
   BARRA DE STATUS (empresa, ambiente, certificado, usuário, hora)
   ===================================================================== */
.barra-status {
  position: sticky; bottom: 0; z-index: 18; display: flex; align-items: center; gap: 0; height: var(--status-h);
  padding: 0 .5rem; background: var(--superficie); border-top: 1px solid var(--borda); font-size: .74rem; color: var(--texto-2); white-space: nowrap; overflow: hidden;
}
.barra-status .st { display: inline-flex; align-items: center; gap: .35rem; height: 100%; padding: 0 .65rem; border-right: 1px solid var(--borda); color: inherit; font-weight: 500; text-decoration: none !important; min-width: 0; }
.barra-status .st:last-child { border-right: 0; }
.barra-status a.st:hover { background: var(--superficie-2); color: var(--texto); }
.barra-status .st svg { width: 13px; height: 13px; flex: none; color: var(--texto-3); }
.barra-status .st i { width: 7px; height: 7px; border-radius: 50%; background: var(--texto-3); flex: none; }
.barra-status .st-ok i { background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.barra-status .st-perigo { color: var(--perigo); font-weight: 650; }
.barra-status .st-perigo i { background: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.18); }
.barra-status .st-perigo svg, .barra-status .st-alerta svg { color: currentColor; }
.barra-status .st-alerta { color: var(--alerta); font-weight: 650; }
.barra-status .st-alerta i { background: var(--alerta); }
.barra-status .espaco { flex: 1; border: 0; }
.barra-status .espaco + .st { border-left: 1px solid var(--borda); }
.barra-status [data-relogio] { font-variant-numeric: tabular-nums; }
.app .barra-acoes-cte { bottom: calc(var(--status-h) + .5rem); }
.app .toast { bottom: calc(var(--status-h) + 1rem); }

/* =====================================================================
   PALETA "Ir para…" (Ctrl+K)
   ===================================================================== */
.paleta-veu { position: fixed; inset: 0; z-index: 95; background: rgba(11,19,36,.4); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 1rem 1rem; animation: surge .1s ease; }
.paleta { width: 100%; max-width: 560px; background: var(--superficie); border: 1px solid var(--borda); border-radius: 10px; box-shadow: var(--sombra-3); overflow: hidden; font-size: .88rem; color: var(--texto); }
.paleta-busca { display: flex; align-items: center; gap: .5rem; padding: 0 .9rem; border-bottom: 1px solid var(--borda); }
.paleta-busca input { flex: 1; height: 48px; border: 0; outline: 0; background: none; color: var(--texto); font: 500 .95rem var(--fonte); }
.paleta ul { list-style: none; margin: 0; padding: .35rem; max-height: min(420px, 55vh); overflow-y: auto; }
.paleta li[data-n] { display: flex; align-items: center; gap: .6rem; padding: .45rem .6rem; border-radius: 6px; cursor: pointer; }
.paleta li[data-n] svg { width: 16px; height: 16px; color: var(--texto-3); flex: none; }
.paleta li[data-n] small { margin-left: auto; color: var(--texto-3); font-size: .72rem; font-family: ui-monospace, Consolas, monospace; }
.paleta li.sel { background: var(--marca-suave); }
.paleta li.sel svg { color: var(--marca-forte); }
.paleta-mais { width: 16px; height: 16px; flex: none; display: grid; place-items: center; border-radius: 4px; background: var(--marca-forte); color: #fff; font-weight: 700; font-size: .8rem; line-height: 1; }
.paleta-grupo { padding: .55rem .6rem .2rem; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--texto-3); }
.paleta-vazio { padding: 1rem; color: var(--texto-3); text-align: center; }
.paleta-rodape { display: flex; gap: 1rem; padding: .45rem .9rem; border-top: 1px solid var(--borda); background: var(--superficie-2); font-size: .72rem; color: var(--texto-3); }
.paleta-rodape kbd { margin-right: .15rem; }

/* =====================================================================
   CELULAR / TABLET
   ===================================================================== */
@media (max-width: 1100px) { .btn-paleta { min-width: 0; } .btn-paleta .longo, .btn-paleta kbd { display: none; } }
@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .app .lateral { width: 260px; }
  .btn-recolher { display: none; }
  .lateral-cab { padding-right: 2.6rem; }
  .app .topo, .app .conteudo { padding-left: .9rem; padding-right: .9rem; }
  .app .cabecalho-pagina, .app .painel-topo, .app .assist-topo { margin-left: -.9rem; margin-right: -.9rem; padding-left: .9rem; padding-right: .9rem; }
  .trilha > :not(.atual):not(:last-child) { display: none; }
  .trilha .trilha-sep { display: none; }
}
@media (max-width: 640px) {
  .app .topo { height: 52px; gap: .4rem; }
  .trilha { display: none; }
  .app .seletor { flex: 1 1 auto; }
  .app .seletor-botao { min-width: 0; max-width: none; }
  .app .seletor-lista { right: 0; left: auto; min-width: 0; width: min(92vw, 340px); }
  .app .selo-homologacao { height: 30px; padding: 0 .45rem; }
  .app .selo-homologacao b { font-size: .68rem; }
  .app .conteudo { padding-top: .9rem; }
  .app .cabecalho-pagina, .app .painel-topo, .app .assist-topo { margin-top: -.9rem; }
  .app .cabecalho-pagina h1, .app .painel-topo h1 { font-size: 1.05rem; }
  .app .cabecalho-pagina .acoes { width: 100%; }
  .app .cabecalho-pagina .acoes .btn { flex: 1 1 0; }
  .barra-status .st:not(:nth-child(-n+2)):not(.st-perigo):not(.st-alerta) { display: none; }
  .barra-status .st:first-child { flex: 0 1 auto; overflow: hidden; }
  .barra-status .st:first-child { text-overflow: ellipsis; }
  .app .tabela th, .app .tabela td { padding: .5rem .7rem; }
}
@media (prefers-reduced-motion: reduce) { .app { transition: none; } }

/* ---------- ajustes da conferência ---------- */
.app .busca svg { left: .65rem; width: 15px; height: 15px; }
.app .busca .entrada { padding-left: 2.1rem; }
.app .assist-topo { display: block; }
.app .percurso-ufs > .dica { font-size: .78rem; color: var(--texto-3); }
/* o "← voltar" do cabeçalho vira redundante com a trilha do topo (no celular a trilha some e ele volta) */
.app .cabecalho-pagina a.fraco:first-child, .app .assist-topo > a.fraco:first-child { display: inline-block; font-size: .76rem; margin-bottom: .1rem; }
@media (min-width: 641px) {
  .app .cabecalho-pagina a.fraco:first-child, .app .assist-topo > a.fraco:first-child { display: none; }
}
@media (max-width: 640px) {
  .app { --status-h: 0px; }
  .barra-status { display: none; }
  .btn-paleta { width: 34px; height: 34px; padding: 0; justify-content: center; flex: none; }
}

/* =====================================================================
   IDENTIDADE POR MÓDULO (gerado): cada área tem cor e ícone próprios, usados
   no cabeçalho da tela, no menu lateral e nos atalhos/indicadores do painel.
   ===================================================================== */
.principal[data-modulo="painel"], .m-painel { --mc: #059669; --mc2: #34d399; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='9' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='5' rx='1.5'/%3E%3Crect x='14' y='12' width='7' height='9' rx='1.5'/%3E%3Crect x='3' y='16' width='7' height='5' rx='1.5'/%3E%3C/svg%3E"); }
.principal[data-modulo="cte"], .m-cte { --mc: #2563eb; --mc2: #60a5fa; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.62l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E"); }
.principal[data-modulo="cteos"], .m-cteos { --mc: #0284c7; --mc2: #38bdf8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.principal[data-modulo="mdfe"], .m-mdfe { --mc: #7c3aed; --mc2: #a78bfa; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.1 5.1 9 3 3 5.4v15.6l6-2.4 6 2.4 6-2.4V2.4z'/%3E%3Cpath d='M9 3v15.6'/%3E%3Cpath d='M15 5.4V21'/%3E%3C/svg%3E"); }
.principal[data-modulo="eventos"], .m-eventos { --mc: #db2777; --mc2: #f472b6; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 20h9'/%3E%3Cpath d='M16.38 3.62a1 1 0 0 1 3 3L7.37 18.64a2 2 0 0 1-.86.5l-2.87.84a.5.5 0 0 1-.62-.62l.84-2.87a2 2 0 0 1 .5-.86z'/%3E%3C/svg%3E"); }
.principal[data-modulo="gnre"], .m-gnre { --mc: #d97706; --mc2: #fbbf24; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3C/svg%3E"); }
.principal[data-modulo="distribuicao"], .m-distribuicao { --mc: #0891b2; --mc2: #22d3ee; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 15V3'/%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E"); }
.principal[data-modulo="sefaz"], .m-sefaz { --mc: #4f46e5; --mc2: #818cf8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 3v18h18'/%3E%3Cpath d='m19 9-5 5-4-4-3 3'/%3E%3C/svg%3E"); }
.principal[data-modulo="nfe-recebidas"], .m-nfe-recebidas { --mc: #0d9488; --mc2: #2dd4bf; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='22 12 16 12 14 15 10 15 8 12 2 12'/%3E%3Cpath d='M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z'/%3E%3C/svg%3E"); }
.principal[data-modulo="inutilizacao"], .m-inutilizacao { --mc: #be123c; --mc2: #fb7185; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16'/%3E%3Cpath d='M4 15h16'/%3E%3Cpath d='M10 3 8 21'/%3E%3Cpath d='m16 3-2 18'/%3E%3C/svg%3E"); }
.principal[data-modulo="empresas"], .m-empresas { --mc: #059669; --mc2: #34d399; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='2' width='16' height='20' rx='2'/%3E%3Cpath d='M9 22v-4h6v4'/%3E%3Cpath d='M8 6h.01M16 6h.01M12 6h.01M12 10h.01M12 14h.01M16 10h.01M16 14h.01M8 10h.01M8 14h.01'/%3E%3C/svg%3E"); }
.principal[data-modulo="clientes"], .m-clientes { --mc: #0d9488; --mc2: #2dd4bf; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M22 21v-2a4 4 0 0 0-3-3.87'/%3E%3Cpath d='M16 3.13a4 4 0 0 1 0 7.75'/%3E%3C/svg%3E"); }
.principal[data-modulo="veiculos"], .m-veiculos { --mc: #ea580c; --mc2: #fb923c; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 18V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v11a1 1 0 0 0 1 1h2'/%3E%3Cpath d='M15 18H9'/%3E%3Cpath d='M19 18h2a1 1 0 0 0 1-1v-3.65a1 1 0 0 0-.22-.62l-3.48-4.35A1 1 0 0 0 17.52 8H14'/%3E%3Ccircle cx='17' cy='18' r='2'/%3E%3Ccircle cx='7' cy='18' r='2'/%3E%3C/svg%3E"); }
.principal[data-modulo="motoristas"], .m-motoristas { --mc: #c2410c; --mc2: #fdba74; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Cpath d='M12 14v8'/%3E%3Cpath d='m10.2 11.1-7.9-2.4'/%3E%3Cpath d='m13.8 11.1 7.9-2.4'/%3E%3C/svg%3E"); }
.principal[data-modulo="seguradoras"], .m-seguradoras { --mc: #4f46e5; --mc2: #818cf8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.principal[data-modulo="series"], .m-series { --mc: #475569; --mc2: #94a3b8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 9h16'/%3E%3Cpath d='M4 15h16'/%3E%3Cpath d='M10 3 8 21'/%3E%3Cpath d='m16 3-2 18'/%3E%3C/svg%3E"); }
.principal[data-modulo="usuarios"], .m-usuarios { --mc: #475569; --mc2: #94a3b8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='12' cy='7' r='4'/%3E%3C/svg%3E"); }
.principal[data-modulo="assinatura"], .m-assinatura { --mc: #16a34a; --mc2: #4ade80; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='2' y='5' width='20' height='14' rx='2'/%3E%3Cpath d='M2 10h20'/%3E%3Cpath d='M6 15h4'/%3E%3C/svg%3E"); }
.principal[data-modulo="integracoes"], .m-integracoes { --mc: #7c3aed; --mc2: #a78bfa; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4'/%3E%3Cpath d='m21 2-9.6 9.6'/%3E%3Ccircle cx='7.5' cy='15.5' r='5.5'/%3E%3C/svg%3E"); }
.principal[data-modulo="minha-conta"], .m-minha-conta { --mc: #475569; --mc2: #94a3b8; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E"); }
.principal[data-modulo="admin"], .m-admin { --mc: #0f172a; --mc2: #64748b; --mi: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E"); }
.m-frete { --mc: #2563eb; --mc2: #60a5fa; } .m-plano { --mc: #d97706; --mc2: #fbbf24; }
.app .lateral .nav-item[href="/painel"] { --mc2: #34d399; }
.app .lateral .nav-item[href="/cte"] { --mc2: #60a5fa; }
.app .lateral .nav-item[href="/mdfe"] { --mc2: #a78bfa; }
.app .lateral .nav-item[href="/eventos"] { --mc2: #f472b6; }
.app .lateral .nav-item[href="/gnre"] { --mc2: #fbbf24; }
.app .lateral .nav-item[href="/distribuicao"] { --mc2: #22d3ee; }
.app .lateral .nav-item[href="/sefaz"] { --mc2: #818cf8; }
.app .lateral .nav-item[href="/nfe-recebidas"] { --mc2: #2dd4bf; }
.app .lateral .nav-item[href="/empresas"] { --mc2: #34d399; }
.app .lateral .nav-item[href="/clientes"] { --mc2: #2dd4bf; }
.app .lateral .nav-item[href="/veiculos"] { --mc2: #fb923c; }
.app .lateral .nav-item[href="/motoristas"] { --mc2: #fdba74; }
.app .lateral .nav-item[href="/seguradoras"] { --mc2: #818cf8; }
.app .lateral .nav-item[href="/series"] { --mc2: #94a3b8; }
.app .lateral .nav-item[href="/usuarios"] { --mc2: #94a3b8; }
.app .lateral .nav-item[href="/assinatura"] { --mc2: #4ade80; }
.app .lateral .nav-item[href="/integracoes"] { --mc2: #a78bfa; }
.app .lateral .nav-item[href="/minha-conta"] { --mc2: #94a3b8; }
.app .lateral .nav-item[href="/admin"] { --mc2: #64748b; }

/* =====================================================================
   HARMONIA (07/10, 2ª passada): fundo, cartões, cabeçalho com o ícone do
   módulo, menu colorido por módulo, painel equilibrado.
   ===================================================================== */
.app { --fundo: #f3f5f9; }
:root[data-theme="dark"] .app { --fundo: #121a29; }
:where(.app .principal) { --mc: #059669; --mc2: #34d399; }

/* cartões: um pouco mais de presença, mesmo raio e respiro em todo lugar */
.app .cartao { border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 1px 1px rgba(16,24,40,.02); border-color: #e3e8ef; }
:root[data-theme="dark"] .app .cartao { border-color: var(--borda); }
.app .cartao-cab { border-radius: 12px 12px 0 0; padding: .7rem 1.1rem; }
.app .cartao-corpo { padding: 1.1rem; }
.app .cartao-cab h2 { font-size: .92rem; font-weight: 650; }
.app .tabela-wrap:last-child .tabela tr:last-child td { border-bottom: 0; }
.app .tabela th:first-child, .app .tabela td:first-child { padding-left: 1.1rem; }
.app .tabela th:last-child, .app .tabela td:last-child { padding-right: 1.1rem; }

/* cabeçalho da tela: faixa com a cor do módulo e o ícone em destaque */
.app .cabecalho-pagina, .app .painel-topo, .app .assist-topo {
  position: relative; padding-top: .85rem; padding-bottom: .85rem;
  background: linear-gradient(100deg, color-mix(in srgb, var(--mc) 7%, var(--superficie)) 0%, var(--superficie) 45%);
}
.app .cabecalho-pagina::after, .app .painel-topo::after, .app .assist-topo::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, var(--mc) 0, color-mix(in srgb, var(--mc2) 60%, transparent) 30%, transparent 70%);
}
/* o ícone fica à esquerda do bloco título+subtítulo, centralizado na altura */
.app .cabecalho-pagina > div:first-child, .app .painel-topo > div:first-child {
  position: relative; min-height: 42px; padding-left: calc(42px + .85rem); display: flex; flex-direction: column; justify-content: center;
}
.app .assist-topo { padding-left: calc(1.25rem + 42px + .85rem); min-height: 72px; display: flex; flex-direction: column; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: 0; }
.app .cabecalho-pagina > div:first-child::before, .app .painel-topo > div:first-child::before, .app .assist-topo::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 11px;
  background: var(--mi) center / 21px no-repeat, linear-gradient(135deg, var(--mc2), var(--mc));
  box-shadow: 0 8px 16px -8px var(--mc), inset 0 1px 0 rgba(255,255,255,.25);
}
.app .assist-topo::before { left: 1.25rem; }
.app .assist-topo > a.fraco:first-child { align-self: flex-start; }
.app .titulo-com-icone img { display: none; }
.app .cabecalho-pagina h1, .app .painel-topo h1, .app .assist-topo h1 { font-size: 1.2rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }
.app .contador { font-size: .72rem; font-weight: 700; padding: .1rem .5rem; border-radius: 999px; background: color-mix(in srgb, var(--mc) 12%, transparent); color: var(--mc); }

/* vazio e títulos de seção acompanham a cor do módulo */
.app .vazio .icone-grande { background: color-mix(in srgb, var(--mc) 11%, transparent); color: var(--mc); }

/* menu lateral: cada ícone com a cor do seu módulo */
:where(.app .lateral .nav-item) { --mc2: #94a3b8; }
.app .lateral .nav-item svg { color: var(--mc2); opacity: .75; }
.app .lateral .nav-item:hover svg { opacity: 1; color: var(--mc2); }
.app .lateral .nav-item.active { background: color-mix(in srgb, var(--mc2) 16%, transparent); }
.app .lateral .nav-item.active svg { color: var(--mc2); opacity: 1; }
.app .lateral .nav-item.active::before { background: var(--mc2); }

/* ---------- painel ---------- */
.app .kpis2 { gap: 1rem; }
:where(.app .kpi2) { --mc: #059669; }
.app .kpi2 { padding: .95rem 1.1rem 1rem; border-top: 3px solid var(--mc); }
.app .kpi2-ic { width: 30px; height: 30px; border-radius: 8px; background: color-mix(in srgb, var(--mc) 12%, transparent) !important; color: var(--mc) !important; }
.app .kpi2-val { font: 700 1.6rem var(--fonte) !important; margin: .55rem 0 .15rem; }
.app .kpi2-val small { font-size: .85rem; }
.app .kpi2 .barra { height: 5px; border: 0; }
.app .kpi2 .barra > i { background: var(--mc); }

.atalhos-faixa { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
:where(.atalhos-faixa a) { --mc: #059669; --mc2: #34d399; }
.atalhos-faixa a {
  display: grid; grid-template-columns: 36px minmax(0, 1fr); column-gap: .65rem; align-items: center; padding: .7rem .8rem;
  background: var(--superficie); border: 1px solid #e3e8ef; border-radius: 12px; color: var(--texto); text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(16,24,40,.05); transition: border-color .15s, box-shadow .15s, transform .15s;
}
:root[data-theme="dark"] .atalhos-faixa a { border-color: var(--borda); }
.atalhos-faixa a:hover { border-color: color-mix(in srgb, var(--mc) 45%, transparent); box-shadow: 0 6px 16px -10px var(--mc); transform: translateY(-1px); }
.atalhos-faixa span { grid-row: 1 / span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--mc2), var(--mc)); }
.atalhos-faixa span svg { width: 18px; height: 18px; }
.atalhos-faixa b { font-size: .84rem; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atalhos-faixa small { font-size: .72rem; color: var(--texto-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1280px) { .atalhos-faixa { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .atalhos-faixa { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; } .atalhos-faixa small { display: none; } }

.app .painel-grade { gap: 1rem; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
.app .painel-col { gap: 1rem; }
.app .pend-lista { padding: .3rem .5rem .5rem; }
.app .pend { padding: .55rem .6rem; border-radius: 8px; gap: .65rem; }
.app .pend > svg { width: 30px; height: 30px; padding: 7px; border-radius: 8px; }
.app .pend b { font-size: .84rem; }
.app .pend small { font-size: .75rem; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.passos-faixa { margin-bottom: 1rem; }
.passos-faixa .cartao-corpo { padding: .8rem 1.1rem; }
.passos-faixa .lista-passos { flex-direction: row; gap: .5rem; counter-reset: p; }
.passos-faixa .lista-passos li { flex: 1 1 0; min-width: 0; padding: .5rem .7rem; border: 1px solid var(--borda); border-radius: 10px; background: var(--superficie-2); gap: .6rem; }
.passos-faixa .lista-passos li.feito { background: var(--superficie); }
.passos-faixa .lista-passos .t { font-size: .82rem; }
.passos-faixa .lista-passos li .btn { flex: none; }
@media (max-width: 900px) { .passos-faixa .lista-passos { flex-direction: column; } }

/* faixa de homologação dentro do assistente: firme, sem gritar mais que o topo */
.app .faixa-homolog { background: color-mix(in srgb, #dc2626 9%, var(--superficie)); color: #b91c1c; border: 1px solid color-mix(in srgb, #dc2626 30%, transparent); border-left: 4px solid #dc2626; }
:root[data-theme="dark"] .app .faixa-homolog { color: #fca5a5; }

/* abas (consultas SEFAZ, pagamento): segmentado de sistema */
.app .abas-pagamento { gap: 0; display: inline-flex; padding: 3px; background: var(--superficie); border: 1px solid #e3e8ef; border-radius: 10px; }
.app .abas-pagamento button { border: 0; border-radius: 7px; padding: .4rem .85rem; font-size: .84rem; background: none; color: var(--texto-2); }
.app .abas-pagamento button.sel { background: color-mix(in srgb, var(--mc) 12%, transparent); color: var(--mc); }
.app .abas-pagamento button svg { width: 16px; height: 16px; }

/* passos do assistente com a cor do módulo */
.app .assist-passos .atual .bolinha { background: var(--mc); border-color: var(--mc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 20%, transparent); }
.app .assist-passos .feito .bolinha { border-color: var(--mc); color: var(--mc); background: color-mix(in srgb, var(--mc) 10%, var(--superficie)); }
.app .assist-trilho i { background: var(--mc); }
@media (max-width: 640px) {
  .app .cabecalho-pagina > div:first-child, .app .painel-topo > div:first-child { padding-left: calc(34px + .65rem); min-height: 34px; }
  .app .assist-topo { padding-left: calc(.9rem + 34px + .65rem); min-height: 60px; }
  .app .assist-topo::before { left: .9rem; }
  .app .cabecalho-pagina > div:first-child::before, .app .painel-topo > div:first-child::before, .app .assist-topo::before { width: 34px; height: 34px; border-radius: 9px; background-size: 17px, auto; }
}
.app .assist-topo h1, .app .assist-topo p, .app .cabecalho-pagina h1, .app .cabecalho-pagina p { margin-top: 0; margin-bottom: 0; }
.app .cabecalho-pagina p, .app .painel-data, .app .assist-topo p { margin-top: .15rem; }

/* ícones ilustrados do produto (CT-e, MDF-e, GNRE, Eventos, Distribuição): têm prioridade sobre o quadrado
   colorido em TODAS as telas do módulo — lista, assistente, detalhe — e nos atalhos do painel */
.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .m-cte, .m-cteos { --mimg: url("../img/icone-cte-128.webp"); }
.principal[data-modulo="mdfe"], .m-mdfe { --mimg: url("../img/icone-mdfe-128.webp"); }
.principal[data-modulo="gnre"], .m-gnre { --mimg: url("../img/icone-gnre-128.webp"); }
.principal[data-modulo="eventos"], .m-eventos { --mimg: url("../img/icone-eventos-128.webp"); }
.principal[data-modulo="distribuicao"], .m-distribuicao { --mimg: url("../img/icone-distribuicao-128.webp"); }
:is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"])
  :is(.cabecalho-pagina > div:first-child, .painel-topo > div:first-child)::before,
:is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"]) .assist-topo::before {
  width: 48px; height: 48px; border-radius: 0; background: var(--mimg) center / contain no-repeat; box-shadow: none;
  filter: drop-shadow(0 6px 10px color-mix(in srgb, var(--mc) 35%, transparent));
}
:is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"])
  :is(.cabecalho-pagina > div:first-child, .painel-topo > div:first-child) { padding-left: calc(48px + .85rem); }
:is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"]) .assist-topo { padding-left: calc(1.25rem + 48px + .85rem); }
.atalhos-faixa :is(a.m-cte, a.m-mdfe, a.m-gnre, a.m-distribuicao) span { background: var(--mimg) center / contain no-repeat; filter: drop-shadow(0 4px 6px color-mix(in srgb, var(--mc) 35%, transparent)); }
.atalhos-faixa :is(a.m-cte, a.m-mdfe, a.m-gnre, a.m-distribuicao) span svg { display: none; }
@media (max-width: 640px) {
  :is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"])
    :is(.cabecalho-pagina > div:first-child, .painel-topo > div:first-child)::before,
  :is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"]) .assist-topo::before { width: 40px; height: 40px; }
  :is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"])
    :is(.cabecalho-pagina > div:first-child, .painel-topo > div:first-child) { padding-left: calc(40px + .65rem); }
  :is(.principal[data-modulo="cte"], .principal[data-modulo="cteos"], .principal[data-modulo="mdfe"], .principal[data-modulo="gnre"], .principal[data-modulo="eventos"], .principal[data-modulo="distribuicao"]) .assist-topo { padding-left: calc(.9rem + 40px + .65rem); }
}

/* =====================================================================
   TABELAS EM GRADE (planilha): colunas separadas, linhas zebradas,
   cabeçalho marcado — vale para todas as listas do sistema
   ===================================================================== */
.app table.tabela { border-collapse: separate; border-spacing: 0; }
.app .tabela th {
  background: color-mix(in srgb, var(--mc, #059669) 5%, var(--superficie-2)); color: var(--texto-2);
  border-bottom: 1px solid var(--borda-forte); border-right: 1px solid var(--borda); white-space: nowrap;
}
.app .tabela td { border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); height: 42px; }
.app .tabela th:last-child, .app .tabela td:last-child { border-right: 0; }
.app .tabela tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--superficie-2) 60%, var(--superficie)); }
.app .tabela tbody tr:hover td { background: color-mix(in srgb, var(--mc, #059669) 7%, var(--superficie)); }
.app .tabela tbody tr:last-child td { border-bottom: 0; }
.app .tabela td.num, .app .tabela td .num { font-variant-numeric: tabular-nums; }
.app .tabela .nome-linha { font-weight: 650; color: var(--texto); }
.app .tabela a.nome-linha:hover { color: var(--mc, var(--marca-forte)); }
.app .tabela td.acoes-linha { width: 1%; }
/* a tabela do cartão encosta nas bordas arredondadas */
.app .cartao > .tabela-wrap:last-child, .app .cartao > .tabela-wrap:last-child .tabela { border-radius: 0 0 12px 12px; }
.app .cartao > .tabela-wrap:first-child .tabela th:first-child { border-top-left-radius: 12px; }
.app .cartao > .tabela-wrap:first-child .tabela th:last-child { border-top-right-radius: 12px; }
/* célula com avatar + nome + subtítulo */
.celula-nome { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.celula-nome .avatar { width: 30px; height: 30px; border-radius: 8px; font-size: .72rem; background: color-mix(in srgb, var(--mc, #059669) 12%, transparent); color: var(--mc, #059669); }
.celula-nome > span { min-width: 0; line-height: 1.25; }
.celula-nome small { display: block; color: var(--texto-3); font-size: .75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 360px; }
:root[data-theme="dark"] .app .tabela tbody tr:nth-child(even) td { background: color-mix(in srgb, #fff 2.5%, var(--superficie)); }
@media (max-width: 640px) {
  .app .tabela td { height: auto; }
  .celula-nome small { max-width: 52vw; }
  .celula-nome .so-movel { display: block; font-variant-numeric: tabular-nums; }
}

/* =====================================================================
   LISTAS: pílulas por situação, colunas ordenáveis, seleção e lote
   ===================================================================== */
.pilulas { display: flex; gap: .4rem; flex-wrap: wrap; padding: .6rem 1.1rem; border-bottom: 1px solid var(--borda); background: var(--superficie); }
.pilula {
  display: inline-flex; align-items: center; gap: .4rem; height: 28px; padding: 0 .7rem; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--borda); background: var(--superficie); color: var(--texto-2); font: 600 .78rem var(--fonte); transition: .12s;
}
.pilula b { font-weight: 700; color: var(--texto); background: var(--superficie-2); border-radius: 999px; padding: 0 .4rem; font-size: .72rem; min-width: 20px; text-align: center; }
.pilula i { width: 7px; height: 7px; border-radius: 50%; background: var(--texto-3); }
.pilula:hover { border-color: var(--borda-forte); color: var(--texto); }
.pilula.sel { background: color-mix(in srgb, var(--mc) 10%, var(--superficie)); border-color: color-mix(in srgb, var(--mc) 45%, transparent); color: var(--mc); }
.pilula.sel b { background: var(--mc); color: #fff; }
.p-autorizado i { background: #10b981; } .p-rejeitado i, .p-denegado i { background: #dc2626; }
.p-rascunho i { background: #94a3b8; } .p-enviando i { background: #2563eb; } .p-cancelado i { background: #64748b; }

.app .tabela th.ordenavel { padding: 0; }
.app .tabela th.ordenavel button {
  display: flex; align-items: center; gap: .3rem; width: 100%; height: 100%; padding: .5rem .9rem; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; white-space: nowrap;
}
.app .tabela th.ordenavel.dir button { justify-content: flex-end; }
.app .tabela th.ordenavel:first-child button, .app .tabela th.col-sel + th.ordenavel button { padding-left: .9rem; }
.app .tabela th.ordenavel button:hover { color: var(--texto); }
.app .tabela th.ordenavel.ativa { color: var(--mc); }
.seta-ord { font-size: .62rem; opacity: .45; }
.ativa .seta-ord { opacity: 1; }
.app .tabela .col-sel { width: 38px; padding: 0 0 0 1rem !important; text-align: left; }
.app .tabela .col-sel input { width: 16px; height: 16px; accent-color: var(--mc); cursor: pointer; vertical-align: middle; }
.app .tabela tr.marcada td { background: color-mix(in srgb, var(--mc) 9%, var(--superficie)) !important; }

.rodape-totais { display: flex; gap: 1.5rem; flex-wrap: wrap; justify-content: flex-end; padding: .55rem 1.1rem; border-top: 1px solid var(--borda-forte); background: var(--superficie-2); font-size: .8rem; color: var(--texto-2); }
.rodape-totais b { color: var(--texto); font-variant-numeric: tabular-nums; }
.rodape-totais b.ok { color: var(--sucesso); }

.barra-lote {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--status-h, 30px) + 14px); z-index: 60;
  display: flex; align-items: center; gap: .5rem; padding: .5rem .6rem .5rem 1rem; border-radius: 12px;
  background: #0f1a2e; color: #e2e8f0; box-shadow: 0 18px 40px -12px rgba(11,19,36,.55); animation: sobe .18s ease; max-width: calc(100vw - 2rem); flex-wrap: wrap;
}
.lote-qtd { font-size: .84rem; margin-right: .4rem; } .lote-qtd b { color: #6ee7b7; }
.barra-lote .btn-fantasma { color: #cbd5e1; } .barra-lote .btn-fantasma:hover { background: rgba(255,255,255,.08); color: #fff; }
@media (max-width: 640px) { .rodape-totais { justify-content: flex-start; gap: .4rem 1rem; } .barra-lote { bottom: 12px; left: 1rem; right: 1rem; transform: none; } }

/* =====================================================================
   MAPA DO BRASIL (ladrilhos por UF)
   ===================================================================== */
.mapa-br { width: 100%; height: auto; display: block; overflow: visible; }
.mapa-uf rect { fill: var(--superficie-2); stroke: var(--borda); stroke-width: 1; transition: fill .15s, stroke .15s; }
.mapa-sigla { font: 700 12px var(--fonte); fill: var(--texto-2); text-anchor: middle; pointer-events: none; }
.mapa-valor { font: 700 11px var(--fonte); fill: var(--texto); text-anchor: middle; pointer-events: none; }
.mapa-uf.clicavel { cursor: pointer; }
.mapa-uf.clicavel:hover rect { stroke: var(--mc); stroke-width: 2; }
/* status SEFAZ */
.m-ok rect { fill: color-mix(in srgb, #10b981 22%, var(--superficie)); stroke: color-mix(in srgb, #10b981 55%, transparent); }
.m-ok .mapa-sigla { fill: #047857; }
.m-perigo rect { fill: color-mix(in srgb, #dc2626 18%, var(--superficie)); stroke: color-mix(in srgb, #dc2626 55%, transparent); }
.m-perigo .mapa-sigla { fill: #b91c1c; }
.m-sem rect { fill: var(--superficie-2); stroke: var(--borda-forte); stroke-dasharray: 3 3; }
.m-sem .mapa-sigla { fill: var(--texto-3); }
.m-minha rect { stroke: var(--mc); stroke-width: 2.5; }
.m-sel rect { stroke: var(--texto); stroke-width: 2.5; }
:root[data-theme="dark"] .m-ok .mapa-sigla { fill: #6ee7b7; }
:root[data-theme="dark"] .m-perigo .mapa-sigla { fill: #fca5a5; }
/* percurso */
.m-rota rect { fill: color-mix(in srgb, var(--mc) 22%, var(--superficie)); stroke: var(--mc); }
.m-rota .mapa-sigla { fill: var(--mc); }
.m-origem rect, .m-destino rect { fill: var(--mc); stroke: var(--mc); }
.m-destino rect { fill: color-mix(in srgb, var(--mc) 75%, #000); }
.m-origem .mapa-sigla, .m-destino .mapa-sigla { fill: #fff; }
.mapa-rota { fill: none; stroke: var(--mc); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 7; opacity: .9; pointer-events: none; }
.mapa-seta { fill: var(--mc); }
.mapa-ordem circle { fill: var(--superficie); stroke: var(--mc); stroke-width: 1.5; }
.mapa-ordem text { font: 700 9px var(--fonte); fill: var(--mc); text-anchor: middle; }
/* calor (painel) */
.m-calor .mapa-sigla { fill: #fff; } .m-calor .mapa-valor { fill: #fff; }
.m-n1 rect { fill: color-mix(in srgb, #2563eb 35%, var(--superficie)); stroke: transparent; }
.m-n1 .mapa-sigla, .m-n1 .mapa-valor { fill: #1e3a8a; }
.m-n2 rect { fill: color-mix(in srgb, #2563eb 58%, var(--superficie)); stroke: transparent; }
.m-n3 rect { fill: color-mix(in srgb, #2563eb 80%, var(--superficie)); stroke: transparent; }
.m-n4 rect { fill: #1d4ed8; stroke: transparent; }
:root[data-theme="dark"] .m-n1 .mapa-sigla, :root[data-theme="dark"] .m-n1 .mapa-valor { fill: #fff; }

/* SEFAZ: mapa + painel lateral */
.sefaz-mapa { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin: .5rem 0 1rem; }
.sefaz-lado { display: flex; flex-direction: column; gap: .75rem; }
.legenda-mapa { display: flex; flex-wrap: wrap; gap: .5rem 1.1rem; font-size: .8rem; color: var(--texto-2); }
.legenda-mapa span { display: inline-flex; align-items: center; gap: .4rem; }
.legenda-mapa i { width: 12px; height: 12px; border-radius: 3px; border: 1px solid; }
.legenda-mapa b { color: var(--texto); }
.l-ok { background: color-mix(in srgb, #10b981 22%, var(--superficie)); border-color: #10b981 !important; }
.l-perigo { background: color-mix(in srgb, #dc2626 18%, var(--superficie)); border-color: #dc2626 !important; }
.l-sem { background: var(--superficie-2); border-style: dashed !important; border-color: var(--borda-forte) !important; }
.l-minha { background: var(--superficie); border: 2px solid var(--mc) !important; }
.uf-detalhe { display: flex; flex-direction: column; gap: .1rem; padding: .7rem .9rem; border-radius: 10px; border: 1px solid var(--borda); border-left: 4px solid var(--texto-3); background: var(--superficie-2); }
.uf-detalhe small { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--texto-3); }
.uf-detalhe b { font-size: .95rem; } .uf-detalhe span { font-size: .82rem; color: var(--texto-2); }
.uf-detalhe.ok { border-left-color: #10b981; } .uf-detalhe.ruim { border-left-color: #dc2626; } .uf-detalhe.sem { border-left-color: var(--borda-forte); }
@media (max-width: 760px) { .sefaz-mapa { grid-template-columns: 1fr; } .sefaz-mapa .mapa-br { max-width: 320px; margin: 0 auto; } }

/* MDF-e: percurso com mapa */
.percurso-corpo { display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 1.25rem; align-items: start; }
.percurso-esq { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.percurso-mapa { display: flex; flex-direction: column; gap: .35rem; align-items: center; padding: .6rem; border: 1px solid var(--borda); border-radius: 12px; background: var(--superficie-2); }
.percurso-mapa .dica { font-size: .72rem; color: var(--texto-3); text-align: center; }
@media (max-width: 760px) { .percurso-corpo { grid-template-columns: 1fr; } .percurso-mapa .mapa-br { max-width: 240px; } }

/* painel: mapa de destinos + ranking */
.mapa-painel { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 1rem; align-items: center; }
.mapa-painel .mapa-vazio { margin: 0; }
.ranking-ufs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.ranking-ufs li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: .5rem; font-size: .8rem; }
.ranking-ufs i { height: 8px; border-radius: 4px; background: linear-gradient(90deg, #60a5fa, #1d4ed8); min-width: 4px; }
.ranking-ufs span { font-variant-numeric: tabular-nums; font-weight: 650; }

/* mini-gráfico nos indicadores */
.faisca { display: block; width: 100%; height: 26px; margin-top: .55rem; }
.faisca polyline { fill: none; stroke: var(--mc); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.faisca polygon { fill: color-mix(in srgb, var(--mc) 12%, transparent); stroke: none; }
.faisca.vazia line { stroke: var(--borda-forte); stroke-dasharray: 2 3; vector-effect: non-scaling-stroke; }
.m-sel rect { stroke-dasharray: none; }
.mapa-rota { stroke-width: 2.5; stroke-dasharray: 2 6; opacity: .75; }
.mapa-painel { grid-template-columns: minmax(0, 230px) minmax(0, 1fr); }
@media (max-width: 1280px) and (min-width: 1101px) { .mapa-painel { grid-template-columns: 1fr; } .mapa-painel .mapa-br { max-width: 240px; margin: 0 auto; } }
@media (max-width: 560px) { .mapa-painel { grid-template-columns: 1fr; } .mapa-painel .mapa-br { max-width: 260px; margin: 0 auto; } }

/* painel em tablet e celular: uma coluna só (a regra ".app .painel-grade" acima ganhava do app.css e deixava os dois gráficos espremidos lado a lado) */
@media (max-width: 1100px) { .app .painel-grade { grid-template-columns: minmax(0, 1fr); } }
.ranking-ufs li { grid-template-columns: 26px minmax(0, 1fr) 2.2ch; }
.ranking-ufs span { text-align: right; }
@media (max-width: 560px) {
  .app .painel-grade .cartao-cab { flex-wrap: nowrap; align-items: flex-start; gap: .6rem; padding: .85rem 1rem .75rem; }
  .app .painel-grade .cartao-cab > div { min-width: 0; }
  .app .painel-grade .cartao-cab h2 { font-size: 1rem; line-height: 1.25; }
  .app .painel-grade .cartao-cab h2 + .fraco { font-size: .8rem; line-height: 1.35; margin-top: .2rem; }
  .app .painel-grade .cartao-cab > .btn, .app .painel-grade .cartao-cab > .etiqueta { flex: none; white-space: nowrap; }
  .app .painel-grade .cartao-corpo { padding: 1rem; }
  .app .grafico { height: 210px; gap: .45rem; }
  .app .g-eixo, .app .g-x { font-size: .7rem; }
  .app .g-barras { gap: 2px; }
  .app .g-barra { max-width: none; border-radius: 3px 3px 0 0; }
  .app .g-tabela summary { padding: .35rem 0; }
  .mapa-painel { gap: 1.1rem; }
  .mapa-painel .mapa-br { max-width: min(100%, 300px); }
  .mapa-painel .mapa-vazio { text-align: center; }
  .ranking-ufs { gap: .7rem; padding-top: 1rem; border-top: 1px solid var(--borda); }
  .ranking-ufs li { grid-template-columns: 30px minmax(0, 1fr) 2.6ch; gap: .7rem; font-size: .9rem; }
  .ranking-ufs li > i { height: 10px; border-radius: 5px; }
}

/* =====================================================================
   ASSISTENTE: formulário + resumo lateral fixo
   ===================================================================== */
.assist-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; }
.assist-resumo {
  position: sticky; top: calc(var(--topo-h) + .9rem); display: flex; flex-direction: column; gap: 0;
  background: var(--superficie); border: 1px solid #e3e8ef; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05); overflow: hidden;
  max-height: calc(100vh - var(--topo-h) - var(--status-h) - 2rem); overflow-y: auto;
}
:root[data-theme="dark"] .assist-resumo { border-color: var(--borda); }
.ar-cab { display: flex; align-items: center; gap: .65rem; padding: .8rem 1rem; border-bottom: 1px solid var(--borda); background: linear-gradient(100deg, color-mix(in srgb, var(--mc) 9%, var(--superficie)), var(--superficie)); }
.ar-cab b { display: block; font-size: .9rem; } .ar-cab small { font-size: .74rem; color: var(--texto-3); }
.ar-ic { width: 34px; height: 34px; flex: none; background: var(--mimg) center / contain no-repeat; }
.ar-bloco { display: flex; flex-direction: column; gap: .25rem; padding: .75rem 1rem; border-bottom: 1px solid var(--borda); font-size: .84rem; }
.ar-bloco > small, .ar-total > small { font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.ar-falta { color: var(--texto-3); font-style: italic; font-size: .8rem; }
.ar-bloco.vazio { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--superficie-2) 70%, transparent) 8px 16px); }
.ar-quem { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .3rem; align-items: baseline; }
.ar-quem i { font-style: normal; font-size: .72rem; color: var(--texto-3); }
.ar-quem b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-rota { display: grid; grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr); align-items: center; gap: .3rem; }
.ar-rota span { display: flex; flex-direction: column; font-size: .76rem; color: var(--texto-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ar-rota span:last-child { text-align: right; }
.ar-rota b { font-size: 1.05rem; color: var(--mc); }
.ar-rota i { height: 2px; background: repeating-linear-gradient(90deg, var(--mc) 0 4px, transparent 4px 7px); position: relative; }
.ar-rota i::after { content: ""; position: absolute; right: -2px; top: -4px; border: 5px solid transparent; border-left-color: var(--mc); border-right: 0; }
.ar-num { display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; color: var(--texto-2); }
.ar-mapa { max-width: 170px; margin: .3rem auto .1rem; }
.ar-mapa .mapa-sigla { font-size: 11px; }
.ar-total { display: flex; flex-direction: column; gap: .1rem; padding: .85rem 1rem; background: color-mix(in srgb, var(--mc) 6%, var(--superficie)); border-bottom: 1px solid var(--borda); }
.ar-total b { font-size: 1.45rem; font-weight: 700; color: var(--texto); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.ar-total span { font-size: .76rem; color: var(--texto-3); }
.ar-passos { list-style: none; margin: 0; padding: .7rem 1rem .85rem; display: flex; flex-direction: column; gap: .3rem; font-size: .8rem; color: var(--texto-3); }
.ar-passos li { display: flex; align-items: center; gap: .55rem; }
.ar-passos i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--borda-forte); flex: none; }
.ar-passos li.feito { color: var(--texto-2); } .ar-passos li.feito i { background: var(--mc); border-color: var(--mc); box-shadow: inset 0 0 0 2px var(--superficie); }
.ar-passos li.atual { color: var(--texto); font-weight: 650; } .ar-passos li.atual i { border-color: var(--mc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--mc) 20%, transparent); }
.placa-mini { display: inline-block; margin: 0 .3rem .2rem 0; padding: .05rem .45rem; border: 1.5px solid #1f2937; border-top: 4px solid #1d4ed8; border-radius: 4px; background: #fff; color: #111827; font: 700 .78rem ui-monospace, Consolas, monospace; letter-spacing: .04em; }
@media (max-width: 1180px) { .assist-layout { grid-template-columns: minmax(0, 1fr); } .assist-resumo { display: none; } }

/* prévia do DACTE (folha) */
.previa-doc { margin-top: 1rem; border: 1px solid #e3e8ef; border-radius: 12px; background: var(--superficie); overflow: hidden; }
.previa-doc > summary { display: flex; align-items: center; gap: .5rem; padding: .7rem 1rem; cursor: pointer; font-weight: 650; font-size: .9rem; list-style: none; border-bottom: 1px solid var(--borda); }
.previa-doc > summary svg { width: 16px; height: 16px; color: var(--mc); }
.previa-doc > summary::-webkit-details-marker { display: none; }
.previa-doc:not([open]) > summary { border-bottom: 0; }
.folha {
  position: relative; margin: 1rem auto; max-width: 820px; background: #fff; color: #111; padding: 14px; border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 10px 30px -12px rgba(0,0,0,.25); font: 400 10.5px/1.35 Arial, Helvetica, sans-serif; overflow: hidden;
}
.folha-marca { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; font: 800 46px Arial, sans-serif; color: rgba(220,38,38,.09); transform: rotate(-18deg); letter-spacing: .05em; white-space: nowrap; }
.fl-linha { display: flex; border: 1px solid #333; border-top: 0; }
.fl-linha:first-of-type, .fl-topo { border-top: 1px solid #333; }
.fl-cx { flex: 1; padding: 4px 6px; border-right: 1px solid #333; display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.fl-cx:last-child { border-right: 0; }
.fl-cx small { font-size: 7.5px; font-weight: 700; color: #444; letter-spacing: .03em; }
.fl-cx b { font-size: 11px; }
.fl-emit { flex: 1.6; } .fl-emit b { font-size: 12.5px; }
.fl-titulo { align-items: center; justify-content: center; text-align: center; }
.fl-titulo b { font-size: 18px; letter-spacing: .1em; }
.fl-mini { font-size: 9px; font-weight: 700; margin-top: 3px; }
.fl-num { flex: 1.1; display: grid; grid-template-columns: 1fr 1fr; gap: 3px 8px; }
.fl-num div { display: flex; flex-direction: column; font-size: 10.5px; font-weight: 700; }
.fl-dir { text-align: right; flex: .55; }
.fl-total { font-size: 13px; font-weight: 700; }
.fl-comp { flex: 2; } .fl-comp span { display: flex; justify-content: space-between; border-bottom: 1px dotted #bbb; }
.fl-comp i { font-style: normal; }
.fl-docs .mono { font-size: 9.5px; }
.fl-parte span { color: #333; }
@media (max-width: 640px) { .folha { font-size: 9px; padding: 8px; } .fl-linha { flex-wrap: wrap; } .fl-cx { flex-basis: 100%; border-right: 0; border-bottom: 1px solid #333; } .fl-cx:last-child { border-bottom: 0; } }

/* =====================================================================
   DETALHE DO DOCUMENTO: linha do tempo, resumo + rota, barra de ações
   ===================================================================== */
.linha-tempo { list-style: none; margin: 0 0 1rem; padding: .85rem 1.1rem; display: flex; background: var(--superficie); border: 1px solid #e3e8ef; border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.05); }
:root[data-theme="dark"] .linha-tempo { border-color: var(--borda); }
.linha-tempo li { flex: 1; display: flex; align-items: center; gap: .6rem; position: relative; min-width: 0; }
.linha-tempo li:not(:last-child)::after { content: ""; flex: 1; height: 2px; margin: 0 .75rem; background: var(--borda); border-radius: 2px; }
.linha-tempo li.lt-feito:not(:last-child)::after { background: var(--mc); }
.lt-bola { width: 26px; height: 26px; border-radius: 50%; flex: none; display: grid; place-items: center; border: 2px solid var(--borda-forte); background: var(--superficie); color: #fff; }
.lt-bola svg { width: 14px; height: 14px; }
.lt-feito .lt-bola { background: var(--mc); border-color: var(--mc); }
.lt-atual .lt-bola { border-color: var(--mc); background: var(--mc); box-shadow: 0 0 0 4px color-mix(in srgb, var(--mc) 22%, transparent); animation: pulsoLt 2s ease-in-out infinite; }
.lt-erro .lt-bola { background: #dc2626; border-color: #dc2626; }
.lt-pendente .lt-bola { border-style: dashed; }
.lt-txt { display: flex; flex-direction: column; line-height: 1.2; white-space: nowrap; }
.lt-txt b { font-size: .84rem; } .lt-txt small { font-size: .72rem; color: var(--texto-3); }
.lt-pendente .lt-txt b { color: var(--texto-3); font-weight: 600; }
.lt-erro .lt-txt b { color: #dc2626; }
@keyframes pulsoLt { 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--mc) 8%, transparent); } }
@media (max-width: 760px) {
  .linha-tempo { flex-direction: column; gap: .55rem; }
  .linha-tempo li::after { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lt-atual .lt-bola { animation: none; } }

.detalhe-grade { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1rem; align-items: start; margin-top: 1rem; }
.detalhe-lado { display: flex; flex-direction: column; gap: 1rem; }
.detalhe-mapa { display: flex; flex-direction: column; gap: .7rem; align-items: stretch; }
.detalhe-mapa .mapa-br { max-width: 210px; margin: 0 auto; }
.valor-destaque { display: flex; flex-direction: column; gap: .15rem; padding: 1rem 1.1rem; background: linear-gradient(120deg, color-mix(in srgb, var(--mc) 9%, var(--superficie)), var(--superficie)) !important; }
.valor-destaque small { font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--texto-3); }
.valor-destaque b { font-size: 1.6rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.valor-destaque span { font-size: .78rem; color: var(--texto-3); }
@media (max-width: 1000px) { .detalhe-grade { grid-template-columns: 1fr; } }

.btn-copiar { display: inline-flex; align-items: center; gap: .3rem; margin-left: .4rem; padding: .1rem .5rem; border: 1px solid var(--borda); border-radius: 6px; background: var(--superficie); color: var(--texto-2); font: 600 .72rem var(--fonte); cursor: pointer; vertical-align: middle; }
.btn-copiar svg { width: 12px; height: 12px; }
.btn-copiar:hover { border-color: var(--mc); color: var(--mc); }
.btn-copiar.copiado { background: var(--sucesso-suave); border-color: var(--sucesso); color: var(--sucesso); }

.barra-doc {
  position: sticky; bottom: calc(var(--status-h) + .6rem); z-index: 15; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center;
  margin-top: 1rem; padding: .45rem .6rem; background: var(--superficie); border: 1px solid #e3e8ef; border-radius: 12px; box-shadow: 0 -8px 20px -14px rgba(11,19,36,.3);
}
:root[data-theme="dark"] .barra-doc { border-color: var(--borda); }
.barra-doc:empty { display: none; }

/* esqueleto de carregamento */
.esqueleto i, .esq-ic { display: block; height: 12px; border-radius: 6px; background: linear-gradient(90deg, var(--superficie-2) 0%, color-mix(in srgb, var(--borda) 70%, var(--superficie-2)) 50%, var(--superficie-2) 100%); background-size: 200% 100%; animation: brilhoEsq 1.3s ease-in-out infinite; }
@keyframes brilhoEsq { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.esq-pagina { display: flex; flex-direction: column; gap: 1rem; }
.esq-cab { display: flex; align-items: center; gap: .85rem; padding: .3rem 0 .6rem; }
.esq-cab > div { display: flex; flex-direction: column; gap: .45rem; } .esq-cab i:first-child { height: 16px; }
.esq-ic { width: 42px; height: 42px; border-radius: 11px; }
.esq-cartao { display: flex; flex-direction: column; gap: 1rem; padding: 1.1rem; background: var(--superficie); border: 1px solid var(--borda); border-radius: 12px; }
.esq-grade { display: grid; grid-template-columns: repeat(3, 1fr); gap: .9rem 1rem; } .esq-grade i { height: 34px; }
.esq-lista { display: flex; flex-direction: column; }
.esq-linha { display: flex; gap: 1.5rem; align-items: center; padding: .85rem 1.1rem; border-bottom: 1px solid var(--borda); }
.esq-linha:last-child { border-bottom: 0; } .esq-linha i:nth-child(2) { flex: none; } .esq-linha i:last-child { margin-left: auto; }
@media (prefers-reduced-motion: reduce) { .esqueleto i, .esq-ic { animation: none; } }

/* =====================================================================
   ENTRADA (login, cadastro, senha): mesmo visual do sistema
   ===================================================================== */
.auth2-form .caixa {
  background: color-mix(in srgb, var(--superficie) 92%, transparent); border: 1px solid #e3e8ef; border-radius: 16px;
  box-shadow: 0 1px 2px rgba(16,24,40,.05), 0 24px 48px -24px rgba(11,19,36,.18); padding: 2rem 2rem 1.6rem; backdrop-filter: blur(6px);
}
:root[data-theme="dark"] .auth2-form .caixa { border-color: var(--borda); }
.auth2-form h1 { font: 700 1.55rem/1.2 var(--fonte); letter-spacing: -.01em; }
.auth2-form form { gap: .9rem; margin-top: 1.4rem; }
.auth2-form .campo > label, .auth2-form .rotulo { font-size: .78rem; }
.auth2-form .campo input:not([type=checkbox]) { height: 42px; border-radius: 8px; }
.auth2-form .com-icone > svg { top: 21px; }
.auth2-form .campo .com-icone input { padding-left: 2.4rem; }
.auth2-form .btn-primario { background: var(--marca-forte); box-shadow: 0 8px 18px -10px rgba(5,150,105,.8); border-radius: 8px; height: 44px; }
.auth2-form .btn-primario::after { display: none; }
.auth2-form .btn-primario:hover { background: #047857; transform: none; }
.auth2-form .auth-logo .logo { --logo-h: 64px; }
.auth2-form .divisor { font-size: .78rem; }
.auth2-form { background-image: radial-gradient(circle at 1px 1px, color-mix(in srgb, var(--texto-3) 22%, transparent) 1px, transparent 0); background-size: 22px 22px; }

/* prévia do sistema flutuando sobre a foto */
.auth-foto { position: relative; }
.previa-sistema {
  position: absolute; top: 2.2rem; right: 2.2rem; width: min(360px, 44%); z-index: 2; padding: 0 0 .6rem;
  background: rgba(255,255,255,.94); color: #0b1324; border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0,0,0,.55); backdrop-filter: blur(8px);
  animation: flutuaPrevia 7s ease-in-out infinite alternate; overflow: hidden; font-family: var(--fonte);
}
@keyframes flutuaPrevia { to { transform: translateY(-8px); } }
.ps-barra { display: flex; align-items: center; gap: .3rem; padding: .5rem .75rem; background: #0f1a2e; color: #94a3b8; font-size: .68rem; font-weight: 600; }
.ps-barra i { width: 8px; height: 8px; border-radius: 50%; background: #334155; } .ps-barra i:first-child { background: #f87171; } .ps-barra i:nth-child(2) { background: #fbbf24; } .ps-barra i:nth-child(3) { background: #34d399; }
.ps-barra span { margin-left: .4rem; }
.ps-linha { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: .6rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid #e5e9f0; font-size: .78rem; }
.ps-linha b { display: block; font-size: .8rem; } .ps-linha small { color: #64748b; font-size: .7rem; }
.ps-ic { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: #d1fae5; color: #059669; }
.ps-ic svg { width: 16px; height: 16px; } .ps-roxo { background: #ede9fe; color: #7c3aed; }
.ps-val { font-variant-numeric: tabular-nums; color: #047857; }
.ps-chip { font-size: .66rem; font-weight: 700; color: #7c3aed; background: #ede9fe; border-radius: 99px; padding: .1rem .45rem; }
.ps-graf { display: block; width: calc(100% - 1.6rem); height: 34px; margin: .55rem .8rem 0; }
.ps-graf polyline { fill: none; stroke: #10b981; stroke-width: 1.6; vector-effect: non-scaling-stroke; }
.ps-graf polygon { fill: rgba(16,185,129,.15); }
@media (prefers-reduced-motion: reduce) { .previa-sistema { animation: none; } }
@media (max-width: 760px) {
  .barra-doc { position: static; box-shadow: none; }
  .barra-doc .btn { flex: 1 1 calc(50% - .35rem); justify-content: flex-start; }
}
.detalhe-mapa .mapa-br { max-width: 180px; }
.ar-vinculo { background: color-mix(in srgb, #ea580c 7%, var(--superficie)); border-left: 3px solid #ea580c; }

/* ---------- GNRE: "precisa ou não" e calculadora ---------- */
.app .aviso-gnre { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .95rem; border-radius: var(--raio-lg); border: 1px solid var(--ag-borda); background: var(--ag-fundo); }
.app .aviso-gnre.ag-nao { --ag-cor: var(--sucesso); --ag-fundo: var(--sucesso-suave); --ag-borda: color-mix(in srgb, var(--sucesso) 30%, transparent); }
.app .aviso-gnre.ag-talvez { --ag-cor: var(--info); --ag-fundo: var(--info-suave); --ag-borda: color-mix(in srgb, var(--info) 30%, transparent); }
.app .aviso-gnre.ag-sim { --ag-cor: var(--alerta); --ag-fundo: var(--alerta-suave); --ag-borda: color-mix(in srgb, var(--alerta) 35%, transparent); }
.app .aviso-gnre .ag-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--ag-cor); color: #fff; }
.app .aviso-gnre .ag-ic svg { width: 18px; height: 18px; }
.app .aviso-gnre .ag-txt { display: flex; flex-direction: column; gap: .25rem; min-width: 0; font-size: .86rem; color: var(--texto-2); line-height: 1.45; }
.app .aviso-gnre .ag-txt b { color: var(--texto); font-size: .92rem; }
.app .aviso-gnre .ag-txt .btn, .app .aviso-gnre .ag-txt .link-acao { align-self: flex-start; margin-top: .35rem; display: inline-flex; align-items: center; gap: .35rem; }
.app .aviso-gnre .ag-txt .link-acao svg { width: 15px; height: 15px; }
.app .aviso-gnre .ag-nota { font-size: .8rem; color: var(--texto-3); }
.app .aviso-gnre.ag-topo { margin-bottom: 1rem; }
.app .valores-cab { display: inline-flex; align-items: center; gap: .75rem; flex-wrap: wrap; justify-content: flex-end; }
.app .calc-origem { display: inline-flex; align-items: center; gap: .3rem; color: var(--sucesso); }
.app .calc-origem svg { width: 13px; height: 13px; flex: none; }
.app .dialogo.dialogo-calc { max-width: 600px; max-height: calc(100dvh - 2rem); overflow-y: auto; }
.app .calc-grade { gap: .8rem 1rem; }
.app .calc-explica { margin-top: -.35rem; }
.app .calc-conta { border: 1px solid var(--borda); border-radius: var(--raio-lg); background: var(--superficie-2); padding: .4rem .95rem; }
.app .calc-linha { display: flex; justify-content: space-between; gap: 1rem; padding: .45rem 0; font-size: .9rem; color: var(--texto-2); font-variant-numeric: tabular-nums; }
.app .calc-linha + .calc-linha { border-top: 1px dashed var(--borda); }
.app .calc-linha b { color: var(--texto); white-space: nowrap; }
.app .calc-total { font-size: 1rem; color: var(--texto); }
.app .calc-total b { font-size: 1.25rem; color: var(--mc, var(--marca)); }
.app .calc-compara { display: flex; align-items: flex-start; gap: .5rem; flex-wrap: wrap; font-size: .85rem; padding: .6rem .8rem; border-radius: var(--raio); color: var(--texto-2); }
.app .calc-compara svg { width: 16px; height: 16px; flex: none; margin-top: .1rem; }
.app .calc-compara > span { flex: 1; min-width: 12rem; }
.app .calc-compara.igual { background: var(--sucesso-suave); }
.app .calc-compara.igual svg { color: var(--sucesso); }
.app .calc-compara.diferente { background: var(--alerta-suave); }
.app .calc-compara.diferente svg { color: var(--alerta); }
@media (max-width: 640px) {
  .app .dialogo-calc .acoes { flex-direction: column-reverse; }
  .app .dialogo-calc .acoes .btn { width: 100%; justify-content: center; }
}
.app .calc-explica { margin-top: -.35rem; font-size: .82rem; color: var(--texto-3); }
.app .calc-cp { align-self: end; padding-bottom: .35rem; }
.app .calc-cp .interruptor { white-space: normal; align-items: flex-start; color: var(--texto); font-weight: 500; }
.app .calc-cp .interruptor > span:last-child { display: flex; flex-direction: column; gap: .1rem; }
.app .calc-cp .interruptor small { font-weight: 400; font-size: .78rem; }
@media (max-width: 640px) { .app .calc-cp { order: 1; } }
.app .ncm-origem { color: var(--sucesso); }

/* modo suporte (admin da plataforma dentro da conta de um cliente) */
.faixa-suporte { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .45rem 1.25rem; background: #4c1d95; color: #fff; font-size: .86rem; }
.faixa-suporte svg { width: 16px; height: 16px; flex: none; }
.faixa-suporte > span { flex: 1; min-width: 0; }
.faixa-suporte .fraco-claro { opacity: .75; }
.faixa-suporte form { margin: 0; }
.faixa-suporte .btn { background: #fff; color: #4c1d95; border-color: #fff; }
@media (max-width: 640px) { .faixa-suporte { padding: .45rem 1rem; } }
.suporte-cartao { margin-bottom: 1.25rem; border-color: #c4b5fd; }
.suporte-atalhos { display: flex; flex-wrap: wrap; gap: .5rem; }
@media (max-width: 640px) { .suporte-atalhos .btn { flex: 1 1 100%; justify-content: center; } }

/* ===================================================================== celular: tabela vira lista de cartões
   Cada linha = um cartão: a célula principal (a do link) é o título, as demais aparecem em duas colunas com o nome
   da coluna em cima (data-rotulo, posto pelo ui.js) e os botões da linha ficam embaixo, largos para o dedo.
   .tabela-fixa fica de fora (tabelinhas de números, como a do gráfico do painel). */
@media (max-width: 640px) {
  .app .tabela-wrap:has(> table.tabela:not(.tabela-fixa)) { overflow: visible; }
  .app table.tabela:not(.tabela-fixa), .app table.tabela:not(.tabela-fixa) > tbody { display: block; width: 100%; }
  .app table.tabela:not(.tabela-fixa) > thead { display: none; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .55rem .9rem; position: relative;
    padding: .85rem 1rem; border-bottom: 1px solid var(--borda);
  }
  .app table.tabela:not(.tabela-fixa) > tbody > tr:last-child { border-bottom: 0; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td {
    display: block; padding: 0 !important; border: 0; min-width: 0; text-align: left !important; overflow-wrap: anywhere; font-size: .88rem;
  }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td[data-rotulo]:not([data-rotulo=""]):not(.td-titulo):not(.acoes-linha)::before {
    content: attr(data-rotulo); display: block; font-size: .7rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
    color: var(--texto-3); margin-bottom: .1rem;
  }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td:empty { display: none; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.td-titulo { grid-column: 1 / -1; order: -1; font-size: 1rem; font-weight: 650; padding-right: 2.4rem !important; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.td-titulo .nome-linha { font-size: 1rem; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.col-sel { position: absolute; top: .8rem; right: 1rem; width: auto; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.col-sel input { width: 22px; height: 22px; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.acoes-linha { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .45rem; width: auto !important; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.acoes-linha .btn { width: auto; flex: 1 1 0; margin: 0 !important; min-height: 40px; justify-content: center; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.acoes-linha .btn .rot { display: inline !important; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td[colspan] { grid-column: 1 / -1; }
  /* no cartão há espaço: as colunas que a tabela estreita escondia voltam, e as cópias "só celular" saem */
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.ocultar-movel, .app table.tabela:not(.tabela-fixa) > tbody > tr > td.ocultar-tablet { display: block; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td.acoes-linha .ocultar-movel { display: inline-flex; }
  .app table.tabela:not(.tabela-fixa) .so-movel { display: none !important; }
  .app table.tabela:not(.tabela-fixa) > tbody > tr > td { background: transparent !important; box-shadow: none !important; }
  .app table.tabela:not(.tabela-fixa) tfoot { display: block; }
  .app table.tabela:not(.tabela-fixa) tfoot tr { display: flex; flex-wrap: wrap; justify-content: space-between; padding: .7rem 1rem; }
  .app table.tabela:not(.tabela-fixa) tfoot td { padding: 0 !important; border: 0; }

  /* campos com 16px: abaixo disso o iPhone dá zoom ao tocar no campo e a tela fica desenquadrada */
  .app .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .app .campo select, .app .campo textarea, .app .entrada,
  .app input[type=search], .app input[type=text], .app input[type=email], .app input[type=tel], .app input[type=number], .app input[type=password] { font-size: 16px; }
  .app .campo input:not([type=checkbox]):not([type=radio]):not([type=file]), .app .campo select, .app .entrada { min-height: 44px; }

  /* alvos de toque: nada clicável abaixo de ~40px */
  .app .btn { min-height: 40px; }
  .app .btn-sm { min-height: 38px; }
  .app .menu-movel, .app .fechar-menu, .app .btn-lateral { min-width: 42px; min-height: 42px; }
  .app .link-acao { padding: .45rem 0; display: inline-block; }
  .app .tabela th { font-size: .72rem; }
}
/* painel no celular: cartões de número em 2 colunas sem o valor quebrar ("R$" numa linha e o número na outra) */
@media (max-width: 640px) {
  .app .kpi2 { padding: .85rem .9rem; min-width: 0; }
  .app .kpi2-val { font-size: clamp(1.15rem, 5.4vw, 1.5rem) !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app .kpi2-cab { font-size: .78rem; line-height: 1.25; }
}
