/* Sistema visual v2 (10/2026): app de banco, limpo e sem textura. Fundo cinza-claro, cards brancos de
   canto largo, botoes pretos em pilula, cor so onde e marca (cartoes) ou acento (laranja da casa).
   O tema segue o aparelho; data-tema="claro|escuro" no <html> forca um dos dois. */
:root {
  --bg: #F2F1EC;
  --bg-2: #E9E8E2;
  --card: #FFFFFF;
  --card-2: #F6F5F1;
  --soft: #F4F3EE;
  --ink: #121212;
  --ink-2: #444444;
  --muted: #8B897F;
  --ink-3: #B0AEA4;
  --line: #E6E4DD;
  --hair: rgba(0, 0, 0, .07);
  --accent: #F4540D;
  --accent-ink: #C94309;
  --accent-soft: #FDE9DE;
  --green: #1E9E5A;
  --green-soft: #E3F4EA;
  --red: #D93B2B;
  --red-soft: #FBE7E4;
  --amber: #B07C10;
  --amber-soft: #F7EED9;
  --black: #111111;
  --btn-bg: #111111;
  --btn-ink: #FFFFFF;
  --nav: #111111;
  --nav-ink: rgba(255, 255, 255, .78);
  --input-bg: #F6F5F1;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --r-sm: 12px;
  --r: 18px;
  --r-lg: 26px;
  --sh-1: 0 1px 2px rgba(0, 0, 0, .03);
  --sh-2: 0 10px 30px -22px rgba(0, 0, 0, .25);
  --sh-3: 0 24px 50px -24px rgba(0, 0, 0, .35);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-tema="claro"]) { --bg: #0B0B0B; --bg-2: #161616; --card: #171717; --card-2: #1F1F1F; --soft: #222222; --ink: #FFFFFF; --ink-2: #D6D6D6; --muted: #9A9A9A; --ink-3: #6F6F6F; --line: #262626; --hair: rgba(255, 255, 255, .09); --accent-soft: rgba(244, 84, 13, .2); --green-soft: rgba(30, 158, 90, .2); --red-soft: rgba(217, 59, 43, .22); --amber-soft: rgba(176, 124, 16, .24); --black: #FFFFFF; --btn-bg: #FFFFFF; --btn-ink: #111111; --nav: #1C1C1C; --input-bg: #1C1C1C; --sh-2: 0 10px 30px -18px rgba(0, 0, 0, .7); --sh-3: 0 24px 50px -20px rgba(0, 0, 0, .8); color-scheme: dark; }
}
:root[data-tema="escuro"] { --bg: #0B0B0B; --bg-2: #161616; --card: #171717; --card-2: #1F1F1F; --soft: #222222; --ink: #FFFFFF; --ink-2: #D6D6D6; --muted: #9A9A9A; --ink-3: #6F6F6F; --line: #262626; --hair: rgba(255, 255, 255, .09); --accent-soft: rgba(244, 84, 13, .2); --green-soft: rgba(30, 158, 90, .2); --red-soft: rgba(217, 59, 43, .22); --amber-soft: rgba(176, 124, 16, .24); --black: #FFFFFF; --btn-bg: #FFFFFF; --btn-ink: #111111; --nav: #1C1C1C; --input-bg: #1C1C1C; --sh-2: 0 10px 30px -18px rgba(0, 0, 0, .7); --sh-3: 0 24px 50px -20px rgba(0, 0, 0, .8); color-scheme: dark; }
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 14px; line-height: 1.5; min-height: 100dvh; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: var(--sans); }
button { -webkit-appearance: none; appearance: none; }
::selection { background: var(--accent-soft); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* tela inteira: sem coluna central, o respiro vem so do padding lateral */
.wrap { position: relative; z-index: 1; width: 100%; padding: 14px clamp(16px, 2.6vw, 40px) calc(88px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 18px; }

/* entrada da pagina: cada bloco sobe em sequencia, uma vez, curto */
@keyframes sobe { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.wrap > * { animation: sobe .55s var(--ease) both; }
.wrap > *:nth-child(2) { animation-delay: .04s; }
.wrap > *:nth-child(3) { animation-delay: .08s; }
.wrap > *:nth-child(4) { animation-delay: .12s; }
.wrap > *:nth-child(5) { animation-delay: .16s; }
.wrap > *:nth-child(6) { animation-delay: .2s; }
.wrap > *:nth-child(7) { animation-delay: .24s; }
.wrap > *:nth-child(8) { animation-delay: .28s; }
.wrap > *:nth-child(n+9) { animation-delay: .32s; }
.wrap > .topo { animation: none; }

/* ---- header + nav em pilula ---- */
.topo { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: sticky; top: 0; z-index: 5; padding: 10px 0 8px; margin: 0 calc(-1 * clamp(16px, 2.6vw, 40px)); padding-left: clamp(16px, 2.6vw, 40px); padding-right: clamp(16px, 2.6vw, 40px); background: rgba(241, 238, 232, .82); backdrop-filter: blur(14px) saturate(1.1); -webkit-backdrop-filter: blur(14px) saturate(1.1); }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 15.5px; letter-spacing: -.01em; white-space: nowrap; }
.logo i { width: 36px; height: 36px; border-radius: 11px; background: linear-gradient(145deg, #FF6A26, var(--accent) 55%, #D8460A); color: #fff; font-style: normal; font-weight: 800; display: grid; place-items: center; font-size: 17px; letter-spacing: -.02em; line-height: 1; box-shadow: 0 6px 14px -6px rgba(244, 84, 13, .55), inset 0 1px 0 rgba(255, 255, 255, .25); }
.nav { display: flex; gap: 2px; background: rgba(255, 255, 255, .72); border: 1px solid var(--hair); border-radius: 999px; padding: 4px; overflow-x: auto; flex: 1; min-width: 0; scrollbar-width: none; box-shadow: var(--sh-1); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.nav::-webkit-scrollbar { display: none; }
.nav a { font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 8px 15px; border-radius: 999px; white-space: nowrap; transition: background .18s var(--ease), color .18s var(--ease); }
.nav a:hover { background: rgba(23, 21, 15, .05); color: var(--ink); }
.nav a.ativo { background: var(--black); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 4px 10px -6px rgba(0, 0, 0, .5); }
.nav .sp { flex: 1; }
.nav button { border: none; background: none; font-size: 13px; font-weight: 600; color: var(--muted); padding: 8px 14px; border-radius: 999px; cursor: pointer; transition: color .18s; }
.nav button:hover { color: var(--red); }
@media (max-width: 640px) {
  .logo span { display: none; }
  .nav { mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 14px, #000 calc(100% - 22px), transparent); }
}

/* ---- tipografia ---- */
h1 { font-weight: 800; font-size: clamp(23px, 2.5vw, 28px); letter-spacing: -.025em; line-height: 1.15; color: var(--ink); }
h1 em { font-style: italic; color: var(--accent); }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -.005em; }
/* titulo de secao fora de card vira "olho": pequeno, espacado, em caixa alta */
section:not(.card) > h2, section:not(.card) > .row > h2 { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.sub { font-size: 13px; color: var(--muted); line-height: 1.5; }
.mono, .num { font-variant-numeric: tabular-nums; }
.num { text-align: right; white-space: nowrap; }
.cab-pagina { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cab-pagina .sub { margin-top: 6px; }

/* ---- superficies ---- */
.card { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg); box-shadow: var(--sh-2); }
.pad { padding: 22px 24px; }
.card > h2 { margin-bottom: 12px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* hero cheio de cor (parcelas e afins) */
.hero { position: relative; overflow: hidden; padding: 24px 26px; border-radius: var(--r-lg); background: var(--accent); border: 0; color: #fff; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--sh-3); }
.hero.estourado { background: var(--red); }
.hero.fechado { background: var(--black); }
.hero::after { content: ''; position: absolute; inset: auto -10% -60% auto; width: 56%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .16), transparent 72%); pointer-events: none; }
.hero .rot { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .78); }
.hero .val { font-size: clamp(38px, 8vw, 56px); font-weight: 800; letter-spacing: -.03em; line-height: 1.02; font-variant-numeric: tabular-nums; }
.hero .val .cur { font-size: .4em; font-weight: 600; opacity: .7; margin-right: 5px; vertical-align: .55em; letter-spacing: 0; }
.hero .det { font-size: 13px; color: rgba(255, 255, 255, .82); }

/* hero do teto: a resposta da ferramenta, em tinta, com brasa laranja no canto */
.hero-teto { position: relative; overflow: hidden; padding: 26px 28px 24px; border-radius: var(--r-lg); background: linear-gradient(160deg, #1D1B17, var(--black) 60%); color: #fff; box-shadow: var(--sh-3); display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: end; }
.hero-teto::before { content: ''; position: absolute; top: -45%; right: -12%; width: 58%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(244, 84, 13, .62), rgba(244, 84, 13, 0) 72%); filter: blur(14px); pointer-events: none; }
.hero-teto.apertado::before { background: radial-gradient(closest-side, rgba(255, 176, 46, .55), rgba(255, 176, 46, 0) 72%); }
.hero-teto.estourado { background: linear-gradient(160deg, #9A2416, #7E1B10 60%); }
.hero-teto.estourado::before { background: radial-gradient(closest-side, rgba(255, 140, 110, .5), rgba(255, 140, 110, 0) 72%); }
.hero-teto > * { position: relative; }
.hero-rot { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .62); }
.hero-val { margin-top: 8px; font-size: clamp(42px, 7.2vw, 68px); font-weight: 800; letter-spacing: -.035em; line-height: .98; font-variant-numeric: tabular-nums; }
.hero-val .cur { font-size: .36em; font-weight: 600; opacity: .55; margin-right: 6px; vertical-align: .62em; letter-spacing: 0; }
.hero-det { margin-top: 10px; font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.hero-det b { color: #fff; font-weight: 700; }
.hero-lado { display: flex; gap: 26px; justify-self: end; }
.hero-lado > div { text-align: right; }
.hero-lado .k { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: rgba(255, 255, 255, .5); }
.hero-lado .n { margin-top: 4px; font-size: 20px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-teto .track { grid-column: 1 / -1; margin-top: 2px; height: 6px; background: rgba(255, 255, 255, .13); }
.hero-teto .fill { background: #fff; }
.hero-teto .fill.crit { background: #FFB4A6; }
.hero-teto .marker { background: rgba(255, 255, 255, .55); }
.hero-pe { grid-column: 1 / -1; font-size: 12px; color: rgba(255, 255, 255, .55); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.hero-lado .k, .hero-lado .n { white-space: nowrap; }
@media (max-width: 680px) {
  .hero-teto { grid-template-columns: 1fr; padding: 22px 20px 20px; gap: 14px 0; }
  .hero-val { font-size: clamp(40px, 12vw, 52px); }
  .hero-lado { justify-self: stretch; gap: 10px 18px; flex-wrap: wrap; padding-top: 2px; }
  .hero-lado > div { text-align: left; }
  .hero-lado .k { font-size: 9.5px; letter-spacing: .07em; }
  .hero-lado .n { font-size: 16px; }
}

.track { position: relative; height: 8px; background: rgba(255, 255, 255, .28); border-radius: 4px; margin-top: 12px; }
.card .track { background: rgba(23, 21, 15, .07); }
.fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px; background: #fff; transition: width .6s var(--ease); }
.card .fill { background: var(--accent); }
.fill.crit { background: #fff; } .card .fill.crit { background: var(--red); }
.marker { position: absolute; top: -4px; bottom: -4px; width: 2px; background: rgba(255, 255, 255, .9); border-radius: 2px; }
.card .marker { background: var(--ink); opacity: .7; }
.marker::after { content: attr(data-l); position: absolute; top: -16px; left: 50%; transform: translateX(-50%); font-size: 10px; font-weight: 600; color: inherit; white-space: nowrap; }

/* tile: numero de apoio. Mais plano que o card, com rotulo em olho */
.tile { background: var(--card); border: 1px solid var(--hair); border-radius: var(--r); padding: 16px 18px 15px; box-shadow: var(--sh-1); transition: transform .2s var(--ease), box-shadow .2s var(--ease); }
.tile .l { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.tile .v { font-size: 26px; font-weight: 800; margin-top: 7px; font-variant-numeric: tabular-nums; letter-spacing: -.025em; line-height: 1.12; }
.tile .v .cur { font-size: .52em; font-weight: 600; color: var(--muted); margin-right: 3px; vertical-align: .42em; letter-spacing: 0; }
.tile .s { font-size: 12px; color: var(--muted); margin-top: 5px; line-height: 1.45; }
.card.tile { box-shadow: var(--sh-2); }
a.tile:hover, .tile[data-abre]:hover { transform: translateY(-2px); box-shadow: var(--sh-3); }

/* ---- chips ---- */
.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 4px 10px; white-space: nowrap; letter-spacing: .01em; }
.p-good { background: var(--green-soft); color: var(--green); }
.p-warn { background: var(--amber-soft); color: var(--amber); }
.p-crit { background: var(--red-soft); color: var(--red); }
.p-mute { background: var(--bg-2); color: var(--muted); }
.p-acc { background: var(--accent-soft); color: var(--accent-ink); }
.chip { display: inline-block; font-size: 10.5px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; vertical-align: middle; letter-spacing: .02em; }
.chip.verde { background: var(--green-soft); color: var(--green); }
.chip.cinza { background: var(--bg-2); color: var(--muted); }
.chip.laranja { background: var(--accent-soft); color: var(--accent-ink); }
.chip.vermelho { background: var(--red-soft); color: var(--red); }

/* ---- barras horizontais por categoria ---- */
.hb { display: flex; flex-direction: column; gap: 6px; padding: 11px 0; border-top: 1px solid var(--hair); }
.hb:first-child { border-top: 0; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.hb-n { font-size: 13.5px; font-weight: 600; min-width: 0; }
.hb-v { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; flex-shrink: 0; }
.hb-v b { color: var(--ink); font-weight: 800; }
.hb-t { position: relative; height: 7px; background: rgba(23, 21, 15, .07); border-radius: 4px; overflow: hidden; }
.hb-f { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px; transition: width .6s var(--ease); }
.hb-f.over { background: var(--red); }
.hb-m { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink); opacity: .7; border-radius: 2px; }

/* ---- formularios ---- */
label { display: flex; flex-direction: column; gap: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .02em; color: var(--muted); }
input, select, textarea { width: 100%; background: var(--input-bg); border: 1px solid var(--hair); border-radius: 12px; font-size: 14px; color: var(--ink); padding: 11px 13px; font-family: var(--sans); resize: vertical; transition: border-color .15s, box-shadow .15s, background .15s; }
input::placeholder, textarea::placeholder { color: #B5AFA3; }
input:hover, select:hover, textarea:hover { border-color: rgba(23, 21, 15, .16); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); background: #fff; box-shadow: 0 0 0 4px rgba(244, 84, 13, .12); }
.ajuda { font-size: 11px; font-weight: 400; color: var(--muted); text-transform: none; letter-spacing: 0; line-height: 1.5; }
.btn { font-size: 13px; font-weight: 700; background: var(--black); color: #fff; border: none; border-radius: 999px; padding: 11px 20px; cursor: pointer; letter-spacing: .01em; box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 8px 18px -10px rgba(0, 0, 0, .45); transition: transform .15s var(--ease), box-shadow .15s var(--ease), filter .15s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; line-height: 1.15; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.08); box-shadow: 0 12px 24px -12px rgba(0, 0, 0, .5); }
.btn:active { transform: translateY(0); filter: brightness(.98); }
.btn:disabled { opacity: .4; cursor: default; transform: none; filter: none; }
.btn.sec, .btn.acao { background: var(--accent); color: #fff; border: none; box-shadow: 0 1px 0 rgba(255, 255, 255, .22) inset, 0 10px 22px -12px rgba(244, 84, 13, .7); }
.btn.sec:hover, .btn.acao:hover { opacity: 1; filter: brightness(1.05); }
.btn.fantasma { background: var(--card); color: var(--ink-2); border: 1px solid var(--hair); box-shadow: var(--sh-1); }
.btn.fantasma:hover { color: var(--ink); border-color: rgba(23, 21, 15, .22); opacity: 1; filter: none; }
.sel-inline { width: auto; max-width: 190px; padding: 6px 9px; font-size: 12.5px; border-radius: 9px; }

/* ---- assessor flutuante ---- */
.ast-botao { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 56px; height: 56px; border-radius: 50%; background: linear-gradient(145deg, #FF6A26, var(--accent) 55%, #D8460A); color: #fff; border: none; font-size: 24px; line-height: 1; cursor: pointer; box-shadow: 0 16px 34px -10px rgba(244, 84, 13, .7), 0 2px 4px rgba(0, 0, 0, .12); z-index: 40; transition: transform .18s var(--ease), box-shadow .18s; }
.ast-botao:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 22px 40px -12px rgba(244, 84, 13, .75); }
.ast-painel { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); width: min(420px, calc(100vw - 32px)); height: min(640px, calc(100dvh - 90px)); background: var(--card); border: 1px solid var(--hair); border-radius: var(--r-lg); box-shadow: var(--sh-3); z-index: 41; display: flex; flex-direction: column; overflow: hidden; }
.ast-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 14px 18px; border-bottom: 1px solid var(--hair); flex-shrink: 0; }
.ast-chat { flex: 1; max-height: none; padding: 12px 14px; }
.ast-rodape { border-top: 1px solid var(--hair); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; flex-shrink: 0; background: var(--card-2); }
.ast-form { display: flex; gap: 8px; align-items: center; }
.ast-form input { flex: 1; min-width: 0; }
.ast-anexos { display: flex; gap: 6px; flex-wrap: wrap; }
.ast-anexos .chip a { color: inherit; }
@media (max-width: 560px) {
  .ast-painel { left: 8px; right: 8px; width: auto; bottom: calc(8px + env(safe-area-inset-bottom)); height: min(640px, calc(100dvh - 70px)); }
}

/* ---- botao grande que abre um gerenciador ---- */
.bt-grande { display: flex; justify-content: space-between; align-items: center; gap: 14px; width: 100%; padding: 22px 24px; border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--card); font-family: inherit; text-align: left; cursor: pointer; box-shadow: var(--sh-2); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s; }
.bt-grande:hover { transform: translateY(-2px); box-shadow: var(--sh-3); border-color: rgba(244, 84, 13, .35); }
.bt-grande .t { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.bt-grande .s { display: block; font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.bt-grande .seta { font-size: 18px; color: var(--muted); flex-shrink: 0; transition: transform .2s var(--ease), color .2s; }
.bt-grande:hover .seta { transform: translateX(3px); color: var(--accent); }

/* ---- ano que abre a lista de meses ---- */
.ano { border: 1px solid var(--hair); border-radius: var(--r-lg); background: var(--card); overflow: hidden; box-shadow: var(--sh-2); }
.ano + .ano { margin-top: 12px; }
.ano-cab { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 16px 20px; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.ano-cab:hover { background: var(--card-2); }
.ano-titulo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.ano-seta { color: var(--muted); font-size: 11px; transition: transform .2s var(--ease); font-family: var(--sans); }
.ano.aberto .ano-seta { transform: rotate(90deg); }
.ano-meses { display: none; border-top: 1px solid var(--hair); }
.ano.aberto .ano-meses { display: block; }
.mes-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; padding: 13px 20px; border: 0; border-top: 1px solid var(--hair); background: none; font-family: inherit; text-align: left; cursor: pointer; transition: background .15s; }
.mes-item:first-child { border-top: 0; }
.mes-item:hover { background: var(--accent-soft); }
.mes-nome { font-size: 13.5px; font-weight: 700; text-transform: capitalize; }
.mes-meta { font-size: 12px; color: var(--muted); margin-top: 1px; }
.mes-num { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mes-num b { display: block; font-size: 14px; color: var(--ink); }

/* ---- linha de receita recebida / conta paga ---- */
.quit { display: flex; flex-direction: row; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--hair); font-size: 14px; font-weight: 400; color: var(--ink); text-transform: none; letter-spacing: 0; }
.quit:first-child { border-top: 0; }
.quit input[type="checkbox"] { width: 20px; height: 20px; flex-shrink: 0; accent-color: var(--green); cursor: pointer; }
.quit-corpo { flex: 1; min-width: 0; }
.quit-nome { font-size: 13.5px; font-weight: 600; }
.quit-meta { font-size: 12px; color: var(--muted); }
.quit-valor { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.quit.feito .quit-nome { color: var(--muted); }

/* ---- conversas estilo WhatsApp: lista a esquerda, conversa aberta a direita ---- */
.wa { display: flex; height: min(640px, 74vh); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; background: var(--card); box-shadow: var(--sh-2); }
.wa-lista { width: 290px; flex-shrink: 0; border-right: 1px solid var(--hair); overflow-y: auto; overflow-x: hidden; }
.wa-item { display: flex; gap: 11px; align-items: center; width: 100%; padding: 13px 14px; border: 0; border-bottom: 1px solid var(--hair); background: none; font-family: inherit; text-align: left; cursor: pointer; }
.wa-item:hover { background: var(--card-2); }
.wa-item.ativo { background: var(--accent-soft); }
.wa-av { width: 42px; height: 42px; border-radius: 50%; background: var(--black); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; flex-shrink: 0; }
.wa-av.grupo { background: var(--accent); }
.wa-corpo { min-width: 0; flex: 1; }
.wa-nome { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 700; }
.wa-hora { font-size: 11px; font-weight: 500; color: var(--muted); flex-shrink: 0; }
.wa-previa { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-chat { flex: 1; min-width: 0; display: flex; flex-direction: column; background: #EFEAE2; }
.wa-cab { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-bottom: 1px solid var(--hair); background: var(--card); flex-shrink: 0; }
.wa-voltar { display: none; border: 0; background: none; font-family: inherit; font-size: 18px; color: var(--muted); cursor: pointer; padding: 0 2px; }
/* a conversa copia o WhatsApp Web: rabiscos parados no fundo, fonte do sistema,
   balao branco pra quem chega e verde pro que sai, pontinha so no primeiro da sequencia */
.wa-msgs { flex: 1; overflow-y: auto; padding: 14px clamp(16px, 5%, 64px) 18px; display: flex; flex-direction: column; background: #EFEAE2 url('wa-fundo.svg?v=41') repeat; background-size: 420px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif; color: #111B21; }
.wa-msgs .chat-vazio { align-self: center; margin: auto 0; max-width: 340px; padding: 8px 14px; border-radius: 8px; background: #FFF5C4; color: #54656F; font-size: 12.5px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-bolha { position: relative; max-width: 65%; margin-top: 2px; padding: 6px 7px 8px 9px; border-radius: 7.5px; font-size: 14.2px; line-height: 19px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-bolha.deles { align-self: flex-start; background: #FFFFFF; }
.wa-bolha.nossa { align-self: flex-end; background: #D9FDD3; }
.wa-bolha.cauda { margin-top: 12px; }
.wa-bolha.cauda::before { content: ''; position: absolute; top: 0; width: 8px; height: 13px; background: inherit; }
.wa-bolha.cauda.deles { border-top-left-radius: 0; }
.wa-bolha.cauda.deles::before { left: -8px; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.wa-bolha.cauda.nossa { border-top-right-radius: 0; }
.wa-bolha.cauda.nossa::before { right: -8px; clip-path: polygon(0 0, 100% 0, 0 100%); }
.wa-autor { display: block; font-size: 12.8px; font-weight: 600; line-height: 22px; color: var(--c); }
.wa-texto { white-space: pre-wrap; overflow-wrap: anywhere; }
.wa-texto code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.wa-folga { display: inline-block; width: 42px; height: 1px; }
.wa-bolha.nossa .wa-folga { width: 58px; }
.wa-meta { position: absolute; right: 7px; bottom: 4px; display: inline-flex; align-items: center; gap: 3px; font-size: 11px; line-height: 15px; color: #667781; white-space: nowrap; }
.wa-check { width: 16px; height: 11px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.wa-cit { display: flex; flex-direction: column; margin: 1px -3px 5px -5px; padding: 5px 12px 7px 11px; border-radius: 7.5px; background: rgba(11,20,26,.05); box-shadow: inset 4px 0 var(--c); }
.wa-bolha.nossa .wa-cit { background: rgba(3,58,24,.07); }
.wa-cit > b { font-size: 12.8px; font-weight: 600; line-height: 22px; color: var(--c); }
.wa-cit span { font-size: 13.2px; line-height: 18px; color: #667781; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.wa-dia { align-self: center; margin: 12px 0 2px; padding: 5px 12px 6px; border-radius: 7.5px; background: #FFFFFF; color: #54656F; font-size: 12.5px; line-height: 21px; box-shadow: 0 1px .5px rgba(11,20,26,.13); }
.wa-dia + .wa-bolha { margin-top: 10px; }
@media (max-width: 700px) {
  .wa-bolha { max-width: 85%; }
  .wa-lista { width: 100%; }
  .wa.aberto .wa-lista { display: none; }
  .wa:not(.aberto) .wa-chat { display: none; }
  .wa.aberto .wa-voltar { display: inline-flex; }
}

/* linha de categoria clicavel na legenda da pizza */
.linha-cat { padding: 6px 0; display: block; width: 100%; background: none; border: none; font-family: inherit; font-size: inherit; color: inherit; cursor: pointer; text-align: left; border-radius: 8px; transition: background .15s; }
.linha-cat:hover { background: var(--card-2); }
.linha-cat:hover .hb-n { color: var(--accent-ink); }

/* nota curta editavel dentro de tabelas: discreta ate receber foco */
.in-nota { min-width: 120px; padding: 6px 8px; font-size: 12.5px; border-radius: 8px; background: transparent; border-color: transparent; box-shadow: none; }
.in-nota:hover { border-color: var(--hair); }
.in-nota:focus { background: var(--input-bg); }

.drop { border: 1.5px dashed rgba(23, 21, 15, .18); border-radius: var(--r); padding: 28px 16px; text-align: center; color: var(--muted); font-weight: 600; cursor: pointer; transition: .18s; background: var(--card-2); }
.drop.over, .drop:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-ink); }
.drop input { display: none; }

/* ---- tabelas ---- */
.tw { overflow-x: auto; border-radius: var(--r-lg); }
.tw.rolagem { overflow-y: auto; }
.tw.rolagem thead th { position: sticky; top: 0; background: var(--card); z-index: 2; border-bottom: 0; box-shadow: 0 1px 0 var(--hair); }
table { width: 100%; border-collapse: collapse; font-size: 13px; background: var(--card); }
th { text-align: left; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 12px 14px; border-bottom: 1px solid var(--hair); white-space: nowrap; }
th.num { text-align: right; }
td { padding: 12px 14px; border-bottom: 1px solid var(--hair); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr { transition: background .12s; }
tbody tr:hover td { background: var(--card-2); }
tr:last-child td { border-bottom: 0; }
tr.dup td { opacity: .45; }
tr.rev td { background: var(--amber-soft); }
.desc { font-weight: 600; }
.desc small { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%) translateY(6px); background: var(--black); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 13px; font-weight: 600; opacity: 0; transition: opacity .2s, transform .25s var(--ease); pointer-events: none; z-index: 9; max-width: 90vw; box-shadow: var(--sh-3); }
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.vazio { padding: 30px 20px; text-align: center; color: var(--muted); font-size: 13.5px; line-height: 1.5; }

.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login .card { width: min(380px, 100%); padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.erro { color: var(--red); font-size: 12.5px; font-weight: 600; min-height: 18px; }

/* ---- mobile ---- */
@media (max-width: 640px) {
  input, select, textarea, .sel-inline { font-size: 16px; }
  .tw table { min-width: 620px; }
  /* tabela que so tem o estado vazio nao precisa rolar de lado: cabe na tela */
  .tw table:has(.vazio-rico), .tw table:has(td.vazio) { min-width: 0; width: 100%; }
  .tw table:has(.vazio-rico) thead, .tw table:has(td.vazio) thead { display: none; }
  .vazio-rico { padding: 26px 14px 24px; }
  .l-btn { padding: 8px 10px; }
  .wrap { gap: 14px; }
  .grid { gap: 10px; }
  .tile { padding: 14px 15px 13px; }
  .tile .v { font-size: 21px; letter-spacing: -.03em; }
  .cab-pagina { align-items: flex-start; }
}
@media (max-width: 560px) { .pad { padding: 18px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- extensoes: listas, toggles, chat e graficos ---------- */
.lista { list-style: none; }
.lista li { display: flex; gap: 12px; align-items: center; padding: 14px 2px; border-top: 1px solid var(--hair); }
.lista li:first-child { border-top: none; }
.l-corpo { flex: 1; min-width: 0; }
.l-titulo { font-size: 13.5px; font-weight: 700; overflow-wrap: break-word; }
.l-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.l-valor { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.l-acoes { display: flex; gap: 4px; }
.l-btn { background: none; border: none; color: var(--muted); font-size: 15px; cursor: pointer; padding: 4px 6px; border-radius: 8px; transition: background .15s, color .15s; }
.l-btn:hover { color: var(--ink); background: var(--bg-2); }
.l-btn.perigo:hover { color: var(--red); background: var(--red-soft); }

.switch { position: relative; width: 42px; height: 24px; flex: none; cursor: pointer; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch i { position: absolute; inset: 0; background: #DDD7CA; border-radius: 999px; transition: background .18s; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: left .18s var(--ease); box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.switch input:checked + i { background: var(--green); }
.switch input:checked + i::after { left: 21px; }
.switch input:focus-visible + i { outline: 2px solid var(--accent); outline-offset: 2px; }

.chat { display: flex; flex-direction: column; gap: 10px; min-height: 300px; max-height: 56vh; overflow-y: auto; padding: 4px 2px; }
.msg { max-width: 85%; padding: 11px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: break-word; }
.msg.eu { align-self: flex-end; background: var(--black); color: #fff; border-bottom-right-radius: 5px; }
.msg.ia { align-self: flex-start; background: var(--card-2); border: 1px solid var(--hair); border-bottom-left-radius: 5px; }
.msg.ia.pensando { color: var(--muted); font-style: normal; }
.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input { flex: 1; }
.chat-vazio { text-align: center; color: var(--muted); padding: 30px 10px; font-size: 13px; }
.sugestoes { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 10px; }
.sugestoes button { font-size: 12px; font-weight: 600; background: var(--card); border: 1px solid var(--hair); border-radius: 999px; padding: 7px 14px; cursor: pointer; color: var(--ink); box-shadow: var(--sh-1); }
.sugestoes button:hover { border-color: var(--accent); color: var(--accent-ink); }

svg.graf { display: block; width: 100%; height: auto; overflow: visible; }
.graf .eixo { font-size: 10px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.graf .grade { stroke: var(--hair); stroke-width: 1; }
.graf-legenda { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; }
.graf-legenda span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); font-weight: 600; }
.graf-legenda i { width: 10px; height: 10px; border-radius: 3px; flex: none; }

/* tooltip dos graficos: segue o cursor, nunca captura o mouse */
.gtip { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--hair); border-radius: 12px; padding: 9px 12px; font-size: 12px; line-height: 1.5; box-shadow: var(--sh-3); pointer-events: none; max-width: 260px; }
.gtip b { font-variant-numeric: tabular-nums; }
.gtip i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 6px; vertical-align: baseline; }

.aba-linha { display: flex; gap: 4px; overflow-x: auto; background: rgba(255, 255, 255, .6); border: 1px solid var(--hair); border-radius: 999px; padding: 3px; scrollbar-width: none; }
.aba-linha::-webkit-scrollbar { display: none; }
.aba-linha button { border: 0; background: transparent; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 7px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; transition: background .18s var(--ease), color .18s; }
.aba-linha button:hover { color: var(--ink); background: rgba(23, 21, 15, .05); }
.aba-linha button.ativo { background: var(--black); border-color: var(--black); color: #fff; box-shadow: 0 4px 10px -6px rgba(0, 0, 0, .5); }

/* ---------- modal (janela flutuante, no lugar de window.prompt) ---------- */
.modal-veu { position: fixed; inset: 0; background: rgba(23, 21, 15, .42); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 50; display: grid; place-items: center; padding: 16px; opacity: 0; transition: opacity .18s; }
.modal-veu.on { opacity: 1; }
.modal { background: var(--card); border: 1px solid var(--hair); border-radius: 22px; width: min(520px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--sh-3); transform: translateY(10px) scale(.985); transition: transform .22s var(--ease); }
.modal-veu.on .modal { transform: none; }
.modal-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 22px 12px; }
.modal-cab h2 { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.modal-x { background: none; border: none; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px; transition: background .15s, color .15s; }
.modal-x:hover { color: var(--ink); background: var(--bg-2); }
.modal-corpo { padding: 4px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
.modal-campos { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
.modal-campos .largo { grid-column: 1 / -1; }
.modal-rod { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 14px 22px 20px; flex-wrap: wrap; }
.modal-rod .dir { margin-left: auto; display: flex; gap: 10px; }
@media (max-width: 560px) {
  .modal-veu { padding: 0; place-items: end stretch; }
  .modal { width: 100% !important; max-width: none; border-radius: 22px 22px 0 0; max-height: 94dvh; padding-bottom: env(safe-area-inset-bottom); }
  .modal-veu .modal { transform: translateY(16px); }
  .modal-veu.on .modal { transform: none; }
}
@media (max-width: 480px) { .modal-campos { grid-template-columns: 1fr; } }

/* botao que abre o importador */
.abre-import { display: flex; align-items: center; gap: 8px; }

/* ---------- barra inferior no celular: as 4 telas de todo dia + "Mais" ---------- */
.tabbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 6px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(255, 255, 255, .88); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); border-top: 1px solid var(--hair); box-shadow: 0 -10px 30px -18px rgba(23, 21, 15, .25); }
.tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 2px 4px; border: 0; background: none; font-family: inherit; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; color: var(--muted); border-radius: 12px; cursor: pointer; transition: color .15s, background .15s; -webkit-tap-highlight-color: transparent; }
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar .ativo { color: var(--ink); }
.tabbar .ativo svg { stroke-width: 2.2; }
.tabbar .ativo::after { content: ''; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); margin-top: 1px; }
.tabbar a:not(.ativo)::after, .tabbar button::after { content: ''; width: 4px; height: 4px; margin-top: 1px; }
/* folha "Mais": as outras telas e sair */
.mais-lista { list-style: none; display: grid; gap: 4px; }
.mais-lista a, .mais-lista button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border: 0; background: none; font-family: inherit; font-size: 15px; font-weight: 600; color: var(--ink); text-align: left; border-radius: 12px; cursor: pointer; }
.mais-lista a:hover, .mais-lista button:hover { background: var(--card-2); }
.mais-lista a.ativo { background: var(--accent-soft); color: var(--accent-ink); }
.mais-lista .sair { color: var(--red); }
@media (max-width: 640px) {
  .tabbar { display: grid; }
  .topo .nav { display: none; }
  .topo { padding-bottom: 4px; }
  .logo span { display: inline; }
  .wrap { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .ast-botao { bottom: calc(82px + env(safe-area-inset-bottom)); width: 52px; height: 52px; right: 14px; }
  .ast-painel { bottom: calc(76px + env(safe-area-inset-bottom)); height: min(600px, calc(100dvh - 150px)); }
  .toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
}

/* ---------- estado vazio com voz: olho, frase, exemplos e acao ---------- */
.vazio-rico { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding: 34px 22px 30px; }
.vazio-rico .vr-olho { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.vazio-rico .vr-titulo { font-size: 19px; font-weight: 800; letter-spacing: -.02em; max-width: 34ch; line-height: 1.25; }
.vazio-rico .vr-texto { font-size: 13.5px; color: var(--muted); max-width: 48ch; line-height: 1.55; }
.vazio-rico .vr-exemplos { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 4px; }
.vazio-rico .vr-exemplos span, .vazio-rico .vr-exemplos button { font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--card-2); border: 1px solid var(--hair); border-radius: 999px; padding: 7px 13px; font-family: inherit; cursor: default; }
.vazio-rico .vr-exemplos button { cursor: pointer; }
.vazio-rico .vr-exemplos button:hover { border-color: var(--accent); color: var(--accent-ink); }
.vazio-rico .vr-acao { margin-top: 8px; }

tr.casado td { background: var(--green-soft); }

/* ---------- cartoes como objeto: tile com a cor da marca ---------- */
.cartao-tile { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 164px; padding: 20px 22px; border-radius: var(--r-lg); color: #fff; background: var(--cor, var(--black)); box-shadow: var(--sh-3); transition: transform .22s var(--ease), box-shadow .22s var(--ease); }
.cartao-tile::before { content: ''; position: absolute; inset: auto -20% -70% auto; width: 70%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent 72%); pointer-events: none; }
.cartao-tile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .08), transparent 45%); pointer-events: none; }
.cartao-tile:hover { transform: translateY(-3px); box-shadow: 0 30px 60px -24px rgba(23, 21, 15, .45); }
.cartao-tile > * { position: relative; z-index: 1; }
.cartao-tile .ct-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.cartao-tile .ct-banco { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.cartao-tile .ct-nome { margin-top: 4px; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.cartao-tile .ct-papel { font-size: 12px; opacity: .75; margin-top: 2px; }
.cartao-tile .ct-chip { width: 34px; height: 24px; border-radius: 6px; background: linear-gradient(135deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, .25)); border: 1px solid rgba(255, 255, 255, .5); flex-shrink: 0; }
.cartao-tile .ct-rodape { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; }
.cartao-tile .ct-k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.cartao-tile .ct-v { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.cartao-tile .ct-ciclo { font-size: 11.5px; opacity: .78; text-align: right; line-height: 1.5; }
.cartao-tile.inativo { filter: saturate(.3); opacity: .72; }

/* ---------- pagina do cartao: o tile da lista vira o hero da pagina ---------- */
.pilha { display: flex; flex-direction: column; gap: 18px; }
.volta { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); width: fit-content; transition: color .18s; }
.volta:hover { color: var(--accent-ink); }
.hero-cartao { position: relative; overflow: hidden; padding: 24px 28px 22px; border-radius: var(--r-lg); color: #fff; background: var(--cor, var(--black)); box-shadow: var(--sh-3); display: flex; flex-direction: column; gap: 22px; }
.hero-cartao::before { content: ''; position: absolute; inset: auto -8% -55% auto; width: 48%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 255, 255, .22), transparent 72%); pointer-events: none; }
.hero-cartao::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .1), transparent 45%); pointer-events: none; }
.hero-cartao > * { position: relative; z-index: 1; }
.hero-cartao.inativo { filter: saturate(.3); }
.hc-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.hc-banco { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .85; }
.hc-nome { margin-top: 4px; color: #fff; }
.hc-papel { font-size: 13px; opacity: .78; margin-top: 3px; }
.hc-acoes { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.hc-estado { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .22); white-space: nowrap; }
.hc-btn { font-family: inherit; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .32); border-radius: 999px; padding: 6px 14px; cursor: pointer; transition: background .18s var(--ease); white-space: nowrap; }
.hc-btn:hover { background: rgba(255, 255, 255, .24); }
.hc-corpo { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: end; }
.hc-rot { font-size: 11.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .65; }
.hc-val { margin-top: 6px; font-size: clamp(38px, 6vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1; font-variant-numeric: tabular-nums; }
.hc-val .cur { font-size: .38em; font-weight: 600; opacity: .6; margin-right: 6px; vertical-align: .6em; letter-spacing: 0; }
.hc-det { margin-top: 10px; font-size: 13px; opacity: .8; }
.hc-det b { font-weight: 700; }
.hc-lado { display: flex; gap: 26px; justify-self: end; }
.hc-lado > div { text-align: right; }
.hc-lado .k { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .6; white-space: nowrap; }
.hc-lado .n { margin-top: 4px; font-size: 19px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hc-mix { display: flex; flex-direction: column; gap: 8px; }
.hc-track { height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .18); overflow: hidden; }
.hc-track i { display: block; height: 100%; background: #fff; border-radius: 4px; transition: width .6s var(--ease); }
.hc-pe { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; opacity: .72; }

/* faixa de faturas: mes em cima, valor embaixo */
.aba-linha.faturas { padding: 4px; background: rgba(255, 255, 255, .7); width: fit-content; max-width: 100%; }
.aba-linha.faturas button { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 7px 14px 6px; border-radius: 14px; line-height: 1.2; }
.aba-linha.faturas button small { font-size: 11px; font-weight: 600; opacity: .72; font-variant-numeric: tabular-nums; }

/* cabecalho de secao com contador e busca local */
.eyebrow-n { color: var(--ink-3); margin-left: 4px; font-variant-numeric: tabular-nums; }
.linha-acoes { display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0; max-width: 100%; }
.in-busca { flex: 0 1 240px; min-width: 120px; width: 240px; padding: 8px 13px; font-size: 13px; border-radius: 999px; }
button.pill { border: 0; cursor: pointer; font-family: inherit; }
button.pill:hover { filter: brightness(.96); }
.hb.clicavel { cursor: pointer; }
.hb.clicavel:hover .hb-n { color: var(--accent-ink); }
.parc-prog { height: 4px; margin-top: 7px; max-width: 220px; }

@media (max-width: 640px) {
  .hero-cartao { padding: 20px 18px 18px; gap: 18px; }
  .hc-corpo { grid-template-columns: 1fr; gap: 12px 0; }
  .hc-val { font-size: clamp(36px, 11vw, 46px); }
  .hc-lado { justify-self: stretch; gap: 10px 18px; flex-wrap: wrap; }
  .hc-lado > div { text-align: left; }
  .hc-lado .n { font-size: 16px; }
  .linha-acoes { width: 100%; }
  .in-busca { flex: 1 1 auto; width: auto; }
  .hc-extra { display: none; }
  .hc-pe { gap: 6px 12px; }
}

/* ---------- app na tela de inicio (PWA) ---------- */
a, button { -webkit-tap-highlight-color: rgba(244, 84, 13, .14); }
.tabbar, .mais-lista { -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
.guia-icone { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--r); background: var(--card-2); border: 1px solid var(--hair); }
.guia-icone img { width: 56px; height: 56px; border-radius: 14px; box-shadow: var(--sh-2); flex: none; }
.guia-icone .t { font-weight: 800; font-size: 15px; }
.guia-icone .s { font-size: 12.5px; color: var(--muted); line-height: 1.45; margin-top: 2px; }
.guia-sec { font-size: 11px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 16px 0 10px; }
.guia-instalar { list-style: none; display: grid; gap: 12px; counter-reset: passo; }
.guia-instalar li { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; }
.guia-instalar li::before { counter-increment: passo; content: counter(passo); flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--black); color: #fff; font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.guia-instalar b { font-weight: 700; color: var(--ink); }

/* ---------- visao geral: resumo do periodo, donuts com toque e extrato em lista ---------- */
.per-resumo { display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: end; }
.per-resumo .pr-k { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.per-resumo .pr-v { margin-top: 6px; font-size: clamp(28px, 3.2vw, 36px); font-weight: 800; letter-spacing: -.03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.per-resumo .pr-v .cur { font-size: .45em; font-weight: 600; color: var(--muted); margin-right: 4px; vertical-align: .5em; letter-spacing: 0; }
.per-resumo .pr-s { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.per-resumo .pr-lado { display: flex; gap: 24px; }
.per-resumo .pr-lado > div { text-align: right; min-width: 0; }
.per-resumo .pr-lado .k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); white-space: nowrap; }
.per-resumo .pr-lado .n { margin-top: 4px; font-size: 18px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.per-resumo .pr-lado .n.txt { font-size: 14px; max-width: 210px; overflow: hidden; text-overflow: ellipsis; }
.per-resumo .pr-lado .s { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; gap: 22px; align-items: flex-start; flex-wrap: wrap; }
.donut { width: 196px; height: 196px; flex-shrink: 0; max-width: 100%; }
.donut path, .donut circle { transition: opacity .18s var(--ease); }
.donut .apagada { opacity: .28; }
.donut text { pointer-events: none; }
.donut-legenda { flex: 1; min-width: min(100%, 230px); }
.donut-legenda .hb { padding: 9px 8px; margin: 0 -8px; border-radius: 10px; width: calc(100% + 16px); }
.donut-legenda .hb + .hb { border-top: 1px solid var(--hair); }
.donut-legenda button.hb { text-align: left; background: none; border: 0; border-top: 0; font-family: inherit; color: inherit; cursor: pointer; }
.donut-legenda button.hb + button.hb { border-top: 1px solid var(--hair); }
.donut-legenda .hb.on { background: var(--card-2); }
.donut-legenda .dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 8px; vertical-align: -1px; }
.extrato { overflow: hidden; }
.ex-dia { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 22px 6px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ex-dia b { font-size: 12px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ex-row { display: grid; grid-template-columns: minmax(0, 1fr) 140px 200px 120px; gap: 12px; align-items: center; padding: 10px 22px; border-top: 1px solid var(--hair); }
.ex-row .ex-desc { font-weight: 600; font-size: 13.5px; min-width: 0; overflow-wrap: anywhere; }
.ex-row .ex-desc small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 400; }
.ex-row .ex-col { font-size: 12.5px; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-row .ex-meta { display: none; font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.ex-row .ex-val { text-align: right; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ex-row.fixa .ex-desc, .ex-row.fixa .ex-val { color: var(--muted); font-weight: 600; }
.ex-mais { display: block; width: 100%; padding: 13px; border: 0; border-top: 1px solid var(--hair); background: var(--card-2); font-family: inherit; font-size: 13px; font-weight: 700; color: var(--accent-ink); cursor: pointer; }
.ex-mais:hover { background: var(--bg-2); }
@media (max-width: 640px) {
  .per-resumo { grid-template-columns: 1fr; gap: 12px 0; }
  .per-resumo .pr-lado { gap: 14px 20px; flex-wrap: wrap; }
  .per-resumo .pr-lado > div { text-align: left; }
  .per-resumo .pr-lado .n.txt { max-width: 100%; }
  .donut-wrap { flex-direction: column; align-items: stretch; gap: 14px; }
  .donut { width: 180px; height: 180px; margin: 0 auto; }
  .ex-dia { padding: 13px 16px 5px; }
  .ex-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 11px 16px; }
  .ex-row .ex-col { display: none; }
  .ex-row .ex-meta { display: block; }
}
/* legenda do donut no celular: nome em cima, valor embaixo, nada quebrando em tres linhas */
@media (max-width: 640px) {
  .donut-legenda .hb-top { flex-wrap: wrap; gap: 1px 10px; }
  .donut-legenda .hb-n { flex: 1 1 100%; font-size: 13px; }
  .donut-legenda .hb-v { white-space: normal; padding-left: 18px; }
}
/* dentro de uma janela a lista nao tem largura pra colunas: fica no formato de celular */
.extrato.compacto .ex-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.extrato.compacto .ex-col { display: none; }
.extrato.compacto .ex-meta { display: block; }

/* =====================================================================================
   v2 · shell do app: coluna central, topo com botoes redondos, pilula de navegacao preta
   ===================================================================================== */
.wrap { max-width: 560px; margin: 0 auto; padding: 8px 18px calc(118px + env(safe-area-inset-bottom)); gap: 16px; }
.wrap.largo { max-width: 1120px; }
.topo { position: static; display: flex; align-items: center; gap: 10px; flex-wrap: nowrap; padding: 6px 0 0; margin: 0; background: none; border: 0; box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.topo .sp { flex: 1; }
.logo { display: none; }
.rb { width: 42px; height: 42px; border-radius: 50%; background: var(--card); border: 1px solid var(--hair); display: grid; place-items: center; color: var(--ink); box-shadow: var(--sh-1); cursor: pointer; font-family: inherit; padding: 0; text-decoration: none; transition: transform .15s var(--ease), background .15s; }
.rb:hover { background: var(--card-2); }
.rb:active { transform: scale(.94); }
.rb svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(145deg, #FF6A26, var(--accent) 55%, #D8460A); color: #fff; font-weight: 800; font-size: 15px; display: grid; place-items: center; text-decoration: none; box-shadow: 0 8px 18px -10px rgba(244, 84, 13, .7); }
h1 { font-size: 27px; letter-spacing: -.03em; line-height: 1.1; }
.cab-pagina { align-items: flex-end; }
.sub-pag { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.sub-pag b { color: var(--ink); font-weight: 700; }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; display: block; }

/* pilula de navegacao: 4 abas, a ativa vira um chip branco com o nome; a transicao entre
   paginas e do navegador (view transitions), o chip desliza sozinho de uma aba pra outra */
.navpill { position: fixed; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(calc(100% - 36px), 420px); height: 66px; border-radius: 999px; background: var(--nav); display: grid; align-items: center; padding: 8px; z-index: 30; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6); }
.navpill a { display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px; color: var(--nav-ink); font-size: 13px; font-weight: 800; border-radius: 999px; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.navpill a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.navpill a.on { background: #fff; color: #111; }
.navpill a:not(.on):hover { color: #fff; }
@view-transition { navigation: auto; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .2s; }
::view-transition-group(nav-chip) { animation-duration: .32s; animation-timing-function: var(--ease); }
.tabbar, .ast-botao { display: none !important; }
.toast { bottom: calc(98px + env(safe-area-inset-bottom)); }
.ast-painel { bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (max-width: 640px) {
  .wrap { padding-bottom: calc(118px + env(safe-area-inset-bottom)); }
  .ast-painel { bottom: calc(92px + env(safe-area-inset-bottom)); height: min(600px, calc(100dvh - 170px)); }
}

/* ---- componentes no tom novo ---- */
.card { border-radius: var(--r-lg); border: 1px solid var(--hair); box-shadow: var(--sh-2); }
.tile { border-radius: var(--r); }
.btn { background: var(--btn-bg); color: var(--btn-ink); border-radius: 999px; box-shadow: none; }
.btn:hover { filter: brightness(1.08); }
.btn.sec { background: var(--card); color: var(--ink); border: 1px solid var(--hair); }
.btn.fantasma { background: transparent; color: var(--ink-2); border: 1px solid var(--hair); }
.aba-linha { background: var(--card); border: 1px solid var(--hair); }
.aba-linha button.ativo { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); box-shadow: none; }
.aba-linha button:hover { background: var(--soft); }
.hb-t, .card .track { background: var(--hair); }
.switch i { background: var(--bg-2); }
.drop { border-color: var(--hair); }
.modal { border-radius: 28px; }
@media (max-width: 640px) { .modal { border-radius: 28px 28px 0 0; } }
.cab-sec { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 16px 18px 6px; }
.cab-sec h2 { font-size: 15px; font-weight: 800; letter-spacing: -.01em; }
.cab-sec .l { font-size: 12px; color: var(--muted); font-weight: 600; text-decoration: none; }
.cab-sec .l:hover { color: var(--accent-ink); }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -18px; padding: 2px 18px; }
.chips::-webkit-scrollbar { display: none; }
.chips button, .chips a { flex: none; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 13px; border-radius: 999px; background: var(--card); border: 1px solid var(--hair); color: var(--ink-2); white-space: nowrap; cursor: pointer; text-decoration: none; }
.chips .on { background: var(--btn-bg); color: var(--btn-ink); border-color: var(--btn-bg); }
.seg { display: flex; gap: 4px; background: var(--card); border: 1px solid var(--hair); border-radius: 999px; padding: 4px; }
.seg button { flex: 1; font-family: inherit; text-align: center; font-size: 12.5px; font-weight: 700; color: var(--muted); padding: 8px 0; border-radius: 999px; border: 0; background: none; cursor: pointer; }
.seg button.on { background: var(--btn-bg); color: var(--btn-ink); }
.grp { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 6px 4px 0; }
.busca { display: flex; align-items: center; gap: 10px; padding: 0 16px; height: 46px; border-radius: 999px; background: var(--card); border: 1px solid var(--hair); color: var(--muted); }
.busca input { flex: 1; border: 0; background: none; font: inherit; font-size: 14px; color: var(--ink); padding: 0; box-shadow: none; }
.busca input:focus { outline: none; box-shadow: none; }

/* ---- linhas de lista (contas do mes, menus) ---- */
.lin { display: flex; align-items: center; gap: 12px; padding: 11px 18px; text-decoration: none; color: inherit; }
.lin + .lin { border-top: 1px solid var(--hair); }
a.lin:hover, button.lin:hover { background: var(--card-2); }
button.lin { width: 100%; border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; }
.chk { width: 38px; height: 38px; border-radius: 50%; border: 1.5px solid var(--hair); display: grid; place-items: center; color: var(--ink); flex: none; background: var(--soft); cursor: pointer; transition: background .18s, border-color .18s, transform .12s; padding: 0; font-family: inherit; }
.chk svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chk:active { transform: scale(.92); }
.chk.ok { background: var(--green); border-color: var(--green); color: #fff; }
.chk.marca { background: var(--cor); border-color: var(--cor); color: #fff; }
.lin .t { font-size: 13.5px; font-weight: 700; flex: 1; min-width: 0; }
.lin .m { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.lin .v { font-size: 13.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lin.pago .v, .lin.pago .t { color: var(--muted); }
.lin .chev { color: var(--ink-3); }
.tag { font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--soft); color: var(--ink-2); white-space: nowrap; }
.tag.alerta { background: var(--accent-soft); color: var(--accent-ink); }
.tag.ok { background: var(--green-soft); color: var(--green); }

/* ---- home: pilha de cartoes ---- */
.stack { position: relative; height: 272px; }
.stack .ct { position: absolute; left: 0; right: 0; border: 0; padding: 0; margin: 0; appearance: none; -webkit-appearance: none; font-family: inherit; text-align: left; border-radius: 24px; color: #fff; background: var(--cor); overflow: hidden; cursor: pointer; transition: top .4s var(--ease), left .4s var(--ease), right .4s var(--ease), opacity .3s; }
.stack .ct::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .16), transparent 55%); pointer-events: none; }
.stack .ct > * { position: relative; z-index: 1; }
.stack .ct.b2 { top: 0; left: 12px; right: 12px; height: 40px; opacity: .9; }
.stack .ct.b1 { top: 12px; height: 80px; }
/* dentro de <button> o navegador centraliza o conteudo na vertical (Safari e Chrome): o rotulo cairia atras do cartao da frente */
.stack .ct.b1 .f { position: absolute; top: 0; left: 0; right: 0; padding: 11px 20px 0; }
.stack .fr-wrap { position: absolute; left: 0; right: 0; top: 58px; height: 214px; filter: drop-shadow(0 14px 18px rgba(0, 0, 0, .16)) drop-shadow(0 2px 4px rgba(0, 0, 0, .08)); }
:root[data-tema="escuro"] .stack .fr-wrap { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6)); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .stack .fr-wrap { filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .6)); } }
.stack .ct.fr { position: absolute; inset: 0; border-radius: 0; cursor: default; }
.stack .f { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px 0; }
.stack .marca { font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.stack .dir { font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.stack .b1 .dir { text-transform: none; letter-spacing: 0; font-size: 13px; font-weight: 800; opacity: .95; }
.stack .mid { display: flex; justify-content: space-between; align-items: flex-end; padding: 24px 20px 0; }
.stack .k { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .7; white-space: nowrap; }
.stack .big { margin-top: 4px; font-size: 32px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.stack .big .cur { font-size: .42em; font-weight: 600; opacity: .6; margin-right: 4px; vertical-align: .55em; }
.stack .r { text-align: right; padding-bottom: 2px; }
.stack .r .v { font-size: 15px; font-weight: 800; margin-top: 4px; white-space: nowrap; }
.stack .kp { position: absolute; left: 20px; bottom: 19px; display: flex; gap: 13px; }
.stack .kp span { display: block; font-size: 10px; font-weight: 600; opacity: .72; white-space: nowrap; }
.stack .kp b { display: block; margin-top: 2px; font-size: 12.5px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stack .pill { position: absolute; right: 0; bottom: 0; z-index: 4; height: 44px; display: flex; align-items: center; gap: 8px; background: #111; color: #fff; border-radius: 999px; padding: 0 15px 0 8px; font-size: 12.5px; font-weight: 800; text-decoration: none; box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .45), 0 2px 4px rgba(0, 0, 0, .12); }
.stack .pill b { width: 28px; height: 28px; border-radius: 50%; background: #fff; color: #111; display: grid; place-items: center; font-size: 15px; }
:root[data-tema="escuro"] .stack .pill { background: #1F1F1F; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .8); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .stack .pill { background: #1F1F1F; box-shadow: 0 12px 26px -10px rgba(0, 0, 0, .8); } }
.pontos { display: flex; gap: 6px; justify-content: center; margin-top: 12px; }
.pontos i { width: 6px; height: 6px; border-radius: 3px; background: var(--c); opacity: .5; transition: width .25s var(--ease), opacity .2s; }
.pontos i.on { width: 18px; opacity: 1; }
.stack-vazio { height: auto; }
/* escolha do cartao: folha com a lista */
.esc-cartoes { display: grid; gap: 10px; margin-top: 12px; }
.esc-cartoes button { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 20px; padding: 16px 18px; color: #fff; background: var(--cor); font-family: inherit; cursor: pointer; text-align: left; box-shadow: 0 14px 30px -20px rgba(0, 0, 0, .6); }
.esc-cartoes .n { font-size: 15px; font-weight: 800; }
.esc-cartoes .s { font-size: 11.5px; opacity: .85; margin-top: 2px; }
.esc-cartoes .v { font-size: 15px; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---- home: acoes e contas do mes ---- */
.acoes { display: grid; grid-template-columns: repeat(4, 1fr); padding: 16px 10px 14px; }
.acoes a, .acoes button { display: flex; flex-direction: column; align-items: center; gap: 8px; font-family: inherit; font-size: 11.5px; font-weight: 700; color: var(--ink-2); text-decoration: none; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.acoes b { width: 48px; height: 48px; border-radius: 50%; border: 1.5px solid var(--hair); display: grid; place-items: center; color: var(--ink); background: var(--card); transition: transform .15s var(--ease), background .15s; }
.acoes a:hover b, .acoes button:hover b { background: var(--soft); }
.acoes a:active b, .acoes button:active b { transform: scale(.93); }

/* ---- contas do mes (tela) ---- */
.pager { display: flex; align-items: center; justify-content: space-between; padding: 0 2px; }
.pager h2 { font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.resumo3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.resumo3 .card { padding: 14px 14px 12px; }
.resumo3 .k { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.resumo3 .n { font-size: 16px; font-weight: 800; margin-top: 5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@media (max-width: 400px) { .resumo3 .n { font-size: 14.5px; } }

/* ---- carteira: tiles dos cartoes ---- */
.ctile { display: block; border-radius: 24px; color: #fff; background: var(--cor); padding: 16px 18px; position: relative; overflow: hidden; text-decoration: none; box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .6); transition: transform .2s var(--ease); }
.ctile:hover { transform: translateY(-2px); }
.ctile::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255, 255, 255, .14), transparent 50%); pointer-events: none; }
.ctile > * { position: relative; z-index: 1; }
.ctile .r1 { display: flex; justify-content: space-between; align-items: flex-start; }
.ctile .r2 { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 22px; gap: 12px; }
.ctile .banco { font-size: 10.5px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .9; }
.ctile .nome { font-size: 14px; font-weight: 800; margin-top: 1px; }
.ctile .chip { width: 32px; height: 23px; border-radius: 6px; background: linear-gradient(135deg, rgba(255, 255, 255, .6), rgba(255, 255, 255, .25)); border: 1px solid rgba(255, 255, 255, .5); flex: none; }
.ctile .k { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; opacity: .72; }
.ctile .big { font-size: 22px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.ctile .big.txt { font-size: 15px; opacity: .85; }
.ctile .s { font-size: 11px; opacity: .8; text-align: right; line-height: 1.5; }
.ctile.inativo { filter: saturate(.3); opacity: .7; }

/* ---- estatisticas ---- */
.barras { display: flex; align-items: flex-end; gap: 10px; height: 130px; padding: 4px 18px 0; }
.barras div { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); font-weight: 700; }
.barras i { display: block; width: 100%; flex: 1; border-radius: 8px 8px 4px 4px; background: var(--soft); position: relative; overflow: hidden; }
.barras i::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: var(--ink); border-radius: 8px 8px 0 0; }
.barras i.hoje::after { background: var(--accent); }
.barras i.estourou::after { background: var(--red); }
.kpis2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpis2 .card { padding: 14px 16px; text-decoration: none; color: inherit; }
.kpis2 .k { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.kpis2 .n { font-size: 18px; font-weight: 800; margin-top: 5px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpis2 .s { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

/* ---- conta ---- */
.perfil { display: flex; align-items: center; gap: 14px; padding: 4px 2px; }
.perfil .av { display: flex; }
.perfil .av b { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; border: 3px solid var(--bg); }
.perfil .av b + b { margin-left: -14px; }
.perfil .n { font-size: 17px; font-weight: 800; }

/* ---- folha "mais" ---- */
.opcoes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.opcoes a, .opcoes button { display: flex; align-items: center; gap: 12px; padding: 14px; border-radius: 18px; background: var(--soft); font-family: inherit; font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none; border: 0; cursor: pointer; text-align: left; }
.opcoes a:hover, .opcoes button:hover { background: var(--bg-2); }
.opcoes b { width: 40px; height: 40px; border-radius: 50%; background: var(--card); display: grid; place-items: center; flex: none; }
.opcoes small { display: block; font-size: 11px; color: var(--muted); font-weight: 500; margin-top: 2px; }
.sheet-sub { font-size: 12.5px; color: var(--muted); margin: -4px 0 12px; }

/* ---- investimentos (placeholder) ---- */
.investir-vazio { padding: 10px 0 0; }

/* ---- login no tom novo ---- */
.login .card { border-radius: 28px; }

/* ---- pecas que faltavam no shell v2 ---- */
.pilha { display: flex; flex-direction: column; gap: 16px; }
.fab { position: fixed; right: max(18px, calc(50% - 280px)); bottom: calc(100px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; background: var(--btn-bg); color: var(--btn-ink); border: 0; display: grid; place-items: center; z-index: 29; box-shadow: 0 16px 34px -12px rgba(0, 0, 0, .55); cursor: pointer; }
.fab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2.2; stroke-linecap: round; }
.wrap.largo ~ .fab, .wrap.largo .fab { right: max(18px, calc(50% - 560px)); }
.chip-select { flex: none; appearance: none; -webkit-appearance: none; font-family: inherit; font-size: 12.5px; font-weight: 700; padding: 8px 30px 8px 13px; border-radius: 999px; background: var(--btn-bg) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>") no-repeat right 10px center / 14px; color: var(--btn-ink); border: 1px solid var(--btn-bg); cursor: pointer; box-shadow: none; width: auto; }
:root[data-tema="escuro"] .chip-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); }
@media (prefers-color-scheme: dark) { :root:not([data-tema="claro"]) .chip-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23111' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); } }
.ex-row.clicavel { width: 100%; border: 0; border-top: 1px solid var(--hair); background: none; font-family: inherit; color: inherit; text-align: left; cursor: pointer; }
.ex-row.clicavel:hover { background: var(--card-2); }
.ex-row.rev { background: var(--amber-soft); }
.ex-row:first-child, .ex-dia + .ex-row { border-top: 0; }
.ex-dia + .ex-row { border-top: 1px solid var(--hair); }
.extrato .ex-dia:first-child { padding-top: 16px; }
.lin.pago .m { color: var(--ink-3); }
.hero-cartao .volta { display: none; }
/* a busca e um <label>: desfaz o empilhamento e a caixa alta que o label global impoe */
label.busca { flex-direction: row; align-items: center; gap: 10px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--muted); }
label.busca svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; flex: none; }

/* ---- contas do mes v2: data como bloco, estado embaixo do valor, aviso de vencidas ---- */
.lin.lc { padding: 10px 18px; }
.lin.lc .t { border: 0; background: none; font-family: inherit; text-align: left; cursor: pointer; padding: 0; color: inherit; }
.lin.lc .t, .lin.lc .m { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lin.lc .v { text-align: right; flex: none; }
.lin.lc .v b { display: block; }
.lin.lc .v small { display: block; font-size: 11px; font-weight: 700; margin-top: 2px; color: var(--muted); }
.lin.lc .v small.logo { color: var(--accent-ink); }
.lin.lc .v small.ok { color: var(--green); }
.lin.lc .v small.venceu { color: var(--red); }
.dt { position: relative; width: 44px; height: 44px; border-radius: 14px; background: var(--soft); border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; flex: none; line-height: 1; color: var(--ink); font-family: inherit; cursor: pointer; padding: 0; transition: transform .12s, background .18s; }
.dt:active { transform: scale(.92); }
.dt b { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.dt span { font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.dt.logo { box-shadow: inset 0 0 0 1.5px var(--accent); }
.dt.venceu { box-shadow: inset 0 0 0 1.5px var(--red); }
.dt.venceu b { color: var(--red); }
.dt.pago { background: var(--green); color: #fff; }
.dt.pago svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.dt i { position: absolute; top: -3px; right: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--c); border: 2px solid var(--card); }
.prog { padding: 4px 18px 10px; }
.prog .t { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.prog .t b { color: var(--ink); }
.prog .bar { height: 5px; border-radius: 3px; background: var(--hair); overflow: hidden; }
.prog .bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; transition: width .5s var(--ease); }
#prog.card .prog { padding: 14px 18px 14px; }
.venc { display: flex; align-items: center; gap: 10px; width: calc(100% - 36px); margin: 2px 18px 10px; padding: 10px 12px; border-radius: 14px; background: var(--accent-soft); color: var(--accent-ink); font-family: inherit; font-size: 12.5px; font-weight: 700; border: 0; cursor: pointer; text-align: left; }
.venc b { font-weight: 800; }
.venc .sp { flex: 1; }
.venc .ir { font-size: 12px; font-weight: 800; white-space: nowrap; }
.venc svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mais-link { justify-content: center; font-size: 12.5px; font-weight: 700; color: var(--accent-ink); background: var(--card-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.dica-pe { text-align: center; font-size: 11px; color: var(--ink-3); margin-top: -8px; }
.link-lote { border: 0; background: none; font-family: inherit; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: none; color: var(--accent-ink); cursor: pointer; padding: 0; }
.modal-corpo .lin.lc .t { white-space: normal; }
/* navegador sem clip-path: path(): o pill fica sobre o cartao, com a sombra fazendo o recorte */
.stack.sem-recorte .ct.fr { border-radius: 24px; }
.stack.sem-recorte .pill { right: 12px; bottom: 12px; box-shadow: 0 0 0 9px var(--bg), 0 10px 22px -10px rgba(0, 0, 0, .45); }
