/* NovaNF no desenho dos apps (~/Dev/Design/DESIGN.md), o mesmo do NovaCar Gestor e da TOTUSPASS.
   Sistema fixo: Inter (opsz 14) e Inter Display (opsz 32), tema escuro com luzes, superfícies brancas
   com alpha, card de raio 24, controles em cápsula, botão principal branco.
   Identidade (vagas da paleta, seção 1): Nova Totus, acento #FE2D8C, luzes no mesmo matiz
   (~/Dev/Design/paletas/novatotus.md). O acento só aparece em ação de texto, item marcado e luzes. */

@font-face { font-family: "Inter"; src: url("/fonts/InterDisplay.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+25B2, U+25BC, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; src: url("/fonts/InterDisplay-ext.woff2") format("woff2-variations"); font-weight: 100 900; font-style: normal; font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  color-scheme: dark;
  /* identidade: Nova Totus */
  --acento: #FE2D8C;
  --acento-fraco: rgb(254 45 140 / .15);
  --luz-profunda: 122 0 51;     /* #7A0033 */
  --luz-alta: 208 18 111;       /* #D0126F */
  /* sistema: tema escuro (2.1) */
  --fundo: #000000;
  --tinta: #FFFFFF;
  --tinta-suave: #F4F4F4;
  --fraco: rgb(255 255 255 / .72);
  --terciario: #A1A1A3;
  --superficie: rgb(255 255 255 / .07);
  --superficie-hover: rgb(255 255 255 / .10);
  --controle: rgb(255 255 255 / .10);
  --superficie-alta: rgb(255 255 255 / .135);
  --campo: rgb(255 255 255 / .10);
  --busca: rgb(255 255 255 / .14);
  --pilula: #202020;
  --folha: #353535;
  --gaveta: #111111;
  --popover: #1F1F1F;
  --linha: rgb(255 255 255 / .08);
  --divisor: rgb(255 255 255 / .18);
  --verde: #2EC27E; --verde-fraco: rgb(46 194 126 / .15);
  --ambar: #FFB84D; --ambar-fraco: rgb(255 184 77 / .14);
  --vermelho: #FF453A; --vermelho-fraco: rgb(255 69 58 / .15);
  --aba-inativa: rgb(255 255 255 / .70);
  --botao-pressionado: #DAD8DB;
  --sobre-branco: #000000;
  --scrim: rgb(0 0 0 / .48);
  --raio: 24px;
  --gaveta-larg: 248px;
}

* { box-sizing: border-box; }
html { background: var(--fundo); color-scheme: dark; }
body { margin: 0; background: transparent; color: var(--tinta); font-family: "Inter", system-ui, sans-serif; font-variation-settings: "opsz" 14; font-size: 14px; line-height: 17px; font-weight: 400; -webkit-font-smoothing: antialiased; font-variant-numeric: proportional-nums; -webkit-tap-highlight-color: transparent; }
/* luzes do fundo (2.3), fixas no alto da área de conteúdo */
body::before { content: ""; position: fixed; inset: 0 0 auto var(--gaveta-larg); height: 720px; z-index: -1; pointer-events: none;
  background: radial-gradient(circle 720px at 62% -260px, rgb(var(--luz-alta) / .85), rgb(var(--luz-alta) / 0)), radial-gradient(circle 420px at 38% -40px, rgb(var(--luz-profunda) / .9), rgb(var(--luz-profunda) / 0)); }
a { color: var(--tinta); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; font-variation-settings: inherit; }
button, a { touch-action: manipulation; }
p, ul, ol, h1, h2, h3 { margin: 0; }
b, strong { font-weight: 600; }
code { font-family: inherit; font-variant-numeric: tabular-nums; font-size: 12px; background: var(--controle); padding: 2px 8px; border-radius: 999px; color: var(--tinta-suave); }
.carregando { padding: 64px; color: var(--fraco); text-align: center; }
:where(button, a, input, select, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--tinta); outline-offset: 2px; }

/* ── escala (2.4) ── */
.display { font-variation-settings: "opsz" 32; }
h1, .titulo-tela { font-size: 32px; line-height: 38px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta); }
h2 { font-size: 18px; line-height: 22px; font-weight: 500; color: var(--tinta-suave); }  /* titulo */
h3 { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); } /* corpoForte */
.t-sub { font-size: 14px; line-height: 17px; color: var(--fraco); }
.legenda { font-size: 12px; line-height: 15px; color: var(--fraco); }
.num { font-variant-numeric: tabular-nums; }
.forte { color: var(--tinta-suave); font-weight: 500; }
.dim { color: var(--terciario); }
.acento { color: var(--acento); }
.marca { font-weight: 700; font-variation-settings: "opsz" 32; letter-spacing: 0; white-space: nowrap; color: var(--tinta); }
.marca span { color: var(--acento); }

