/* Lira: visual do app. Modo escuro (o claro vem depois, trocando só os tokens do :root).
   A cor de destaque vem de html[data-cor] (azul, verde ou roxo), escolhida em Ajustes. */

@font-face { font-family: "Inter"; src: url("fontes/inter.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }

:root {
  --fundo: #0C0D11;
  --card: #16171C;
  --card2: #1F2026;
  --card3: #2A2B32;
  --linha: rgba(255, 255, 255, 0.08);
  --texto: #F4F4F2;
  --texto2: #B9BAC2;
  --texto3: #9A9BA6;
  --apagado: #7C7D88;
  --positivo: #5BD68A;
  --positivo-suave: rgba(91, 214, 138, 0.12);
  --negativo: #FF7A6B;
  --negativo-suave: rgba(255, 122, 107, 0.1);
  --aviso: #F2B84B;
  --aviso-suave: rgba(242, 184, 75, 0.12);
  --sobre-destaque: #0A0A0B;
  --raio: 24px;
  --fonte: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --largura: 560px;
  color-scheme: dark;
}
html[data-cor="azul"]  { --destaque: #7B93FF; --destaque-suave: rgba(123, 147, 255, 0.14); --destaque-fraco: rgba(123, 147, 255, 0.3); --brilho: rgba(123, 147, 255, 0.26); --brilho-fundo: rgba(123, 147, 255, 0.11); }
html[data-cor="verde"] { --destaque: #D7F55C; --destaque-suave: rgba(215, 245, 92, 0.12); --destaque-fraco: rgba(215, 245, 92, 0.26); --brilho: rgba(215, 245, 92, 0.2); --brilho-fundo: rgba(215, 245, 92, 0.07); }
html[data-cor="roxo"]  { --destaque: #A68BFF; --destaque-suave: rgba(166, 139, 255, 0.14); --destaque-fraco: rgba(166, 139, 255, 0.3); --brilho: rgba(166, 139, 255, 0.26); --brilho-fundo: rgba(166, 139, 255, 0.11); }

*, *::before, *::after { box-sizing: border-box; }
/* sem zoom: "manipulation" tira o toque duplo onde "pan-x pan-y" não for entendido; onde for, também tira a pinça */
* { touch-action: manipulation; touch-action: pan-x pan-y; }
html { background: var(--fundo); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; color: var(--texto);
  background: radial-gradient(120% 420px at 50% -120px, var(--brilho-fundo), transparent 75%) no-repeat, var(--fundo);
  font: 400 15px/1.45 var(--fonte); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent; overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; }            /* abaixo de 16px o iPhone dá zoom ao tocar no campo */
button { cursor: pointer; -webkit-user-select: none; user-select: none; }
button:disabled { opacity: 0.45; cursor: default; }
svg { display: block; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin: 0; }
a { color: var(--destaque); }
:focus-visible { outline: 2px solid var(--destaque); outline-offset: 2px; }
.n { font-variant-numeric: tabular-nums; }
.cent { color: inherit; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- abertura ---------- */
.abertura { position: fixed; inset: 0; z-index: 100; background: var(--fundo); display: grid; place-items: center; transition: opacity 0.55s ease; }
.abertura.saindo { opacity: 0; pointer-events: none; }
.abertura-brilho { position: absolute; left: 50%; bottom: -45vh; width: 150vw; max-width: 900px; aspect-ratio: 1; transform: translateX(-50%); border-radius: 50%; background: radial-gradient(closest-side, var(--brilho), transparent); animation: aparece 1.4s ease-out both; }
.abertura-centro { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: -6vh; }
.abertura-icone { width: 112px; height: 112px; border-radius: 32px; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha), 0 40px 90px -30px var(--brilho); display: grid; place-items: center; }
.abertura-icone svg { width: 64px; height: 64px; }
.abertura-traco { fill: none; stroke: var(--destaque); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 102; animation: desenha 1.2s 0.15s cubic-bezier(0.65, 0, 0.35, 1) both; }
.abertura-palavra { width: 90px; height: 58px; color: var(--texto); animation: sobe 0.8s 0.65s ease-out both; }
.abertura p { font-size: 11px; font-weight: 500; letter-spacing: 0.26em; text-transform: uppercase; color: var(--texto3); animation: sobe 0.8s 0.8s ease-out both; }
.abertura-carga { position: absolute; bottom: calc(64px + env(safe-area-inset-bottom)); left: 50%; width: 120px; height: 2px; margin-left: -60px; border-radius: 2px; background: var(--card2); overflow: hidden; }
.abertura-carga span { display: block; height: 100%; background: var(--destaque); transform-origin: left; animation: carrega 1.6s 0.2s cubic-bezier(0.65, 0, 0.35, 1) both; }
@keyframes desenha { from { stroke-dashoffset: 102; } to { stroke-dashoffset: 0; } }
@keyframes carrega { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sobe { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes aparece { from { opacity: 0; } to { opacity: 1; } }

/* ---------- porta (entrar) ---------- */
.porta { min-height: 100dvh; max-width: 400px; margin: 0 auto; padding: calc(env(safe-area-inset-top) + 12vh) 24px 40px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.porta-icone { width: 80px; height: 80px; border-radius: 24px; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha), 0 30px 70px -24px var(--brilho); display: grid; place-items: center; color: var(--destaque); }
.porta-icone svg { width: 46px; height: 46px; }
.porta-palavra { width: 70px; height: 46px; color: var(--texto); margin-bottom: 18px; }
.porta-form { width: 100%; display: flex; flex-direction: column; gap: 14px; }
.porta-texto { font-size: 14px; color: var(--texto2); text-align: center; }
.erro { color: var(--negativo); font-size: 14px; min-height: 1px; }
.erro:empty { display: none; }

/* ---------- estrutura ---------- */
.tela { max-width: var(--largura); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 18px) 16px calc(112px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 12px; }
.card { background: var(--card); border-radius: var(--raio); box-shadow: inset 0 0 0 1px var(--linha); padding: 18px; }
button.card { width: 100%; border: 0; text-align: left; color: inherit; display: block; }
.card-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h2, .titulo-secao { font-size: 15px; font-weight: 500; }
.rotulo { font-size: 11px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto2); }
.sub { font-size: 13px; color: var(--texto2); }
.dica { font-size: 12px; color: var(--texto3); line-height: 1.5; }
.grande { font-size: clamp(32px, 11vw, 48px); font-weight: 300; letter-spacing: -0.035em; line-height: 1.05; white-space: nowrap; }
.medio { font-size: clamp(24px, 8vw, 34px); font-weight: 300; letter-spacing: -0.03em; line-height: 1.1; white-space: nowrap; }
.brilhante { position: relative; overflow: hidden; }
.brilhante::before { content: ""; position: absolute; right: -110px; top: -130px; width: 320px; height: 320px; border-radius: 50%; background: radial-gradient(closest-side, var(--brilho), transparent); pointer-events: none; }
.brilhante > * { position: relative; }
.brilhante.lucro::before { background: radial-gradient(closest-side, rgba(91, 214, 138, 0.2), transparent); }
.brilhante.lucro::after { content: ""; position: absolute; left: -120px; bottom: -150px; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(closest-side, var(--brilho-fundo), transparent); pointer-events: none; }
.vazio { text-align: center; padding: 28px 12px; color: var(--texto2); font-size: 14px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.vazio svg { width: 34px; height: 34px; color: var(--apagado); }

/* topo das abas */
.topo { display: flex; align-items: center; gap: 12px; padding: 2px 0 4px; }
.topo-marca { width: 40px; height: 40px; border-radius: 13px; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha); display: grid; place-items: center; color: var(--destaque); flex-shrink: 0; }
.topo-marca svg { width: 24px; height: 24px; }
.topo-texto { flex: 1; min-width: 0; }
.topo-texto h1 { font-size: 28px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.ola { font-size: 17px; font-weight: 500; }
.data-hoje { font-size: 12px; color: var(--texto3); margin-top: 2px; }
.botao-perfil { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); font-weight: 600; font-size: 14px; flex-shrink: 0; }
.seletor-mes { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha); }
.seletor-mes strong { font-size: 14px; font-weight: 500; }
.seletor-mes button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--card2); display: grid; place-items: center; }
.seletor-mes svg { width: 18px; height: 18px; }

/* chips */
.chip { display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: var(--card2); color: var(--texto2); white-space: nowrap; line-height: 1.2; }
.chip svg { width: 13px; height: 13px; }
.chip.destaque { background: var(--destaque-suave); color: var(--destaque); }
.chip.positivo { background: var(--positivo-suave); color: var(--positivo); }
.chip.negativo { background: var(--negativo-suave); color: var(--negativo); }
.chip.aviso { background: var(--aviso-suave); color: var(--aviso); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.delta { font-size: 12px; font-weight: 500; white-space: nowrap; }
.delta.positivo { color: var(--positivo); } .delta.negativo { color: var(--negativo); }
.delta span { color: var(--texto3); font-weight: 400; }

/* números em grade (estilo Axis) */
.grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.numero { display: flex; flex-direction: column; gap: 6px; padding: 16px; }
.numero .valor { font-size: clamp(16px, 5vw, 21px); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.numero .rotulo-num { font-size: 12px; color: var(--texto2); }
.numero-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.numero-icone { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; flex-shrink: 0; }
.numero-icone svg { width: 15px; height: 15px; }
.numero .pe { font-size: 12px; color: var(--texto3); }
button.numero { border: 0; text-align: left; color: inherit; background: var(--card); border-radius: 22px; box-shadow: inset 0 0 0 1px var(--linha); }

/* meta */
.meta-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.meta-valores { margin-top: 10px; font-size: 14px; color: var(--texto2); }
.meta-valores strong { color: var(--texto); font-weight: 500; font-size: 20px; letter-spacing: -0.02em; }
.barra { height: 8px; border-radius: 999px; background: var(--card3); overflow: hidden; margin: 12px 0 10px; }
.barra span { display: block; height: 100%; border-radius: 999px; background: var(--destaque); }
.meta-vazia { display: flex; align-items: center; gap: 12px; color: var(--texto2); font-size: 14px; }
.meta-vazia svg { width: 22px; height: 22px; color: var(--destaque); }

/* segmentos e escolhas */
.segmento { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--fundo); box-shadow: inset 0 0 0 1px var(--linha); flex-shrink: 0; }
.segmento button { height: 30px; padding: 0 12px; border: 0; border-radius: 999px; background: transparent; color: var(--texto3); font-size: 12px; font-weight: 500; display: flex; align-items: center; justify-content: center; }
.segmento button[aria-pressed="true"] { background: var(--card3); color: var(--texto); }
.segmento.icones button { width: 34px; padding: 0; }
.segmento.largo { flex: 1; min-width: 0; }
.segmento.largo button { flex: 1; min-width: 0; padding: 0 6px; }
.segmento svg { width: 16px; height: 16px; }
.escolhas { display: flex; flex-wrap: wrap; gap: 8px; }
.escolhas button { min-height: 40px; padding: 0 16px; border-radius: 999px; border: 0; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto2); font-size: 14px; font-weight: 500; }
.escolhas button[aria-pressed="true"] { background: var(--texto); color: var(--fundo); box-shadow: none; }
.escolhas.pequenas button { min-height: 32px; padding: 0 12px; font-size: 13px; }

/* gráfico */
.grafico-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.grafico-controles { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.grafico-controles .escolhas { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.grafico-svg { width: 100%; height: auto; margin-top: 10px; overflow: visible; }
.g-barra { fill: var(--serie-fraca, var(--destaque-fraco)); }
.g-barra.foco { fill: var(--serie, var(--destaque)); }
.g-barra.negativa { fill: rgba(255, 122, 107, 0.35); }
.g-barra.negativa.foco { fill: var(--negativo); }
.g-zero { stroke: var(--linha); stroke-width: 1; }
.g-grade { stroke: rgba(255, 255, 255, 0.05); stroke-width: 1; }
.g-linha { fill: none; stroke: var(--serie, var(--destaque)); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.g-linha.tracejada { stroke-dasharray: 4 5; }
.g-linha.cinza { stroke: var(--texto2); }
.g-linha.amarela { stroke: #F2B84B; }
.g-guia { stroke: rgba(255, 255, 255, 0.2); stroke-width: 1; stroke-dasharray: 2 3; }
.g-area { fill: var(--serie, var(--destaque)); fill-opacity: 0.1; }
.g-ponto { fill: var(--serie, var(--destaque)); stroke: var(--card); stroke-width: 2; }
.g-ponto.vazado { fill: var(--card); stroke: var(--serie, var(--destaque)); stroke-width: 1.6; }
.g-ponto.amarelo { fill: var(--card); stroke: #F2B84B; stroke-width: 1.6; }
.g-ponto.cinza { fill: var(--card); stroke: var(--texto2); stroke-width: 1.6; }
.g-rotulo { fill: var(--texto3); font-size: 10.5px; text-anchor: middle; font-family: var(--fonte); }
.g-rotulo.foco { fill: var(--texto); font-weight: 600; }
.g-balao rect { fill: var(--card3); }
.g-balao text { fill: var(--texto); font-size: 11px; font-weight: 600; text-anchor: middle; font-family: var(--fonte); font-variant-numeric: tabular-nums; }
.g-alvo { fill: transparent; cursor: pointer; }
.grafico-pe { display: flex; justify-content: space-between; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--linha); font-size: 12px; color: var(--texto3); }
.grafico-pe .n { color: var(--texto); }
.legenda { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.legenda-linha { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; color: var(--texto2); }
.legenda-linha .n { color: var(--texto); font-size: 14px; }

/* listas */
.lista { display: flex; flex-direction: column; }
.linha-item { display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 13px 0; width: 100%; border: 0; border-top: 1px solid var(--linha); background: none; text-align: left; color: inherit; }
.lista > :first-child { border-top: 0; }
.linha-item .nome { font-size: 15px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-item .info { display: block; font-size: 12px; color: var(--texto3); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-item .direita { text-align: right; white-space: nowrap; }
.linha-item .direita .n { font-size: 15px; }
.linha-item .direita .pe { font-size: 12px; color: var(--texto3); margin-top: 4px; }
.ponto { display: inline-block; vertical-align: middle; width: 6px; height: 6px; margin: -2px 6px 0 0; border-radius: 50%; background: var(--apagado); }
.ponto.anunciado { background: var(--destaque); }
.miniatura { width: 48px; height: 48px; border-radius: 14px; background: var(--card2); color: var(--texto2); display: grid; place-items: center; overflow: hidden; flex-shrink: 0; }
.miniatura img { width: 100%; height: 100%; object-fit: cover; }
.miniatura svg { width: 22px; height: 22px; }
.miniatura.p { width: 44px; height: 44px; border-radius: 12px; }
.lucro-pos { color: var(--positivo); } .lucro-neg { color: var(--negativo); }
.linha-item .direita .pe.lucro-pos, .linha-mov .n.lucro-pos { color: var(--positivo); }
.linha-item .direita .pe.lucro-neg, .linha-mov .n.lucro-neg { color: var(--negativo); }

/* busca e filtros */
.busca { display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: 16px; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto3); }
.busca svg { width: 18px; height: 18px; flex-shrink: 0; }
.busca input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: var(--texto); }
.filtros { display: flex; gap: 8px; align-items: center; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 16px; }
.filtros::-webkit-scrollbar, .grafico-controles .escolhas::-webkit-scrollbar { display: none; }
.filtros button { height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto2); font-size: 13px; font-weight: 500; white-space: nowrap; flex-shrink: 0; }
.filtros button[aria-pressed="true"] { background: var(--texto); color: var(--fundo); box-shadow: none; }
.ordem { height: 36px; padding: 0 30px 0 12px; border-radius: 999px; border: 0; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23A3A3A8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 10px center / 14px no-repeat; box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto); font-size: 13px; font-weight: 500; -webkit-appearance: none; appearance: none; flex-shrink: 0; }

/* de onde veio o lucro */
.categorias { display: grid; gap: 14px; margin-top: 16px; }
.anel-caixa { position: relative; width: 184px; height: 184px; margin: 0 auto; }
.anel-caixa .anel { width: 100%; height: 100%; }
.anel-centro { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; text-align: center; pointer-events: none; }
.anel-centro strong { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; }
.anel-centro span { font-size: 12px; color: var(--texto3); }
.cat-linha { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 42px; gap: 10px; align-items: center; padding: 7px 0; font-size: 14px; }
.cat-linha .cor { width: 10px; height: 10px; border-radius: 50%; }
.cat-linha .nome-parte { display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.cat-linha .nome-parte::after { content: ""; flex: 1; min-width: 0; border-bottom: 1px dotted rgba(255, 255, 255, 0.16); margin-left: 8px; transform: translateY(3px); }
.cat-linha .pct { text-align: right; color: var(--texto2); }
@media (min-width: 480px) { .categorias { grid-template-columns: minmax(0, 1fr) 184px; align-items: center; } .anel-caixa { order: 2; margin: 0; } }
.prev-foco { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 14px; }
.prev-foco strong { font-weight: 600; }

/* caixa */
.composicao { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; align-items: center; margin-top: 18px; }
.anel { width: 96px; height: 96px; transform-origin: 50% 50%; }
@media (max-width: 359px) { .composicao { grid-template-columns: minmax(0, 1fr); } .anel { display: none; } }
.anel-fundo { fill: none; stroke: var(--card3); }
.parte { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto 14px; gap: 8px; align-items: center; padding: 8px 0; width: 100%; border: 0; background: none; text-align: left; color: inherit; font-size: 13px; }
.parte .cor { width: 10px; height: 10px; border-radius: 50%; }
.parte .nome-parte { color: var(--texto2); display: flex; align-items: center; min-width: 0; white-space: nowrap; }
.parte .nome-parte::after { content: ""; flex: 1; min-width: 0; border-bottom: 1px dotted rgba(255, 255, 255, 0.14); margin-left: 4px; transform: translateY(3px); }
.parte .n { font-size: 14px; }
.parte svg { width: 14px; height: 14px; color: var(--texto3); }
button.parte .nome-parte { color: var(--texto); }
.acoes-caixa { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.acoes-caixa .botao { height: 48px; font-size: 14px; padding: 0 6px; }
@media (max-width: 359px) { .acoes-caixa { grid-template-columns: repeat(2, minmax(0, 1fr)); } .acoes-caixa .principal { grid-column: 1 / -1; } }
.data-bloco { width: 44px; height: 48px; border-radius: 12px; background: var(--card2); display: flex; flex-direction: column; align-items: center; justify-content: center; flex-shrink: 0; }
.data-bloco b { font-size: 16px; font-weight: 500; line-height: 1.1; }
.data-bloco small { font-size: 9px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--texto3); }
.linha-mov { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--linha); }
.lista > .linha-mov:first-child { border-top: 0; }
.linha-mov > button:first-child { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 0; background: none; padding: 0; text-align: left; color: inherit; min-width: 0; }
.linha-mov.simples { grid-template-columns: minmax(0, 1fr); }
.linha-mov.simples > button:first-child { grid-template-columns: minmax(0, 1fr) auto; }
.linha-mov .nome { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.linha-mov .info { display: block; font-size: 12px; color: var(--texto3); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* botões */
.botao { height: 52px; border-radius: 999px; border: 0; font-weight: 600; font-size: 15px; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 0 18px; text-decoration: none; }
.botao svg { width: 18px; height: 18px; flex-shrink: 0; }
.botao.principal { background: var(--destaque); color: var(--sobre-destaque); box-shadow: 0 14px 34px -14px var(--brilho); }
.botao.secundario { background: var(--card2); color: var(--texto); box-shadow: inset 0 0 0 1px var(--linha); font-weight: 500; }
.botao.claro { background: var(--texto); color: var(--fundo); }
.botao.perigo { background: var(--negativo-suave); color: var(--negativo); font-weight: 500; }
.botao.so-texto { background: transparent; color: var(--texto2); height: 44px; font-weight: 500; }
.botao.so-texto.perigo { color: var(--negativo); }
.botao-pequeno { height: 32px; padding: 0 12px; border-radius: 999px; border: 0; background: var(--card2); color: var(--texto); font-size: 12px; font-weight: 500; display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex-shrink: 0; }
.botao-pequeno svg { width: 14px; height: 14px; }
.botao-pequeno.destaque { background: var(--destaque-suave); color: var(--destaque); }
.icone-botao { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--card); box-shadow: inset 0 0 0 1px var(--linha); display: grid; place-items: center; color: var(--texto); flex-shrink: 0; }
.icone-botao svg { width: 20px; height: 20px; }
.icone-botao.pequeno { width: 36px; height: 36px; background: transparent; box-shadow: none; color: var(--texto3); }
.icone-botao.pequeno svg { width: 16px; height: 16px; }
.empilhado { display: flex; flex-direction: column; gap: 10px; }

/* menu de baixo */
.menu { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(to top, var(--fundo) 45%, rgba(12, 13, 17, 0)); pointer-events: none; }
.menu-dentro { max-width: var(--largura); margin: 0 auto; display: flex; align-items: center; gap: 10px; pointer-events: auto; }
.abas { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(22, 23, 28, 0.92); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: inset 0 0 0 1px var(--linha), 0 20px 40px -12px rgba(0, 0, 0, 0.7); }
.aba { height: 44px; min-width: 44px; border-radius: 999px; border: 0; background: var(--card2); color: var(--texto2); display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0; font-size: 14px; font-weight: 600; }
.aba svg { width: 20px; height: 20px; flex-shrink: 0; }
.aba span { display: none; }
.aba[aria-current="page"] { background: var(--destaque); color: var(--sobre-destaque); padding: 0 16px 0 12px; }
.aba[aria-current="page"] span { display: inline; }
.botao-mais { width: 56px; height: 56px; border-radius: 50%; border: 0; background: var(--destaque); color: var(--sobre-destaque); display: grid; place-items: center; box-shadow: 0 12px 30px -8px var(--brilho); flex-shrink: 0; }
.botao-mais svg { width: 24px; height: 24px; }
@media (max-width: 359px) {
  .aba[aria-current="page"] { padding: 0 12px; }
  .aba[aria-current="page"] span { display: none; }
  .botao-mais { width: 52px; height: 52px; }
}

/* ---------- página (item, ajustes) ---------- */
.pagina { position: fixed; inset: 0; z-index: 20; background: var(--fundo); overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; animation: entra 0.28s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes entra { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.pagina-dentro { max-width: var(--largura); margin: 0 auto; padding: calc(env(safe-area-inset-top) + 14px) 16px calc(40px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 14px; }
.barra-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.barra-topo span { font-size: 15px; font-weight: 500; }
.foto-grande { position: relative; height: 250px; border-radius: 26px; background: radial-gradient(120% 90% at 50% 0%, #2A2B32, #16171C); box-shadow: inset 0 0 0 1px var(--linha); overflow: hidden; display: grid; place-items: center; color: #4E4E55; }
.foto-grande img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.foto-grande > svg { width: 64px; height: 64px; }
.foto-botao { position: absolute; right: 12px; bottom: 12px; height: 36px; padding: 0 12px; border-radius: 999px; border: 0; background: rgba(10, 10, 11, 0.72); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12); color: var(--texto); font-size: 12px; font-weight: 500; display: flex; align-items: center; gap: 6px; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.foto-botao svg { width: 16px; height: 16px; }
.nome-item { font-size: 24px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.2; overflow-wrap: anywhere; }
.detalhes { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; font-size: 14px; }
.detalhes div { display: flex; justify-content: space-between; gap: 14px; }
.detalhes dt { color: var(--texto2); flex-shrink: 0; }
.detalhes dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.conta { display: flex; flex-direction: column; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--linha); font-size: 13px; }
.conta div { display: flex; justify-content: space-between; gap: 10px; }
.conta span:first-child { color: var(--texto2); }
.linha-custo { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto 36px; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--linha); }
.lista > .linha-custo:first-child { border-top: 0; }
.linha-custo .nome { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icone-custo { width: 36px; height: 36px; border-radius: 10px; background: var(--card2); color: var(--texto2); display: grid; place-items: center; font-size: 13px; font-weight: 600; }
.botao-tracejado { width: 100%; height: 46px; margin-top: 8px; border-radius: 14px; border: 1px dashed rgba(255, 255, 255, 0.16); background: transparent; color: var(--texto); font-size: 14px; font-weight: 500; display: flex; align-items: center; justify-content: center; gap: 8px; }
.botao-tracejado svg { width: 18px; height: 18px; }
.venda-bloco + .venda-bloco { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--linha); }
.acoes-venda { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.acoes-venda .botao { height: 44px; font-size: 14px; }
.opcao { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 0; border: 0; border-top: 1px solid var(--linha); background: none; color: inherit; text-align: left; font-size: 15px; }
.lista > .opcao:first-child { border-top: 0; }
.opcao svg { width: 20px; height: 20px; color: var(--texto2); flex-shrink: 0; }
.opcao span { flex: 1; }
.opcao small { color: var(--texto3); font-size: 13px; }
.cores { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.cores button { height: 64px; border-radius: 16px; border: 0; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: 13px; color: var(--texto2); }
.cores button[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--texto); color: var(--texto); }
.cores i { width: 18px; height: 18px; border-radius: 50%; }
.rodape { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 20px 0 4px; color: var(--texto3); font-size: 12px; }
.rodape svg { width: 22px; height: 22px; color: var(--destaque); }

/* ---------- folha (formulários de baixo pra cima) ---------- */
dialog { color: var(--texto); }
.folha { margin: auto auto 0; padding: 0; width: 100%; max-width: var(--largura); max-height: 94dvh; border: 0; border-radius: 28px 28px 0 0; background: var(--card); box-shadow: 0 -1px 0 var(--linha); overflow: hidden; }
.folha[open] { animation: folha-sobe 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.folha::backdrop { background: rgba(0, 0, 0, 0.62); }
@keyframes folha-sobe { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.folha-corpo { max-height: 94dvh; overflow-y: auto; overscroll-behavior: contain; padding: 8px 20px calc(20px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 16px; }
.puxador { width: 40px; height: 4px; border-radius: 4px; background: var(--card3); margin: 2px auto 0; flex-shrink: 0; }
.folha-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.folha-topo h2 { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.folha-acoes { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; }
.campo { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.campo > span, .campo legend { font-size: 13px; color: var(--texto2); padding: 0; }
fieldset.campo { border: 0; margin: 0; padding: 0; }
fieldset.campo legend { margin-bottom: 8px; }
.entrada { width: 100%; height: 50px; padding: 0 16px; border-radius: 16px; border: 0; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); color: var(--texto); outline: none; -webkit-appearance: none; appearance: none; }
.entrada:focus { box-shadow: inset 0 0 0 1.5px var(--destaque); }
.entrada::placeholder { color: var(--apagado); }
textarea.entrada { height: auto; min-height: 80px; padding: 14px 16px; resize: vertical; line-height: 1.4; }
select.entrada { padding-right: 40px; background: var(--card2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23A3A3A8' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E") right 16px center / 16px no-repeat; }
input[type="date"].entrada { display: flex; align-items: center; }
input[type="date"].entrada::-webkit-date-and-time-value { text-align: left; }
.dinheiro { position: relative; display: flex; align-items: center; }
.dinheiro::before { content: "R$"; position: absolute; left: 16px; color: var(--texto3); pointer-events: none; }
.dinheiro .entrada { padding-left: 46px; }
.dinheiro.grande-campo .entrada { height: 64px; font-size: 30px; font-weight: 300; letter-spacing: -0.02em; padding-left: 58px; }
.dinheiro.grande-campo::before { font-size: 22px; font-weight: 300; }
.duas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.interruptor { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-radius: 16px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); font-size: 15px; }
.interruptor input { -webkit-appearance: none; appearance: none; width: 46px; height: 28px; border-radius: 999px; background: var(--card3); position: relative; margin: 0; flex-shrink: 0; transition: background 0.2s; }
.interruptor input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: var(--texto); transition: transform 0.2s; }
.interruptor input:checked { background: var(--destaque); }
.interruptor input:checked::after { transform: translateX(18px); background: var(--sobre-destaque); }
.custo-linha { display: grid; grid-template-columns: minmax(0, 1fr) 112px 40px; gap: 8px; align-items: center; }
.custo-linha .entrada { height: 46px; }
.custo-linha .dinheiro::before { left: 12px; font-size: 14px; }
.custo-linha .dinheiro .entrada { padding-left: 38px; padding-right: 8px; }
.resultado-vivo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 20px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); }
.resultado-vivo .sub { font-size: 12px; }
.resultado-vivo .medio { margin-top: 4px; }
.foto-escolha { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 18px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); width: 100%; border: 0; text-align: left; color: var(--texto); font-size: 14px; }
.foto-escolha .miniatura { background: var(--card3); }

.confirma { width: calc(100% - 40px); max-width: 380px; padding: 0; border: 0; border-radius: 24px; background: var(--card2); box-shadow: inset 0 0 0 1px var(--linha); }
.confirma::backdrop { background: rgba(0, 0, 0, 0.62); }
.confirma-corpo { padding: 22px; display: flex; flex-direction: column; gap: 18px; }
.confirma-corpo p { font-size: 15px; line-height: 1.5; }
.confirma-acoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.confirma-acoes .botao { height: 46px; font-size: 14px; }

.aviso { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); z-index: 200; transform: translate(-50%, 12px); max-width: calc(100% - 32px); padding: 12px 18px; border-radius: 16px; background: var(--card3); box-shadow: inset 0 0 0 1px var(--linha), 0 16px 40px -10px rgba(0, 0, 0, 0.8); font-size: 14px; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.2s; text-align: center; }
.aviso.visivel { opacity: 1; transform: translate(-50%, 0); }

/* ---------- animações de entrada ---------- */
.entrando > * { animation: card-entra 0.6s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 60ms); }
@keyframes card-entra { from { opacity: 0; transform: translateY(16px) scale(0.985); } }
.entrando .g-barra, .anima .g-barra { transform-box: fill-box; transform-origin: 50% 100%; animation: barra-cresce 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both; animation-delay: calc(0.3s + var(--b, 0) * 35ms); }
@keyframes barra-cresce { from { transform: scaleY(0); } }
.entrando .g-linha[pathLength], .anima .g-linha[pathLength] { stroke-dasharray: 1; animation: linha-desenha 1.1s 0.3s cubic-bezier(0.65, 0, 0.35, 1) both; }
@keyframes linha-desenha { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.entrando .g-linha.tracejada, .anima .g-linha.tracejada { animation: aparece 0.9s 0.35s both; }
.entrando .g-area, .anima .g-area, .entrando .g-ponto, .anima .g-ponto, .entrando .g-balao, .anima .g-balao { animation: aparece 0.6s 0.8s both; }
.entrando .anel, .anima .anel { animation: anel-gira 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes anel-gira { from { transform: rotate(-50deg); } }
.entrando .anel-parte, .anima .anel-parte { animation-name: anel-nasce; animation-timing-function: linear; animation-fill-mode: both; }
@keyframes anel-nasce { 0% { stroke-dasharray: 0 999; opacity: 0; } 1% { opacity: 1; } }
.entrando .barra span { transform-origin: left; animation: barra-enche 1s 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes barra-enche { from { transform: scaleX(0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; transition-duration: 0.01ms !important; }
}
