/* Módulo de Vendas MarcMarc
   Celular primeiro: barra fixa no topo (marca + filtros), abas fixas embaixo, listas compactas.
   A partir de 760px: abas no topo, tabelas completas. Tons neutros levemente azulados, acento azul-petróleo. */
:root {
  --bg: #f4f5f7;
  --panel: #ffffff;
  --fg: #16191f;
  --muted: #5d6573;
  --line: #e1e4ea;
  --accent: #0f6e8c;
  --accent-soft: #e3f1f5;
  --ok: #18794e;
  --bad: #c2362b;
  --line2: #d9822b;
  --grid: #eceef2;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
  --gutter: max(14px, env(safe-area-inset-left, 0px));
  --gutter-r: max(14px, env(safe-area-inset-right, 0px));
  --abas-h: 60px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101317;
    --panel: #191d23;
    --fg: #e8eaee;
    --muted: #9aa3b2;
    --line: #2a303a;
    --accent: #4fb3d1;
    --accent-soft: #15313b;
    --ok: #4cc38a;
    --bad: #f07167;
    --line2: #f0a35e;
    --grid: #232831;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--fg); font: 15px/1.45 var(--font); -webkit-text-size-adjust: 100%; }
.num { font-variant-numeric: tabular-nums; }
button, input, select { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- barra fixa: marca + filtros (+ abas no desktop) ---------- */
.barra { position: sticky; top: 0; z-index: 20; background: var(--panel); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top, 0px); }
.topo-in, .filtros-in { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter-r); }
.topo-in { display: flex; align-items: center; gap: 12px; padding-top: 10px; padding-bottom: 6px; }
.marca { font-weight: 650; letter-spacing: -.01em; white-space: nowrap; }
.marca span { color: var(--muted); font-weight: 400; }
.topo form { margin-left: auto; }
.link-btn { background: none; border: 0; color: var(--muted); cursor: pointer; padding: 6px 8px; border-radius: 6px; min-height: 36px; }
.link-btn:hover { color: var(--fg); background: var(--bg); }

.filtros-in { display: flex; flex-direction: column; gap: 8px; padding-bottom: 10px; }
/* uma linha só, que rola para o lado no celular */
.filtro { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter-r) 2px var(--gutter); scroll-padding: 0 var(--gutter); }
.filtro::-webkit-scrollbar { display: none; }
.chip { flex: none; border: 1px solid var(--line); background: var(--panel); padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 36px; display: inline-flex; align-items: center; gap: 6px; }
.chip:hover { border-color: var(--muted); }
.chip[aria-pressed="true"], .chip[aria-expanded="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.so-entregues input { accent-color: var(--ok); margin: 0; width: 16px; height: 16px; }
.so-entregues:has(input:checked) { border-color: var(--ok); color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--panel)); }
.datas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.datas input { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 6px 8px; min-height: 36px; flex: 1 1 130px; min-width: 0; }
.btn { border: 1px solid var(--accent); background: var(--accent); color: #fff; border-radius: 8px; padding: 7px 16px; cursor: pointer; min-height: 36px; }
.btn:disabled { opacity: .5; cursor: default; }

/* abas: embaixo no celular (como app), no topo no desktop */
.abas { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--panel); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
.aba { border: 0; background: none; color: var(--muted); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--abas-h); font-size: 12px; cursor: pointer; position: relative; }
.aba svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.aba[aria-selected="true"] { color: var(--accent); font-weight: 600; }
.aba[aria-selected="true"]::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.aba span { white-space: nowrap; }