/* ── casca: gaveta (menu lateral) + barra superior + conteúdo ── */
.app { min-height: 100vh; display: grid; grid-template-columns: var(--gaveta-larg) minmax(0, 1fr); }
.lateral { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--gaveta); }
.lateral-logo { height: 80px; display: flex; align-items: center; padding: 0 24px; flex: none; }
.lateral-logo .marca { font-size: 20px; line-height: 24px; }
.nav { flex: 1; overflow-y: auto; padding: 0 12px 12px; scrollbar-width: none; } .nav::-webkit-scrollbar { display: none; }
.nav-secao { padding: 18px 12px 8px; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--terciario); user-select: none; }
/* item marcado (3.28): cápsula em acento fraco com texto no acento */
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 11px; border: 0; border-radius: 999px; background: transparent; color: var(--fraco); cursor: pointer; text-align: left; font-size: 14px; line-height: 17px; transition: background-color .2s, color .2s; }
.nav-item svg { flex: none; opacity: .7; }
@media (hover: hover) { .nav-item:hover { background: rgb(255 255 255 / .07); color: var(--tinta); } .nav-item:hover svg { opacity: 1; } }
.nav-item.ativo { background: var(--acento-fraco); color: var(--acento); font-weight: 500; }
.nav-item.ativo svg { opacity: 1; }
.nav-item span:nth-child(2) { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav .contador { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: var(--tinta); color: var(--sobre-branco); font-size: 11px; line-height: 13px; font-weight: 500; }
.lateral-rodape { flex: none; padding: 12px; position: relative; }
.perfil { display: flex; align-items: center; gap: 12px; width: 100%; padding: 8px; border: 0; border-radius: 999px; background: transparent; color: var(--tinta); cursor: pointer; text-align: left; transition: background-color .2s; }
@media (hover: hover) { .perfil:hover { background: rgb(255 255 255 / .07); } }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--acento); color: #3A0019; font-size: 13px; font-weight: 600; }
.perfil-texto { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.perfil-nome { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.perfil-papel { font-size: 12px; line-height: 15px; color: var(--fraco); }
.perfil svg { color: var(--terciario); flex: none; }

.principal { min-width: 0; display: flex; flex-direction: column; }
.cabecalho { position: sticky; top: 0; z-index: 30; height: 80px; display: flex; align-items: center; gap: 12px; padding: 0 60px; transition: background-color .2s; }
.cabecalho.rolou { background: rgb(0 0 0 / .72); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
.cabecalho-esq { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1; }
.saudacao { font-size: 18px; line-height: 22px; font-weight: 500; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saudacao-data { font-size: 14px; line-height: 17px; color: var(--fraco); margin-top: 1px; }
.cabecalho-dir { display: flex; align-items: center; gap: 8px; flex: none; }
/* busca (3.7): 36, cápsula, branco 14% */
.busca-global { display: flex; align-items: center; gap: 12px; height: 36px; width: 300px; padding: 0 13px; border: 0; border-radius: 999px; background: var(--busca); color: var(--fraco); cursor: text; text-align: left; font-size: 14px; }
.busca-global svg { flex: none; }
.busca-global span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.busca-global kbd { font-family: inherit; font-size: 12px; color: var(--terciario); }
/* botão redondo do cabeçalho (3.36, ajuste do Gestor): círculo de 44 em branco 10% */
.icone-btn { position: relative; width: 44px; height: 44px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--controle); color: var(--tinta); cursor: pointer; transition: transform .34s cubic-bezier(.2,.9,.25,1.25), background-color .28s; }
.icone-btn:active { transform: scale(1.12); background: rgb(255 255 255 / .3); transition-duration: .12s; }
.pontinho { position: absolute; right: 10px; top: 9px; width: 7px; height: 7px; border-radius: 50%; background: var(--acento); box-shadow: 0 0 0 2px #2a0a17; font-size: 0; }
.aviso-teste { height: 32px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--ambar-fraco); color: var(--ambar); font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; }
.menu-ancora { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; padding: 8px; border-radius: var(--raio); background: var(--popover); z-index: 40; animation: entra .18s cubic-bezier(.23,1,.32,1); }
.menu.menu-acima { top: auto; bottom: calc(100% + 8px); left: 0; right: auto; width: 100%; min-width: 240px; }
.menu-titulo { padding: 10px 12px 6px; font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); }
.menu-cabeca { padding: 10px 12px 12px; }
.menu-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; min-height: 48px; padding: 10px 12px; border: 0; border-radius: 18px; background: transparent; color: var(--tinta); cursor: pointer; font-size: 14px; }
.menu-item > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-item svg { flex: none; color: var(--tinta); }
@media (hover: hover) { .menu-item:hover { background: rgb(255 255 255 / .07); } }
.menu-item.perigo svg { color: var(--vermelho); }
.menu-ponto { width: 8px; height: 8px; border-radius: 50%; background: var(--terciario); flex: none; } .menu-ponto.urgente { background: var(--vermelho); }
.menu-texto { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); }
.menu-detalhe { font-size: 14px; line-height: 17px; color: var(--fraco); }
.menu-vazio { padding: 24px 12px; text-align: center; font-size: 14px; color: var(--fraco); }

