/* Painel do dono. Um estilo de cartão, uma cor de destaque, sombra só no que flutua. */
@font-face { font-family: Manrope; src: url(/fontes/manrope-latin.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+20AC, U+2122, U+2212; }
@font-face { font-family: Manrope; src: url(/fontes/manrope-latin-ext.woff2) format("woff2"); font-weight: 200 800; font-display: swap; unicode-range: U+0100-02AF, U+1E00-1EFF; }

:root {
  color-scheme: light;
  --fundo: #f6f5f2; --lateral: #efeee9; --placa: #ffffff; --placa-2: #f6f5f2;
  --linha: #e7e5df; --linha-forte: #d5d2ca;
  --texto: #17161a; --suave: #66636d; --fraco: #8d8a93;
  --destaque: #6a45e8; --destaque-lavagem: rgb(106 69 232 / .14);
  --sobe: #0b7a53; --sobe-fundo: #e2f3ea; --desce: #b3263f; --desce-fundo: #fbe8eb; --alerta: #8a5b00; --alerta-fundo: #fbf0d6;
  --botao: #17161a; --botao-texto: #ffffff;
  --cor-pix: #6a45e8; --cor-credit_card: #12907a; --cor-boleto: #b7791a; --cor-outro: #c0447a;
  --sombra: 0 18px 50px rgb(23 22 26 / .16), 0 2px 8px rgb(23 22 26 / .08);
  --raio: 12px;
}
:root[data-tema="escuro"] {
  color-scheme: dark;
  --fundo: #101012; --lateral: #0b0b0d; --placa: #17171a; --placa-2: #1f1f23;
  --linha: #29292e; --linha-forte: #3a3a41;
  --texto: #f2f1f4; --suave: #a3a1ab; --fraco: #7e7c86;
  --destaque: #9a80ff; --destaque-lavagem: rgb(154 128 255 / .17);
  --sobe: #4ddca6; --sobe-fundo: #10301f; --desce: #ff93a4; --desce-fundo: #3a1820; --alerta: #f2c35c; --alerta-fundo: #33270c;
  --botao: #f2f1f4; --botao-texto: #141416;
  --cor-pix: #8b6dfb; --cor-credit_card: #1aa88f; --cor-boleto: #c4851c; --cor-outro: #d4568a;
  --sombra: 0 18px 50px rgb(0 0 0 / .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fundo); scrollbar-color: var(--linha-forte) transparent; }
body { color: var(--texto); font: 500 14px/1.5 Manrope, system-ui, sans-serif; -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
::selection { background: var(--destaque); color: #fff; }
:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
input { caret-color: var(--destaque); }
img, svg { display: block; }
ul, ol { list-style: none; }
h1, h2, h3 { line-height: 1.25; letter-spacing: -.015em; }
h2 { font-size: 14px; font-weight: 800; letter-spacing: -.005em; }
h3 { font-size: 13px; font-weight: 700; color: var(--suave); letter-spacing: 0; }
[hidden] { display: none !important; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.suave { color: var(--suave); }
.nota { color: var(--suave); font-size: 12px; }
:root[data-tema="escuro"] .so-claro, :root:not([data-tema="escuro"]) .so-escuro { display: none; }
.marca img { width: 124px; height: auto; }

/* ---------- controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 0 14px; border: 1px solid var(--linha-forte); border-radius: 8px; background: var(--placa); font-weight: 700; font-size: 13px; white-space: nowrap; transition: background-color .15s, border-color .15s, opacity .15s; }
.btn:hover { background: var(--placa-2); border-color: var(--fraco); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.principal { background: var(--botao); border-color: var(--botao); color: var(--botao-texto); }
.btn.principal:hover { opacity: .86; }
.btn.grande { min-height: 46px; font-size: 14px; }
.btn.pequeno { min-height: 30px; padding: 0 10px; font-size: 12px; gap: 6px; }
.btn.pequeno .ic { width: 14px; height: 14px; }
.btn.so-icone { width: 36px; padding: 0; border-color: transparent; background: transparent; color: var(--suave); }
.btn.so-icone:hover { background: var(--placa-2); color: var(--texto); }
.btn.so-icone.contorno { border-color: var(--linha-forte); background: var(--placa); }
.link { color: var(--destaque); font-weight: 700; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.segmentos { display: inline-flex; gap: 2px; padding: 3px; border-radius: 9px; background: var(--lateral); border: 1px solid var(--linha); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.segmentos button { flex: none; min-height: 28px; padding: 0 12px; border-radius: 6px; color: var(--suave); font-weight: 700; font-size: 12.5px; }
.segmentos button:hover { color: var(--texto); }
.segmentos button[aria-pressed="true"] { background: var(--placa); color: var(--texto); box-shadow: 0 0 0 1px var(--linha-forte); }
input[type="date"], input[type="email"], input[type="password"], input[type="text"] { min-height: 38px; width: 100%; padding: 0 12px; border: 1px solid var(--linha-forte); border-radius: 8px; background: var(--placa); }
input:focus-visible { outline: 2px solid var(--destaque); outline-offset: 0; border-color: transparent; }

/* ---------- entrada ---------- */
.entrada { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.entrada form { width: min(372px, 100%); display: grid; gap: 8px; padding: 32px; background: var(--placa); border: 1px solid var(--linha); border-radius: 16px; }
.entrada .marca { margin-bottom: 18px; }
.entrada h1 { font-size: 22px; font-weight: 800; }
.entrada p { color: var(--suave); margin-bottom: 12px; }
.entrada label { font-weight: 700; font-size: 13px; margin-top: 4px; }
.entrada input { min-height: 44px; }
.entrada .btn { margin-top: 12px; }
.entrada .erro { color: var(--desce); margin: 4px 0 0; font-size: 13px; }
.erro:empty { display: none; }

/* ---------- moldura ---------- */
#painel:has(.lateral) { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100dvh; }
.atualizando main { opacity: .55; transition: opacity .15s; }
.lateral { position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; gap: 18px; padding: 18px 12px; background: var(--lateral); border-right: 1px solid var(--linha); overflow-y: auto; }
.lateral > .marca { padding: 0 8px; }
.atalho { display: flex; align-items: center; gap: 9px; min-height: 36px; padding: 0 8px 0 10px; border: 1px solid var(--linha-forte); border-radius: 8px; background: var(--placa); color: var(--suave); font-size: 13px; }
.atalho span { margin-right: auto; }
kbd { padding: 1px 6px; border: 1px solid var(--linha-forte); border-radius: 5px; font: 700 11px Manrope, sans-serif; color: var(--fraco); }
.lateral nav { display: grid; gap: 18px; }
.grupo { display: grid; gap: 2px; }
.grupo p { padding: 0 10px 4px; color: var(--fraco); font-size: 12px; font-weight: 700; }
.lateral nav button, .pe-lateral > a, .pe-lateral > button { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 8px; color: var(--suave); font-weight: 700; font-size: 13.5px; text-decoration: none; text-align: left; }
.lateral nav button:hover, .pe-lateral > a:hover, .pe-lateral > button:hover { color: var(--texto); background: var(--placa-2); }
.lateral nav button[aria-current] { background: var(--placa); color: var(--texto); box-shadow: 0 0 0 1px var(--linha); }
.lateral nav button[aria-current] .ic { color: var(--destaque); }
.pe-lateral { margin-top: auto; display: grid; gap: 2px; }
.dono { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding: 12px 2px 0; border-top: 1px solid var(--linha); }
.dono-email { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--suave); }
.topo-movel, .abas { display: none; }

main { min-width: 0; width: 100%; max-width: 1380px; margin: 0 auto; padding: 26px 32px 70px; }
.cabecalho { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; margin-bottom: 20px; }
.cabecalho h1 { font-size: 24px; font-weight: 800; }
.cabecalho .titulo p { color: var(--suave); font-size: 13px; }
.acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.datas { display: flex; align-items: center; gap: 6px; color: var(--suave); }
.datas input { width: 148px; }

/* ---------- cartões ---------- */
.cartao { min-width: 0; padding: 20px; background: var(--placa); border: 1px solid var(--linha); border-radius: var(--raio); }
.cartao > header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 16px; }
.dinheiro { display: inline-flex; align-items: baseline; white-space: nowrap; }
.dinheiro small { font-size: .52em; font-weight: 700; color: var(--suave); letter-spacing: 0; }
.dinheiro small:first-child:not(:last-child) { margin-right: .18em; }
.dinheiro.negativo > * { color: var(--desce); }
.delta { padding: 2px 8px; border-radius: 6px; font-size: 12px; font-weight: 800; letter-spacing: 0; white-space: nowrap; }
.delta.sobe { background: var(--sobe-fundo); color: var(--sobe); }
.delta.desce { background: var(--desce-fundo); color: var(--desce); }
.delta.neutro { background: var(--placa-2); color: var(--suave); font-weight: 700; }

.geral { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.heroi { grid-column: span 8; display: flex; flex-direction: column; }
.extrato { grid-column: span 4; }
.trio { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pagamento, .saude { grid-column: span 3; }
.recentes { grid-column: span 6; }

.heroi-topo { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.heroi h2 { color: var(--suave); font-weight: 700; font-size: 13px; }
.numero-heroi { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.numero-heroi .dinheiro { font-size: 52px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.grafico { position: relative; height: 250px; margin-top: auto; border-radius: 6px; touch-action: pan-y; }
.grafico svg { overflow: visible; }
.grade-linha { stroke: var(--linha); stroke-width: 1; }
.eixo-texto { fill: var(--fraco); font-size: 11px; font-weight: 700; }
.linha-atual { fill: none; stroke: var(--destaque); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.linha-antes { fill: none; stroke: var(--fraco); stroke-width: 1.5; stroke-dasharray: 4 4; opacity: .7; }
.area { fill: url(#lavagem); }
.parada-1 { stop-color: var(--destaque); stop-opacity: .18; }
.parada-2 { stop-color: var(--destaque); stop-opacity: 0; }
.guia { stroke: var(--linha-forte); opacity: 0; }
.ponto { fill: var(--destaque); stroke: var(--placa); stroke-width: 2; opacity: 0; }
.apontando .guia, .apontando .ponto { opacity: 1; }
.legenda { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 10px; color: var(--suave); font-size: 12px; font-weight: 700; }
.legenda span { display: flex; align-items: center; gap: 7px; }
.legenda span::before { content: ""; width: 14px; border-top: 2px solid var(--destaque); }
.legenda .leg-antes::before { border-top: 2px dashed var(--fraco); }

dl { display: grid; }
.linha-extrato { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--linha); }
.linha-extrato dt { color: var(--suave); }
.linha-extrato dd { font-weight: 800; text-align: right; }
.linha-extrato.desconto dd { color: var(--suave); font-weight: 700; }
.linha-extrato.parcial dt { color: var(--texto); font-weight: 800; }
.linha-extrato.total { border-bottom: 0; padding-top: 16px; }
.linha-extrato.total dt { color: var(--texto); font-weight: 800; font-size: 15px; }
.linha-extrato.total .dinheiro { font-size: 30px; letter-spacing: -.025em; }
.extrato > header { margin-bottom: 4px; }
.razoes { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 12px; background: var(--placa-2); border-radius: 8px; }
.razoes div { display: grid; gap: 1px; padding: 10px 12px; }
.razoes div + div { border-left: 1px solid var(--linha); }
.razoes span { color: var(--suave); font-size: 11.5px; font-weight: 700; }
.razoes strong { font-size: 16px; }
.extrato > .nota { margin-top: 10px; }

.secundario { display: grid; grid-template-columns: minmax(0, 1fr) minmax(70px, 120px); align-items: end; column-gap: 16px; }
.secundario h3 { grid-column: 1 / -1; }
.secundario .numero { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; }
.secundario .numero > .dinheiro { font-size: 30px; font-weight: 800; letter-spacing: -.025em; }
.secundario .nota { grid-column: 1 / -1; margin-top: 4px; }
.faisca { height: 34px; align-self: center; }
.faisca svg { width: 100%; height: 34px; }
.faisca path { fill: none; stroke: var(--destaque); stroke-width: 1.75; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.faisca.vazia { border-bottom: 1px dashed var(--linha-forte); height: 1px; }

.pilha { display: flex; gap: 2px; height: 12px; margin-bottom: 16px; border-radius: 4px; overflow: hidden; }
.cor-pix { background: var(--cor-pix); } .cor-credit_card { background: var(--cor-credit_card); } .cor-boleto { background: var(--cor-boleto); } .cor-outro { background: var(--cor-outro); }
.chaves li { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; column-gap: 10px; padding: 9px 0; border-top: 1px solid var(--linha); }
.chaves i { width: 10px; height: 10px; border-radius: 3px; }
.chaves strong { grid-column: 3; grid-row: 1; }
.chaves .qtd { grid-column: 2 / -1; color: var(--suave); font-size: 12px; }
.chaves li > span:nth-child(2) { font-weight: 700; }
.saude > header { margin-bottom: 4px; }
.saude .linha-extrato { flex-direction: column; align-items: flex-start; gap: 0; padding: 8px 0; }
.saude .linha-extrato dt { font-size: 12px; }
.saude .linha-extrato:last-child { border-bottom: 0; padding-bottom: 0; }

.recentes > header { margin-bottom: 4px; }
.recentes li { display: grid; grid-template-columns: minmax(0, 1fr) auto 96px; align-items: center; gap: 14px; padding: 11px 0; border-bottom: 1px solid var(--linha); }
.recentes li:last-child { border-bottom: 0; padding-bottom: 0; }
.recentes .estado { justify-self: end; }
.valor-recente { display: grid; text-align: right; }
.valor-recente span { color: var(--suave); font-size: 12px; }
.pessoa { display: flex; align-items: center; gap: 11px; min-width: 0; }
.pessoa > div { display: grid; min-width: 0; }
.pessoa strong { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pessoa div span { color: var(--suave); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--placa-2); border: 1px solid var(--linha-forte); color: var(--suave); font-size: 12px; font-weight: 800; }

.estado { display: inline-flex; align-items: center; gap: 6px; padding: 2px 9px; border-radius: 6px; font-size: 12px; font-weight: 800; background: var(--placa-2); color: var(--suave); white-space: nowrap; }
.estado::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.estado.paid { background: var(--sobe-fundo); color: var(--sobe); }
.estado.pending { background: var(--alerta-fundo); color: var(--alerta); }
.estado.refunded, .estado.chargeback, .estado.refused { background: var(--desce-fundo); color: var(--desce); }
.marcador { display: inline-block; padding: 1px 7px; border: 1px solid var(--linha-forte); border-radius: 5px; color: var(--suave); font-size: 11.5px; font-weight: 700; white-space: nowrap; }

.vazio { display: grid; justify-items: center; gap: 2px; padding: 32px 12px; text-align: center; }
.vazio span { color: var(--suave); font-size: 12.5px; max-width: 44ch; }

/* ---------- listas e tabelas ---------- */
.pilha-pagina { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.dupla { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.ferramentas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.ferramentas .empurra { margin-left: auto; }
.caixa-busca { display: flex; align-items: center; gap: 9px; flex: 0 1 320px; min-width: 220px; min-height: 36px; padding: 0 11px; border: 1px solid var(--linha-forte); border-radius: 8px; color: var(--fraco); }
.caixa-busca:focus-within { border-color: var(--destaque); box-shadow: 0 0 0 1px var(--destaque); }
.caixa-busca input { flex: 1; min-width: 0; border: 0; background: none; outline: 0; color: var(--texto); }
.contagem { color: var(--suave); font-size: 12.5px; font-weight: 700; margin-bottom: 8px; }
.rolavel { overflow-x: auto; margin: 0 -20px -8px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--linha); }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
th { color: var(--fraco); font-size: 12px; font-weight: 700; white-space: nowrap; padding-block: 8px; }
.n { text-align: right; white-space: nowrap; }
tbody tr:hover { background: var(--placa-2); }
tbody tr:last-child td { border-bottom: 0; }
td .pessoa { max-width: 320px; }
.produto, .etiquetas { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
tr.pai td { font-weight: 800; }
tr.filho td:first-child { padding-left: 40px; color: var(--suave); }
tr.neto td:first-child { padding-left: 62px; color: var(--fraco); }
.alerta-cakto { margin-bottom: 16px; padding: 10px 14px; border-radius: 8px; background: var(--alerta-fundo); color: var(--alerta); font-weight: 700; font-size: 13px; }
.celula-parte { position: relative; display: inline-grid; min-width: 150px; justify-items: end; padding-bottom: 6px; }
.celula-parte i { position: absolute; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: var(--destaque); }
.quando { display: grid; white-space: nowrap; }
.quando strong { font-weight: 700; }
.quando strong::first-letter { text-transform: uppercase; }
.quando span { color: var(--suave); font-size: 12px; }
.passos { display: flex; gap: 6px; }
.passo { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px dashed var(--linha-forte); border-radius: 6px; color: var(--fraco); font-size: 12px; font-weight: 700; white-space: nowrap; }
.passo.feito { border: 1px solid transparent; background: var(--sobe-fundo); color: var(--sobe); }
.passo .ic { width: 13px; height: 13px; stroke-width: 2.5; }
.aulas { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.aulas .barra-trilho { width: 64px; }
.barra-trilho { height: 6px; border-radius: 3px; background: var(--linha); overflow: hidden; }
.barra-trilho i { display: block; height: 100%; border-radius: 3px; background: var(--destaque); }
.barras li { display: grid; grid-template-columns: minmax(130px, 1fr) minmax(80px, 2fr) 104px 52px; align-items: center; gap: 16px; padding: 11px 0; border-top: 1px solid var(--linha); }
.barras li:first-child { border-top: 0; padding-top: 0; }
.barra-nome { display: grid; min-width: 0; }
.barra-nome strong { font-weight: 700; overflow-wrap: anywhere; }
.barra-nome span, .barra-parte { color: var(--suave); font-size: 12px; }
.barra-valor, .barra-parte { text-align: right; }
.dupla .barras li { grid-template-columns: minmax(0, 1fr) auto 48px; row-gap: 6px; }
.dupla .barra-trilho { grid-column: 1 / -1; grid-row: 2; }

.funil ol { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.funil li { display: grid; gap: 4px; align-content: start; padding: 0 16px; }
.funil li + li { border-left: 1px solid var(--linha); }
.funil li:first-child { padding-left: 0; } .funil li:last-child { padding-right: 0; }
.funil-nome { color: var(--suave); font-size: 12.5px; font-weight: 700; }
.funil li strong { font-size: 30px; line-height: 1.2; letter-spacing: -.025em; }
.funil-coluna { display: flex; align-items: flex-end; height: 72px; border-radius: 6px; background: var(--placa-2); overflow: hidden; }
.funil-coluna i { display: block; width: 100%; background: var(--destaque); }

/* ---------- o que flutua ---------- */
#dica { position: fixed; z-index: 60; display: grid; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--linha-forte); background: var(--placa); box-shadow: var(--sombra); font-size: 12px; pointer-events: none; white-space: nowrap; }
#dica strong { font-size: 15px; }
#dica span { color: var(--suave); }
#dica .dica-antes { border-top: 1px solid var(--linha); margin-top: 4px; padding-top: 4px; }
#aviso { position: fixed; left: 50%; bottom: 24px; z-index: 70; translate: -50% 10px; width: max-content; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 8px; background: var(--botao); color: var(--botao-texto); font-weight: 700; font-size: 13px; box-shadow: var(--sombra); opacity: 0; pointer-events: none; transition: opacity .18s, translate .18s; }
#aviso.visivel { opacity: 1; translate: -50% 0; }
dialog { color: var(--texto); background: var(--placa); border: 1px solid var(--linha-forte); box-shadow: var(--sombra); }
dialog::backdrop { background: rgb(10 10 12 / .45); }
#gasto { margin: 0 0 0 auto; width: min(420px, 100%); height: 100dvh; max-height: 100dvh; padding: 20px; border-width: 0 0 0 1px; }
#gasto[open] { animation: entrar .2s ease-out; }
@keyframes entrar { from { translate: 24px 0; opacity: 0; } }
#gasto > header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
#gasto form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0 24px; }
#gasto label { display: block; font-weight: 700; font-size: 12.5px; margin-bottom: 4px; }
#gasto form .btn { grid-column: 1 / -1; min-height: 40px; }
#gasto li { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 14px; padding: 10px 0; border-bottom: 1px solid var(--linha); }
#busca { margin: 12vh auto auto; width: min(560px, calc(100% - 24px)); max-height: 70vh; padding: 0; border-radius: 14px; overflow: hidden; }
#busca[open] { display: flex; flex-direction: column; }
.campo-comando { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--linha); color: var(--fraco); }
.campo-comando input { flex: 1; min-width: 0; height: 52px; border: 0; background: none; outline: 0; color: var(--texto); font-size: 15px; }
#busca ul { overflow-y: auto; padding: 6px; }
#busca li { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 8px; cursor: pointer; font-weight: 700; }
#busca li[aria-selected="true"] { background: var(--placa-2); }
#busca li .ic { color: var(--suave); }
#busca li small { margin-left: auto; color: var(--suave); font-weight: 500; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#busca li.nada { cursor: default; color: var(--suave); justify-content: center; }

.esqueleto { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-auto-rows: 130px; gap: 16px; max-width: 1100px; margin: 80px auto; padding: 0 24px; }
.esqueleto i { border-radius: var(--raio); background: var(--lateral); animation: pulsar 1s ease-in-out infinite alternate; }
.esqueleto i:first-child { grid-row: span 2; }
@keyframes pulsar { to { opacity: .45; } }

/* ---------- telas menores ---------- */
@media (max-width: 1180px) {
  .heroi, .extrato, .recentes { grid-column: 1 / -1; }
  .pagamento, .saude { grid-column: span 6; }
}
@media (max-width: 900px) {
  #painel:has(.lateral) { display: block; }
  .lateral { display: none; }
  .topo-movel { display: flex; align-items: center; gap: 2px; position: sticky; top: 0; z-index: 20; padding: 10px 12px 10px 16px; background: var(--fundo); border-bottom: 1px solid var(--linha); }
  .topo-movel .marca { margin-right: auto; }
  .topo-movel .marca img { width: 104px; }
  main { padding: 18px 14px 96px; }
  .abas { position: fixed; inset: auto 0 0; z-index: 20; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding-bottom: env(safe-area-inset-bottom); background: var(--placa); border-top: 1px solid var(--linha); }
  .abas button { display: grid; justify-items: center; gap: 3px; padding: 9px 0 8px; color: var(--suave); font-size: 11px; font-weight: 800; }
  .abas button[aria-current] { color: var(--texto); }
  .abas button[aria-current] .ic { color: var(--destaque); }
  #aviso { bottom: 80px; }
  .acoes { width: 100%; }
  .acoes .segmentos { order: -1; width: 100%; }
  .acoes .segmentos button { flex: 1 0 auto; }
  .acoes .principal { margin-left: auto; }
  .trio, .dupla { grid-template-columns: minmax(0, 1fr); }
  .funil ol { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .funil li { grid-template-columns: 1fr auto; padding: 0; align-items: baseline; }
  .funil li + li { border-left: 0; border-top: 1px solid var(--linha); padding-top: 12px; }
  .funil li strong { font-size: 22px; grid-row: 1; grid-column: 2; }
  .funil-coluna { display: none; }
  .funil li .nota { grid-column: 1 / -1; }
  /* cada linha da tabela vira um cartão */
  .rolavel { margin: 0 -16px -8px; overflow: visible; }
  table, tbody, tr, td { display: block; }
  thead { display: none; }
  tbody tr { padding: 12px 16px; border-bottom: 1px solid var(--linha); }
  tbody tr:last-child { border-bottom: 0; }
  td, td:first-child, td:last-child { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 4px 0; border: 0; text-align: right; white-space: normal; }
  td::before { content: attr(data-rotulo); color: var(--fraco); font-size: 12px; font-weight: 700; text-align: left; }
  td:first-child { justify-content: flex-start; text-align: left; padding-bottom: 8px; font-weight: 800; }
  td:first-child::before, td[data-rotulo=""]::before { content: none; }
  td[data-rotulo=""] { justify-content: flex-end; }
  tr.filho td:first-child { padding-left: 0; }
  tr.filho { padding-left: 32px; }
  tr.neto { padding-left: 48px; }
  tr.neto td:first-child { padding-left: 0; }
  .aulas { justify-content: flex-end; }
}
@media (max-width: 560px) {
  .cartao { padding: 16px; }
  .pagamento, .saude { grid-column: 1 / -1; }
  .numero-heroi .dinheiro { font-size: 40px; }
  .grafico { height: 250px; }
  .recentes li { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .recentes .estado { grid-column: 1 / -1; justify-self: start; margin-left: 45px; }
  .barras li { grid-template-columns: minmax(0, 1fr) auto 48px; row-gap: 6px; }
  .barras .barra-trilho { grid-column: 1 / -1; grid-row: 2; }
  .ferramentas .segmentos, .caixa-busca { flex-basis: 100%; width: 100%; }
  .ferramentas .empurra { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
