:root {
  --fundo: #f3eee6;
  --cartao: #ffffff;
  --tinta: #1d1814;
  --tinta2: #5f574d;
  --tinta3: #948b7e;
  --linha: #ebe4d9;
  --suave: #f1ebe2;
  --verde: #1b3a5c;        /* cor da casa (azul): destaque e fundo do cartão principal */
  --verde-claro: #e3ecf6;
  --creme: #f6efe2;
  --entra: #0e7a55;        /* texto de receita */
  --sai: #b8431a;          /* texto de despesa */
  --sai-claro: #fbe8dd;
  --serie-receita: #1baf7a;
  --serie-despesa: #eb6834;
  --serie-unica: #2a78d6;
  --serie-unica-clara: #b7d3f6;
  --alerta: #8a5a00;
  --alerta-fundo: #fbefd2;
  --raio: 22px;
  --sombra: 0 1px 2px rgba(29, 24, 20, .04), 0 10px 28px rgba(29, 24, 20, .06);
  --titulo: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* vale mesmo onde a classe define display: grid/flex */
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--fundo); color: var(--tinta);
  font: 16px/1.4 "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; font-family: var(--titulo); letter-spacing: -0.03em; }
h1 { font-size: 30px; font-weight: 800; line-height: 1.05; }
h2 { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
small, .mudo { color: var(--tinta2); font-size: 13px; }
svg.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

#tela { max-width: 1080px; margin: 0 auto; padding: 22px 16px 28px; }
/* assinatura da Nebulafy no fim de toda tela; o espaço de baixo é o da pílula de navegação */
#marca { text-align: center; padding: 0 16px 112px; font-size: 12.5px; color: var(--tinta3); }
#marca a { color: var(--tinta2); font-weight: 700; text-decoration: none; }
#marca a:hover { text-decoration: underline; }
.sobre .linha-btn { margin-top: 4px; }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.topo small { display: block; margin-bottom: 2px; }
.topo small::first-letter, .dia span::first-letter { text-transform: uppercase; }
.avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--verde); color: var(--creme); font: 800 18px var(--titulo); }

/* navegação: pílula flutuante */
#abas {
  position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 6px; background: rgba(29, 24, 20, .94); border-radius: 999px;
  box-shadow: 0 14px 34px rgba(29, 24, 20, .32); z-index: 5; backdrop-filter: blur(8px);
}
#abas[hidden] { display: none; }
#abas button {
  display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 54px; padding: 8px 4px 7px;
  border: 0; border-radius: 999px; background: none; color: #b9b0a3; font-size: 10.5px; font-weight: 600; transition: background .15s, color .15s;
}
#abas button.ativa { background: var(--creme); color: var(--tinta); }
#abas svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.cartao { background: var(--cartao); border-radius: var(--raio); padding: 18px; box-shadow: var(--sombra); }
.cartao + .cartao, .bloco { margin-top: 14px; }
.cartao > h2 { margin-bottom: 2px; }
.cartao > h2 + .mudo { display: block; margin-bottom: 14px; }

.faixa { border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; background: var(--alerta-fundo); color: var(--alerta); font-size: 14px; font-weight: 600; }
.faixa.toque { display: flex; align-items: center; gap: 10px; cursor: pointer; margin: 14px 0 0; }
.faixa.toque b { flex: 1; font-weight: 600; }