/* busca global (janela) */
.busca-caixa { display: flex; flex-direction: column; padding: 16px; }
.busca-topo { display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border-radius: 999px; background: var(--busca); color: var(--fraco); }
.busca-topo input { flex: 1; border: 0; background: transparent; outline: none; font-size: 16px; color: var(--tinta); }
.busca-topo input::placeholder { color: var(--fraco); }
.busca-resultados { padding-top: 8px; max-height: 420px; overflow: auto; }
.busca-grupo { padding: 16px 12px 6px; font-size: 14px; font-weight: 500; color: var(--fraco); }
.busca-item { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; min-height: 56px; padding: 8px 12px; border: 0; border-radius: 18px; background: transparent; color: var(--tinta); cursor: pointer; }
.busca-item svg { flex: none; } .busca-item .menu-texto { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (hover: hover) { .busca-item:hover { background: rgb(255 255 255 / .07); } }

/* ── conteúdo ── */
.conteudo { width: 100%; max-width: 1240px; margin: 0 auto; padding: 8px 60px 96px; animation: entra .18s cubic-bezier(.23,1,.32,1); }
@keyframes entra { from { opacity: 0; transform: translateY(4px); } }
.titulo-tela { margin-bottom: 32px; }
.topo { display: flex; justify-content: flex-end; margin-bottom: 16px; }
.topo-acoes { display: flex; gap: 8px; }
.alertas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
/* card informativo (3.9): superfície alta, texto e um rótulo de cor quando pede atenção */
.faixa { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px; border-radius: var(--raio); background: var(--superficie-alta); color: var(--tinta-suave); font-size: 14px; line-height: 20px; }
.faixa strong { font-weight: 500; }
.faixa.warning strong { color: var(--ambar); }
.faixa.danger strong { color: var(--vermelho); }
.faixa.success strong { color: var(--verde); }
.faixa.info { background: var(--superficie); color: var(--fraco); }
.faixa .btn { flex: none; }
.msgs { display: flex; flex-direction: column; gap: 8px; } .msgs:empty { display: none; } .msgs:not(:empty) { margin-top: 16px; }

/* título de seção com link (3.35) */
.titulo-secao { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 32px 0 12px; }
.titulo-secao:first-child { margin-top: 0; }
.titulo-secao .link, .link-acento { border: 0; background: none; padding: 0; color: var(--acento); font-size: 14px; line-height: 17px; font-weight: 500; cursor: pointer; transition: opacity .2s; }
.link-acento:active, .titulo-secao .link:active { opacity: .5; }

/* card (3.9) e grupo de lista (3.10): raio 24, superfície, sem contorno */
.card, .painel { background: var(--superficie); border-radius: var(--raio); }
.painel-corpo { padding: 16px; }
.painel-cabeca { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 16px 4px; }
.painel-cabeca h2 { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); }
.painel-rodape { padding: 0 16px 16px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.grupo-lista { background: var(--superficie); border-radius: var(--raio); padding: 4px 0; }
.linha { display: flex; align-items: center; gap: 16px; width: 100%; min-height: 72px; padding: 0 16px; border: 0; border-radius: var(--raio); background: transparent; color: var(--tinta); text-align: left; }
.linha.simples { min-height: 56px; }
button.linha, .linha.clicavel { cursor: pointer; transition: background-color .25s; }
@media (hover: hover) { button.linha:hover, .linha.clicavel:hover { background: rgb(255 255 255 / .05); } }
button.linha:active, .linha.clicavel:active { background: rgb(255 255 255 / .07); transition-duration: .05s; }
.linha-texto { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.linha-titulo { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-sub { font-size: 14px; line-height: 17px; color: var(--fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-valor { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; }
.linha-valor .v { font-size: 16px; line-height: 19.5px; color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.linha-valor .d { font-size: 14px; line-height: 17px; color: var(--fraco); }
.linha-acoes { display: flex; align-items: center; gap: 8px; flex: none; }
.chevron { color: var(--terciario); flex: none; }
/* círculo de ícone (40 em controle; destaque em acento fraco) */
.circulo { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--controle); color: var(--tinta); font-size: 14px; font-weight: 500; }
.circulo.c48 { width: 48px; height: 48px; }
.circulo.destaque { background: var(--acento-fraco); color: var(--acento); }
.circulo.iniciais { color: var(--fraco); }

/* situação da nota: texto na cor do estado, como no subtítulo da linha */
.badge, .st { font-weight: 500; white-space: nowrap; }
.badge .ponto { display: none; }
.st.autorizada, .badge.autorizada { color: var(--verde); }
.st.processando, .badge.processando { color: var(--ambar); }
.st.erro, .badge.erro { color: var(--vermelho); }
.st.cancelada, .badge.cancelada { color: var(--terciario); }
.m-cabeca .badge { font-size: 14px; }

/* valor grande (3.2) e ações circulares */
.heroi { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 8px 0 32px; }
.heroi-valor { font-size: 56px; line-height: 64px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta-suave); }
.heroi-rotulo { margin-top: 8px; font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta); }
.heroi-legenda { margin-top: 10px; font-size: 14px; line-height: 17px; color: var(--fraco); }
.acoes-circulares { display: flex; justify-content: center; gap: 40px; margin-bottom: 40px; }
.acao-circular { display: flex; flex-direction: column; align-items: center; gap: 8px; border: 0; background: none; color: var(--tinta-suave); cursor: pointer; font-size: 14px; line-height: 17px; font-weight: 500; transition: opacity .3s; }
.acao-circular .circulo { width: 48px; height: 48px; }
.acao-circular:active { opacity: .35; transition-duration: .06s; }

/* cards de métrica (3.30) */
.metricas { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 32px; }
.metrica { display: flex; flex-direction: column; padding: 16px; border-radius: var(--raio); background: var(--superficie); min-height: 120px; border: 0; text-align: left; color: var(--tinta); }
button.metrica { cursor: pointer; } @media (hover: hover) { button.metrica:hover { background: var(--superficie-hover); } }
.metrica-rotulo { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); }
.metrica-valor { margin-top: 6px; font-size: 24px; line-height: 29px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta-suave); }
.metrica-legenda { margin-top: auto; padding-top: 8px; font-size: 14px; line-height: 17px; color: var(--fraco); }
.metrica.alerta .metrica-valor { color: var(--vermelho); }

.painel-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.grafico { width: 100%; height: 200px; display: block; }
.g-linha { stroke: rgb(255 255 255 / .06); stroke-width: 1; }
.g-barra rect { fill: rgb(255 255 255 / .24); } .g-barra.atual rect { fill: var(--tinta-suave); } .g-barra.vazia rect { fill: rgb(255 255 255 / .10); }
.g-rotulo { fill: var(--fraco); font-size: 12px; text-transform: capitalize; }
.passos-lista { list-style: none; margin: 0; padding: 4px 0; }
.passos-lista li { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 0 16px; }
.passos-lista li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.passo-num { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--controle); color: var(--tinta); font-size: 16px; font-weight: 500; }

