/* Visual no estilo do painel da LLABS AI: fundo preto e cartões de "vidro".
   A interface é neutra (branco/prata). Cor só onde ela quer dizer algo:
   verde = pago · vermelho = pendente/excluir · azul = pagou a conta/recebe · amarelo = aviso */

/* ---------- cores ---------- */
:root {
  --fundo: #050506;
  --texto: #f6f6f9;
  --sutil: #9a9ca6;
  --linha: rgba(255, 255, 255, .12);
  --linha-forte: rgba(255, 255, 255, .45);
  --vidro: linear-gradient(145deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .015)), rgba(10, 10, 13, .6);
  --prata: linear-gradient(135deg, #fff 0%, #dcdde2 55%, #b4b6be 100%);
  --pago: #4df0a6;
  --pago-fundo: rgba(77, 240, 166, .1);
  --pendente: #ff6b86;
  --pendente-fundo: rgba(255, 107, 134, .1);
  --azul: #6cb6ff;
  --azul-fundo: rgba(108, 182, 255, .1);
  --aviso: #ffd45e;
  --aviso-fundo: rgba(255, 212, 94, .1);
  --suave: cubic-bezier(.22, 1, .36, 1);
  --titulo: "Space Grotesk", "Manrope", system-ui, sans-serif;
  color-scheme: dark;
}