/* cartão principal do dia */
.heroi {
  position: relative; overflow: hidden; border-radius: 28px; padding: 22px 20px 20px; color: var(--creme);
  background: radial-gradient(120% 130% at 100% 0%, #2e5a86 0%, #1b3a5c 46%, #10253c 100%);
  box-shadow: 0 18px 40px rgba(16, 37, 60, .28);
}
.heroi::before, .heroi::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(246, 239, 226, .12); pointer-events: none; }
.heroi::before { width: 260px; height: 260px; right: -90px; top: -110px; }
.heroi::after { width: 400px; height: 400px; right: -170px; top: -190px; }
.heroi > * { position: relative; }
.heroi .estado { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(246, 239, 226, .12); font-size: 13px; font-weight: 600; }
.ponto { width: 8px; height: 8px; border-radius: 50%; background: #b9b0a3; }
.ponto.aberto { background: #5fe0ac; box-shadow: 0 0 0 4px rgba(95, 224, 172, .22); }
.heroi .rot { display: block; margin-top: 18px; font-size: 13px; color: rgba(246, 239, 226, .72); font-weight: 500; }
.heroi .saldo { display: block; font: 800 44px/1.05 var(--titulo); letter-spacing: -0.04em; margin-top: 2px; white-space: nowrap; }
.heroi .trio { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid rgba(246, 239, 226, .14); }
.heroi .trio span { display: block; font-size: 12px; color: rgba(246, 239, 226, .68); }
.heroi .trio b { display: block; font: 700 16px var(--titulo); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.heroi .linha-btn { margin-top: 18px; }
.heroi .btn { border: 0; min-height: 46px; }
.heroi .btn.claro { background: var(--creme); color: var(--tinta); }
.heroi .btn.vidro { background: rgba(246, 239, 226, .13); color: var(--creme); }
.heroi p { margin: 8px 0 0; font-size: 13px; color: rgba(246, 239, 226, .72); }

/* botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 18px;
  border: 1px solid var(--linha); border-radius: 16px; background: var(--cartao); font-weight: 650; text-decoration: none; color: var(--tinta);
  transition: transform .08s;
}
.btn:active { transform: scale(.98); }
.btn.forte { background: var(--tinta); border-color: var(--tinta); color: var(--creme); }
.btn.perigo { color: var(--sai); }
.btn.mini { min-height: 38px; padding: 0 14px; border-radius: 12px; font-size: 14px; }
.btn:disabled { opacity: .5; }
.linha-btn { display: flex; gap: 8px; flex-wrap: wrap; }
.linha-btn .btn { flex: 1; }

.acoes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 0; }
.acao { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 14px; border: 0; border-radius: 20px; background: var(--cartao); box-shadow: var(--sombra); font: 700 16px var(--titulo); text-align: left; transition: transform .08s; }
.acao:active { transform: scale(.97); }
.acao .bola { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--suave); }
.acao.venda { background: var(--tinta); color: var(--creme); }
.acao.venda .bola { background: var(--creme); color: var(--tinta); }
.acao.receita .bola { background: var(--verde-claro); color: var(--entra); }
.acao.despesa .bola { background: var(--sai-claro); color: var(--sai); }
.acoes.duas { grid-template-columns: repeat(2, 1fr); }

/* contas em aberto na tela Hoje */
.contas { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.conta { text-align: left; border: 0; border-radius: 18px; padding: 12px 14px; background: var(--cartao); box-shadow: var(--sombra); }
.conta span { display: block; font-size: 12.5px; color: var(--tinta2); }
.conta b { display: block; font: 800 20px var(--titulo); letter-spacing: -0.02em; }
.conta small { display: block; color: var(--tinta3); }

/* itens do pedido de compra e cartões de cadastro */
.item-c { display: grid; grid-template-columns: 1fr 64px 92px; gap: 6px; align-items: center; margin-top: 6px; }
.item-c select, .item-c input { min-height: 42px; padding: 4px 8px; font-size: 14px; border-radius: 10px; }
.item-c .ic-total { grid-column: 1 / 3; font-size: 13px; text-align: right; }
.item-c .pm { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--cartao); box-shadow: inset 0 0 0 1px var(--linha); font-size: 20px; justify-self: end; }
.cad-ed { background: var(--cartao); border-radius: 16px; padding: 12px; margin-top: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: end; }
.cad-ed .campo { margin: 0; min-width: 0; }
.cad-ed .campo span { display: block; margin: 0 0 3px 2px; font-size: 11.5px; color: var(--tinta2); font-weight: 600; }
.cad-ed .campo.nome, .cad-ed .cnpj-linha, .cad-ed .linha-btn { grid-column: 1 / -1; }
.cad-ed input { min-height: 42px; padding: 6px 10px; font-size: 14px; border-radius: 10px; }
.cad-ed input.nome, .cad-ed input.razao { font-weight: 600; }
.cad-ed .linha-btn { align-items: center; }
.cad-ed .linha-btn .btn { flex: 0 0 auto; }
.cad-ed .marca-linha { margin: 0; flex: 1; font-size: 13px; }
.cad-ed .remover { border: 0; background: var(--sai-claro); }
.foto-campo { grid-column: 1 / -1; }
.foto-linha { display: flex; align-items: center; gap: 10px; }
.foto-previa img { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; display: block; }
.foto-linha .btn { cursor: pointer; }

/* campo de cliente com busca */
.busca-cli { position: relative; }
.busca-cli .busca { display: flex; }
.busca-cli .bc-txt { width: 100%; padding-left: 38px; }
.bc-lista { position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 3; background: var(--cartao); border-radius: 14px; box-shadow: 0 10px 28px rgba(29, 24, 20, .16); padding: 6px; max-height: 260px; overflow: auto; }
.bc-lista button { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; font-size: 15px; }
.bc-lista button:hover, .bc-lista button:focus-visible { background: var(--suave); }
.bc-lista button b { font-weight: 600; }
.bc-lista button small { color: var(--tinta3); white-space: nowrap; }
.bc-lista .mudo { display: block; padding: 8px 12px; }

/* novidades */
.faixa.novidades { background: var(--verde-claro); color: var(--entra); }
.novidade { margin-top: 12px; }
.novidade h2 { margin: 2px 0 8px; }
.novidade ul { margin: 0; padding-left: 20px; font-size: 14.5px; line-height: 1.45; }
.novidade li + li { margin-top: 6px; }
.novidade.nova { box-shadow: var(--sombra), inset 0 0 0 2px var(--verde-claro); }

/* números de destaque */
.tiles { display: grid; gap: 10px; }
.tile { background: var(--cartao); border-radius: 18px; padding: 14px; min-width: 0; box-shadow: var(--sombra); }
.tile span { display: block; font-size: 12.5px; color: var(--tinta2); font-weight: 500; }
.tile strong { display: block; margin-top: 2px; font: 800 21px var(--titulo); letter-spacing: -0.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile em { display: block; margin-top: 4px; font-style: normal; font-size: 12px; color: var(--tinta3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tiles:not(.kpis) .tile { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.tiles:not(.kpis) .tile span { font-size: 14px; }
.delta { display: inline-block; padding: 1px 7px; border-radius: 999px; font-weight: 700; margin-right: 4px; background: var(--suave); color: var(--tinta2); }
.delta.bom { background: var(--verde-claro); color: var(--entra); }
.delta.ruim { background: var(--sai-claro); color: var(--sai); }
.entra { color: var(--entra); }
.sai { color: var(--sai); }

/* listas */
.lista { list-style: none; margin: 0; padding: 0; }
.lista li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--linha); cursor: pointer; }
.lista li:first-child { border-top: 0; padding-top: 4px; }
.lista li:last-child { padding-bottom: 2px; }
.lista .seta { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--suave); color: var(--tinta2); }
.lista .seta.entra { background: var(--verde-claro); color: var(--entra); }
.lista .seta.sai { background: var(--sai-claro); color: var(--sai); }
.lista .seta svg { width: 18px; height: 18px; }
.lista .meio { flex: 1; min-width: 0; }
.lista .meio b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista .meio small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista .meio small.quebra { white-space: normal; }
.lista .valor { font-weight: 700; white-space: nowrap; text-align: right; }
.lista .valor small { display: block; font-weight: 500; margin-top: 2px; }
.dia { display: flex; justify-content: space-between; margin: 22px 4px 8px; font-size: 13px; font-weight: 650; color: var(--tinta2); }
.vazio { text-align: center; color: var(--tinta2); padding: 28px 12px; margin: 0; }

.etq { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--suave); color: var(--tinta2); }
.etq.baixo { background: var(--alerta-fundo); color: var(--alerta); }
.etq.zerado { background: var(--sai-claro); color: var(--sai); }
.etq.ok { background: var(--verde-claro); color: var(--entra); }

/* filtros */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--cartao); box-shadow: inset 0 0 0 1px var(--linha); font-weight: 600; font-size: 14px; }
.chip.ativa { background: var(--tinta); box-shadow: none; color: var(--creme); }

/* formulários */
label { display: block; font-size: 13px; font-weight: 600; color: var(--tinta2); margin: 14px 0 5px; }
input, select, textarea { width: 100%; min-height: 50px; padding: 10px 14px; border: 1px solid var(--linha); border-radius: 14px; background: #fff; }
textarea { min-height: 150px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--verde); outline-offset: 1px; }
input.grande { font: 800 34px var(--titulo); letter-spacing: -0.03em; text-align: center; min-height: 76px; border-radius: 18px; }
input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; padding: 0; accent-color: var(--verde); flex: none; }
.filtros input { width: auto; min-height: 40px; padding: 4px 12px; border-radius: 999px; }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.marca-linha { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 14px; color: var(--tinta); font-weight: 500; }