/* barra de filtros: segmentado com trilho (3.24), chips roláveis (3.23), busca (3.7) */
.barra { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.barra-dir { display: flex; gap: 8px; align-items: center; margin-left: auto; }
.segmento { display: inline-grid; grid-auto-flow: column; grid-auto-columns: 1fr; height: 36px; padding: 2px; border-radius: 999px; background: var(--controle); }
.segmento button { min-width: 96px; padding: 0 14px; border: 0; border-radius: 999px; background: transparent; color: var(--aba-inativa); cursor: pointer; font-size: 14px; line-height: 17px; font-weight: 500; transition: background-color .25s, color .25s; white-space: nowrap; }
.segmento button.ativo { background: rgb(255 255 255 / .20); color: var(--tinta); }
.chips { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; } .chips::-webkit-scrollbar { display: none; }
.chips button { height: 36px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; color: var(--aba-inativa); cursor: pointer; font-size: 14px; font-weight: 500; white-space: nowrap; transition: background-color .2s, transform .2s; }
.chips button.ativo { background: var(--controle); color: var(--tinta); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.chips button:active { transform: scale(.96); }
.busca { height: 36px; width: 280px; max-width: 100%; padding: 0 16px 0 40px; border: 0; border-radius: 999px; background: var(--busca) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,.72)' stroke-width='2.3' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.3-4.3'/%3E%3C/svg%3E") no-repeat 13px center; color: var(--tinta); outline: none; font-size: 14px; }
.busca::placeholder { color: var(--fraco); }

/* botões (3.6): primário branco em cápsula; secundário em pílula; pequeno de 40 em controle */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border: 0; border-radius: 999px; background: var(--controle); color: var(--tinta); cursor: pointer; font-size: 14px; line-height: 17px; font-weight: 500; white-space: nowrap; text-decoration: none; transition: background-color .2s, transform .2s, opacity .2s; }
.btn:active { transform: scale(.96); }
@media (hover: hover) { .btn:hover { background: rgb(255 255 255 / .16); } }
.btn:disabled { background: #4C4C4C; color: #161616; pointer-events: none; }
.btn.primario { background: var(--tinta); color: var(--sobre-branco); }
@media (hover: hover) { .btn.primario:hover { background: var(--tinta); opacity: .92; } }
.btn.primario:active { background: var(--botao-pressionado); transform: none; }
.btn.perigo { color: var(--vermelho); }
.btn.fantasma { background: transparent; color: var(--tinta-suave); }
@media (hover: hover) { .btn.fantasma:hover { background: rgb(255 255 255 / .07); } }
.btn.pequeno { height: 36px; padding: 0 14px; }
.btn.grande { height: 52px; padding: 0 24px; font-size: 16px; line-height: 19.5px; }
.btn.icone { width: 40px; padding: 0; }
.acoes-linha { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.acoes-linha .espaco { flex: 1; }
.acoes-form { display: flex; gap: 16px; justify-content: flex-end; margin-top: 24px; }

/* formulário (3.7 e 3.34): rótulo 14 Medium fraco; campo de 52 quase cápsula, sem borda, branco 10% */
.grade { display: grid; gap: 20px 16px; grid-template-columns: repeat(12, 1fr); align-items: start; }
.c2 { grid-column: span 2; } .c3 { grid-column: span 3; } .c4 { grid-column: span 4; } .c5 { grid-column: span 5; } .c6 { grid-column: span 6; } .c7 { grid-column: span 7; } .c8 { grid-column: span 8; } .c12 { grid-column: span 12; }
.campo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.campo > label { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); display: flex; align-items: center; gap: 8px; }
.campo input, .campo select, .campo textarea, .prefixo { width: 100%; height: 52px; padding: 0 18px; border: 0; border-radius: 22px; background: var(--campo); color: var(--tinta-suave); outline: none; font-size: 16px; transition: background-color .2s, box-shadow .2s; }
.campo select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23A1A1A3' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; padding-right: 44px; }
.campo select option { background: var(--popover); color: var(--tinta); }
.campo input:focus, .campo select:focus, .campo textarea:focus, .prefixo:focus-within { background: rgb(255 255 255 / .20); }
.campo input::placeholder, .campo textarea::placeholder { color: var(--fraco); }
.campo textarea { height: auto; min-height: 112px; padding: 15px 18px; resize: vertical; line-height: 22px; }
.campo input[type="file"] { padding: 15px 18px; font-size: 14px; color: var(--fraco); }
.campo input[type="file"]::file-selector-button { margin-right: 12px; height: 28px; padding: 0 12px; border: 0; border-radius: 999px; background: var(--tinta); color: var(--sobre-branco); font: inherit; font-weight: 500; cursor: pointer; }
.campo input[type="date"] { color-scheme: dark; }
.campo input:disabled { opacity: .5; }
.campo .ajuda { font-size: 12px; line-height: 15px; color: var(--fraco); }
.campo.mono input { font-variant-numeric: tabular-nums; }
.com-acao { display: flex; gap: 8px; } .com-acao input { flex: 1; min-width: 0; } .com-acao .btn { height: 52px; }
.prefixo { display: flex; align-items: center; gap: 8px; padding-right: 0; }
.prefixo span { color: var(--fraco); font-size: 16px; }
.prefixo input { background: transparent !important; padding-left: 0 !important; height: 100% !important; }
.toggle { display: flex; align-items: center; gap: 12px; cursor: pointer; min-height: 52px; font-size: 16px; font-weight: 400; color: var(--tinta-suave) !important; }
.toggle input { width: 20px; height: 20px; accent-color: var(--acento); flex: none; }
/* grupos de configuração: cada um é um card com título de seção */
/* seção de formulário: card com título; dentro de janela, direto na folha (sem card dentro de card) */
.grupo { background: var(--superficie); border-radius: var(--raio); padding: 20px; }
.grupo + .grupo { margin-top: 16px; }
.modal .grupo { background: transparent; padding: 0; }
.modal .grupo + .grupo { margin-top: 12px; }
.modal .grupo-cabeca { margin-bottom: 16px; }
.grupo-cabeca { margin-bottom: 20px; }
.grupo-cabeca h3 { font-size: 18px; line-height: 22px; font-weight: 500; color: var(--tinta-suave); }
.grupo-cabeca p { margin-top: 6px; font-size: 14px; line-height: 20px; color: var(--fraco); max-width: 72ch; }
.estado-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.estado-linha .badge { height: 28px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 999px; background: var(--controle); font-size: 14px; }
.grupo .acoes-linha { margin-top: 20px; }
details.grupo > summary { font-size: 18px; line-height: 22px; font-weight: 500; color: var(--tinta-suave); }
pre.json { margin: 0; background: rgb(255 255 255 / .05); border-radius: 18px; padding: 14px 16px; font-family: inherit; font-variant-numeric: tabular-nums; font-size: 12px; line-height: 17px; color: var(--fraco); overflow: auto; max-height: 420px; white-space: pre-wrap; word-break: break-word; }
details > summary { cursor: pointer; color: var(--tinta-suave); font-size: 14px; font-weight: 500; list-style: none; display: flex; align-items: center; gap: 8px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: ""; width: 6px; height: 6px; border-right: 2px solid var(--terciario); border-bottom: 2px solid var(--terciario); transform: rotate(-45deg); transition: transform .2s; }
details[open] > summary::before { transform: rotate(45deg); }
details[open] > summary { margin-bottom: 12px; }

/* abas de Configurações: fileira de chips (3.23) */
.abas { display: flex; gap: 4px; margin-bottom: 24px; overflow-x: auto; scrollbar-width: none; }
.abas button { height: 36px; padding: 0 13px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--aba-inativa); white-space: nowrap; }
.abas button.ativo { background: var(--controle); color: var(--tinta); box-shadow: inset 0 0 0 1px rgb(255 255 255 / .18); }
.painel-form { max-width: 820px; background: transparent; }
.painel-form > .painel-corpo { padding: 0; }
.painel-form > .painel-rodape { padding: 24px 0 0; }

/* emitir: cards por etapa e a nota ao lado */
.emitir { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.passos { display: flex; flex-direction: column; gap: 16px; }
.passo { background: var(--superficie); border-radius: var(--raio); }
.passo-cabeca { display: flex; align-items: center; gap: 12px; padding: 20px 20px 0; }
.passo-cabeca h2 { font-size: 18px; line-height: 22px; font-weight: 500; }
.passo-cabeca a { margin-left: auto; font-size: 14px; font-weight: 500; color: var(--acento); }
.passo-cabeca .passo-num { display: none; }
.passo-corpo { padding: 20px; }
.cliente-ficha { font-size: 14px; line-height: 17px; color: var(--fraco); margin-top: 10px; }
.cliente-ficha:empty { display: none; }
.lado { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 12px; }
.lado-acoes { display: flex; flex-direction: column; gap: 8px; }
.lado-acoes .btn.primario { height: 52px; font-size: 16px; }

/* a nota: card de destaque com as partes e o valor */
.documento { background: var(--superficie-alta); border-radius: var(--raio); overflow: hidden; }
.doc-cabeca { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 16px 16px 8px; }
.doc-tipo { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); }
.doc-meta { font-size: 14px; line-height: 17px; color: var(--fraco); margin-top: 2px; }
.doc-amb { height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--ambar-fraco); color: var(--ambar); font-size: 11px; line-height: 13px; font-weight: 500; white-space: nowrap; }
.doc-amb.producao { background: var(--verde-fraco); color: var(--verde); }
.doc-partes { display: grid; grid-template-columns: 1fr; }
.doc-parte { padding: 10px 16px; }
.doc-rotulo { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); margin-bottom: 4px; }
.doc-nome { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); }
.doc-linha { font-size: 14px; line-height: 17px; color: var(--fraco); }
.doc-servico { padding: 10px 16px; }
.doc-texto { font-size: 14px; line-height: 20px; color: var(--tinta-suave); white-space: pre-wrap; margin-bottom: 4px; }
.doc-total { display: flex; justify-content: space-between; align-items: baseline; padding: 16px; margin-top: 4px; }
.doc-total span { font-size: 14px; color: var(--fraco); }
.doc-total strong { font-size: 32px; line-height: 38px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta-suave); }
.doc-rodape { padding: 0 16px 16px; font-size: 12px; line-height: 15px; color: var(--fraco); word-break: break-all; }
.m-corpo .doc-partes { grid-template-columns: 1fr 1fr; }