/* ---------- base ---------- */
/* tap-highlight: tira o "flash" cinza que aparece ao tocar em botões no celular */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh; /* no celular, desconta a barra de endereço que aparece e some */
  color: var(--texto);
  font: 15px/1.5 "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: radial-gradient(900px 500px at 50% -120px, rgba(255, 255, 255, .09), transparent 70%), var(--fundo);
  background-attachment: fixed;
}
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
h2 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; color: var(--sutil); margin: 26px 6px 10px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::placeholder { color: #6c6e79; }
.sutil { color: var(--sutil); font-size: 13px; }
.centro { text-align: center; }
.rotulo { display: block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .1em; color: var(--sutil); margin-bottom: 8px; }
.erro { color: var(--pendente); font-size: 14px; font-weight: 700; }
/* Tela "Carregando…": a casinha flutuando e o texto com um brilho passando. */
.carregando {
  min-height: 100vh; min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 18px;
}
.carregando .marca-icone { width: 64px; height: 64px; font-size: 34px; border-radius: 20px; animation: flutuar 3.2s ease-in-out infinite; }
.carregando-texto {
  font-weight: 700; letter-spacing: .14em; font-size: 13px; text-transform: uppercase;
  background: linear-gradient(90deg, #6c6e79 0%, #6c6e79 35%, #fff 50%, #6c6e79 65%, #6c6e79 100%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: brilho-texto 1.8s linear infinite;
}

/* Ícones de linha (desenhados em SVG, pegam a cor do texto). */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- botões e campos ---------- */
.botao {
  width: 100%; padding: 13px 18px; border-radius: 14px; font-weight: 800;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .06);
  transition: transform .3s var(--suave), box-shadow .3s, border-color .3s, opacity .3s;
}
.botao:hover { border-color: var(--linha-forte); }
.botao.principal {
  color: #0a0a0d; border-color: transparent; background: var(--prata);
  box-shadow: 0 8px 28px rgba(255, 255, 255, .14), inset 0 1px #fff;
}
.botao.principal:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(255, 255, 255, .22), inset 0 1px #fff; }
.botao.perigo {
  color: #fff; border-color: rgba(255, 120, 145, .6);
  background: linear-gradient(135deg, #ff5d7a, #d62f55);
  box-shadow: 0 10px 28px rgba(255, 73, 105, .3), inset 0 1px rgba(255, 255, 255, .3);
}
.botao:active { transform: scale(.97); transition-duration: .1s; }
.botao:disabled { opacity: .55; cursor: progress; transform: none; }
.botao-texto {
  background: none; border: 0; color: var(--texto); font-weight: 700; font-size: 14px;
  padding: 6px 10px; border-radius: 10px; transition: background .25s;
}
.botao-texto:hover { background: rgba(255, 255, 255, .08); }
.botao-texto.perigo, .botao-texto.excluir { color: var(--pendente); }
.botao-texto.perigo:hover, .botao-texto.excluir:hover { background: var(--pendente-fundo); }

input, select {
  width: 100%; padding: 12px 14px; border-radius: 13px; outline: none;
  border: 1px solid var(--linha); background: rgba(3, 3, 6, .7);
  box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  transition: border-color .25s, box-shadow .25s;
}
input:focus, select:focus { border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08); }
select option { background: #111114; color: #fff; }

/* Campo de senha com o olhinho dentro, na direita. */
.campo-com-olho { position: relative; }
.campo-com-olho input { padding-right: 46px; }
.botao-olho {
  position: absolute; right: 6px; top: 50%; translate: 0 -50%;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 0; border-radius: 9px; background: none; color: var(--sutil); transition: color .2s, background .2s;
}
.botao-olho:hover { color: var(--texto); background: rgba(255, 255, 255, .06); }
.botao-olho .ic { width: 18px; height: 18px; }
.campo-com-olho[hidden], .campo-com-olho:has(input[hidden]) { display: none; }

/* ---------- marca (casinha no quadrado branco, igual ao logo da LLABS) ---------- */
.marca { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.marca-icone {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; font-size: 20px;
  border-radius: 12px; background: #f4f4f6; border: 1px solid rgba(255, 255, 255, .45);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, .06), 0 8px 26px rgba(255, 255, 255, .16);
}
.marca-texto { display: grid; gap: 3px; min-width: 0; }
.marca-nome { font-family: var(--titulo); font-weight: 700; font-size: 14px; letter-spacing: .16em; text-transform: uppercase; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* "Atualizado em tempo real" com a bolinha verde respirando. */
.ao-vivo { display: inline-flex; align-items: center; gap: 7px; font-size: 11px; font-weight: 600; color: var(--sutil); white-space: nowrap; }
.ponto-vivo {
  width: 6px; height: 6px; flex: none; border-radius: 50%;
  background: var(--pago); box-shadow: 0 0 8px var(--pago); animation: respirar 2.2s ease-in-out infinite;
}
.ao-vivo.sem-conexao .ponto-vivo { background: var(--aviso); box-shadow: 0 0 8px var(--aviso); }

/* ---------- tela de entrar ---------- */
.login { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 16px; }
.login-caixa {
  width: 100%; max-width: 400px; padding: 32px 24px; border-radius: 24px; text-align: center;
  display: grid; gap: 14px; border: 1px solid var(--linha); background: var(--vidro);
  box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 24px 60px rgba(0, 0, 0, .5);
  backdrop-filter: blur(16px); animation: entrar .7s var(--suave) backwards;
}
.login-caixa .marca-icone { width: 64px; height: 64px; font-size: 34px; border-radius: 20px; margin: 0 auto 4px; animation: flutuar 4.5s ease-in-out infinite; }
.login-caixa h1 { font-family: var(--titulo); font-size: 19px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; }

/* O fundo prateado das "pastilhas" (abas do topo e Morador/Responsável).
   Ele é um elemento só, que DESLIZA até o botão escolhido (posição calculada no app.js). */
.indicador {
  position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none;
  border-radius: 10px; background: var(--prata); box-shadow: inset 0 1px #fff, 0 4px 16px rgba(255, 255, 255, .08);
  transition: transform .45s var(--suave), width .45s var(--suave), height .45s var(--suave);
}
.indicador.sem-transicao { transition: none; }

/* Abas "Morador / Responsável" da tela de entrar. */
.seletor {
  position: relative;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px;
  border-radius: 14px; border: 1px solid var(--linha); background: rgba(255, 255, 255, .04);
}
.seletor button {
  position: relative; z-index: 1;
  border: 0; background: none; padding: 9px 10px; border-radius: 10px;
  font-weight: 700; font-size: 14px; color: var(--sutil); transition: color .3s;
}
.seletor button:hover { color: var(--texto); }
.seletor button.ativo { color: #0a0a0d; }

/* ---------- topo e abas ---------- */
.topo {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 12px; padding: 12px 16px;
  background: rgba(5, 5, 6, .72); border-bottom: 1px solid var(--linha);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
.abas { position: relative; display: flex; gap: 4px; padding: 4px; border-radius: 14px; border: 1px solid var(--linha); background: rgba(255, 255, 255, .04); }
.abas button {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 7px;
  border: 0; background: none; padding: 8px 13px; border-radius: 10px;
  font-weight: 700; font-size: 14px; color: var(--sutil); transition: color .3s;
}
.abas button:hover { color: var(--texto); }
.abas button.ativa { color: #0a0a0d; }
.abas .icone { width: 17px; height: 17px; }

.conteudo { max-width: 680px; margin: 0 auto; padding: 22px 16px 48px; }

/* No PC estreito, esconde o nome do site e o nome da pessoa (fica a bolinha com as
   iniciais) para caber as abas. Senão "Pedro Henrique" empurrava o topo pra fora da tela. */
@media (min-width: 641px) and (max-width: 1100px) {
  .marca-texto { display: none; }
  .nome-eu { display: none; }
}
/* Tela média (tablet em pé, janela estreita): as abas não cabiam, "Nova conta" quebrava em duas
   linhas e a casinha ficava por cima da aba Painel. Aqui as abas ficam só com o texto. */
@media (min-width: 641px) and (max-width: 860px) {
  .abas .icone { display: none; }
  .abas button { padding: 8px 11px; white-space: nowrap; }
  .marca { flex: none; }
  .topo { justify-content: space-between; }
}

/* No celular as abas vão para baixo da tela, perto do dedo. */
@media (max-width: 640px) {
  .marca-nome { font-size: 12px; letter-spacing: .12em; }
  .ao-vivo { font-size: 10.5px; }
  /* O desfoque no topo "prenderia" as abas dentro dele; no celular o topo fica sólido. */
  .topo { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 5, 6, .96); }
  .abas {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 6;
    border-radius: 0; border-width: 1px 0 0; background: rgba(8, 8, 10, .92);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .abas button { flex: 1; flex-direction: column; gap: 3px; font-size: 11.5px; padding: 7px 2px; }
  .abas .icone { width: 21px; height: 21px; }
  .nome-eu { display: none; }
  .conteudo { padding-bottom: 104px; }
}

/* ---------- perfil e menu ---------- */
.eu-area { position: relative; flex: none; }
.botao-eu {
  display: flex; align-items: center; gap: 8px;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .05); border-radius: 999px;
  padding: 4px 10px 4px 4px; font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: border-color .25s, background .25s;
}
.botao-eu:hover, .botao-eu[aria-expanded="true"] { border-color: var(--linha-forte); background: rgba(255, 255, 255, .08); }
.seta-menu { width: 16px; height: 16px; color: var(--sutil); transition: transform .3s var(--suave); }
.botao-eu[aria-expanded="true"] .seta-menu { transform: rotate(180deg); }

/* Bolinha com as iniciais da pessoa. */
.avatar {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%;
  font-family: var(--titulo); font-size: 12px; font-weight: 700; color: #0a0a0d;
  background: var(--prata); box-shadow: inset 0 1px #fff;
}
.avatar.grande { width: 42px; height: 42px; font-size: 15px; }

.menu-eu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; width: 260px; padding: 6px;
  border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(160deg, rgba(30, 30, 34, .99), rgba(12, 12, 15, .99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .12);
  animation: aparecer .25s var(--suave) both; transform-origin: top right;
}
.menu-topo { display: flex; align-items: center; gap: 12px; padding: 10px 10px 12px; border-bottom: 1px solid var(--linha); margin-bottom: 6px; }
.menu-topo b { display: block; font-size: 15px; }
.menu-eu button {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px;
  border: 0; border-radius: 11px; background: none; text-align: left; font-weight: 600; font-size: 14px;
  transition: background .2s;
}
.menu-eu button .ic { width: 18px; height: 18px; color: var(--sutil); }
.menu-eu button:hover { background: rgba(255, 255, 255, .07); }
.menu-eu button:hover .ic { color: var(--texto); }
.menu-eu button.perigo, .menu-eu button.perigo .ic { color: var(--pendente); }
.menu-eu button.perigo:hover { background: var(--pendente-fundo); }
.menu-linha { height: 1px; background: var(--linha); margin: 6px 4px; }

/* ---------- cartões ---------- */
.cartao {
  border-radius: 22px; border: 1px solid var(--linha); background: var(--vidro);
  box-shadow: inset 0 1px rgba(255, 255, 255, .1), 0 24px 60px rgba(0, 0, 0, .4);
  backdrop-filter: blur(16px); animation: entrar .6s var(--suave) backwards;
  transition: border-color .4s, box-shadow .4s, transform .45s var(--suave);
}
.saudacao { margin: 0 6px 18px; }
.saudacao h1 { font-family: var(--titulo); font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
/* Frase com um degradê branco → prata, e a mãozinha que acena uma vez ao entrar. */
.saudacao-frase {
  background: linear-gradient(120deg, #fff 0%, #fff 45%, #a6a8b2 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.aceno { display: inline-block; transform-origin: 70% 75%; animation: acenar 2s ease-in-out .5s 1 backwards; }
.destaque {
  padding: 22px;
  /* um brilho suave atrás do número grande */
  background: radial-gradient(420px 170px at 22% 42%, rgba(255, 255, 255, .07), transparent 70%), var(--vidro);
}
.valor-grande {
  font-family: var(--titulo); font-size: 42px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; margin: 4px 0 8px;
  font-variant-numeric: tabular-nums;
  /* glow: o número "acende" para ficar bem destacado */
  text-shadow: 0 0 14px rgba(255, 255, 255, .5), 0 0 36px rgba(255, 255, 255, .28), 0 0 72px rgba(255, 255, 255, .14);
}
.meu-resumo { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--linha); font-weight: 600; line-height: 2; }

/* overflow: hidden faz o fundo claro do "passar o mouse" respeitar as bordas
   arredondadas do cartão (antes ele vazava e aparecia um quadrado nos cantos). */
.lista { overflow: hidden; }
.lista > .item { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.lista > .item + .item { border-top: 1px solid var(--linha); }
.lista .vazio { padding: 20px 18px; color: var(--sutil); text-align: center; }
.item .nome { font-weight: 700; flex: 1; min-width: 0; }
.detalhe { display: block; font-weight: 500; font-size: 12px; color: var(--sutil); }

/* Etiquetas com bolinha brilhante (estilo LLABS). */
.etiqueta {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .04);
}
/* A bolinha "respira": perde força e fica clarinha, mas nunca apaga de vez. */
.etiqueta::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor;
  animation: respirar 2.6s ease-in-out infinite;
}
.etiqueta.pago { color: var(--pago); border-color: rgba(77, 240, 166, .35); background: var(--pago-fundo); }
.etiqueta.pendente { color: var(--pendente); border-color: rgba(255, 107, 134, .35); background: var(--pendente-fundo); }
.etiqueta.azul { color: var(--azul); border-color: rgba(108, 182, 255, .35); background: var(--azul-fundo); }
.etiqueta.neutra { color: var(--sutil); }
.etiquetas { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }

.alerta {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 14px; font-size: 14px;
  border-color: rgba(255, 212, 94, .4); background: var(--aviso-fundo);
}
.alerta p { flex: 1; }
.alerta .botao-texto { color: var(--aviso); white-space: nowrap; }
.alerta-texto { padding: 12px 14px; border-radius: 13px; font-size: 14px; border: 1px solid rgba(255, 212, 94, .4); background: var(--aviso-fundo); }

/* ---------- quem deve pra quem (uma barra por pessoa, abre ao clicar) ---------- */
.devedor + .devedor { border-top: 1px solid var(--linha); }
.devedor summary {
  display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  cursor: pointer; list-style: none; user-select: none; transition: background .25s;
}
.devedor summary::-webkit-details-marker { display: none; }
.devedor summary:hover { background: rgba(255, 255, 255, .03); }
.devedor .nome { font-weight: 800; flex: 1; min-width: 0; }
.seta-abrir {
  width: 28px; height: 28px; flex: none; display: grid; place-items: center; border-radius: 9px;
  border: 1px solid var(--linha); color: var(--sutil); font-size: 16px; line-height: 1;
  transition: transform .35s var(--suave), color .25s, border-color .25s;
}
.devedor.aberta .seta-abrir { transform: rotate(90deg); color: var(--texto); border-color: var(--linha-forte); }
/* A "gaveta": a altura dela é animada pelo app.js para abrir escorregando pra baixo. */
.devedor-corpo { overflow: hidden; }
.devedor-contas { padding: 0 18px 14px; display: grid; gap: 8px; }
.divida {
  display: grid; gap: 6px; padding: 11px 14px;
  border: 1px solid var(--linha); border-radius: 14px; background: rgba(255, 255, 255, .035);
}
.divida-topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* A continha: + o que ele deve, − o que o outro deve pra ele. */
.divida-itens { display: grid; gap: 3px; padding: 6px 0 2px; border-top: 1px dashed var(--linha); }
.divida-item { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--sutil); font-variant-numeric: tabular-nums; }
.divida-item em { font-style: normal; color: #6f717c; }
.divida-item.abate span:last-child { color: var(--azul); }
.divida-explica { font-size: 12px; color: var(--sutil); }
.botao-acertar {
  justify-self: start; display: inline-flex; align-items: center; gap: 7px; margin-top: 4px;
  padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 700;
  color: var(--pago); border: 1px solid rgba(77, 240, 166, .35); background: var(--pago-fundo); transition: background .2s;
}
.botao-acertar:hover { background: rgba(77, 240, 166, .18); }
.botao-acertar .ic { width: 16px; height: 16px; }
/* Linha de baixo da dupla: "Marcar como acertado" na esquerda, "Pagar" na direita. */
.divida-acoes { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.divida-acoes .botao-acertar { margin-top: 0; }
/* "Pagar": prateado, igual ao botão principal do site, pra chamar atenção. */
.botao-pagar {
  margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 16px; border-radius: 10px; font-size: 13px; font-weight: 800; color: #0a0a0d;
  background: var(--prata); box-shadow: inset 0 1px #fff, 0 6px 18px rgba(255, 255, 255, .12);
  transition: transform .25s var(--suave), box-shadow .25s;
}
.botao-pagar:hover { transform: translateY(-1px); box-shadow: inset 0 1px #fff, 0 10px 26px rgba(255, 255, 255, .22); }
.botao-pagar .ic { width: 16px; height: 16px; stroke-width: 2; }
.divida .para { font-weight: 700; }
.divida .para span { color: var(--sutil); font-weight: 500; }
.divida .conta-nome { display: block; font-size: 13px; color: var(--sutil); overflow-wrap: anywhere; }
.divida .valor { font-family: var(--titulo); font-weight: 700; white-space: nowrap; }

/* ---------- nova conta ---------- */
.formulario { padding: 22px; display: grid; gap: 18px; }
.formulario > label { display: block; }
.campo-valor { text-align: center; }
.valor-entrada { display: flex; align-items: baseline; justify-content: center; gap: 8px; }
.valor-entrada span { color: var(--sutil); font-family: var(--titulo); font-size: 22px; font-weight: 700; }
.valor-entrada input {
  width: 210px; padding: 4px 0; text-align: center; background: none; box-shadow: none;
  border: 0; border-bottom: 2px solid var(--linha); border-radius: 0;
  font-family: var(--titulo); font-size: 40px; font-weight: 700; letter-spacing: -.02em;
}
.valor-entrada input:focus { border-color: rgba(255, 255, 255, .8); box-shadow: none; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dividir-cabecalho { display: flex; align-items: center; justify-content: space-between; margin-bottom: -10px; }
.dividir-cabecalho .rotulo { margin: 0; }
.dividir-cabecalho .botao-texto { color: var(--sutil); font-size: 13px; }
.dividir-cabecalho .botao-texto:hover { color: var(--texto); }

.participantes { display: grid; gap: 8px; }
.participante {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; user-select: none;
  border: 1px solid var(--linha); border-radius: 14px; background: rgba(255, 255, 255, .02);
  transition: border-color .25s, background .25s, opacity .25s;
}
.participante input { width: 20px; height: 20px; margin: 0; accent-color: #fff; box-shadow: none; }
.participante .nome { flex: 1; font-weight: 700; }
.participante .valor { font-family: var(--titulo); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Quando o valor aparece (ex.: a pessoa voltou para a divisão), ele "surge" de leve. */
.participante .valor.surgiu { animation: surgir .35s var(--suave); }
.participante.marcado { border-color: rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .05); }
.participante:not(.marcado) { opacity: .5; }

/* Campo de data do celular. O iPhone dá a ele uma largura mínima própria e ignora a do
   cartão (por isso ele passava da beirada). "appearance: none" tira isso. */
input[type="date"] {
  -webkit-appearance: none; appearance: none;
  display: block; min-width: 0; min-height: 47px; text-align: left;
}
input[type="date"]::-webkit-date-and-time-value { text-align: left; }
.campo { min-width: 0; } /* deixa a coluna encolher em vez de empurrar pra fora */

/* ---------- calendário e lista de nomes bonitos (computador) ---------- */
.campo-bonito { position: relative; }
.campo-botao {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; border-radius: 13px; text-align: left; font-weight: 600;
  border: 1px solid var(--linha); background: rgba(3, 3, 6, .7); box-shadow: inset 0 1px rgba(255, 255, 255, .04);
  transition: border-color .25s, box-shadow .25s;
}
.campo-botao:hover { border-color: var(--linha-forte); }
.campo-botao[aria-expanded="true"], .campo-botao:focus-visible {
  outline: none; border-color: rgba(255, 255, 255, .6); box-shadow: 0 0 0 4px rgba(255, 255, 255, .08);
}
.campo-botao .ic { width: 18px; height: 18px; color: var(--sutil); transition: transform .3s var(--suave); }
.campo-botao[aria-expanded="true"] .ic.seta { transform: rotate(180deg); }

/* A caixinha que abre embaixo do campo (mesmo estilo do menu do perfil). */
.lista-opcoes, .calendario {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 20;
  border-radius: 18px; border: 1px solid rgba(255, 255, 255, .14);
  background: linear-gradient(160deg, rgba(30, 30, 34, .99), rgba(12, 12, 15, .99));
  box-shadow: 0 24px 60px rgba(0, 0, 0, .7), inset 0 1px rgba(255, 255, 255, .12);
  animation: aparecer .25s var(--suave) both; transform-origin: top left;
}
.lista-opcoes { right: 0; padding: 6px; max-height: 290px; overflow: auto; }
.lista-opcoes button {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  padding: 10px 12px; border: 0; border-radius: 11px; background: none; text-align: left; font-weight: 600;
  animation: surgir .3s var(--suave) backwards; transition: background .2s;
}
.lista-opcoes button:nth-child(2) { animation-delay: .03s; }
.lista-opcoes button:nth-child(3) { animation-delay: .06s; }
.lista-opcoes button:nth-child(4) { animation-delay: .09s; }
.lista-opcoes button:nth-child(5) { animation-delay: .12s; }
.lista-opcoes button:hover, .lista-opcoes button:focus-visible { outline: none; background: rgba(255, 255, 255, .07); }
.lista-opcoes button[aria-selected="true"] { background: rgba(255, 255, 255, .1); }
.lista-opcoes .ic { width: 18px; height: 18px; }

.calendario { width: 300px; padding: 14px; }
.cal-topo { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-titulo { font-family: var(--titulo); font-weight: 700; font-size: 15px; }
.cal-seta {
  width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; font-size: 18px; line-height: 1;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .04); transition: border-color .2s, background .2s;
}
.cal-seta:hover { border-color: var(--linha-forte); background: rgba(255, 255, 255, .08); }
.cal-grade { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.cal-semana { font-size: 11px; font-weight: 800; color: var(--sutil); padding: 4px 0 6px; }
.cal-dia {
  aspect-ratio: 1; border: 0; border-radius: 10px; background: none;
  font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; transition: background .2s, transform .2s;
}
.cal-dia:hover, .cal-dia:focus-visible { outline: none; background: rgba(255, 255, 255, .08); }
.cal-dia.outro-mes { color: #4d4f58; }
.cal-dia.hoje { box-shadow: inset 0 0 0 1px var(--linha-forte); }
.cal-dia.escolhido { color: #0a0a0d; background: var(--prata); box-shadow: inset 0 1px #fff, 0 4px 14px rgba(255, 255, 255, .15); }
.cal-rodape { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--linha); }
.cal-rodape .botao-texto { font-size: 13px; color: var(--sutil); }
.cal-rodape .botao-texto:hover { color: var(--texto); }

/* ---------- boas-vindas (logo depois de entrar) ---------- */
.boas-vindas {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; cursor: pointer;
  background: rgba(5, 5, 6, .82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  animation: aparecer-fundo .3s ease both;
}
.boas-vindas-caixa { display: grid; justify-items: center; gap: 10px; text-align: center; }
.boas-vindas .marca-icone {
  width: 76px; height: 76px; font-size: 40px; border-radius: 24px; margin-bottom: 8px;
  animation: pop-casa .7s cubic-bezier(.34, 1.56, .64, 1) both, flutuar 3s ease-in-out .7s infinite;
}
.boas-vindas-titulo {
  font-family: var(--titulo); font-size: 26px; font-weight: 700; letter-spacing: -.02em;
  text-shadow: 0 0 24px rgba(255, 255, 255, .3);
  animation: surgir .5s var(--suave) .2s backwards;
}
.boas-vindas .sutil { font-size: 14px; animation: surgir .5s var(--suave) .35s backwards; }
.boas-vindas.saindo { animation: sumir-fundo .35s ease forwards; }
.boas-vindas.saindo .boas-vindas-caixa { transition: transform .35s var(--suave); transform: scale(.94) translateY(-6px); }

/* ---------- navegação de mês (Resumo e filtro das Contas) ---------- */
.mes-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 2px 14px; }
.mes-titulo { font-family: var(--titulo); font-size: 18px; font-weight: 700; }
.mes-nav.pequeno { justify-content: flex-start; margin: 0; }
.mes-rotulo {
  min-width: 150px; padding: 7px 12px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--sutil);
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .04); transition: color .2s, border-color .2s;
}
.mes-rotulo.ativo { color: var(--texto); border-color: var(--linha-forte); }
.filtros-extra { display: grid; gap: 10px; margin-bottom: 10px; }
.filtros-extra .filtros { margin: 0; }

/* ---------- Resumo: gráfico de barras (quanto cada um gastou) ---------- */
.grafico { padding: 8px 18px; }
.barra-linha { display: grid; grid-template-columns: 104px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; }
.barra-linha + .barra-linha { border-top: 1px solid var(--linha); }
.barra-nome { font-weight: 700; font-size: 14px; }
.barra-trilho { height: 10px; border-radius: 99px; background: rgba(255, 255, 255, .05); overflow: hidden; }
/* barra fina, ponta arredondada, presa na base (esquerda); cresce do zero ao aparecer */
.barra {
  display: block; height: 100%; width: 0; border-radius: 4px 99px 99px 4px;
  background: var(--prata);
  transition: width .8s var(--suave);
}
/* brilho da barra na cor dela */
.barra.alto { box-shadow: 0 0 12px rgba(255, 77, 109, .35); }
.barra.medio { box-shadow: 0 0 12px rgba(255, 159, 67, .3); }
.barra.baixo { box-shadow: 0 0 12px rgba(47, 217, 139, .3); }

/* Título do gráfico + seletor de estilo (Barras / Pizza / Meses) */
.grafico-cabecalho { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 26px 6px 10px; flex-wrap: wrap; }
.grafico-cabecalho h2 { margin: 0; }
.seletor-grafico { grid-template-columns: repeat(3, auto); padding: 3px; border-radius: 12px; }
.seletor-grafico button { padding: 6px 12px; font-size: 12.5px; }
.seletor-grafico .indicador { border-radius: 9px; }

/* Legenda das cores (embaixo do gráfico) */
.legenda-cores { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; padding: 10px 0 6px; border-top: 1px solid var(--linha); margin-top: 4px; }
.legenda-cores span { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--sutil); }
.legenda-cores i { width: 14px; height: 8px; border-radius: 99px; }

/* Pizza (rosca) */
.rosca { display: grid; grid-template-columns: 190px 1fr; align-items: center; gap: 22px; padding: 12px 0; }
.rosca-svg { width: 100%; max-width: 190px; }
.fatia { transition: opacity .2s; animation: girar-fatia .9s var(--suave) backwards; }
.rosca-svg:hover .fatia { opacity: .55; }
.rosca-svg .fatia:hover { opacity: 1; }
.rosca-total { fill: var(--texto); font-family: var(--titulo); font-weight: 700; font-size: 17px; }
.rosca-rotulo { fill: var(--sutil); font-size: 11px; }
.rosca-legenda { display: grid; gap: 8px; }
.rosca-item { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 10px; font-size: 14px; }
.rosca-item i { width: 12px; height: 12px; border-radius: 4px; }
.rosca-nome { font-weight: 700; }
.rosca-valor { font-family: var(--titulo); font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.rosca-valor .detalhe { display: inline; margin-left: 4px; font-family: "Manrope", sans-serif; }
@media (max-width: 520px) { .rosca { grid-template-columns: 1fr; justify-items: center; } .rosca-legenda { width: 100%; } }

/* Meses (gráfico de "picos") */
.linha-svg { width: 100%; height: auto; display: block; padding-top: 6px; overflow: visible; }
.linha-svg .eixo { stroke: var(--linha); stroke-width: 1; }
.linha-svg .guia { stroke: rgba(255, 255, 255, .05); stroke-width: 1; }
.linha-svg .linha { stroke: #e9eaee; stroke-width: 2.5; stroke-linejoin: round; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(255, 255, 255, .25)); }
.linha-svg circle { stroke: var(--fundo); stroke-width: 2.5; transition: r .2s; }
.linha-svg .ponto-mes:hover circle { r: 8; }
.linha-svg circle.atual { stroke: #fff; }
.linha-svg .valor-ponto { fill: var(--texto); font-family: var(--titulo); font-weight: 700; font-size: 14px; }
.linha-svg .mes-rotulo-svg { fill: var(--sutil); font-size: 13px; font-weight: 700; text-transform: capitalize; }
.linha-svg .mes-rotulo-svg.atual { fill: var(--texto); }
.linha-svg .area { animation: surgir .8s var(--suave) backwards; }

.barra-valor { text-align: right; font-family: var(--titulo); font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.barra-valor .detalhe { font-family: "Manrope", sans-serif; font-weight: 500; }
.valor-forte { font-family: var(--titulo); font-weight: 700; white-space: nowrap; }
@media (max-width: 480px) { .barra-linha { grid-template-columns: 78px 1fr auto; gap: 10px; } }

/* ---------- painel do administrador ---------- */
.janela-larga { width: min(480px, calc(100% - 32px)); }
.janela-botoes.um { grid-template-columns: 1fr; }
#admin-moradores b { color: var(--texto); }
#admin-moradores .botao-texto:disabled { opacity: .35; cursor: default; }

/* ---------- chave Pix ---------- */
.botao-pix {
  display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 8px; vertical-align: 2px;
  border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em;
  color: var(--pago); border: 1px solid rgba(77, 240, 166, .35); background: var(--pago-fundo); transition: background .2s;
}
.botao-pix:hover { background: rgba(77, 240, 166, .2); }
.botao-pix.sem-pix { color: var(--sutil); border-color: var(--linha); background: rgba(255, 255, 255, .04); }

/* ---------- chavinha do modo leve (no menu) ---------- */
.chave-leve {
  margin-left: auto; width: 32px; height: 18px; flex: none; border-radius: 99px; position: relative;
  background: rgba(255, 255, 255, .12); transition: background .2s;
}
.chave-leve::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%;
  background: #9a9ca6; transition: transform .2s, background .2s;
}
.chave-leve.ligada { background: var(--pago-fundo); box-shadow: inset 0 0 0 1px rgba(77, 240, 166, .5); }
.chave-leve.ligada::after { transform: translateX(14px); background: var(--pago); }

/* ---------- Histórico: seletor Resumo / Meu extrato / Meses / Registros ----------
   Colunas automáticas: 4 para morador, 3 para responsável (que não tem "Meu extrato"). */
.seletor-historico { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; margin: 0 0 18px; }
.seletor-historico button { font-size: 13px; padding: 9px 4px; white-space: nowrap; }
.seletor-historico button[hidden] { display: none; }

/* ---------- editar conta (faixa no topo do formulário) ---------- */
.editando {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px 10px 14px;
  border-radius: 13px; border: 1px solid rgba(255, 212, 94, .4); background: var(--aviso-fundo); font-size: 14px;
}
.editando .botao-texto { color: var(--aviso); }

/* ---------- Compras ---------- */
.compras-novo { display: flex; gap: 10px; padding: 12px; margin-top: 12px; }
.compras-novo .botao, .admin-novo .botao { width: auto; flex: none; white-space: nowrap; padding: 12px 16px; }
.compras-novo input, .admin-novo input { flex: 1; min-width: 0; } /* o campo encolhe, o botão fica inteiro */
.compras-titulo { display: flex; align-items: center; justify-content: space-between; }
.compras-titulo h2 { margin-right: auto; }
.compras-acoes { display: flex; gap: 4px; margin-top: 16px; }
.compras-acoes .botao-texto:disabled { opacity: .35; cursor: default; }
.compra .nome { font-weight: 600; }
.compra.comprada .nome { color: var(--sutil); text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .25); }
.compra.comprada .nome .detalhe { text-decoration: none; }
.marcar-compra {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; border-radius: 8px;
  border: 1.5px solid var(--linha-forte); background: none; color: #0a0a0d; font-weight: 800; font-size: 14px;
  transition: background .2s, border-color .2s, transform .15s;
}
.marcar-compra:active { transform: scale(.9); }
.compra.comprada .marcar-compra { background: var(--pago); border-color: var(--pago); }

/* ---------- Meses fechados (extratos) ---------- */
.fechar-mes { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; margin-bottom: 14px; flex-wrap: wrap; }
.fechar-mes .botao { width: auto; }
.extrato { margin-bottom: 14px; overflow: hidden; }
.extrato-topo { display: flex; justify-content: space-between; gap: 12px; padding: 18px 18px 6px; }
.extrato-topo h3 { font-family: var(--titulo); font-size: 18px; font-weight: 700; }
.extrato-topo .total { font-family: var(--titulo); font-size: 18px; font-weight: 700; }
.extrato-bloco { padding: 10px 18px; display: grid; gap: 4px; }
.extrato-bloco + .extrato-bloco { border-top: 1px solid var(--linha); }
.extrato-linha { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.extrato-linha b { font-family: var(--titulo); font-variant-numeric: tabular-nums; }
.extrato-linha b.deve { color: var(--pendente); }

/* ---------- Pagar com Pix (QR code) ---------- */
.pagar-valor { font-family: var(--titulo); font-size: 30px; font-weight: 700; text-shadow: 0 0 18px rgba(255, 255, 255, .3); }
.qr { width: min(240px, 70vw); margin: 4px auto; padding: 10px; border-radius: 16px; background: #fff; }
.qr svg { display: block; width: 100%; height: auto; }

/* ---------- Painel do administrador: moradores ---------- */
.admin-novo { display: flex; gap: 10px; }
.admin-novo .botao { width: auto; white-space: nowrap; }
/* nome e informações em cima, botões numa linha embaixo (senão o nome fica espremido) */
.admin-morador { flex-wrap: wrap; row-gap: 4px; }
.admin-morador .nome { flex: 1 1 100%; }
.admin-morador.saiu .nome { color: var(--sutil); }
.admin-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; margin-left: -10px; }
.admin-acoes .botao-texto { font-size: 13px; padding: 5px 8px; }
.admin-acoes .botao-texto:disabled { opacity: .35; cursor: default; }
.admin-renomear { display: flex; gap: 6px; }
.admin-renomear input { padding: 8px 10px; }

/* ---------- lista de contas ---------- */
.filtros { display: flex; gap: 6px; margin-bottom: 10px; flex-wrap: wrap; }
.filtros button {
  padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--sutil);
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .04); transition: color .25s, border-color .25s, background .25s;
}
.filtros button:hover { color: var(--texto); border-color: var(--linha-forte); }
.filtros button.ativo { color: #0a0a0d; border-color: transparent; background: var(--prata); }
.dica { margin: 0 6px 14px; }

/* Sem animação de entrada aqui: as contas são redesenhadas a cada pagamento marcado. */
.conta { margin-bottom: 14px; overflow: hidden; animation: none; }
.conta-topo { display: flex; gap: 12px; padding: 18px 18px 12px; }
.conta-topo .titulo { flex: 1; min-width: 0; }
.conta-topo h3 { font-family: var(--titulo); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.conta-topo .total { font-family: var(--titulo); font-size: 18px; font-weight: 700; white-space: nowrap; }
.progresso { height: 5px; margin: 0 18px 8px; border-radius: 99px; overflow: hidden; background: var(--pendente-fundo); }
.progresso div { height: 100%; border-radius: 99px; background: var(--pago); box-shadow: 0 0 10px var(--pago); transition: width .4s var(--suave); }
.conta .item { padding: 10px 18px; }
.conta .item .valor { font-family: var(--titulo); font-weight: 700; white-space: nowrap; }
.botao-status, .status-fixo { min-width: 122px; justify-content: center; }
.botao-status { cursor: pointer; transition: transform .1s, box-shadow .25s; }
.botao-status:hover { box-shadow: 0 0 0 3px rgba(255, 255, 255, .06); }
.botao-status:active { transform: scale(.95); }
.status-fixo { cursor: not-allowed; opacity: .85; }
.conta-rodape { display: flex; justify-content: flex-end; padding: 6px 10px 10px; border-top: 1px solid var(--linha); }
.conta-rodape .excluir { font-size: 13px; }

/* ---------- registros (quem fez o quê e quando) ---------- */
.intro { margin: 0 6px 4px; }
.registro { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 13px 18px; }
/* Linha do tempo: um fiozinho ligando um ícone ao próximo. */
.registro:not(:last-child)::after {
  content: ""; position: absolute; left: 32.5px; top: 47px; bottom: -9px; width: 1px;
  background: linear-gradient(rgba(255, 255, 255, .22), rgba(255, 255, 255, .06));
}
.registro-icone {
  width: 30px; height: 30px; flex: none; display: grid; place-items: center;
  border-radius: 10px; font-size: 14px; font-weight: 800; border: 1px solid var(--linha);
  color: var(--texto); background: rgba(255, 255, 255, .05);
}
.registro-icone.morador, .registro-icone.editou, .registro-icone.fechou { color: var(--texto); }
.registro-icone.redefiniu { color: var(--aviso); border-color: rgba(255, 212, 94, .35); background: var(--aviso-fundo); }
.registro-icone.acertou, .registro-icone.pagou { color: var(--pago); border-color: rgba(77, 240, 166, .35); background: var(--pago-fundo); }
.registro-icone.desfez { color: var(--aviso); border-color: rgba(255, 212, 94, .35); background: var(--aviso-fundo); }
.registro-icone.excluiu { color: var(--pendente); border-color: rgba(255, 107, 134, .35); background: var(--pendente-fundo); }
.registro-texto { flex: 1; min-width: 0; font-size: 14px; color: #c9cad2; padding-top: 4px; overflow-wrap: anywhere; }
.registro-texto b { color: var(--texto); font-weight: 700; }
/* Administrador: barra "Apagar todos" e o ✕ de cada registro. */
.registros-admin {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 6px 0;
  padding: 10px 12px 10px 14px; border-radius: 14px; border: 1px solid rgba(255, 107, 134, .25); background: var(--pendente-fundo);
}
.apagar-registro {
  width: 26px; height: 26px; flex: none; display: grid; place-items: center; margin-top: 2px;
  border: 1px solid var(--linha); border-radius: 8px; background: none; color: var(--sutil); font-size: 12px;
  transition: color .2s, border-color .2s, background .2s;
}
.apagar-registro:hover { color: var(--pendente); border-color: rgba(255, 107, 134, .45); background: var(--pendente-fundo); }
.registro time { font-family: var(--titulo); font-size: 13px; color: var(--sutil); white-space: nowrap; padding-top: 5px; }

/* ---------- janelas (trocar senha e confirmações) ---------- */
.janela {
  width: min(400px, calc(100% - 32px)); padding: 0; border-radius: 24px; color: var(--texto);
  border: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(160deg, rgba(32, 32, 36, .98), rgba(10, 10, 13, .98));
  box-shadow: 0 36px 90px rgba(0, 0, 0, .8), 0 0 50px rgba(255, 255, 255, .05), inset 0 1px rgba(255, 255, 255, .18);
}
.janela[open] { animation: aparecer .35s var(--suave) both; }
.janela::backdrop { background: rgba(0, 0, 0, .65); backdrop-filter: blur(4px); }
.janela-conteudo { padding: 24px; display: grid; gap: 12px; }
.janela-titulo { margin: 0; font-family: var(--titulo); font-size: 20px; font-weight: 700; text-transform: none; letter-spacing: -.01em; color: var(--texto); }
.janela-botoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.janela-icone {
  width: 56px; height: 56px; margin: 0 auto 4px; display: grid; place-items: center; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07);
}
.janela-icone .ic { width: 26px; height: 26px; }
.janela-icone.tom-aviso { color: var(--aviso); border-color: rgba(255, 212, 94, .4); background: var(--aviso-fundo); box-shadow: 0 0 34px rgba(255, 212, 94, .15); }
.janela-icone.tom-perigo { color: var(--pendente); border-color: rgba(255, 107, 134, .45); background: var(--pendente-fundo); box-shadow: 0 0 34px rgba(255, 73, 105, .22); }
.confirmar-texto { color: #c9cad2; font-size: 14px; }
.confirmar-texto b { color: var(--texto); }

/* Caixinha com a senha dos responsáveis + botão de copiar. */
.linha-copiar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px;
  border: 1px solid var(--linha); border-radius: 13px; background: rgba(3, 3, 6, .7);
}
.linha-copiar code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 15px; font-weight: 700; letter-spacing: .04em; overflow-wrap: anywhere; }
.linha-copiar .botao-texto { white-space: nowrap; font-size: 13px; }
#resp-padrao { margin-top: 6px; }

/* ---------- aviso flutuante ---------- */
/* É um "popover": fica por cima de tudo, até das janelas abertas.
   Não colocar "display" aqui, senão ele não some quando é fechado. */
.aviso {
  position: fixed; inset: auto; margin: 0; left: 50%; bottom: 26px; translate: -50% 0; z-index: 40;
  width: max-content; max-width: calc(100% - 32px); overflow: visible;
  padding: 12px 20px; border-radius: 14px; font-weight: 700; font-size: 14px;
  color: var(--texto); border: 1px solid rgba(255, 255, 255, .18); background: rgba(22, 22, 26, .96);
  backdrop-filter: blur(18px); box-shadow: 0 20px 50px rgba(0, 0, 0, .55);
  animation: aviso-subir .5s cubic-bezier(.34, 1.4, .64, 1) both;
}
/* Aviso de "isso você não pode fazer": amarelo, com uma bolinha na frente. */
.aviso.atencao { color: #ffeab0; border-color: rgba(255, 212, 94, .45); background: rgba(38, 31, 10, .96); }
.aviso.atencao::before {
  content: ""; display: inline-block; vertical-align: middle; margin: -2px 10px 0 0;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--aviso); box-shadow: 0 0 10px var(--aviso); animation: respirar 1.6s ease-in-out infinite;
}
@media (max-width: 640px) { .aviso { bottom: 92px; } }

@media (max-width: 480px) {
  .dupla { grid-template-columns: 1fr; }
}

/* =====================================================================
   ENFEITES E ANIMAÇÕES (tudo bem suave; quem pediu "menos movimento"
   no celular não vê nada disso — ver o fim do arquivo)
   ===================================================================== */

/* Fundo: três luzes brancas bem fracas flutuando devagar + uma grade de pontinhos no topo. */
.fundo-animado { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.fundo-animado::before {
  content: ""; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 55% at 50% 0%, #000 25%, transparent 75%);
}
.fundo-animado span {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .075), transparent 65%);
  animation: flutuar-luz 30s ease-in-out infinite alternate;
}
.fundo-animado span:nth-child(1) { width: 640px; height: 640px; top: -220px; left: -180px; }
.fundo-animado span:nth-child(2) { width: 560px; height: 560px; bottom: -240px; right: -160px; animation-duration: 36s; animation-delay: -10s; }
.fundo-animado span:nth-child(3) { width: 380px; height: 380px; top: 38%; left: 52%; animation-duration: 42s; animation-delay: -20s; opacity: .6; }

/* Topo: logo e perfil descem suave ao entrar; a casinha flutua com um anel que se expande.
   (Não animar o .topo inteiro: no celular a barra de abas fica dentro dele e "pularia".) */
.topo > .marca, .topo > .eu-area { animation: descer .6s var(--suave) backwards; }
.topo .marca-icone { position: relative; animation: flutuar 5s ease-in-out infinite; }
.topo .marca-icone::after {
  content: ""; position: absolute; inset: -6px; border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .35); animation: anel 3.4s ease-out infinite;
}

/* Abas: o ícone da aba escolhida dá um pulinho. */
.abas button.ativa .icone { animation: pulinho .5s cubic-bezier(.34, 1.56, .64, 1); }

/* Menu do perfil: as opções entram uma depois da outra. */
.menu-eu > button { animation: surgir .35s var(--suave) backwards; }
.menu-eu > button:nth-of-type(2) { animation-delay: .03s; }
.menu-eu > button:nth-of-type(3) { animation-delay: .06s; }
.menu-eu > button:nth-of-type(4) { animation-delay: .09s; }
.menu-eu > button:nth-of-type(5) { animation-delay: .12s; }
.menu-eu > button:nth-of-type(6) { animation-delay: .15s; }
.avatar { box-shadow: inset 0 1px #fff, 0 0 0 3px rgba(255, 255, 255, .06); }

/* Cartão do total: um reflexo de luz atravessa de vez em quando, e o número "respira" o brilho. */
.destaque { position: relative; overflow: hidden; }
.destaque::after {
  content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .06), transparent);
  transform: translateX(-150%) skewX(-15deg); animation: reflexo 8s ease-in-out 1.5s infinite;
}
.valor-grande { animation: brilho-numero 4.5s ease-in-out infinite; }

/* Botão principal: uma faixa de luz passa quando o mouse entra. */
.botao.principal { position: relative; overflow: hidden; }
.botao.principal::after {
  content: ""; position: absolute; top: 0; left: 0; width: 45%; height: 100%; pointer-events: none;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: translateX(-160%) skewX(-20deg);
}

/* Etiqueta que acabou de mudar (pago ↔ pendente) dá um pulinho. */
.etiqueta.pop { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1); }

/* Emojis de "tudo certo" flutuando. */
.flutua { display: inline-block; animation: flutuar 3s ease-in-out infinite; }

/* Só em computador (com mouse): cartões levantam um pouquinho, faixa de luz no botão etc. */
@media (hover: hover) {
  .conta:hover, .destaque:hover {
    transform: translateY(-3px); border-color: rgba(255, 255, 255, .2);
    box-shadow: inset 0 1px rgba(255, 255, 255, .12), 0 32px 70px rgba(0, 0, 0, .55);
  }
  .botao.principal:hover::after { transform: translateX(330%) skewX(-20deg); transition: transform .9s var(--suave); }
  .participante:hover { border-color: rgba(255, 255, 255, .35); }
  .divida { transition: border-color .25s, transform .3s var(--suave); }
  .divida:hover { border-color: rgba(255, 255, 255, .22); transform: translateX(3px); }
}

/* Celular (sem mouse): desliga os efeitos de "mouse em cima", que ficavam presos depois do toque. */
@media (hover: none) {
  .botao:hover { border-color: var(--linha); }
  .botao.principal:hover { transform: none; box-shadow: 0 8px 28px rgba(255, 255, 255, .14), inset 0 1px #fff; }
  .botao-texto:hover { background: none; }
  .botao-status:hover { box-shadow: none; }
  .filtros button:hover { color: var(--sutil); border-color: var(--linha); }
  .filtros button.ativo:hover { color: #0a0a0d; border-color: transparent; }
  .devedor summary:hover { background: none; }
  .botao-eu:hover { border-color: var(--linha); background: rgba(255, 255, 255, .05); }
}

@media (max-width: 640px) {
  /* Campos com 16px: abaixo disso o iPhone dá zoom sozinho ao tocar no campo. */
  input, select { font-size: 16px; }
  /* Teclado aberto (digitando)? A barra de abas de baixo desce para não cobrir o formulário. */
  .abas { transition: transform .3s var(--suave); }
  body:has(.conteudo input:focus, .conteudo select:focus, dialog input:focus) .abas { transform: translateY(110%); }
  .saudacao h1 { font-size: 23px; }
  .valor-grande { font-size: 38px; }
}

/* ---------- animações ---------- */
@keyframes entrar { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; } }
@keyframes respirar { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes surgir { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes flutuar { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-5px) rotate(2deg); } }
@keyframes flutuar-luz {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(70px, 40px) scale(1.08); }
  100% { transform: translate(-40px, 80px) scale(.94); }
}
@keyframes girar-fatia { from { opacity: 0; stroke-dasharray: 0 999; } }
@keyframes aparecer-fundo { from { opacity: 0; } to { opacity: 1; } }
@keyframes sumir-fundo { from { opacity: 1; } to { opacity: 0; } }
@keyframes pop-casa { 0% { opacity: 0; transform: scale(.5) rotate(-8deg); } 100% { opacity: 1; transform: none; } }
@keyframes descer { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes anel { 0% { opacity: .5; transform: scale(.92); } 80%, 100% { opacity: 0; transform: scale(1.35); } }
@keyframes pulinho { 0% { transform: scale(.8); } 60% { transform: scale(1.15); } 100% { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(.85); } 55% { transform: scale(1.08); } 100% { transform: scale(1); } }
@keyframes reflexo { 0% { transform: translateX(-150%) skewX(-15deg); } 35%, 100% { transform: translateX(380%) skewX(-15deg); } }
@keyframes brilho-numero {
  0%, 100% { text-shadow: 0 0 14px rgba(255, 255, 255, .5), 0 0 36px rgba(255, 255, 255, .28), 0 0 72px rgba(255, 255, 255, .14); }
  50% { text-shadow: 0 0 10px rgba(255, 255, 255, .35), 0 0 26px rgba(255, 255, 255, .16), 0 0 50px rgba(255, 255, 255, .07); }
}
@keyframes brilho-texto { from { background-position: 100% 0; } to { background-position: -150% 0; } }
@keyframes aviso-subir { from { opacity: 0; transform: translateY(16px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes acenar {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30% { transform: rotate(16deg); }
  20% { transform: rotate(-8deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

/* MODO LEVE (menu → Modo leve): para celular mais antigo.
   Tira as animações, as luzes do fundo e o desfoque (o que mais pesa no celular). */
.leve *, .leve *::before, .leve *::after { animation: none !important; transition: none !important; }
.leve .fundo-animado, .leve .destaque::after, .leve .topo .marca-icone::after { display: none; }
.leve .cartao, .leve .login-caixa, .leve .topo, .leve .aviso, .leve .boas-vindas, .leve .janela::backdrop {
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
}
.leve .cartao, .leve .login-caixa { background: #111114; box-shadow: none; }
.leve .valor-grande, .leve .boas-vindas-titulo { text-shadow: none; }
.leve body { background: var(--fundo); }
.leve .topo { background: rgba(5, 5, 6, .97); } /* sem desfoque, o topo fica sólido */

/* Quem prefere menos movimento no celular não vê animação. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- Lembrete da semana: cartãozinho no canto de baixo ----------
   Não cobre a tela e não bloqueia nada; só some quando a pessoa clica "Entendi". */
.cartao-lembrete {
  position: fixed; right: 22px; bottom: 26px; z-index: 35; width: min(360px, calc(100% - 32px));
  padding: 16px 18px 14px; border-radius: 18px;
  border: 1px solid rgba(255, 212, 94, .35); background: rgba(24, 22, 16, .97);
  backdrop-filter: blur(18px); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
}
.cartao-lembrete[hidden] { display: none; }
.lembrete-topo { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #ffeab0; }
.lembrete-icone { display: inline-block; transform-origin: 50% 10%; animation: sininho 2.4s ease-in-out 1.4s 2; }
@keyframes sininho {
  0%, 60%, 100% { transform: rotate(0); }
  10% { transform: rotate(14deg); } 20% { transform: rotate(-12deg); } 30% { transform: rotate(8deg); } 40% { transform: rotate(-5deg); }
}
.cartao-lembrete p { margin: 8px 0 12px; font-size: 14px; line-height: 1.45; color: var(--texto); }
.lembrete-botoes { display: flex; justify-content: flex-end; align-items: center; gap: 8px; }
.lembrete-botoes .botao { width: auto; flex: none; padding: 9px 22px; }
.lembrete-botoes .botao-texto { white-space: nowrap; }
@media (max-width: 640px) {
  .cartao-lembrete { right: 16px; left: 16px; width: auto; bottom: 92px; }
}
.leve .cartao-lembrete { backdrop-filter: none; }

/* ---------- Busca das Contas ---------- */
.busca { position: relative; }
.busca .ic { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--sutil); pointer-events: none; }
.busca input { width: 100%; padding-left: 42px; }
.busca input::-webkit-search-cancel-button { filter: invert(1) opacity(.6); cursor: pointer; }

/* ---------- Histórico → Meu extrato ---------- */
.meu-numeros { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.meu-numero { padding: 14px 16px; }
.meu-numero b { display: block; font-family: var(--titulo); font-size: 21px; font-variant-numeric: tabular-nums; margin-bottom: 2px; }
.meu-numero.azul b { color: var(--azul); }
.meu-numero.vermelho b { color: var(--pendente); }
.meu-numero.verde b { color: var(--pago); }
@media (max-width: 640px) { .meu-numeros { grid-template-columns: 1fr 1fr; } }
.meu-nota { grid-column: 1 / -1; margin: 2px 4px 0; font-size: 12px; }

/* ---------- Contas: pessoa escolhida no filtro ganha destaque ----------
   Prata/branco (igual ao botão selecionado), porque verde no site quer dizer "pago". */
.lista > .item.selecionada {
  position: relative;
  background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .03) 75%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22), inset 0 0 24px rgba(255, 255, 255, .05);
}
.lista > .item.selecionada::before {
  content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0;
  background: #fff; box-shadow: 0 0 10px rgba(255, 255, 255, .9), 0 0 22px rgba(255, 255, 255, .45);
  animation: brilho-selecionada 2.4s ease-in-out infinite;
}
.lista > .item.selecionada .nome { color: #fff; text-shadow: 0 0 12px rgba(255, 255, 255, .55), 0 0 28px rgba(255, 255, 255, .25); }
.nome-selecionado { color: #fff; font-weight: 800; text-shadow: 0 0 10px rgba(255, 255, 255, .55); }
@keyframes brilho-selecionada { 50% { opacity: .7; } }

/* ---------- Chat de cada conta ---------- */
/* Botão no rodapé da conta (à esquerda; Editar e Excluir ficam à direita). */
.conta-rodape { align-items: center; gap: 4px; }
.botao-chat {
  position: relative; margin-right: auto; display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px; border-radius: 10px; font-size: 13px; font-weight: 700; color: var(--sutil);
  transition: color .2s, background .2s;
}
.botao-chat .ic { width: 17px; height: 17px; }
.botao-chat:hover, .botao-chat.tem { color: var(--texto); }
.botao-chat:hover { background: rgba(255, 255, 255, .07); }
/* Bolinha branca brilhante = tem mensagem nova que você não viu. */
.chat-bolinha {
  width: 8px; height: 8px; border-radius: 50%; background: #fff;
  box-shadow: 0 0 8px rgba(255, 255, 255, .9), 0 0 18px rgba(255, 255, 255, .5); animation: respirar 1.6s ease-in-out infinite;
}

/* A janela do chat: no computador, uma janela alta no meio; no celular, sobe de baixo. */
.janela-chat { width: min(460px, calc(100% - 32px)); height: min(640px, calc(100dvh - 48px)); max-height: none; overflow: hidden; }
.janela-chat[open] { display: flex; flex-direction: column; }
.chat-topo { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--linha); }
.chat-icone {
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .05);
}
.chat-icone .ic { width: 19px; height: 19px; }
.chat-cabecalho { flex: 1; min-width: 0; display: grid; gap: 1px; }
.chat-cabecalho h2 { margin: 0; font-family: var(--titulo); font-size: 17px; font-weight: 700; text-transform: none; letter-spacing: -.01em; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-cabecalho .sutil { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-fechar { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 10px; color: var(--sutil); transition: background .2s, color .2s; }
.chat-fechar:hover { background: rgba(255, 255, 255, .08); color: var(--texto); }

.chat-mensagens { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 14px 8px; display: flex; flex-direction: column; }
.chat-carregando { margin: auto; color: var(--sutil); font-size: 13px; }
.chat-vazio { margin: auto; display: grid; justify-items: center; gap: 6px; text-align: center; color: var(--sutil); font-size: 13px; padding: 20px; }
.chat-vazio .ic { width: 34px; height: 34px; margin-bottom: 6px; opacity: .6; }
.chat-vazio b { color: var(--texto); font-size: 15px; }

/* Separador de dia: "Hoje", "Ontem", "14 de out" */
.chat-dia { display: flex; justify-content: center; margin: 10px 0 6px; }
.chat-dia span {
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--sutil);
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .04);
}

/* Cada mensagem: foto (iniciais) + nome + balão. As minhas ficam à direita, prateadas. */
.msg { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 10px; max-width: 86%; }
.msg.continua { margin-top: 3px; }
.msg.minha { align-self: flex-end; flex-direction: row-reverse; }
.msg-avatar { width: 28px; height: 28px; font-size: 11px; }
.msg-avatar.vazio { visibility: hidden; }
.msg-corpo { display: grid; gap: 3px; min-width: 0; }
.msg-nome { font-size: 11.5px; font-weight: 700; color: var(--sutil); padding-left: 4px; }
.bolha {
  padding: 8px 12px 6px; border-radius: 16px 16px 16px 6px; font-size: 14px; line-height: 1.4;
  border: 1px solid var(--linha); background: rgba(255, 255, 255, .07);
}
.msg.continua:not(.minha) .bolha { border-top-left-radius: 6px; }
.msg.minha .bolha {
  border-radius: 16px 16px 6px 16px; color: #0a0a0d; border-color: transparent;
  background: var(--prata); box-shadow: inset 0 1px #fff;
}
.msg.minha.continua .bolha { border-top-right-radius: 6px; }
.msg-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.bolha time { display: block; text-align: right; margin-top: 2px; font-size: 10.5px; font-weight: 600; opacity: .55; }
.msg.enviando { opacity: .55; }
.msg:not(.enviando) { animation: msg-entrar .35s var(--suave) backwards; }
@keyframes msg-entrar { from { opacity: 0; transform: translateY(8px) scale(.98); } }

/* Lixeirinha: aparece ao passar o mouse (computador) ou ao tocar no balão (celular). */
.msg-apagar {
  align-self: center; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 9px;
  color: var(--sutil); opacity: 0; pointer-events: none; transition: opacity .2s, color .2s, background .2s;
}
.msg-apagar .ic { width: 16px; height: 16px; }
.msg:hover .msg-apagar, .msg.tocada .msg-apagar { opacity: 1; pointer-events: auto; }
.msg-apagar:hover { color: var(--pendente); background: var(--pendente-fundo); }

/* Caixa de escrever + botão redondo de enviar */
.chat-escrever { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px 12px; border-top: 1px solid var(--linha); }
.chat-escrever[hidden] { display: none; }
.chat-escrever textarea {
  flex: 1; min-width: 0; resize: none; max-height: 132px; overflow-y: hidden; padding: 11px 14px; border-radius: 18px; line-height: 1.35;
  font: inherit; font-size: 15px; color: var(--texto); border: 1px solid var(--linha); background: rgba(255, 255, 255, .05); outline: none;
}
.chat-escrever textarea:focus { border-color: rgba(255, 255, 255, .45); box-shadow: 0 0 0 4px rgba(255, 255, 255, .06); }
.chat-enviar {
  width: 42px; height: 42px; flex: none; display: grid; place-items: center; border-radius: 50%; color: #0a0a0d;
  background: var(--prata); box-shadow: inset 0 1px #fff, 0 6px 18px rgba(255, 255, 255, .15);
  transition: transform .2s var(--suave), opacity .2s;
}
.chat-enviar .ic { width: 19px; height: 19px; stroke-width: 2.2; }
.chat-enviar:not(:disabled):hover { transform: scale(1.06); }
.chat-enviar:disabled { opacity: .3; box-shadow: none; cursor: default; }
.chat-so-ler { margin: 0; padding: 12px 16px 16px; text-align: center; font-size: 12.5px; border-top: 1px solid var(--linha); }

@media (max-width: 640px) {
  .janela-chat {
    width: 100%; max-width: 100%; height: 88dvh; margin: auto 0 0; border-radius: 24px 24px 0 0; border-bottom: 0;
  }
  .janela-chat[open] { animation: chat-subir .4s var(--suave) both; }
  .chat-escrever { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
  .chat-escrever textarea { font-size: 16px; } /* 16px: o iPhone não dá zoom */
  .msg { max-width: 90%; }
}
@keyframes chat-subir { from { transform: translateY(100%); } }

/* Tira o visual padrão do navegador dos botões novos (borda e fundo cinza). */
.botao-chat, .chat-fechar, .chat-enviar, .msg-apagar, .botao-pagar { border: 0; background-color: transparent; font: inherit; cursor: pointer; }
.botao-chat { font-size: 13px; font-weight: 700; }
.botao-pagar { font-size: 13px; font-weight: 800; }

/* =====================================================================
   ANIMAÇÕES CAPRICHADAS (17/10/2026)
   Regra pra NÃO pesar o site:
   - só animação que acontece quando a pessoa faz algo, e acaba logo (nada novo rodando sem parar);
   - só "transform" e "opacity" (o celular faz isso na placa de vídeo, sem esforço);
   - modo leve e "menos movimento" desligam tudo (regras lá em cima + "semAnimacao" no app.js).
   ===================================================================== */

/* Brilho do número grande. Antes o text-shadow era redesenhado em todo quadro (a animação mais
   pesada do site). Agora o brilho do texto fica parado e só uma "aura" atrás pulsa (opacidade = leve). */
.valor-grande {
  position: relative; animation: none;
  text-shadow: 0 0 12px rgba(255, 255, 255, .45), 0 0 32px rgba(255, 255, 255, .22), 0 0 64px rgba(255, 255, 255, .1);
}
.valor-grande::before {
  content: ""; position: absolute; z-index: -1; left: -12%; top: -40%; width: 80%; height: 180%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(255, 255, 255, .13), transparent);
  animation: aura 4.5s ease-in-out infinite;
}
@keyframes aura { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.92); } }
.leve .valor-grande::before { display: none; }

/* Janelas: além de abrir suave, agora FECHAM suave (antes sumiam de uma vez).
   Navegador antigo ignora a segunda linha do "transition" e fecha na hora, como antes. */
.janela[open] { animation: aparecer .35s var(--suave) backwards; }
.janela {
  transition: opacity .22s ease, transform .22s ease;
  transition: opacity .22s ease, transform .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.janela:not([open]) { opacity: 0; transform: translateY(6px) scale(.97); }
.janela::backdrop {
  transition: opacity .22s ease;
  transition: opacity .22s ease, overlay .22s allow-discrete, display .22s allow-discrete;
}
.janela[open]::backdrop { animation: aparecer-fundo .3s ease backwards; }
.janela:not([open])::backdrop { opacity: 0; }
@media (max-width: 640px) {
  /* No celular o chat desce de volta pra baixo ao fechar. */
  .janela-chat[open] { animation: chat-subir .42s var(--suave) backwards; }
  .janela-chat {
    transition: transform .26s cubic-bezier(.4, 0, 1, 1);
    transition: transform .26s cubic-bezier(.4, 0, 1, 1), overlay .26s allow-discrete, display .26s allow-discrete;
  }
  .janela-chat:not([open]) { opacity: 1; transform: translateY(100%); }
}

/* Fundo prateado das abas chega com um "quiquinho" de mola. */
.indicador { transition: transform .55s cubic-bezier(.34, 1.3, .64, 1), width .45s var(--suave), height .45s var(--suave); }

/* Resposta ao toque: o botão encolhe um tiquinho enquanto está apertado.
   ("scale" é separado do "transform", então não atrapalha as outras animações do botão.) */
.botao-texto:active, .filtros button:active, .seletor button:active, .botao-chat:active, .botao-pagar:active,
.botao-acertar:active, .chat-enviar:not(:disabled):active, .marcar-compra:active, .botao-pix:active,
.cal-seta:active, .botao-eu:active { scale: .95; }
.abas button:active { scale: .92; }
/* Linhas que ocupam a largura toda (barra de "quem deve pra quem", opções do menu): encolher
   mostrava o fundo retangular com canto reto dentro do cartão arredondado. Aqui só escurece. */
.devedor summary:active, .menu-eu > button:active { background: rgba(255, 255, 255, .07); transition-duration: .05s; }

/* "Carregando…" virou um esqueleto: linhas cinza com um brilho passando. */
.esqueleto { display: grid; gap: 12px; padding: 20px 18px; }
.esqueleto i {
  position: relative; display: block; height: 12px; border-radius: 6px; overflow: hidden;
  background: rgba(255, 255, 255, .06);
}
.esqueleto i:nth-child(2) { width: 82%; }
.esqueleto i:nth-child(3) { width: 58%; }
.esqueleto i::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
  animation: esqueleto 1.3s ease-in-out infinite;
}
@keyframes esqueleto { to { transform: translateX(100%); } }

/* Comemoração: bolinhas e confetes (criados e apagados pelo app.js). */
.efeitos { position: fixed; inset: 0; z-index: 70; pointer-events: none; overflow: hidden; }
.efeitos i { position: absolute; left: 0; top: 0; border-radius: 2px; }
.efeitos i.bolinha { border-radius: 50%; }
.leve .efeitos { display: none; }

/* Conta que acabou de ficar toda paga: brilho verde passa pelo cartão e pela barra, uma vez. */
.conta.quitou { position: relative; }
.conta.quitou::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(77, 240, 166, .6), inset 0 0 48px rgba(77, 240, 166, .16);
  animation: quitou 1.8s ease-out backwards;
  opacity: 0; /* sem animação (modo leve), o contorno nem aparece */
}
@keyframes quitou { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.progresso div { position: relative; overflow: hidden; }
.conta.quitou .progresso div::after {
  content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
  animation: brilho-barra .9s ease-out .3s forwards;
}
@keyframes brilho-barra { to { transform: translateX(100%); } }

/* Conta recém-lançada e item novo/mudado nas Compras chegam com destaque. */
/* (a conta nova ganha um contorno prateado que acende e apaga; ela já entra na cascata da aba) */
.conta.chegou { position: relative; }
.conta.chegou::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .55), inset 0 0 44px rgba(255, 255, 255, .07);
  animation: quitou 2.2s ease-out .25s backwards;
  opacity: 0;
}
.compra.chegou { animation: chegou .55s var(--suave); }
@keyframes chegou { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.compra.chegou .marcar-compra { animation: pop .5s cubic-bezier(.34, 1.56, .64, 1); }

/* Chat: só a mensagem NOVA entra animada (antes todas repetiam a animação a cada mensagem). */
.msg:not(.enviando) { animation: none; }
.msg.entrando { animation: msg-entrar .42s var(--suave) backwards; animation-delay: var(--atraso, 0s); }
.msg.minha.entrando { animation-name: msg-entrar-minha; }
@keyframes msg-entrar-minha { from { opacity: 0; transform: translate(12px, 6px) scale(.95); } }
.chat-enviar.voou .ic { animation: voar .5s var(--suave); }
@keyframes voar {
  0% { transform: none; }
  40% { transform: translateX(16px); opacity: 0; }
  41% { transform: translateX(-12px); opacity: 0; }
  100% { transform: none; opacity: 1; }
}

/* Gráficos: só animam quando a pessoa abre o Resumo, troca de mês ou de estilo
   (antes a pizza "girava" de novo a cada atualização automática). */
.fatia { animation: none; }
.rosca.animar .fatia { animation: girar-fatia .9s var(--suave) backwards; }
.linha-svg .area { animation: none; }
.linha-svg.animar .area { animation: surgir .8s var(--suave) .3s backwards; }
.linha-svg.animar .linha { stroke-dasharray: 1; stroke-dashoffset: 1; animation: desenhar-linha 1.1s var(--suave) forwards; }
@keyframes desenhar-linha { to { stroke-dashoffset: 0; } }
.linha-svg.animar .ponto-mes circle {
  transform-box: fill-box; transform-origin: center;
  animation: ponto-pop .45s cubic-bezier(.34, 1.56, .64, 1) backwards; animation-delay: calc(var(--i) * .1s + .2s);
}
.linha-svg.animar .valor-ponto { animation: surgir .4s var(--suave) 1s backwards; }
@keyframes ponto-pop { from { opacity: 0; transform: scale(0); } }
