/* FinançasLeonardo — mesmo visual base do Painel do Supera, cor própria (verde-petróleo #0E7C66) */
:root {
  --bg: #f6f6f6;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --border: #e6e6e6;
  --text: #333333;
  --muted: #78787a;
  --primary: #0e7c66;
  --primary-hover: #0a5f4e;
  --primary-soft: #e6f4f1;
  --ok: #067647;      --ok-bg: #ecfdf3;
  --warn: #b54708;    --warn-bg: #fffaeb;
  --alert: #3538cd;   --alert-bg: #eef4ff;
  --danger: #b42318;  --danger-bg: #fef3f2;
  --neutral: #475467; --neutral-bg: #f2f4f7;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 1px 3px rgba(16, 24, 40, .08);
  --radius: 12px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212; --surface: #1c1c1c; --surface-2: #242424; --border: #333333;
    --text: #f2f2f2; --muted: #a3a3a3;
    --primary: #2dd4bf; --primary-hover: #5eead4; --primary-soft: #0f2f2a;
    --ok: #47cd89;     --ok-bg: #053321;
    --warn: #fdb022;   --warn-bg: #4e1d09;
    --alert: #8098f9;  --alert-bg: #1f235b;
    --danger: #f97066; --danger-bg: #55160c;
    --neutral: #cecfd2; --neutral-bg: #2c3240;
    --shadow: none;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 14px/1.5 "Roboto", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
button, input { font: inherit; color: inherit; }

/* ── Cabeçalho ── */
.topo {
  background: var(--surface); border-bottom: 1px solid var(--border); border-top: 4px solid var(--primary);
  position: sticky; top: 0; z-index: 20;
}
.topo .conteudo {
  max-width: 1280px; margin: 0 auto; padding: .75rem 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
}
.marca { display: flex; align-items: center; gap: .75rem; }
.marca img { height: 42px; width: auto; display: block; }
.marca .divisor { width: 1px; height: 32px; background: var(--border); }
.marca b { display: block; font-size: 16px; font-weight: 700; }
.marca small { color: var(--muted); font-size: 12px; }

.mes-nav { display: flex; align-items: center; gap: .25rem; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: .25rem; }
.mes-nav a, .mes-nav span.vazio {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 999px; color: var(--muted);
}
.mes-nav a:hover { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.mes-nav span.vazio { opacity: .3; }
.mes-nav h1 { font-size: 15px; font-weight: 600; margin: 0 .75rem; min-width: 120px; text-align: center; }

main { max-width: 1280px; margin: 0 auto; padding: 1.5rem; }

/* ── Indicadores ── */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1rem 1.1rem; box-shadow: var(--shadow); }
.kpi .rotulo { color: var(--muted); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: .4rem; }
.kpi .valor { font-size: 24px; font-weight: 700; margin-top: .25rem; letter-spacing: -.02em; }
.kpi .valor small { font-size: 14px; color: var(--muted); font-weight: 500; }
.barra-prog { height: 6px; background: var(--neutral-bg); border-radius: 999px; margin-top: .6rem; overflow: hidden; }
.barra-prog i { display: block; height: 100%; background: var(--primary); border-radius: 999px; }
.kpi.ok .barra-prog i { background: var(--ok); }

/* ── Barra de ferramentas ── */
.ferramentas { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.abas { display: flex; gap: .25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: .25rem; flex-wrap: wrap; }
.abas a { padding: .4rem .75rem; border-radius: 7px; color: var(--muted); font-weight: 500; font-size: 13px;
  display: flex; align-items: center; gap: .4rem; }
.abas a:hover { color: var(--text); background: var(--surface-2); }
.abas a.ativo { background: var(--primary-soft); color: var(--primary); }
.abas .qtd { background: var(--neutral-bg); color: var(--neutral); border-radius: 999px; padding: 0 .45rem; font-size: 11px; }
.abas a.ativo .qtd { background: var(--primary); color: #fff; }
.direita { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.busca { position: relative; }
.busca input[type=search] { padding: .5rem .75rem .5rem 2.1rem; width: 260px; max-width: 100%; }
.busca svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); color: var(--muted); }

input[type=text], input[type=search], input[type=number], input:not([type]) {
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }

.btn { border: 1px solid transparent; border-radius: 8px; padding: .5rem .9rem; font-weight: 600; font-size: 13px;
  cursor: pointer; display: inline-flex; align-items: center; gap: .4rem; background: var(--surface);
  border-color: var(--border); color: var(--text); transition: background .15s; }
.btn:hover { background: var(--surface-2); }
.btn.primario { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primario:hover { background: var(--primary-hover); }
.btn.icone { padding: .35rem .5rem; color: var(--muted); }
.btn.icone:hover { color: var(--text); }

/* ── Tabela ── */
.cartao { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: auto; max-height: calc(100vh - 150px); }
table { width: 100%; border-collapse: separate; border-spacing: 0; }
thead th { position: sticky; top: 0; z-index: 5; background: var(--surface-2); text-align: left;
  font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  padding: .7rem .9rem; border-bottom: 1px solid var(--border); white-space: nowrap; }
thead th a { color: inherit; }
thead th a:hover { color: var(--text); }
thead th .seta { color: var(--primary); }
tbody td { padding: .6rem .9rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: var(--surface-2); }
td.nome b { font-weight: 600; }
td.nome .obs, td .sub { display: block; color: var(--muted); font-size: 12px; }
td .sub { white-space: nowrap; }
td.extra { color: var(--muted); font-size: 13px; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.inativo td { opacity: .55; }
.tag-inativo { font-size: 10px; font-weight: 600; text-transform: uppercase; background: var(--neutral-bg);
  color: var(--neutral); padding: .05rem .4rem; border-radius: 4px; margin-left: .35rem; vertical-align: middle; }
.vazio-tabela { text-align: center; color: var(--muted); padding: 2.5rem; }

/* NF */
form.nf { display: flex; gap: .3rem; margin: 0; }
form.nf input { width: 92px; padding: .3rem .5rem; font-variant-numeric: tabular-nums; }
form.nf .btn { padding: .3rem .5rem; }

/* Chave (Sophia / Ativo) */
.chave { position: relative; display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.chave input { position: absolute; opacity: 0; width: 0; height: 0; }
.chave .trilho { width: 36px; height: 20px; border-radius: 999px; background: var(--border); position: relative; transition: background .15s; }
.chave .trilho::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: transform .15s; }
.chave input:checked + .trilho { background: var(--ok); }
.chave input:checked + .trilho::after { transform: translateX(16px); }
.chave input:disabled + .trilho { opacity: .4; cursor: not-allowed; }
.chave input:focus-visible + .trilho { box-shadow: 0 0 0 3px var(--primary-soft); }

/* Status */
.status { display: inline-flex; align-items: center; gap: .35rem; font-size: 12px; font-weight: 600;
  padding: .2rem .6rem; border-radius: 999px; white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.concluido    { color: var(--ok);      background: var(--ok-bg); }
.status.falta_sophia { color: var(--alert);   background: var(--alert-bg); }
.status.falta_nf     { color: var(--warn);    background: var(--warn-bg); }
.status.pendente     { color: var(--neutral); background: var(--neutral-bg); }
.status.vencido      { color: var(--danger);  background: var(--danger-bg); }
.erro { display: block; color: var(--danger); font-size: 12px; margin-top: .25rem; font-weight: 500; }

/* Formulário de aluno (na linha) */
tr.editando td { background: var(--primary-soft) !important; }
form.aluno { display: grid; grid-template-columns: 2fr 2fr 1fr 1fr 1.2fr 1.2fr auto; gap: .75rem; align-items: end; margin: 0; }
form.aluno label { display: flex; flex-direction: column; gap: .25rem; font-size: 12px; font-weight: 500; color: var(--muted); }
form.aluno label.chave { flex-direction: row; color: var(--text); padding-bottom: .5rem; }
form.aluno input { width: 100%; }
form.aluno .acoes { display: flex; gap: .4rem; grid-column: 1 / -1; justify-content: flex-end; }
form.aluno .titulo { grid-column: 1 / -1; font-weight: 600; color: var(--text); }
@media (max-width: 900px) { form.aluno { grid-template-columns: 1fr 1fr; } }

.rodape { color: var(--muted); font-size: 12px; text-align: center; margin-top: 1.25rem; }
.htmx-request { opacity: .6; transition: opacity .15s; }

/* Registrar / remover pagamento */
form.registrar { display: flex; gap: .3rem; margin: 0; }
form.registrar select { background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: .3rem .4rem; font: inherit; font-size: 13px; color: inherit; }
form.registrar select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
form.registrar .btn { padding: .3rem .6rem; }
.pago { display: flex; align-items: center; gap: .4rem; }
.btn.remover { padding: .1rem .4rem; font-size: 12px; opacity: 0; }
tr:hover .btn.remover, .btn.remover:focus { opacity: 1; }
.btn.remover:hover { color: var(--danger); border-color: var(--danger); }

.marca { color: inherit; }
.topo-dir { display: flex; align-items: center; gap: .75rem; }
.menu { display: flex; gap: .25rem; }
.menu a { padding: .45rem .7rem; border-radius: 8px; color: var(--muted); font-weight: 500; font-size: 13px; white-space: nowrap; }
.menu a:hover { background: var(--surface-2); color: var(--text); }
.menu a.ativo { background: var(--primary-soft); color: var(--primary); }

/* Página do bot */
main.estreito { max-width: 760px; }
.titulo-pagina { margin: 0 0 .25rem; font-size: 20px; }
.ajuda { color: var(--muted); margin: 0 0 1.25rem; }
.bloco { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.bloco h3 { margin: 0 0 .5rem; font-size: 15px; display: flex; align-items: center; gap: .5rem; }
.bloco .qtd { background: var(--neutral-bg); color: var(--neutral); border-radius: 999px; padding: 0 .5rem; font-size: 12px; }
.item { display: flex; align-items: center; gap: .6rem; padding: .65rem 0; border-top: 1px solid var(--border); flex-wrap: wrap; margin: 0; }
.bloco h3 + .item { border-top: none; }
.item .info { flex: 1; min-width: 180px; }
.item .info .sub { display: block; color: var(--muted); font-size: 12px; }
.item input { flex: 1; min-width: 140px; }
.vazio-lista { color: var(--muted); margin: .25rem 0; }
.aviso { border-radius: 10px; padding: .7rem 1rem; margin-bottom: 1rem; font-weight: 500; }
.erro-caixa { background: var(--danger-bg); color: var(--danger); }
.ok-caixa { background: var(--ok-bg); color: var(--ok); }

/* Exportar */
details.exportar { position: relative; }
details.exportar summary { list-style: none; }
details.exportar summary::-webkit-details-marker { display: none; }
.menu-exportar { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 250px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12);
  padding: .4rem; display: flex; flex-direction: column; }
.menu-exportar .dica { font-size: 11px; color: var(--muted); padding: .3rem .6rem .4rem; }
.menu-exportar button { background: none; border: none; text-align: left; padding: .55rem .6rem; border-radius: 7px;
  cursor: pointer; font: inherit; font-size: 13px; color: var(--text); display: flex; justify-content: space-between; gap: 1rem; }
.menu-exportar button:hover { background: var(--primary-soft); }
.menu-exportar small { color: var(--muted); }

/* Emitir NF */
.nf-resumo { display: flex; gap: 1.5rem; flex-wrap: wrap; align-items: center; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius); padding: .8rem 1.1rem; margin-bottom: 1rem; box-shadow: var(--shadow); }
.nf-resumo b { font-size: 18px; }
.alerta { color: var(--warn); font-weight: 600; }
.copiavel { display: inline-flex; align-items: center; gap: .3rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn.copiar { padding: .1rem .35rem; font-size: 13px; }

/* Login */
body.pagina-login { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: linear-gradient(180deg, var(--primary) 0 6px, var(--bg) 6px); }
.caixa-login { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 2rem 1.75rem; display: flex; flex-direction: column; gap: .9rem; }
.caixa-login img { height: 48px; width: auto; align-self: center; }
.caixa-login h1 { margin: 0; text-align: center; font-size: 20px; }
.caixa-login p { margin: -.6rem 0 .3rem; text-align: center; color: var(--muted); }
.caixa-login label { display: flex; flex-direction: column; gap: .3rem; font-size: 13px; font-weight: 500; color: var(--muted); }
.caixa-login input { font-size: 16px; padding: .65rem .75rem; }
.caixa-login .btn { justify-content: center; padding: .75rem; font-size: 15px; }
.caixa-login small { text-align: center; color: var(--muted); }
.caixa-login .aviso { margin: 0; }

/* NFS-e: ambiente e emissão */
.faixa-teste { background: #fef08a; color: #713f12; text-align: center; font-weight: 700; font-size: 13px;
  padding: .45rem 1rem; }
.selo-producao { padding: .45rem .7rem; border-radius: 8px; background: var(--ok-bg); color: var(--ok); font-weight: 700; font-size: 13px; white-space: nowrap; }
.bloco-nfse { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: .9rem 1.1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: .6rem; }
.bloco-nfse > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.bloco-nfse small { color: var(--muted); }
.bloco-nfse .btn.primario { align-self: flex-start; }
.pendencias-nfse { font-size: 12px; color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: .5rem .7rem; }
td.n-nfse { min-width: 170px; }
td.n-nfse .btn { margin-top: .25rem; }
.htmx-indicator { display: none; color: var(--muted); font-size: 13px; }
.htmx-request .htmx-indicator, .htmx-request.htmx-indicator { display: inline; }

.link-xml { display: inline-block; margin-top: .25rem; font-size: 12px; font-weight: 500; white-space: nowrap; }

/* ───────────── Celular / telas pequenas ───────────── */
.so-mobile { display: none; }
@media (hover: none) { .btn.remover { opacity: 1; } }

@media (max-width: 760px) {
  body { font-size: 15px; }
  .so-mobile { display: inline; font-size: 13px; color: var(--muted); }

  /* cabeçalho compacto: logo + mês */
  .topo .conteudo { padding: .5rem 1rem; gap: .5rem; }
  .marca img { height: 30px; }
  .marca .divisor, .marca small, .marca b, .menu a span { display: none; }
  .topo-dir { gap: .4rem; }
  .menu a { padding: .45rem .55rem; font-size: 16px; }
  .marca b { font-size: 14px; }
  .mes-nav h1 { font-size: 14px; min-width: 100px; margin: 0 .25rem; }
  .mes-nav a, .mes-nav span.vazio { width: 36px; height: 36px; }

  main { padding: 1rem .75rem 2rem; }

  /* indicadores: 2 por linha, mais enxutos */
  .kpis { grid-template-columns: 1fr 1fr; gap: .5rem; margin-bottom: 1rem; }
  .kpi { padding: .65rem .8rem; border-radius: 10px; }
  .kpi .rotulo { font-size: 11px; }
  .kpi .valor { font-size: 19px; }
  .kpi .barra-prog { height: 4px; margin-top: .4rem; }

  /* abas roláveis na horizontal; busca e botão em largura total */
  .ferramentas { flex-direction: column; align-items: stretch; gap: .6rem; }
  .ferramentas > *, .direita > * { min-width: 0; max-width: 100%; }
  .abas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .abas::-webkit-scrollbar { display: none; }
  .abas a { white-space: nowrap; padding: .5rem .7rem; }
  .direita { flex-direction: column; align-items: stretch; }
  .busca input[type=search] { width: 100%; }
  .direita .btn.primario { justify-content: center; padding: .7rem; }
  details.exportar summary { justify-content: center; padding: .7rem; }
  .menu-exportar { left: 0; right: 0; min-width: 0; }
  .menu-exportar button { padding: .8rem .7rem; font-size: 15px; }

  /* evita zoom automático do iPhone ao tocar em campos */
  input, select { font-size: 16px !important; }

  /* tabela -> cartões */
  .cartao { background: transparent; border: none; box-shadow: none; overflow: visible; max-height: none; }
  table, tbody { display: block; }
  thead { display: none; }
  tbody tr {
    display: grid; grid-template-columns: 1fr auto auto; column-gap: .5rem; row-gap: .35rem;
    grid-template-areas:
      "nome   status edit"
      "extra  extra  extra"
      "venc   mens   mens"
      "pag    pag    pag"
      "nf     nf     sophia";
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: .8rem .9rem; margin-bottom: .6rem; box-shadow: var(--shadow);
  }
  tbody tr[hidden] { display: none; }
  tbody tr:hover td { background: transparent; }
  tbody td { padding: 0; border: none; }
  td.c-nome   { grid-area: nome; align-self: center; }
  td.c-nome b { font-size: 15px; }
  td.c-extra  { grid-area: extra; margin-top: -.2rem; }
  td.c-extra:empty { display: none; }
  td.c-venc   { grid-area: venc; color: var(--muted); font-size: 13px; }
  td.c-venc::before { content: "Vence "; }
  td.c-mens   { grid-area: mens; justify-self: end; font-weight: 600; }
  td.c-pag    { grid-area: pag; border-top: 1px solid var(--border); padding-top: .55rem; margin-top: .15rem; }
  td.c-nf     { grid-area: nf; }
  td.c-sophia { grid-area: sophia; align-self: center; justify-self: end; }
  td.c-status { grid-area: status; align-self: center; }
  td.c-edit   { grid-area: edit; align-self: center; }
  td.vazio    { display: none; }

  form.registrar select { flex: 1; }
  form.registrar .btn, form.nf .btn { padding: .5rem .8rem; }
  form.nf input { flex: 1; width: auto; }
  .pago { justify-content: space-between; }
  .btn.remover { padding: .3rem .6rem; }

  /* Emitir NF: cartão por aluno, com rótulos */
  .nf-tabela tbody tr { grid-template-columns: 1fr; grid-template-areas: none; row-gap: .45rem; }
  .nf-tabela tbody td { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
  .nf-tabela tbody td::before { content: attr(data-rotulo); color: var(--muted); font-size: 12px; }
  .nf-tabela td.n-nome::before { content: none; }
  .nf-tabela td.n-nf { flex-direction: column; align-items: stretch; }
  .nf-tabela td.n-nf::before { content: none; }
  .btn.copiar { padding: .35rem .6rem; font-size: 16px; }

  /* linha em edição / aluno novo */
  tr.editando { display: block; }
  tr.editando td { display: block; background: transparent !important; }
  form.aluno { grid-template-columns: 1fr; }
  form.aluno .acoes .btn { flex: 1; justify-content: center; padding: .65rem; }
  .vazio-tabela { display: block; }
}

/* ───────────── FinançasLeonardo ───────────── */
.logo-fin { width: 38px; height: 38px; border-radius: 10px; background: var(--primary); color: #fff; display: grid;
  place-items: center; font-weight: 700; font-size: 18px; }
select { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .4rem .5rem;
  font: inherit; font-size: 13px; color: inherit; max-width: 100%; }
select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[type=date], input[type=file], input[type=color], input[type=month] { background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .35rem .5rem; font: inherit; color: inherit; }
input[type=color] { width: 44px; height: 34px; padding: .15rem; }
.grade-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 1000px) { .grade-2 { grid-template-columns: 1fr; } }
form.linha-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin: 0; }
form.linha-form label { display: flex; flex-direction: column; gap: .25rem; font-size: 12px; font-weight: 500; color: var(--muted); }
form.linha-form label.cresce { flex: 1; min-width: 180px; }
form.linha-form label.chave { flex-direction: row; color: var(--text); padding-bottom: .45rem; }
form.linha-form input:not([type=checkbox]):not([type=color]) { width: 100%; }
form.inline { display: inline; margin: 0; }
.cat-ponto { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: .35rem; vertical-align: middle; }
.tag { font-size: 11px; font-weight: 600; background: var(--neutral-bg); color: var(--neutral); padding: .1rem .45rem;
  border-radius: 999px; white-space: nowrap; }
.tag.fixo { background: var(--alert-bg); color: var(--alert); }
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.aviso { background: var(--warn-bg); color: var(--warn); }
.valor-gasto { font-weight: 600; }
.valor-entrada { font-weight: 600; color: var(--ok); }
.barras { display: flex; flex-direction: column; gap: .55rem; }
.barras a { color: inherit; display: block; border-radius: 8px; padding: .25rem .35rem; margin: 0 -.35rem; }
.barras a:hover, .barras a.ativo { background: var(--surface-2); }
.barras .topo-barra { display: flex; justify-content: space-between; font-size: 13px; }
.barras .trilho-barra { height: 7px; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; margin-top: .2rem; }
.barras .trilho-barra i { display: block; height: 100%; border-radius: 999px; }
tr.duplicado td { opacity: .5; }
tr.entrada td { color: var(--muted); }
.acoes-linha { display: flex; gap: .3rem; justify-content: flex-end; align-items: center; }
details.editar summary { list-style: none; cursor: pointer; }
details.editar summary::-webkit-details-marker { display: none; }
details.editar[open] { position: relative; }
details.editar .pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: var(--surface);
  border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .8rem; width: 440px; max-width: 90vw; }
.nota { font-size: 12px; color: var(--muted); }
.cartao.baixo { max-height: none; }
.secao-titulo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin: 1.5rem 0 .6rem; flex-wrap: wrap; }
.secao-titulo h2 { font-size: 16px; margin: 0; }
.btn.perigo:hover { color: var(--danger); border-color: var(--danger); }
.btn.pequeno { padding: .25rem .55rem; font-size: 12px; }
@media (max-width: 760px) {
  /* telas do FinançasLeonardo: tabela vira cartão com rótulos */
  .tabela-simples tbody tr { grid-template-columns: 1fr; grid-template-areas: none; row-gap: .4rem; }
  .tabela-simples tbody td { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
  .tabela-simples tbody td[data-rotulo]::before { content: attr(data-rotulo); color: var(--muted); font-size: 12px; }
  .tabela-simples tbody td.vazio-tabela { display: block; }
  details.editar .pop { position: fixed; left: 5vw; right: 5vw; top: 20vh; width: auto; }
}

/* Recebimento PJ (Payoneer) */
.etapas { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1rem; }
.etapas .bloco { margin-bottom: 0; }
.etapa-ok { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: var(--neutral-bg); color: var(--neutral); font-size: 13px; }
.etapa-ok.sim { background: var(--ok-bg); color: var(--ok); }
table.dados-nf { margin: .4rem 0 .7rem; }
table.dados-nf th { text-align: left; font-weight: 500; color: var(--muted); padding: .3rem .8rem .3rem 0; white-space: nowrap; vertical-align: top; font-size: 13px; }
table.dados-nf td { padding: .3rem 0; }
.copiavel-bloco { margin: 0; white-space: pre-wrap; font: 12px/1.4 ui-monospace, monospace; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: .5rem .6rem; user-select: all; }
.copiavel { user-select: all; }
.form-config { display: flex; flex-direction: column; gap: .8rem; }
.form-config label { display: flex; flex-direction: column; gap: .25rem; font-size: 13px; font-weight: 500; color: var(--muted); }
textarea { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: .45rem .6rem; font: inherit; color: var(--text); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 760px) { .etapas { grid-template-columns: 1fr; } table.dados-nf th { white-space: normal; } }