/* tabelas (relatório e códigos por serviço): linhas sem contorno, como o grupo de lista */
.tabela { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; line-height: 17px; }
.tabela th, .tabela td { text-align: left; padding: 14px 16px; vertical-align: middle; }
.tabela th { font-size: 14px; font-weight: 500; color: var(--fraco); padding-top: 12px; padding-bottom: 8px; }
.tabela td { color: var(--tinta-suave); }
.tabela td.num, .tabela th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabela td .sec { display: block; font-size: 14px; line-height: 17px; color: var(--fraco); margin-top: 2px; }
.tabela td .sec.erro-texto { color: var(--vermelho); }
.tabela td.servico { max-width: 300px; }
.tabela .corta { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela td.acoes { text-align: right; white-space: nowrap; }
.tabela tbody tr td:first-child { border-radius: 18px 0 0 18px; } .tabela tbody tr td:last-child { border-radius: 0 18px 18px 0; }
.tabela tr.clicavel { cursor: pointer; }
@media (hover: hover) { .tabela tr.clicavel:hover td { background: rgb(255 255 255 / .05); } }
.tabela.compacta td { padding: 8px 12px; }
input.mini { width: 100%; height: 40px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--campo); color: var(--tinta-suave); outline: none; font-size: 14px; }
input.mini:focus { background: rgb(255 255 255 / .20); }
input.mini::placeholder { color: var(--terciario); }