/* folha (modal de baixo) */
#fundo { position: fixed; inset: 0; background: rgba(29, 24, 20, .5); z-index: 10; display: flex; align-items: flex-end; justify-content: center; backdrop-filter: blur(2px); }
#fundo[hidden] { display: none; }
#folha { width: 100%; max-width: 560px; max-height: 92vh; overflow: auto; background: var(--fundo); border-radius: 28px 28px 0 0; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); animation: sobe .18s ease-out; }
@keyframes sobe { from { transform: translateY(24px); opacity: 0; } }
#folha .cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
#folha .cab h2 { font-size: 22px; font-weight: 800; }
#folha .fechar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--cartao); font-size: 20px; }
#folha .rodape { position: sticky; bottom: -18px; background: linear-gradient(transparent, var(--fundo) 30%); padding: 18px 0 4px; margin-top: 8px; }
#folha .rodape .btn { width: 100%; }
#folha > .btn.forte { width: 100%; margin: 4px 0 2px; } /* "+ Novo" no alto das listas de cadastro */
@media (min-width: 700px) { #fundo { align-items: center; } #folha { border-radius: 28px; } }
@media (prefers-reduced-motion: reduce) { #folha { animation: none; } .btn, .acao { transition: none; } }

/* venda */
.grupo { margin: 16px 2px 8px; font: 700 14px var(--titulo); color: var(--tinta2); }
.produtos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.produto { text-align: left; padding: 12px; border-radius: 16px; border: 0; background: var(--cartao); box-shadow: inset 0 0 0 1px var(--linha); min-height: 70px; }
.produto b { display: block; font-size: 14px; font-weight: 600; line-height: 1.2; margin-bottom: 3px; }
.produto span { font-size: 13px; color: var(--tinta2); }
.produto i { display: block; font-style: normal; font-size: 12px; color: var(--tinta3); }
.produto i.zerado { color: var(--sai); font-weight: 600; }
.produto.no { background: var(--verde-claro); box-shadow: inset 0 0 0 2px var(--verde); }
.carrinho { margin-top: 16px; }
.item { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linha); }
.item .nome { flex: 1; min-width: 0; font-weight: 600; font-size: 14px; }
.item input { width: 84px; min-height: 40px; text-align: center; padding: 4px; }
.item .pm { width: 40px; height: 40px; border-radius: 12px; border: 0; background: var(--cartao); box-shadow: inset 0 0 0 1px var(--linha); font-size: 20px; }
.item .sub { width: 84px; text-align: right; font-weight: 700; font-size: 14px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font: 800 26px var(--titulo); letter-spacing: -0.03em; }

/* edição de produtos */
.prod-ed { background: var(--cartao); border-radius: 16px; padding: 12px; margin-top: 8px; display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 8px; align-items: end; }
.prod-ed input:not([type=checkbox]), .prod-ed select { min-height: 42px; padding: 6px 10px; font-size: 14px; border-radius: 10px; }
.prod-ed .campo { margin: 0; min-width: 0; }
.prod-ed .campo span { display: block; margin: 0 0 3px 2px; font-size: 11.5px; }
.prod-ed .campo.nome { grid-column: 1 / -1; }
.prod-ed input.nome { font-weight: 600; }
.prod-ed .marca-linha { margin: 0; font-size: 13px; min-height: 42px; }
.prod-ed .controla { grid-column: 1 / 3; min-height: 36px; }
.prod-ed .remover { border: 0; background: var(--sai-claro); }

/* análise */
.kpis { grid-template-columns: repeat(2, 1fr); }
.grade { display: grid; gap: 14px; margin-top: 14px; }
.grade > * { min-width: 0; margin: 0 !important; }
.grafico { position: relative; }
.grafico svg { display: block; overflow: visible; }
.grafico text { font-size: 11px; fill: var(--tinta2); font-family: inherit; }
.legenda { display: flex; gap: 14px; font-size: 13px; color: var(--tinta2); margin-bottom: 8px; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.barras-h { display: grid; gap: 12px; }
.barra-h .rot { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.barra-h .rot b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra-h .rot span { white-space: nowrap; color: var(--tinta2); font-size: 13px; }
.barra-h .trilho { height: 10px; border-radius: 0 4px 4px 0; margin-top: 5px; background: var(--suave); }
.barra-h .trilho i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
details { margin-top: 12px; font-size: 13px; }
summary { cursor: pointer; color: var(--tinta2); font-weight: 600; }
table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 14px; }
.rolagem { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.produtos-tab { min-width: 560px; }
.produtos-tab tbody tr { cursor: pointer; }
.produtos-tab tbody tr:hover { background: var(--suave); }
.produtos-tab td small { display: block; color: var(--tinta3); font-size: 12px; }
.produtos-tab th, .produtos-tab td { white-space: nowrap; }
th, td { text-align: right; padding: 8px 2px; border-top: 1px solid var(--linha); }
tr:first-child > td, thead th { border-top: 0; }
th:first-child, td:first-child { text-align: left; }
th { font-size: 13px; color: var(--tinta); font-weight: 700; }
thead th { font-size: 12px; color: var(--tinta2); }
#dica { position: fixed; z-index: 20; pointer-events: none; background: var(--tinta); color: var(--creme); padding: 8px 10px; border-radius: 12px; font-size: 13px; line-height: 1.5; white-space: nowrap; }
#dica[hidden], #aviso[hidden] { display: none; }
#dica i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }

#suporte { position: sticky; top: 0; z-index: 8; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 8px 16px; background: var(--alerta-fundo); color: var(--alerta); font-size: 14px; font-weight: 600; }
#suporte .btn { min-height: 32px; border: 0; }

#aviso { position: fixed; left: 50%; top: 16px; transform: translateX(-50%); z-index: 30; max-width: calc(100% - 32px); background: var(--tinta); color: var(--creme); padding: 12px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; box-shadow: 0 10px 28px rgba(0, 0, 0, .28); }

/* entrada */
.entrar { max-width: 400px; margin: 6vh auto 0; }
.entrar .capa { border-radius: 28px; padding: 26px 22px; margin-bottom: 18px; }
.entrar .marca { display: flex; align-items: center; gap: 10px; font: 700 16px var(--titulo); margin-bottom: 18px; }
.entrar .marca img { width: 34px; height: 34px; border-radius: 10px; }
.entrar .capa .marca { margin-bottom: 34px; }
.entrar .capa h1 { font-size: 34px; }
.entrar .capa p { font-size: 14px; }
.entrar .btn { width: 100%; margin-top: 18px; }

/* título de seção fora do cartão (tela Mais) */
.secao { margin: 22px 4px 8px; font: 700 12.5px var(--titulo); letter-spacing: .08em; text-transform: uppercase; color: var(--tinta2); }
.secao + .cartao { margin-top: 0; }
.sobre > .mudo { display: block; margin-bottom: 12px; }
.menu { list-style: none; margin: 0; padding: 0; }
.menu li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-top: 1px solid var(--linha); cursor: pointer; font-weight: 600; }
.menu li:first-child { border-top: 0; padding-top: 2px; }
.menu li:last-child { padding-bottom: 2px; }
.menu li span { color: var(--tinta2); font-weight: 500; font-size: 14px; text-align: right; }

/* lançamentos: um cartão por dia */
.lista.lanc .meio b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.lista.lanc .meio small { margin-top: 4px; }
.lista.lanc .etq { margin-right: 6px; font-weight: 600; }
.lista.lanc .valor small { color: var(--tinta3); }
.dia-cab { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--linha); }
.dia-num { flex: none; width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: var(--verde); color: var(--creme); font: 800 20px var(--titulo); }
.dia-txt { flex: 1; min-width: 0; }
.dia-txt b { display: block; font: 700 16px var(--titulo); }
.dia-txt small { display: block; }
.dia-tot { display: flex; flex-direction: column; align-items: flex-end; font-size: 13px; font-weight: 700; color: var(--tinta2); white-space: nowrap; }
.busca { position: relative; flex: 1 1 220px; display: flex; align-items: center; }
.busca svg { position: absolute; left: 14px; width: 16px; height: 16px; color: var(--tinta3); pointer-events: none; }
.busca input { width: 100%; padding-left: 38px; } /* em qualquer lugar: a lupa fica à esquerda do texto */
.filtros .busca input { border: 0; box-shadow: inset 0 0 0 1px var(--linha); }

/* análise: destaques, ranking, rosca, barra empilhada */
.destaques { display: grid; gap: 10px; margin-top: 14px; }
.destaque { border-radius: 18px; padding: 14px 16px; background: var(--verde); color: var(--creme); min-width: 0; }
.destaque span { display: block; font-size: 12px; color: rgba(246, 239, 226, .7); font-weight: 500; }
.destaque b { display: block; margin: 2px 0; font: 700 18px var(--titulo); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.destaque small { color: rgba(246, 239, 226, .8); }
.numero { display: block; font: 800 30px var(--titulo); letter-spacing: -0.03em; margin: -6px 0 10px; }
.ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.ranking li { display: flex; gap: 12px; align-items: flex-start; }
.ranking .pos { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--suave); font: 700 13px var(--titulo); color: var(--tinta2); }
.ranking li:first-child .pos { background: var(--tinta); color: var(--creme); }
.ranking .corpo { flex: 1; min-width: 0; }
.ranking .rot { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.ranking .rot b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ranking .rot strong { font-weight: 700; white-space: nowrap; }
.ranking .trilho { height: 8px; border-radius: 0 4px 4px 0; margin: 6px 0 4px; background: var(--suave); }
.ranking .trilho i { display: block; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.ranking small { display: block; font-size: 12px; color: var(--tinta3); }
.rosca { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rosca svg { flex: none; width: 168px; height: 168px; margin: 0 auto; }
.rosca .r-rot { font-size: 9px; fill: var(--tinta2); }
.rosca .r-total { font: 800 15px var(--titulo); fill: var(--tinta); }
.leg-lista { list-style: none; margin: 0; padding: 0; flex: 1 1 200px; min-width: 0; }
.leg-lista li { display: flex; align-items: center; gap: 8px; padding: 8px 0; border-top: 1px solid var(--linha); font-size: 14px; }
.leg-lista li:first-child { border-top: 0; }
.leg-lista i { flex: none; width: 10px; height: 10px; border-radius: 3px; }
.leg-lista span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.leg-lista b { font-weight: 700; white-space: nowrap; }
.leg-lista em { font-style: normal; width: 38px; text-align: right; color: var(--tinta2); font-size: 13px; }
.empilhada { display: flex; gap: 2px; height: 22px; border-radius: 8px; overflow: hidden; margin: 4px 0 10px; }
.empilhada i { min-width: 3px; }

@media (min-width: 560px) {
  .destaques { grid-template-columns: repeat(3, 1fr); }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .tiles:not(.kpis) .tile { display: block; }
  .tiles:not(.kpis) .tile span { font-size: 12.5px; }
}
@media (min-width: 820px) {
  #tela { padding-top: 30px; }
  h1 { font-size: 38px; }
  .tile strong { font-size: 26px; }
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .grade { grid-template-columns: 1fr 1fr; }
  .grade .larga { grid-column: 1 / -1; }
  .heroi { padding: 28px; }
  .heroi .saldo { font-size: 56px; }
  .duas-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 18px; align-items: start; }
  .duas-col > .bloco { margin-top: 0; }
  #abas button { min-width: 80px; }
}

/* ---- Nebulafy Vendas ---- */
.selo { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--suave); color: var(--tinta2); white-space: nowrap; }
.selo.rascunho { background: var(--suave); color: var(--tinta2); }
.selo.enviado { background: var(--alerta-fundo); color: var(--alerta); }
.selo.faturado { background: var(--verde-claro); color: #1b3a5c; }
.selo.recebida { background: #dff3ea; color: var(--entra); }
.selo.cancelado { background: var(--sai-claro); color: var(--sai); }
.meta-barra { height: 8px; border-radius: 0 4px 4px 0; background: var(--suave); margin-top: 6px; overflow: hidden; }
.meta-barra i { display: block; height: 100%; background: var(--verde); border-radius: 0 4px 4px 0; min-width: 2px; }
.meta-barra i.acima { background: var(--entra); }
.item-p { display: grid; grid-template-columns: 1fr 70px 96px 36px; gap: 6px; align-items: center; margin-top: 6px; }
.item-p input, .item-p select { min-height: 42px; padding: 4px 8px; font-size: 14px; border-radius: 10px; }
.item-p .nome-p { font-size: 14px; font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-p .nome-p small { display: block; font-weight: 500; color: var(--tinta3); }
.item-p .pm { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--sai-claro); color: var(--sai); font-size: 18px; justify-self: end; }
.item-p .sub-p { grid-column: 1 / -1; text-align: right; font-size: 13px; color: var(--tinta2); margin-top: -2px; }
.tab-res { min-width: 520px; }
.tab-res td.neg, .neg { color: var(--sai); }
.tab-res td.pos, .pos { color: var(--entra); }
.tab-res tr.soma td { font-weight: 800; border-top: 2px solid var(--tinta); }
.tab-res td:first-child { font-weight: 600; }
.sub-abas { display: flex; gap: 6px; margin-bottom: 14px; }
.sub-abas .chip { flex: 1; }
.rota-cid { font-size: 13px; color: var(--tinta2); line-height: 1.5; }
.grade-dados { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 10px; }
.grade-dados div { background: var(--suave); border-radius: 12px; padding: 8px 10px; font-size: 13px; }
.grade-dados div span { display: block; font-size: 11.5px; color: var(--tinta3); }
.grade-dados div b { font-size: 14px; }
.cnpj-linha { display: flex; gap: 8px; align-items: end; }
.cnpj-linha .campo { flex: 1; }
.cnpj-linha .btn { flex: none; min-height: 50px; }
.lista.compacta li { padding: 9px 0; cursor: default; }
.ped-ind { font-size: 12px; font-weight: 700; color: var(--verde); }
@media (min-width: 560px) { .tiles.quatro { grid-template-columns: repeat(4, 1fr); } }
.produtos-tab th:nth-child(2), .produtos-tab td:nth-child(2) { text-align: left; }
.cf { min-width: 0; }
.par .cf label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* gráficos do Vendas: legenda dos gráficos de barras, funil de pedidos e barras duplas */
.legenda span { display: inline-flex; align-items: center; }
.funil { display: grid; gap: 10px; margin-top: 6px; }
.degrau .rot { display: flex; justify-content: space-between; font-size: 14px; }
.degrau .rot span { color: var(--tinta2); font-size: 13px; }
.degrau .trilho { display: flex; align-items: center; gap: 8px; height: 26px; border-radius: 8px; background: var(--suave); margin-top: 4px; overflow: hidden; }
.degrau .trilho em { font-style: normal; font-size: 12.5px; font-weight: 700; color: var(--tinta2); white-space: nowrap; }
.degrau .trilho i { display: flex; align-items: center; justify-content: flex-end; height: 100%; border-radius: 8px; min-width: 0; }
.degrau .trilho i span { color: #fff; font-size: 12px; font-weight: 700; padding: 0 8px; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.duplas { display: grid; gap: 12px; }
.dupla .rot { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.dupla .rot b { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dupla .rot span { color: var(--tinta2); font-size: 12.5px; white-space: nowrap; }
.dupla .trilho { display: flex; align-items: center; gap: 8px; height: 10px; margin-top: 4px; }
.dupla .trilho i { display: block; height: 10px; border-radius: 0 4px 4px 0; background: var(--suave); }
.dupla .trilho em { font-style: normal; font-size: 12px; color: var(--tinta2); white-space: nowrap; }
.dupla .trilho:first-of-type i { height: 12px; }
.grafico { position: relative; }
.grafico svg { display: block; overflow: visible; }