/* ---------- conteúdo ---------- */
main { max-width: 1320px; margin: 0 auto; padding: 14px var(--gutter-r) calc(var(--abas-h) + 24px + env(safe-area-inset-bottom, 0px)) var(--gutter); display: flex; flex-direction: column; gap: 14px; }
.aba-painel { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.legenda { color: var(--muted); font-size: 13px; margin: 0; }
.aviso { border: 1px solid var(--bad); color: var(--bad); background: color-mix(in srgb, var(--bad) 8%, transparent); padding: 10px 14px; border-radius: var(--radius); }

.cartoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cartao { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cartao h2 { margin: 0; font-size: 12.5px; font-weight: 500; color: var(--muted); }
.valor { font-size: 21px; font-weight: 650; letter-spacing: -.02em; line-height: 1.15; overflow-wrap: anywhere; }
.var { font-size: 12.5px; color: var(--muted); }
.var b { font-weight: 600; }
.var .sobe { color: var(--ok); }
.var .desce { color: var(--bad); }
.cartao-margem .valor { color: var(--accent); }
.extra { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--muted); }
.extra b { color: var(--fg); font-weight: 600; }

.painel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.painel-cab { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.painel h2 { margin: 0; font-size: 16px; font-weight: 600; }
.painel-cab .legenda { flex-basis: 100%; }
.leg { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-left: 8px; }
.sw-bar { background: var(--accent); opacity: .85; }
.sw-linha { height: 3px; background: var(--line2); border-radius: 2px; }
.grafico { position: relative; height: 230px; }

.exportar { margin-left: auto; display: inline-flex; gap: 6px; }
.btn-exp { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--fg); min-height: 32px; }
.btn-exp:hover { border-color: var(--accent); color: var(--accent); }
.btn-exp:disabled { opacity: .5; cursor: progress; }
.btn-sec { align-self: center; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 9px 18px; cursor: pointer; min-height: 40px; }
.btn-sec:hover { border-color: var(--muted); }

.ferramentas { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.busca, .ferramentas select { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 7px 10px; min-height: 38px; }
.busca { flex: 1 1 100%; min-width: 0; }
.ferramentas select { flex: 1 1 0; min-width: 0; }
.contagem { color: var(--muted); font-size: 13px; }
.ferramentas .contagem { flex-basis: 100%; }
.vazio { color: var(--muted); text-align: center; padding: 20px; }
.so-celular { display: block; }
.so-desktop { display: none; }

/* tabelas (desktop) */
.tabela-wrap { overflow-x: auto; }
.tabela { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.tabela th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--panel); }
.tabela td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tabela tbody tr:last-child td { border-bottom: 0; }
.tabela .r { text-align: right; }
.tabela .sobe { color: var(--ok); }
.tabela .desce { color: var(--bad); }
.tabela .tag { font-size: 12px; color: var(--muted); margin-left: 6px; }
.tabela th[data-ord] { cursor: pointer; user-select: none; }
.tabela th[data-ord]:hover { color: var(--fg); }
.tabela th[aria-sort="ascending"]::after { content: " ↑"; }
.tabela th[aria-sort="descending"]::after { content: " ↓"; }
.tabela-sku tbody td:nth-child(1) { font-family: var(--mono); font-size: 13px; }
.tabela-sku tbody td:nth-child(2) { white-space: normal; min-width: 220px; max-width: 420px; }
.tabela-sku tfoot td { font-weight: 600; border-top: 2px solid var(--line); border-bottom: 0; padding: 9px 10px; }
.barra-part { display: inline-block; width: 40px; height: 6px; border-radius: 3px; background: var(--line); margin-right: 8px; vertical-align: middle; overflow: hidden; }
.barra-part i { display: block; height: 100%; background: var(--accent); }

/* pedidos e margem */
.margem-resumo { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.mr { background: var(--bg); border-radius: 10px; padding: 9px 12px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.mr span { font-size: 12px; color: var(--muted); }
.mr b { font-size: 16px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.mr.destaque b { font-size: 19px; color: var(--accent); }
.aviso-custo { grid-column: 1 / -1; font-size: 13px; color: var(--muted); margin: 0; }
.aviso-custo b { color: var(--bad); }
.tabela-ped td:nth-child(3) { white-space: normal; min-width: 200px; max-width: 320px; }
.tabela-ped .sku { font-family: var(--mono); font-size: 12px; color: var(--muted); display: block; }
.tabela-ped .neg { color: var(--bad); font-weight: 600; }
.tabela-ped .menos { color: var(--muted); }
.tag-sc { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--bad); color: var(--bad); white-space: nowrap; }
.margem-pill { display: inline-block; min-width: 52px; text-align: right; font-weight: 600; }
.margem-pill.ruim { color: var(--bad); }
.margem-pill.atencao { color: var(--line2); }
.margem-pill.boa { color: var(--ok); }
#pedidos tr[data-venda] { cursor: pointer; }
#pedidos tr[data-venda]:hover td { background: var(--bg); }
#pedidos tr[data-venda]:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

/* ---------- celular: tabelas viram listas compactas ---------- */
@media (max-width: 759px) {
  .tabela thead { display: none; }
  .tabela, .tabela tbody, .tabela tfoot { display: block; }
  .tabela td { border: 0; padding: 0; white-space: normal; min-width: 0; max-width: none; }

  /* por mês: nome do mês e pares valor | variação */
  #sec-mensal tr { display: grid; grid-template-columns: 1fr 4.5em; gap: 4px 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #sec-mensal tr:last-child { border-bottom: 0; }
  #sec-mensal td:first-child { grid-column: 1 / -1; font-weight: 600; }
  #sec-mensal td:not(:first-child):not(.var-cel) { display: flex; justify-content: space-between; gap: 12px; }
  #sec-mensal td:not(:first-child):not(.var-cel)::before { content: attr(data-rotulo); color: var(--muted); }
  #sec-mensal .tag { display: block; margin: 2px 0 0; font-weight: 400; }

  /* produtos: título + faturamento na 1ª linha; SKU · itens · pedidos | % na 2ª */
  #sec-sku tbody tr { display: grid; grid-template-columns: auto auto auto 1fr auto; grid-template-areas: "t t t t f" "s i p . c"; gap: 3px 10px; padding: 10px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  #sec-sku tbody tr:last-child { border-bottom: 0; }
  #sec-sku tbody tr { grid-template-columns: max-content max-content max-content minmax(0, 1fr) max-content; }
  #sec-sku tbody td:nth-child(n) { min-width: 0; max-width: none; }
  #sec-sku tbody td:nth-child(1), #sec-sku tbody td:nth-child(3), #sec-sku tbody td:nth-child(4), #sec-sku tbody td:nth-child(5), #sec-sku tbody td:nth-child(6) { white-space: nowrap; }
  #sec-sku tbody td:nth-child(1) { grid-area: s; font-size: 12px; color: var(--muted); }
  #sec-sku tbody td:nth-child(2) { grid-area: t; font-weight: 550; font-size: 14px; line-height: 1.3; }
  #sec-sku tbody td:nth-child(3) { grid-area: i; font-size: 12.5px; color: var(--muted); }
  #sec-sku tbody td:nth-child(3)::after { content: " itens"; }
  #sec-sku tbody td:nth-child(4) { grid-area: p; font-size: 12.5px; color: var(--muted); }
  #sec-sku tbody td:nth-child(4)::after { content: " ped."; }
  #sec-sku tbody td:nth-child(5) { grid-area: f; font-weight: 650; text-align: right; }
  #sec-sku tbody td:nth-child(6) { grid-area: c; font-size: 12.5px; color: var(--muted); text-align: right; }
  #sec-sku tbody td:nth-child(7), #sec-sku tbody td:nth-child(8) { display: none; }
  #sec-sku .barra-part { display: none; }
  #sec-sku tfoot tr { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0 0; border-top: 2px solid var(--line); }
  #sec-sku tfoot td { border: 0; padding: 0; }
  #sec-sku tfoot td:empty, #sec-sku tfoot td:nth-child(3), #sec-sku tfoot td:nth-child(6), #sec-sku tfoot td:nth-child(8) { display: none; }

  /* pedidos: produto | margem; data · venda | lucro; valor */
  #sec-pedidos tbody tr { display: grid; grid-template-columns: auto auto 1fr auto; grid-template-areas: "p p p m" "d v . l" "x x x x"; gap: 2px 10px; padding: 11px 0; border-bottom: 1px solid var(--line); align-items: baseline; }
  #sec-pedidos tbody tr:last-child { border-bottom: 0; }
  #sec-pedidos tbody tr { grid-template-columns: max-content max-content minmax(0, 1fr) max-content; }
  #sec-pedidos tbody td:nth-child(n) { min-width: 0; max-width: none; }
  #sec-pedidos td:nth-child(1), #sec-pedidos td:nth-child(2), #sec-pedidos td:nth-child(10), #sec-pedidos td:nth-child(11) { white-space: nowrap; }
  #sec-pedidos td:nth-child(1) { grid-area: d; font-size: 12.5px; color: var(--muted); }
  #sec-pedidos td:nth-child(2) { grid-area: v; font-size: 12.5px; color: var(--muted); }
  #sec-pedidos td:nth-child(2) .sku { display: none; }
  #sec-pedidos td:nth-child(3) { grid-area: p; font-weight: 550; font-size: 14px; line-height: 1.3; }
  #sec-pedidos td:nth-child(3) .sku { margin-top: 2px; }
  #sec-pedidos td:nth-child(4) { grid-area: x; font-size: 12.5px; color: var(--muted); text-align: left; }
  #sec-pedidos td:nth-child(4)::before { content: "Valor "; }
  #sec-pedidos td:nth-child(5), #sec-pedidos td:nth-child(6), #sec-pedidos td:nth-child(7), #sec-pedidos td:nth-child(8), #sec-pedidos td:nth-child(9) { display: none; }
  #sec-pedidos td:nth-child(7):has(.tag-sc) { display: block; grid-area: x; text-align: right; }
  #sec-pedidos td:nth-child(10) { grid-area: l; text-align: right; font-weight: 600; font-size: 13.5px; }
  #sec-pedidos td:nth-child(10)::before { content: "lucro "; font-weight: 400; font-size: 12px; color: var(--muted); }
  #sec-pedidos td:nth-child(11) { grid-area: m; text-align: right; }
  #pedidos tr[data-venda]:active { background: var(--bg); }

  .painel-cab .exportar { margin-left: auto; }
  .tabela-wrap { overflow: visible; }
  /* resumo da margem: faixa que rola para o lado, para a lista aparecer logo */
  .margem-resumo { display: flex; overflow-x: auto; scrollbar-width: none; gap: 8px; margin: 0 -14px; padding: 0 14px; scroll-snap-type: x proximity; }
  .margem-resumo::-webkit-scrollbar { display: none; }
  .mr { flex: none; min-width: 128px; scroll-snap-align: start; }
  .margem-resumo .aviso-custo { display: none; }
  .nota-margem { font-size: 12.5px; color: var(--muted); margin: 0; }
  .nota-margem b { color: var(--bad); }
  .ferramentas-ped select { flex: 1 1 calc(50% - 4px); }
  /* 16px evita o zoom automático do iPhone ao tocar nos campos */
  .busca, .ferramentas select, .datas input { font-size: 16px; }
}
@media (max-width: 420px) {
  .marca span, .quem { display: none; }
}

/* ---------- desktop ---------- */
@media (min-width: 760px) {
  :root { --gutter: max(24px, env(safe-area-inset-left, 0px)); --gutter-r: max(24px, env(safe-area-inset-right, 0px)); }
  .filtros-in { flex-direction: row; flex-wrap: wrap; align-items: center; padding-bottom: 0; gap: 8px 12px; }
  .filtro { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
  .datas { order: 2; }
  .abas { position: static; order: 3; flex-basis: 100%; display: flex; gap: 4px; border-top: 0; padding: 0; background: none; margin-top: 2px; }
  .aba { flex-direction: row; height: 44px; padding: 0 14px; font-size: 14px; gap: 8px; border-radius: 8px 8px 0 0; }
  .aba svg { width: 18px; height: 18px; }
  .aba:hover { color: var(--fg); background: var(--bg); }
  .aba[aria-selected="true"]::before { top: auto; bottom: -1px; left: 10px; right: 10px; border-radius: 3px 3px 0 0; }
  main { padding-top: 20px; padding-bottom: 40px; gap: 18px; }
  .aba-painel { gap: 18px; }
  .cartoes { grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .cartao { padding: 16px 18px; }
  .valor { font-size: 27px; }
  .painel { padding: 16px 20px; }
  .grafico { height: 320px; }
  .busca { flex: 1 1 260px; max-width: 420px; }
  .ferramentas select { flex: none; }
  .ferramentas .contagem { flex-basis: auto; }
  .margem-resumo { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
  .so-celular { display: none; }
  .so-desktop { display: inline; }
  .nota-margem { display: none; }
}
@media (min-width: 1100px) {
  .cartoes { grid-template-columns: repeat(6, 1fr); }
  .valor { font-size: 24px; }
}

/* ---------- detalhe da venda ---------- */
#detalhe { border: 1px solid var(--line); border-radius: 14px; padding: 0; width: min(720px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--panel); color: var(--fg); }
#detalhe::backdrop { background: rgba(10, 14, 20, .45); }
@media (max-width: 759px) {
  /* no celular o detalhe ocupa a tela toda, como uma página */
  #detalhe { width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  .det { padding: calc(14px + env(safe-area-inset-top, 0px)) var(--gutter-r) calc(24px + env(safe-area-inset-bottom, 0px)) var(--gutter); }
  .det-cab { position: sticky; top: calc(-14px - env(safe-area-inset-top, 0px)); background: var(--panel); padding: 8px 0; z-index: 1; border-bottom: 1px solid var(--line); }
}
.det { display: flex; flex-direction: column; gap: 16px; padding: 20px; }
.det-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.det-cab h2 { margin: 0; font-size: 18px; }
.det-cab .legenda { margin-top: 4px; }
.det-fechar { border: 1px solid var(--line); flex: none; }
#det-corpo { display: flex; flex-direction: column; gap: 22px; }
.det-pedido { border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.det-pedido.foco { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.det-itens { margin: 0; font-size: 14px; }
.det-bloco { display: flex; flex-direction: column; gap: 8px; }
.det-bloco h3 { margin: 0; font-size: 12.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px 16px; }
.det-grid div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.det-grid span { font-size: 12px; color: var(--muted); }
.det-grid b { font-weight: 600; overflow-wrap: anywhere; }
.conta { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.conta td { padding: 7px 0; border-bottom: 1px solid var(--line); }
.conta td:last-child { text-align: right; white-space: nowrap; padding-left: 12px; }
.conta td small { color: var(--muted); display: block; font-size: 12px; }
.conta tr.sub td { font-weight: 600; border-bottom-width: 2px; }
.conta tr.total td { font-weight: 700; font-size: 16px; border-bottom: 0; }
.conta .neg { color: var(--bad); }
.selo { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 3px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.selo.ok { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 40%, transparent); }
.selo.alerta { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, transparent); }
.det-links { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; }
.det-links a { color: var(--accent); }

/* ---------- carregando ---------- */
.carregando .valor, .cartao-margem.carregando .valor { color: transparent; background: var(--line); border-radius: 6px; width: 60%; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: 14px; }
.login h1 { margin: 0; font-size: 20px; }
.login label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.login input { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 10px; font-size: 16px; color: var(--fg); }
.login .btn { padding: 11px; font-size: 16px; }
.erro { color: var(--bad); font-size: 14px; margin: 0; }

@media (prefers-reduced-motion: no-preference) {
  .carregando .valor { animation: pulsa 1.2s ease-in-out infinite; }
  @keyframes pulsa { 50% { opacity: .5; } }
}