/* estado vazio (3.11) */
.vazio { padding: 48px 24px; text-align: center; display: flex; flex-direction: column; align-items: center; border-radius: var(--raio); background: var(--superficie); }
.vazio-titulo { font-size: 16px; line-height: 19.5px; font-weight: 500; color: var(--tinta-suave); }
.vazio-sub { margin-top: 8px; font-size: 14px; line-height: 17px; color: var(--fraco); max-width: 320px; }
.vazio .btn { margin-top: 20px; }
.grupo-lista .vazio, .painel .vazio { background: transparent; }

/* relatório do contador */
.barra-relatorio { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.relatorio-doc { padding: 24px; }
.rel-cabeca { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 24px; }
.rel-rotulo { font-size: 14px; line-height: 17px; font-weight: 500; color: var(--fraco); margin-bottom: 4px; }
.rel-cabeca h2 { font-size: 32px; line-height: 38px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta); }
.rel-empresa { display: flex; flex-direction: column; text-align: right; font-size: 14px; line-height: 20px; color: var(--fraco); }
.rel-empresa strong { color: var(--tinta-suave); font-weight: 500; font-size: 16px; }
.rel-sub { margin: 32px 0 8px; font-size: 18px; line-height: 22px; font-weight: 500; color: var(--tinta-suave); }
.rel-total td { font-weight: 500; color: var(--tinta); border-top: 1px solid var(--linha); }
.rel-rodape { margin-top: 24px; font-size: 12px; line-height: 15px; color: var(--fraco); }

/* impressão: papel branco, só o relatório */
@media print {
  @page { size: A4; margin: 16mm; }
  html, body { background: #fff !important; color: #111 !important; }
  body::before { display: none; }
  .lateral, .cabecalho, .nao-imprime, .toasts, .alertas, .titulo-tela { display: none !important; }
  .app { display: block; } .conteudo { padding: 0; max-width: none; }
  .relatorio-doc, .metrica, .painel { background: #fff !important; border: 1px solid #ddd; }
  .relatorio-doc *, .metrica * { color: #111 !important; }
  .relatorio-doc .sec, .rel-rodape, .metrica-rotulo, .rel-empresa, .rel-rotulo { color: #555 !important; }
  .tabela td { border-bottom: 1px solid #eee; }
  .tabela .corta { white-space: normal; }
}

/* escolhas em Configurações (ambiente, emissor): cards de opção com seleção */
.opcoes-ambiente { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opcao-ambiente { display: flex; flex-direction: column; gap: 6px; text-align: left; padding: 16px; border: 0; border-radius: var(--raio); background: var(--superficie); color: var(--tinta); cursor: pointer; transition: background-color .2s; }
@media (hover: hover) { .opcao-ambiente:hover { background: var(--superficie-hover); } }
.opcao-ambiente.ativa { background: rgb(255 255 255 / .14); }
.opcao-ambiente .menu-detalhe { line-height: 20px; }
.opcao-topo { display: flex; align-items: center; gap: 12px; }
.opcao-topo .badge { margin-left: auto; height: 24px; display: inline-flex; align-items: center; padding: 0 9px; border-radius: 999px; background: var(--tinta); color: var(--sobre-branco); font-size: 11px; }
.radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--divisor); flex: none; display: grid; place-items: center; }
.opcao-ambiente.ativa .radio { border: 0; background: var(--acento); }
.opcao-ambiente.ativa .radio::after { content: ""; width: 5px; height: 9px; border: solid var(--tinta); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }

/* acompanhamento da emissão */
.etapas { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.etapas li { display: flex; gap: 16px; align-items: center; min-height: 64px; }
.etapas li > span:last-child { display: flex; flex-direction: column; gap: 2px; }
.etapa-marca { width: 40px; height: 40px; border-radius: 50%; flex: none; background: var(--controle); display: grid; place-items: center; }
.etapas li.feita .etapa-marca { background: var(--verde-fraco); }
.etapas li.feita .etapa-marca::after { content: ""; width: 6px; height: 11px; border: solid var(--verde); border-width: 0 2.3px 2.3px 0; transform: translateY(-1px) rotate(45deg); }
.etapas li.ativa .etapa-marca { background: transparent; border: 4px solid rgb(255 255 255 / .26); border-top-color: var(--acento); animation: girar .8s linear infinite; }
.etapas li:not(.feita):not(.ativa) .menu-texto { color: var(--fraco); }
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .etapas li.ativa .etapa-marca { animation: none; } }
.m-corpo.sem-respiro { padding: 0 !important; }
.pdf-visor { display: block; width: 100%; height: 70vh; border: 0; background: #fff; border-radius: 18px; }
.m-rodape .espaco { flex: 1; }

/* janelas: card flutuante de raio 24; confirmação como a folha (3.20) */
.modal { border: 0; padding: 0; border-radius: var(--raio); background: var(--popover); color: var(--tinta); width: min(600px, calc(100vw - 32px)); }
.modal::backdrop { background: var(--scrim); }
.modal[open] { animation: modal-entra .24s cubic-bezier(.2,.9,.25,1); }
@keyframes modal-entra { from { opacity: 0; transform: scale(.96); } }
.modal .m-cabeca { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 24px 24px 8px; }
.modal .m-cabeca h2 { font-size: 20px; line-height: 24px; font-weight: 700; font-variation-settings: "opsz" 32; color: var(--tinta); }
.m-sub { font-size: 14px; line-height: 17px; color: var(--fraco); margin-top: 4px; }
.modal .m-cabeca-dir { display: flex; align-items: center; gap: 12px; flex: none; }
.modal .m-cabeca-dir .btn.fantasma { width: 36px; height: 36px; padding: 0; background: var(--controle); }
.modal .m-corpo { padding: 16px 24px; max-height: 72vh; overflow: auto; display: flex; flex-direction: column; gap: 16px; }
.modal .m-rodape { padding: 8px 24px 24px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.modal.larga { width: min(880px, calc(100vw - 32px)); }
.modal.pergunta { width: min(420px, calc(100vw - 32px)); background: var(--folha); text-align: center; }
.pergunta .m-cabeca { justify-content: center; padding-top: 28px; }
.pergunta .m-corpo { gap: 16px; text-align: left; }
.pergunta-texto { white-space: pre-line; font-size: 14px; line-height: 20px; color: var(--fraco); text-align: center; }
.pergunta .m-rodape { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 8px 16px 24px; }
.pergunta .m-rodape .btn { height: 52px; font-size: 16px; }
.pergunta .m-rodape .btn:not(.primario):not(.perigo) { background: rgb(255 255 255 / .20); }
.pergunta .m-rodape .btn.perigo { background: var(--tinta); color: var(--vermelho); }

/* toast (3.22): pílula de 56 no pé da tela, some sozinho */
.toasts { position: fixed; left: calc(50% + var(--gaveta-larg) / 2); bottom: 40px; translate: -50% 0; display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 50; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; min-height: 56px; padding: 16px 20px; border-radius: 999px; background: var(--folha); color: var(--tinta); font-size: 16px; line-height: 19.5px; font-weight: 500; max-width: 560px; animation: subir .24s cubic-bezier(.2,.9,.25,1); }
.toast::before { content: ""; width: 16px; height: 16px; border-radius: 50%; flex: none; background: var(--tinta) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") no-repeat center; }
.toast.erro::before { background: var(--vermelho) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round'%3E%3Cpath d='M12 6v7M12 18h.01'/%3E%3C/svg%3E") no-repeat center; }
@keyframes subir { from { transform: translateY(12px); opacity: 0; } }

/* entrada (padrão Login): logo, título 32, campo, botão branco */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login .painel { width: 400px; background: transparent; }
.login .painel-corpo { padding: 0; }
.login-marca { margin-bottom: 40px; text-align: center; }
.login-marca .marca { font-size: 28px; line-height: 32px; display: block; }
.login-marca h1 { margin-top: 32px; }
.login .acoes-form .btn { width: 100%; height: 52px; font-size: 16px; }
body:has(.login)::before { inset: 0; height: 100vh; }
body:has(.login)::after { content: ""; position: fixed; left: 50%; bottom: -60px; width: 384px; height: 200px; translate: -50% 0; z-index: -1; background: radial-gradient(ellipse at center, #33322E, rgb(51 50 46 / 0) 70%); }

@media (prefers-reduced-motion: reduce) { .modal[open], .toast, .conteudo, .menu { animation: none; } .btn, .icone-btn { transition: none; } .btn:active, .icone-btn:active { transform: none; } }
@media (max-width: 1180px) { .busca-global { width: 220px; } .metricas { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1080px) { .painel-grade { grid-template-columns: 1fr; } .emitir { grid-template-columns: 1fr; } .lado { position: static; } .cabecalho, .conteudo { padding-left: 28px; padding-right: 28px; } }
@media (max-width: 860px) {
  :root { --gaveta-larg: 0px; }
  .app { grid-template-columns: 1fr; }
  .lateral { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .lateral-logo { height: 56px; padding: 0 16px; } .nav { display: flex; flex-wrap: wrap; padding: 0 8px 8px; } .nav-secao { display: none; } .nav-item { width: auto; }
  .lateral-rodape { display: none; }
  .cabecalho { padding: 0 16px; height: 64px; } .busca-global { display: none; }
  .conteudo { padding: 8px 16px 64px; }
  .acoes-circulares { gap: 16px; }
  .barra { flex-direction: column; align-items: stretch; } .barra-dir { margin-left: 0; } .busca { width: 100%; }
  .c2, .c3, .c4, .c5, .c6, .c7, .c8 { grid-column: span 12; }
  .opcoes-ambiente { grid-template-columns: 1fr; }
  .metricas { grid-template-columns: 1fr 1fr; }
  .m-corpo .doc-partes { grid-template-columns: 1fr; }
  .toasts { left: 50%; }
}
