/* =========================================================
   FinPla — painel escuro em verde-floresta com vidro e verde-limão
   (mesma estrutura do painel do Trackmatico: menu lateral no computador,
   cartões de vidro com ícone e barra, botões em pílula).
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #030d08;
  --surface: #0a1d13;
  --card: rgb(255 255 255 / .035);
  --card-2: rgb(255 255 255 / .05);
  --text: #eefaf2;
  --text-2: #b4cabb;
  --muted: #7c9586;
  --line: rgb(130 255 170 / .13);
  --line-2: rgb(130 255 170 / .3);
  --track: rgb(255 255 255 / .07);
  --primary: #3fdc2a;
  --primary-2: #9dff1f;
  --accent: #b6f24a;
  --lime: #9dff1f;
  --lime-ink: #0b1d00;
  --primary-soft: rgb(157 255 31 / .1);
  --danger: #ff7b8a;
  --danger-soft: rgb(255 123 138 / .12);
  --warn: #ffc24a;
  --income: #9dff1f;
  --hero-1: #0f5220;
  --hero-2: #04160b;
  --glow: rgb(63 220 42 / .16);
  --glass: linear-gradient(180deg, rgb(24 70 44 / .5), rgb(7 24 15 / .62));
  --glass-solid: rgb(5 20 12 / .82);
  --active: linear-gradient(180deg, #34d64a, #0f9c2e);
  --active-shadow: 0 0 0 1px rgb(63 220 42 / .35), 0 8px 26px rgb(15 162 51 / .4), inset 0 1px 0 rgb(255 255 255 / .25);
  --shadow: inset 0 1px 0 rgb(255 255 255 / .05);
  --shadow-lg: 0 30px 80px -20px rgb(0 0 0 / .6);
  --radius: 22px;
  --nav-h: 64px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --spring: cubic-bezier(.34, 1.4, .5, 1);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  /* Curva verde-limão (a mesma "linha de crescimento" do logo) */
  --curve: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 640 120' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='s' x1='0' x2='1'%3E%3Cstop offset='0' stop-color='%239dff1f' stop-opacity='0'/%3E%3Cstop offset='.7' stop-color='%239dff1f'/%3E%3Cstop offset='1' stop-color='%23d4ff8a'/%3E%3C/linearGradient%3E%3ClinearGradient id='f' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%239dff1f' stop-opacity='.18'/%3E%3Cstop offset='1' stop-color='%239dff1f' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 118C220 116 330 108 430 70S560 8 640 4V120H0Z' fill='url(%23f)'/%3E%3Cpath d='M0 118C220 116 330 108 430 70S560 8 640 4' fill='none' stroke='url(%23s)' stroke-width='3'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background:
    radial-gradient(1000px 600px at 75% -10%, rgb(30 160 70 / .2), transparent 60%),
    radial-gradient(700px 500px at 0% 100%, rgb(120 230 40 / .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font: 16px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
  min-height: 100dvh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
button:focus-visible { outline: 2px solid var(--lime); outline-offset: 2px; }
select option { background: var(--surface); color: var(--text); }
img { max-width: 100%; }
.num { font-variant-numeric: tabular-nums; }
::selection { background: rgb(157 255 31 / .25); }

#app { min-height: 100dvh; }
.splash { min-height: 100dvh; display: grid; place-items: center; }
.splash img { animation: float 2.4s ease-in-out infinite; filter: drop-shadow(0 18px 30px rgba(63, 220, 42, .35)); border-radius: 22px; }

/* ---------- Animações base ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes fade { from { opacity: 0; } }
@keyframes up { from { transform: translateY(100%); } }
@keyframes down { to { transform: translateY(105%); } }
@keyframes pop { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.04); } }
@keyframes float { 50% { transform: translateY(-8px); } }
@keyframes drift1 { 50% { transform: translate(40px, 30px) scale(1.15); } }
@keyframes drift2 { 50% { transform: translate(-50px, -20px) scale(1.2); } }
@keyframes shine { from { transform: translateX(-120%) skewX(-18deg); } to { transform: translateX(260%) skewX(-18deg); } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes fillx { from { transform: scaleX(0); } }
@keyframes glowpulse { 50% { box-shadow: 0 10px 30px rgba(157, 255, 31, .5), 0 0 0 8px rgba(157, 255, 31, .1); } }
@keyframes ripple { to { transform: scale(1); opacity: 0; } }
@keyframes draw { to { stroke-dashoffset: 0; } }

.enter > * { animation: rise .6s var(--ease) both; animation-delay: calc(var(--i, 0) * 55ms); }

/* Efeito de toque (ripple) */
.btn, .action, .chip, .tx, .cat-opt, .set-row, .legend button, .suggest button, .seg button, .tabs2 button { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; pointer-events: none; background: currentColor; opacity: .14; transform: scale(0); animation: ripple .6s var(--ease) forwards; }

/* =========================================================
   Estrutura: menu lateral + painel de vidro (computador).
   No celular: tela cheia com o menu flutuante embaixo.
   ========================================================= */
.fp-app { min-height: 100dvh; }
.fp-side { display: none; }
#view { min-width: 0; }

.page { max-width: 560px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 16px calc(var(--nav-h) + 52px + var(--safe-b)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.hello { font-size: 13.5px; color: var(--text-2); font-weight: 500; }
.title { font-size: 26px; font-weight: 800; letter-spacing: -.035em; margin: 0; }
.month-switch { display: flex; align-items: center; gap: 2px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.month-switch button { width: 34px; height: 34px; border-radius: 50%; font-size: 18px; color: var(--text-2); transition: background .2s, transform .2s var(--spring); }
.month-switch button:hover { background: var(--track); color: var(--text); }
.month-switch button:active { transform: scale(.88); }
.month-switch span { font-size: 14px; font-weight: 700; min-width: 92px; text-align: center; text-transform: capitalize; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; margin-bottom: 14px; }
.card h3 { margin: 0 0 14px; font-size: 15.5px; font-weight: 750; letter-spacing: -.01em; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.card h3 .link, .card-head .link { font-size: 13px; color: var(--lime); font-weight: 700; white-space: nowrap; }

/* Título do cartão com ícone (como os gráficos do Trackmatico) */
.card-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.card-head > div { flex: 1; min-width: 0; }
.card-head h3 { margin: 0; font-size: 17px; }
.card-head p { margin: 2px 0 0; color: var(--text-2); font-size: 13.5px; }
.ibox { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 14px; background: rgb(255 255 255 / .05); color: var(--lime); }
.ibox svg { width: 22px; height: 22px; }

/* ---------- Cartão principal (gastos do mês) ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background: linear-gradient(150deg, var(--hero-1), var(--hero-2));
  color: #fff; border: 1px solid var(--line-2); border-radius: 26px; padding: 22px; margin-bottom: 14px;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.hero .blob { position: absolute; z-index: -2; border-radius: 50%; filter: blur(48px); opacity: .55; }
.hero .b1 { width: 240px; height: 240px; background: #3fdc2a; top: -110px; left: -70px; animation: drift1 9s ease-in-out infinite; }
.hero .b2 { width: 180px; height: 180px; background: #9dff1f; bottom: -120px; left: 35%; opacity: .25; animation: drift2 11s ease-in-out infinite; }
.hero .curve { position: absolute; z-index: -1; right: 0; bottom: 0; width: min(70%, 620px); height: 34%; background: var(--curve) no-repeat right bottom / 100% 100%; filter: drop-shadow(0 0 6px rgb(157 255 31 / .45)); pointer-events: none; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; width: 40%; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .12), transparent); animation: shine 1.6s .35s var(--ease) both; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5; background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px); background-size: 14px 14px; mask-image: linear-gradient(180deg, #000, transparent 70%); -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%); }
.hero-top { display: flex; gap: 16px; align-items: flex-start; }
.hero-ic { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: rgb(255 255 255 / .08); border: 1px solid rgb(255 255 255 / .14); color: var(--lime); }
.hero-ic svg { width: 26px; height: 26px; }
.hero .lbl { font-size: 14px; opacity: .85; font-weight: 600; letter-spacing: .01em; }
.hero .big { font-size: 42px; font-weight: 800; letter-spacing: -.045em; margin: 2px 0; line-height: 1.05; text-shadow: 0 4px 24px rgba(0, 0, 0, .25); }
.hero .sub { font-size: 13.5px; opacity: .75; }
.budget { margin-top: 18px; max-width: 520px; }
.budget-bar { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.budget-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #6fe000, var(--lime)); transform-origin: left; animation: fillx 1.1s .3s var(--ease) both; box-shadow: 0 0 14px rgb(157 255 31 / .55); }
.budget-bar i.warn { background: linear-gradient(90deg, #ffd166, #ffb020); box-shadow: 0 0 14px rgba(255, 190, 60, .55); }
.budget-bar i.over { background: linear-gradient(90deg, #ff8fa3, #ff5d7a); box-shadow: 0 0 14px rgba(255, 93, 122, .55); }
.budget-txt { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; margin-top: 7px; opacity: .85; }

/* ---------- Cartões de número (ícone + barra) ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; padding: 14px; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); animation: rise .55s var(--ease) both; }
.tile:nth-child(2) { animation-delay: .06s; } .tile:nth-child(3) { animation-delay: .12s; } .tile:nth-child(4) { animation-delay: .18s; }
.tile-l { align-self: center; font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile-ic { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 11px; background: rgb(255 255 255 / .05); color: var(--lime); }
.tile-ic svg { width: 18px; height: 18px; }
.tile-v { grid-column: 1 / -1; margin-top: 6px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile small { grid-column: 1 / -1; min-height: 1.4em; color: var(--text-2); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { grid-column: 1 / -1; display: block; height: 7px; margin-top: 10px; border-radius: 999px; background: rgb(255 255 255 / .08); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #6fe000, var(--lime)); box-shadow: 0 0 12px rgb(157 255 31 / .55); transform-origin: left; animation: fillx 1s .25s var(--ease) both; }
.bar.leave i { background: var(--danger); box-shadow: 0 0 12px rgb(255 123 138 / .5); }
.up { color: var(--danger); }
.down { color: var(--income); }

/* ---------- Categorias ---------- */
.cat-wrap { display: flex; gap: 18px; align-items: center; }
.cat-wrap .donut { flex: 0 0 auto; width: 140px; height: 140px; }
@media (max-width: 440px) {
  .cat-wrap { flex-direction: column; align-items: stretch; gap: 18px; }
  .cat-wrap .donut { width: 156px; height: 156px; align-self: center; }
}
.donut .arc { stroke-linecap: round; }
.donut-center { font-size: 22px; font-weight: 800; fill: var(--text); letter-spacing: -.03em; }
.donut-sub { font-size: 11px; fill: var(--muted); font-weight: 500; }
.legend { flex: 1; min-width: 0; display: grid; gap: 9px; }
.legend button { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; text-align: left; width: 100%; border-radius: 10px; padding: 2px 0; }
.legend .nm { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend .vl { font-size: 13.5px; font-weight: 700; }
.legend .pb { grid-column: 2 / 4; height: 5px; border-radius: 9px; background: var(--track); overflow: hidden; margin-top: -4px; }
.legend .pb i { display: block; height: 100%; border-radius: 9px; transform-origin: left; animation: fillx 1s .25s var(--ease) both; }

.bars { width: 100%; height: auto; display: block; overflow: visible; }
.bar-r { fill: url(#barg); opacity: .3; transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 14ms + .1s); }
.bar-hi { opacity: 1; }
.bar-lbl { font-size: 9px; fill: var(--text-2); }
.avg-line { stroke: var(--lime); stroke-dasharray: 4 4; stroke-width: 1; opacity: .45; }

/* ---------- Lançamentos ---------- */
.tx { display: grid; grid-template-columns: 44px 1fr auto; gap: 12px; align-items: center; padding: 11px 8px; margin: 0 -8px; width: calc(100% + 16px); text-align: left; border-radius: 14px; transition: background .2s; }
.tx + .tx { border-top: 1px solid var(--line); }
.tx:hover { background: rgb(255 255 255 / .03); }
.tx:active { background: var(--track); }
.tx .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 20px; box-shadow: inset 0 0 0 1px rgb(255 255 255 / .06); }
.tx .d { min-width: 0; }
.tx .d b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .d small { color: var(--muted); font-size: 12.5px; }
.tx .v { font-weight: 750; font-size: 15px; text-align: right; letter-spacing: -.02em; }
.tx .v.in { color: var(--income); }
.day-head { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--text-2); font-weight: 700; margin: 18px 4px 8px; text-transform: capitalize; letter-spacing: .01em; }
.clip { font-size: 12px; margin-left: 4px; }

.search { display: flex; gap: 8px; margin-bottom: 12px; }
.search input { flex: 1; border-radius: 999px; padding-left: 18px; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px 0 4px; margin-bottom: 4px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; padding: 8px 16px; border-radius: 99px; background: var(--card); border: 1px solid var(--line); font-size: 14px; font-weight: 600; white-space: nowrap; transition: background .25s, color .25s, transform .2s var(--spring); }
.chip:hover:not(.on) { background: rgb(255 255 255 / .07); }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--active); border-color: #4fe063; color: #fff; box-shadow: var(--active-shadow); }

/* ---------- Formulários ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-2); margin-bottom: 7px; letter-spacing: .01em; }
.input, select.input, textarea.input {
  width: 100%; border: 1.5px solid var(--line); background: rgb(255 255 255 / .04); border-radius: 14px;
  padding: 13px 14px; outline: none; font-size: 16px; appearance: none; -webkit-appearance: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
}
.input::placeholder { color: var(--muted); }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-soft); }
.money { font-size: 32px !important; font-weight: 800; letter-spacing: -.04em; padding: 10px 14px !important; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--track); border-radius: 999px; padding: 4px; margin-bottom: 14px; position: relative; }
.seg button { padding: 10px; border-radius: 999px; font-weight: 700; font-size: 14.5px; color: var(--text-2); transition: background .25s, color .25s, box-shadow .25s; }
.seg button.on { background: rgb(255 255 255 / .1); color: var(--text); box-shadow: inset 0 1px 0 rgb(255 255 255 / .1); }
.seg button.on.out { color: var(--danger); }
.seg button.on.in { color: var(--income); }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cat-opt { border: 1.5px solid var(--line); background: var(--card); border-radius: 14px; padding: 10px 4px 8px; font-size: 12.5px; font-weight: 650; display: grid; gap: 3px; justify-items: center; transition: border-color .2s, background .2s, transform .25s var(--spring); }
.cat-opt span { font-size: 22px; transition: transform .35s var(--spring); }
.cat-opt.on { border-color: var(--lime); background: var(--primary-soft); transform: translateY(-2px); box-shadow: 0 0 16px rgb(157 255 31 / .15); }
.cat-opt.on span { transform: scale(1.18) rotate(-6deg); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 14px 18px; border-radius: 999px; font-weight: 750; font-size: 15.5px; background: var(--card-2); border: 1px solid var(--line); transition: transform .2s var(--spring), box-shadow .25s, background .2s, filter .2s; }
.btn:hover { background: rgb(255 255 255 / .08); }
.btn svg { width: 20px; height: 20px; }
.btn.primary { background: linear-gradient(180deg, #c2ff5c, #8be60f); border-color: transparent; color: var(--lime-ink); box-shadow: 0 10px 26px -8px rgb(157 255 31 / .55), inset 0 1px 0 rgba(255, 255, 255, .45); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.danger { background: var(--danger-soft); border-color: rgb(255 123 138 / .25); color: var(--danger); }
.btn.block { width: 100%; }
.btn:active { transform: scale(.96); }
.btn[disabled] { opacity: .6; }
.btns { display: grid; gap: 10px; margin-top: 8px; }

.ai-badge { display: inline-flex; align-items: center; gap: 6px; background: var(--primary-soft); color: var(--lime); border: 1px solid rgb(157 255 31 / .25); font-weight: 700; font-size: 12.5px; border-radius: 99px; padding: 6px 12px; margin-bottom: 14px; animation: pop .5s var(--spring) both; }
.receipt-thumb { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin-bottom: 14px; width: 100%; text-align: left; }
.receipt-thumb img { width: 54px; height: 54px; object-fit: cover; border-radius: 10px; background: var(--track); }
.receipt-thumb .pdf { width: 54px; height: 54px; border-radius: 10px; background: var(--danger-soft); display: grid; place-items: center; font-weight: 800; color: var(--danger); font-size: 13px; }
.receipt-thumb small { color: var(--muted); }
details.items { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; margin-bottom: 14px; font-size: 14px; }
details.items summary { font-weight: 700; cursor: pointer; }
details.items ul { list-style: none; padding: 0; margin: 8px 0 0; }
details.items li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-top: 1px dashed var(--line); }

/* ---------- Menu inferior flutuante (celular) ---------- */
.nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; padding: 0 12px calc(10px + var(--safe-b)); pointer-events: none; }
.nav-in {
  pointer-events: auto; position: relative; max-width: 536px; margin: 0 auto; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: var(--glass-solid); backdrop-filter: blur(22px) saturate(1.5); -webkit-backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 18px 40px -16px rgba(0, 0, 0, .6);
}
.nav-ind { position: absolute; top: 8px; left: 0; width: 20%; height: calc(var(--nav-h) - 16px); display: flex; justify-content: center; pointer-events: none; transition: transform .5s var(--spring), opacity .3s; }
.nav-ind::before { content: ""; width: 58px; height: 100%; border-radius: 16px; background: var(--active); box-shadow: 0 6px 18px rgb(15 162 51 / .4); }
.nav-in > button { position: relative; z-index: 1; display: grid; justify-items: center; gap: 2px; font-size: 10.5px; font-weight: 700; color: var(--muted); transition: color .3s; height: 100%; align-content: center; }
.nav-in > button svg { width: 23px; height: 23px; transition: transform .4s var(--spring); }
.nav-in > button.on { color: #fff; }
.nav-in > button.on svg { transform: translateY(-1px) scale(1.08); }
.fab { width: 58px; height: 58px; border-radius: 20px; background: linear-gradient(160deg, #c2ff5c, #7fdc0a) !important; color: var(--lime-ink) !important; display: grid !important; place-items: center; margin: -30px auto 0; box-shadow: 0 10px 26px rgba(157, 255, 31, .45), inset 0 1px 0 rgba(255, 255, 255, .45); animation: glowpulse 3s ease-in-out infinite; transition: transform .35s var(--spring) !important; height: 58px !important; }
.fab svg { width: 28px !important; height: 28px !important; transition: transform .4s var(--spring) !important; }
.fab:active { transform: scale(.9); }
body.sheet-open .fab svg { transform: rotate(45deg) !important; }

/* ---------- Janelas (sheets) ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgb(0 6 3 / .6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-end; justify-content: center; animation: fade .25s both; }
.overlay.closing { animation: fade .22s reverse both; pointer-events: none; }
.overlay.static, .sheet.static, .sheet.static > * { animation: none !important; }
.sheet { background: linear-gradient(180deg, #0c2416, #061409); border: 1px solid var(--line); border-bottom: 0; width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; border-radius: 30px 30px 0 0; padding: 10px 16px calc(22px + var(--safe-b)); animation: up .5s var(--spring) both; box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .6); touch-action: pan-y; }
.overlay.closing .sheet { animation: down .24s var(--ease) both; }
.sheet .grab { width: 42px; height: 5px; border-radius: 9px; background: var(--muted); opacity: .4; margin: 0 auto 4px; }
.sheet .grab-zone { padding: 6px 0 10px; margin: -10px -16px 0; cursor: grab; touch-action: none; }
.sheet h2 { margin: 0 0 16px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
.sheet > *:not(.grab-zone) { animation: rise .45s var(--ease) both; }
.sheet > *:nth-child(3) { animation-delay: .04s; } .sheet > *:nth-child(4) { animation-delay: .08s; } .sheet > *:nth-child(5) { animation-delay: .12s; } .sheet > *:nth-child(n+6) { animation-delay: .16s; }
.actions { display: grid; gap: 10px; }
.action { display: grid; grid-template-columns: 50px 1fr; gap: 14px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 13px; text-align: left; transition: transform .25s var(--spring), border-color .2s, background .2s; animation: rise .5s var(--ease) both; }
.action:hover { border-color: var(--line-2); background: rgb(255 255 255 / .06); }
.action:nth-child(2) { animation-delay: .05s; } .action:nth-child(3) { animation-delay: .1s; } .action:nth-child(4) { animation-delay: .15s; }
.action:active { transform: scale(.97); }
.action .ai { width: 50px; height: 50px; border-radius: 16px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); display: grid; place-items: center; font-size: 23px; }
.action b { display: block; font-size: 15.5px; letter-spacing: -.01em; }
.action small { color: var(--text-2); font-size: 13px; }

/* ---------- Lendo comprovante ---------- */
.loading { position: fixed; inset: 0; z-index: 60; background: radial-gradient(600px 400px at 50% 40%, rgba(63, 220, 42, .25), transparent 70%), rgba(2, 8, 5, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); display: grid; place-items: center; color: #fff; text-align: center; padding: 24px; animation: fade .3s both; }
.scan-anim { width: 128px; height: 164px; border-radius: 18px; margin: 0 auto 26px; position: relative; overflow: hidden; background: linear-gradient(180deg, rgba(255, 255, 255, .95), rgba(255, 255, 255, .82)); box-shadow: 0 30px 60px -20px rgba(63, 220, 42, .6), 0 0 0 1px rgba(255, 255, 255, .2); animation: float 3s ease-in-out infinite; }
.scan-anim::before { content: ""; position: absolute; left: 16px; right: 16px; top: 22px; height: 110px; background: repeating-linear-gradient(to bottom, #cfdcd6 0 5px, transparent 5px 15px); border-radius: 3px; }
.scan-anim::after { content: ""; position: absolute; left: -10%; right: -10%; height: 46px; background: linear-gradient(180deg, transparent, rgba(157, 255, 31, .35)); border-bottom: 3px solid var(--lime); box-shadow: 0 6px 18px rgba(157, 255, 31, .9); animation: scan 1.5s ease-in-out infinite alternate; }
@keyframes scan { from { top: -46px; } to { top: calc(100% - 46px); } }
.loading p { margin: 4px 0; font-size: 18px; letter-spacing: -.01em; }
.scan-msg { display: block; min-height: 20px; opacity: .8; font-size: 14px; transition: opacity .25s, transform .25s; }
.scan-msg.out { opacity: 0; transform: translateY(6px); }
.loading small { opacity: .6; }

/* ---------- Sucesso ---------- */
.success { position: fixed; inset: 0; z-index: 75; display: grid; place-items: center; pointer-events: none; animation: fade .2s both; }
.success > div { background: var(--glass-solid); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid var(--line-2); border-radius: 28px; padding: 26px 34px; text-align: center; box-shadow: var(--shadow-lg); animation: pop .5s var(--spring) both; }
.success svg { width: 72px; height: 72px; display: block; margin: 0 auto 10px; }
.success circle { stroke: var(--lime); stroke-dasharray: 190; stroke-dashoffset: 190; animation: draw .6s var(--ease) forwards; }
.success path { stroke: var(--lime); stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .35s .45s var(--ease) forwards; }
.success b { font-size: 16px; }
.success.out { animation: fade .25s reverse both; }

.viewer { position: fixed; inset: 0; z-index: 70; background: rgba(0, 0, 0, .94); display: grid; place-items: center; animation: fade .2s both; }
.viewer img { max-width: 100%; max-height: 100dvh; object-fit: contain; animation: pop .4s var(--spring) both; }
.viewer button { position: absolute; top: calc(12px + var(--safe-t)); right: 12px; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .15); color: #fff; font-size: 20px; }

#toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + 30px + var(--safe-b)); transform: translate(-50%, 24px) scale(.95); background: #11301d; border: 1px solid var(--line-2); color: #fff; padding: 12px 18px; border-radius: 16px; font-size: 14px; font-weight: 650; opacity: 0; pointer-events: none; transition: opacity .3s, transform .45s var(--spring); z-index: 80; max-width: calc(100% - 32px); text-align: center; box-shadow: 0 16px 40px -12px rgba(0, 0, 0, .6); }
#toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }
#toast.err { background: #5a1621; border-color: rgb(255 123 138 / .4); }

/* ---------- Estado vazio ---------- */
.empty { text-align: center; padding: 28px 14px; }
.empty .big-ic { font-size: 56px; display: inline-block; animation: float 3s ease-in-out infinite; filter: drop-shadow(0 12px 18px rgba(0, 0, 0, .3)); }
.empty h3 { margin: 10px 0 6px; font-size: 18px; justify-content: center; letter-spacing: -.02em; }
.empty p { color: var(--text-2); margin: 0 0 18px; font-size: 14.5px; }
.empty .btns { max-width: 420px; margin-left: auto; margin-right: auto; }

/* ---------- Chat ---------- */
.chat-page { display: flex; flex-direction: column; height: 100dvh; max-width: 760px; margin: 0 auto; padding: calc(16px + var(--safe-t)) 0 calc(var(--nav-h) + 12px + var(--safe-b)); }
.chat-head { padding: 0 16px 12px; display: flex; justify-content: space-between; align-items: center; }
.chat-head small { color: var(--text-2); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.chat-head small::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 3px var(--primary-soft), 0 0 8px var(--lime); }
.msgs { flex: 1; overflow-y: auto; padding: 6px 16px 12px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 11px 14px; border-radius: 20px; font-size: 15px; line-height: 1.5; word-wrap: break-word; }
.msg.new { animation: pop .45s var(--spring) both; transform-origin: bottom right; }
.msg.bot.new { transform-origin: bottom left; }
.msg.user { align-self: flex-end; background: var(--active); color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 8px 20px -10px rgba(15, 162, 51, .8); }
.msg.bot { align-self: flex-start; background: var(--glass); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.bot p { margin: 0 0 8px; }
.msg.bot p:last-child, .msg.bot ul:last-child { margin-bottom: 0; }
.msg.bot ul { margin: 0 0 8px; padding-left: 20px; }
@property --p { syntax: "<percentage>"; inherits: false; initial-value: 100%; }
@keyframes reveal { from { --p: 0%; } }
.msg.reveal { -webkit-mask-image: linear-gradient(180deg, #000 var(--p), transparent calc(var(--p) + 12%)); mask-image: linear-gradient(180deg, #000 var(--p), transparent calc(var(--p) + 12%)); animation: reveal 1.4s var(--ease) both; }
.typing span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin: 0 2px; animation: blink 1.1s infinite; }
.typing span:nth-child(2) { animation-delay: .15s; }
.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.suggest button { background: var(--card); border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; font-size: 13.5px; font-weight: 600; animation: rise .5s var(--ease) both; transition: transform .2s var(--spring), border-color .2s, background .2s; }
.suggest button:hover { border-color: var(--line-2); background: rgb(255 255 255 / .06); }
.suggest button:nth-child(2) { animation-delay: .06s; } .suggest button:nth-child(3) { animation-delay: .12s; } .suggest button:nth-child(4) { animation-delay: .18s; } .suggest button:nth-child(5) { animation-delay: .24s; }
.suggest button:active { transform: scale(.95); border-color: var(--lime); }
.composer { display: flex; gap: 8px; padding: 8px 16px; }
.composer textarea { flex: 1; resize: none; max-height: 120px; border-radius: 24px; padding: 12px 16px; }
.composer button { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(180deg, #c2ff5c, #8be60f); color: var(--lime-ink); display: grid; place-items: center; flex: 0 0 auto; align-self: flex-end; box-shadow: 0 8px 20px -8px rgba(157, 255, 31, .7); transition: transform .25s var(--spring); }
.composer button:active { transform: scale(.88) rotate(-12deg); }
.composer button svg { width: 20px; height: 20px; }
.chat-intro { text-align: center; padding: 22px 10px; color: var(--text-2); font-size: 14.5px; }
.chat-intro .big-ic { font-size: 46px; display: inline-grid; place-items: center; width: 84px; height: 84px; border-radius: 28px; background: rgb(255 255 255 / .05); border: 1px solid var(--line); animation: float 3s ease-in-out infinite; margin-bottom: 6px; }

/* ---------- Ajustes ---------- */
.set-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 8px; margin: 0 -8px; width: calc(100% + 16px); text-align: left; font-size: 15px; font-weight: 600; border-radius: 12px; transition: background .2s; }
.set-row:hover { background: rgb(255 255 255 / .03); }
.set-row + .set-row { border-top: 1px solid var(--line); }
.set-row small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 500; }
.set-row .arr { color: var(--muted); transition: transform .25s var(--spring); }
.set-row:active .arr { transform: translateX(4px); }
.note { font-size: 13px; color: var(--muted); text-align: center; margin: 16px 0; }

/* ---------- Boas-vindas / login ---------- */
.welcome { position: relative; min-height: 100dvh; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; padding: calc(24px + var(--safe-t)) 22px calc(24px + var(--safe-b)); isolation: isolate; }
.welcome::before, .welcome::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .35; pointer-events: none; }
.welcome::before { width: 380px; height: 380px; background: var(--primary); top: -140px; right: -120px; animation: drift1 10s ease-in-out infinite; }
.welcome::after { width: 300px; height: 300px; background: var(--lime); bottom: -140px; left: -100px; opacity: .18; animation: drift2 12s ease-in-out infinite; }
.welcome > * { animation: rise .7s var(--ease) both; }
.welcome > *:nth-child(2) { animation-delay: .08s; } .welcome > *:nth-child(3) { animation-delay: .16s; } .welcome > *:nth-child(4) { animation-delay: .24s; } .welcome > *:nth-child(5) { animation-delay: .32s; }
.welcome .logo { width: 80px; height: 80px; margin-bottom: 18px; border-radius: 22px; filter: drop-shadow(0 18px 30px rgba(63, 220, 42, .4)); animation: rise .7s var(--ease) both, float 4s 1s ease-in-out infinite; }
.welcome h1 { font-size: 31px; letter-spacing: -.045em; margin: 0 0 10px; line-height: 1.12; font-weight: 800; }
.welcome p.lead { color: var(--text-2); margin: 0 0 24px; font-size: 15.5px; }
.welcome form { padding: 20px; border: 1px solid var(--line); border-radius: 24px; background: var(--glass); box-shadow: var(--shadow); }
.feat { display: grid; gap: 10px; margin-bottom: 22px; }
.feat div { display: flex; gap: 12px; align-items: center; font-size: 14.5px; font-weight: 600; background: var(--glass); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px 8px 8px; animation: rise .6s var(--ease) both; }
.feat div:nth-child(1) { animation-delay: .3s; } .feat div:nth-child(2) { animation-delay: .38s; } .feat div:nth-child(3) { animation-delay: .46s; } .feat div:nth-child(4) { animation-delay: .54s; }
.feat span { width: 38px; height: 38px; border-radius: 50%; background: rgb(255 255 255 / .06); border: 1px solid var(--line); display: grid; place-items: center; font-size: 18px; flex: 0 0 auto; }

/* ---------- Tela de entrada (mesmo formato do Trackmatico e do Maticolink) ---------- */
.login { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; display: grid; grid-template-columns: minmax(360px, 1fr) 1.1fr; }
.login-side { display: grid; place-items: center; padding: calc(32px + var(--safe-t)) 16px calc(32px + var(--safe-b)); }
.login-card { width: min(380px, 100%); display: grid; gap: 4px; animation: rise .6s var(--ease) both; }
.login-logo { width: 52px; height: 52px; border-radius: 15px; filter: drop-shadow(0 12px 24px rgba(63, 220, 42, .35)); }
.login-card h1 { margin: 18px 0 0; font-size: 30px; font-weight: 800; letter-spacing: -.04em; line-height: 1.1; }
.login-eyebrow { color: var(--muted); font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.login-step { margin: 18px 0 0; font-size: 19px; font-weight: 800; letter-spacing: -.02em; }
.login-lead { color: var(--text-2); margin: 6px 0 12px; font-size: 15px; }
.login-card .field { margin-bottom: 10px; }
.login-card .btn.primary { margin-top: 10px; }
.login-card .btn + .btn { margin-top: 8px; }
.login-alert { margin: 2px 0 0; padding: 10px 12px; border-radius: 12px; font-size: 14px; color: var(--danger); background: var(--danger-soft); border: 1px solid rgb(255 123 138 / .25); }
.login-muted { color: var(--muted); font-size: 13px; margin: 12px 0 0; }
.login-art { display: grid; place-items: center; padding: 48px; color: #fff;
  background:
    radial-gradient(circle at 20% 15%, rgb(255 255 255 / .18), transparent 40%),
    linear-gradient(150deg, #04160b 0%, #0f7a2c 55%, #6fd81a 100%); }
.login-art > div { max-width: 420px; animation: rise .7s .1s var(--ease) both; }
.login-art h2 { margin: 0; font-size: 30px; line-height: 1.15; letter-spacing: -.02em; font-weight: 800; }
.login-art p { opacity: .9; font-size: 16px; margin: 10px 0 0; }
.login-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 28px 0 0; }
.login-tiles div { padding: 14px; border-radius: 14px; background: rgb(255 255 255 / .14); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.login-tiles dt { font-size: 12px; opacity: .85; }
.login-tiles dd { margin: 4px 0 0; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; }
@media (max-width: 900px) {
  .login { grid-template-columns: minmax(0, 1fr); }
  .login-art { display: none; }
}

/* ---------- Guia de instalação ---------- */
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 14px; display: grid; gap: 10px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 32px 1fr; gap: 12px; align-items: start; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 13px; font-size: 14.5px; animation: rise .5s var(--ease) both; }
.steps li:nth-child(2) { animation-delay: .06s; } .steps li:nth-child(3) { animation-delay: .12s; } .steps li:nth-child(4) { animation-delay: .18s; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 11px; background: var(--lime); color: var(--lime-ink); display: grid; place-items: center; font-weight: 800; font-size: 14px; box-shadow: 0 0 14px rgb(157 255 31 / .35); }
.kbd { display: inline-flex; align-items: center; gap: 4px; background: var(--track); border: 1px solid var(--line); border-radius: 8px; padding: 1px 8px; font-weight: 700; font-size: 13.5px; white-space: nowrap; }
.kbd svg { width: 15px; height: 15px; }
.tabs2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--track); border-radius: 999px; padding: 4px; margin-bottom: 14px; }
.tabs2 button { padding: 10px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); transition: background .25s, color .25s; }
.tabs2 button.on { background: var(--active); color: #fff; box-shadow: var(--active-shadow); }
.install-banner { display: flex; gap: 12px; align-items: center; background: linear-gradient(120deg, rgb(157 255 31 / .1), rgb(255 255 255 / .03)); border: 1px solid rgb(157 255 31 / .22); border-radius: 20px; padding: 12px; margin-bottom: 14px; }
.install-banner b { display: block; font-size: 14.5px; }
.install-banner small { color: var(--text-2); font-size: 12.5px; }
.install-banner .btn { padding: 9px 14px; font-size: 13.5px; margin-left: auto; flex: 0 0 auto; }
.x { width: 30px; height: 30px; border-radius: 50%; color: var(--muted); font-size: 18px; flex: 0 0 auto; }

/* ===== Resumo (sem IA) ===== */
.rep-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; padding: 10px 0; border-bottom: 1px solid var(--line); position: relative; overflow: hidden; border-radius: 10px; }
.rep-row:last-child { border-bottom: 0; }
.rep-row .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-size: 18px; }
.rep-row .d b { display: block; font-size: 14.5px; font-weight: 700; margin-bottom: 6px; }
.rep-row .pb { display: block; height: 5px; border-radius: 9px; background: var(--track); overflow: hidden; }
.rep-row .pb i { display: block; height: 100%; border-radius: 9px; transform-origin: left; animation: fillx 1s .2s var(--ease) both; }
.rep-row .v { text-align: right; min-width: 104px; }
.rep-row .v b { display: block; font-size: 14.5px; letter-spacing: -.02em; }
.cmp { font-size: 12px; font-weight: 700; color: var(--muted); }
.cmp.up { color: var(--danger); }
.cmp.down { color: var(--lime); }
.tip { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.tip:last-child { border-bottom: 0; }
.tip > span { font-size: 20px; line-height: 1.3; }
.tip p { margin: 0; font-size: 14px; line-height: 1.5; }

/* =========================================================
   Computador e tablet deitado: menu lateral + painel de vidro
   ========================================================= */
@media (min-width: 900px) {
  .fp-app { display: grid; grid-template-columns: 264px minmax(0, 1fr); gap: 18px; align-items: start; padding: 14px; }
  .nav { display: none; }
  #toast { bottom: 28px; }

  .fp-side {
    position: sticky; top: 14px; height: calc(100dvh - 28px);
    display: flex; flex-direction: column; gap: 12px; padding: 22px 16px 16px; overflow: hidden auto;
    border: 1px solid var(--line); border-radius: 26px;
    background: linear-gradient(180deg, rgb(14 44 27 / .92), rgb(4 14 9 / .96));
    isolation: isolate;
  }
  /* Brilho verde-limão no pé do menu, como no Trackmatico. */
  .fp-side::after { content: ""; position: absolute; inset: auto 0 0; height: 220px; z-index: -1; pointer-events: none; background: var(--curve) no-repeat bottom / 100% 100%; opacity: .7; }
  .fp-brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 10px; font-size: 22px; font-weight: 800; letter-spacing: -.03em; }
  .fp-brand img { width: 40px; height: 40px; border-radius: 12px; }
  .fp-brand b { color: var(--lime); }
  .fp-side > .btn.primary { margin-bottom: 4px; }
  .fp-side-label { margin: 14px 0 0 10px; color: var(--text-2); font-size: 12.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
  .fp-side-nav { display: grid; gap: 10px; }
  .fp-side-nav > button {
    display: flex; align-items: center; gap: 14px; padding: 12px 18px;
    border: 1px solid var(--line); border-radius: 999px; background: rgb(255 255 255 / .03);
    color: var(--text); font-size: 15px; font-weight: 500; text-align: left;
    transition: background .15s, border-color .15s;
  }
  .fp-side-nav > button svg { width: 20px; height: 20px; flex: none; }
  .fp-side-nav > button:hover:not(.on) { border-color: var(--line-2); background: rgb(255 255 255 / .06); }
  .fp-side-nav > button.on { border-color: #4fe063; background: var(--active); color: #fff; font-weight: 600; box-shadow: var(--active-shadow); }
  .fp-side-user { margin-top: auto; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 8px; border-radius: 16px; background: rgb(2 8 5 / .65); border: 1px solid var(--line); text-align: left; font-size: 13px; color: var(--text-2); }
  .fp-side-user .av { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--lime); color: var(--lime-ink); font-weight: 800; font-size: 15px; }
  .fp-side-user > span:last-child { min-width: 0; }
  .fp-side-user b, .fp-side-user small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .fp-side-user b { color: var(--text); font-size: 14px; }

  .page {
    max-width: 1180px; margin: 0; min-height: calc(100dvh - 28px); padding: 30px 32px 40px;
    border: 1px solid var(--line); border-radius: 28px;
    background: linear-gradient(180deg, rgb(14 42 26 / .7), rgb(4 14 9 / .78));
    box-shadow: inset 0 1px 0 rgb(255 255 255 / .06), 0 30px 80px rgb(0 0 0 / .35);
  }
  .chat-page {
    max-width: 1180px; margin: 0; height: calc(100dvh - 28px); padding: 26px 16px 16px;
    border: 1px solid var(--line); border-radius: 28px;
    background: linear-gradient(180deg, rgb(14 42 26 / .7), rgb(4 14 9 / .78));
  }
  .chat-page > * { width: 100%; max-width: 820px; margin-left: auto; margin-right: auto; }
  .title { font-size: 34px; }
  .topbar { margin-bottom: 22px; }

  .hero { padding: 26px 28px; }
  .hero .curve { height: 72%; }
  .hero .big { font-size: 52px; }
  .tiles { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 16px; }
  .tile { padding: 20px 22px 22px; }
  .tile-l { font-size: 15px; font-weight: 500; }
  .tile-ic { width: 44px; height: 44px; border-radius: 14px; }
  .tile-ic svg { width: 22px; height: 22px; }
  .tile-v { font-size: 30px; }
  .tile small { font-size: 13.5px; }
  .bar { height: 8px; margin-top: 16px; }
  .card { padding: 22px; margin-bottom: 16px; }
  .bars { max-height: 240px; }
  .fp-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }

  .page-settings { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-content: start; }
  .page-settings > .topbar, .page-settings > .note { grid-column: 1 / -1; }
  .page-settings > .card { margin: 0; }

  /* No computador, as janelas abrem no meio da tela. */
  .overlay { align-items: center; padding: 24px; }
  .sheet { max-width: 540px; max-height: 88dvh; border-radius: 28px; border-bottom: 1px solid var(--line); padding: 10px 22px 24px; animation: pop .4s var(--spring) both; }
  .overlay.closing .sheet { animation: fade .2s reverse both; }
  .sheet .grab-zone { margin: -10px -22px 0; cursor: default; }
  .sheet .grab { opacity: 0; }
}

/* ---------- Acessibilidade: menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}

/* Conferência do extrato (várias movimentações de um print) */
.batch-note { color: var(--muted); font-size: 13px; margin: -4px 0 12px; }
.batch-sum { display: flex; gap: 10px; margin-bottom: 12px; }
.batch-sum span { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.batch-sum b { color: var(--danger); font-size: 16px; }
.batch-sum b.in { color: var(--income); }
.batch-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.batch-row { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--danger); border-radius: 14px; padding: 10px; transition: opacity .2s; }
.batch-row.in { border-left-color: var(--income); }
.batch-row.off { opacity: .45; }
.batch-check { padding-top: 10px; }
.batch-check input { width: 20px; height: 20px; accent-color: var(--primary); }
.batch-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.batch-top, .batch-bottom { display: flex; gap: 6px; align-items: center; min-width: 0; }
.batch-top .input:first-child { flex: 1; min-width: 0; }
.batch-bottom .input { flex: 1; min-width: 0; }
.batch-main .input { padding: 8px 10px; font-size: 14px; min-height: 0; }
.batch-amt { width: 104px; flex: none; text-align: right; }
.batch-sign { font-weight: 800; color: var(--danger); }
.batch-row.in .batch-sign { color: var(--income); }
.batch-dup { color: var(--warn); font-size: 12px; font-weight: 700; }

/* ===== Economizar ===== */
.top-r { display: flex; align-items: center; gap: 8px; }
.top-gear { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.top-gear svg { width: 20px; height: 20px; }
.eco-hero .lbl { font-weight: 700; margin-bottom: 12px; }
.eco-goals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.eco-goals .chip { padding: 10px 4px; text-align: center; }
.eco-custom { display: flex; gap: 8px; margin-bottom: 12px; }
.eco-custom .input { flex: 1; min-width: 0; }
.eco-custom .btn { padding: 10px 16px; font-size: 14px; flex: none; }
.eco-year { font-size: 14px; color: rgb(255 255 255 / .85); }
.eco-year b { color: var(--lime); }
.eco-merch { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
.eco-merch:last-child { border-bottom: 0; }
.eco-merch .n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--lime); font-weight: 800; font-size: 13px; }
.eco-merch .d { min-width: 0; }
.eco-merch .d b, .eco-merch .d small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eco-merch .d small { color: var(--muted); font-size: 12.5px; }
.eco-step { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); animation: rise .5s var(--ease) both; }
.eco-step:last-of-type { border-bottom: 0; }
.eco-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--active); color: #fff; font-weight: 800; font-size: 14px; box-shadow: var(--active-shadow); }
.eco-body { flex: 1; min-width: 0; }
.eco-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.eco-top b { font-size: 15px; line-height: 1.35; }
.eco-save { flex: none; color: var(--lime); font-weight: 800; font-size: 15px; white-space: nowrap; }
.eco-save small { font-size: 11px; color: var(--muted); font-weight: 600; }
.eco-body p { margin: 6px 0 8px; font-size: 13.5px; line-height: 1.5; color: var(--text-2); }
.eco-tags { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12.5px; color: var(--muted); }
.eco-ease { padding: 2px 10px; border-radius: 99px; font-weight: 700; background: var(--primary-soft); color: var(--lime); }
.eco-ease.medio { background: rgb(255 194 74 / .12); color: var(--warn); }
.eco-ease.dificil { background: var(--danger-soft); color: var(--danger); }
.eco-sum { display: flex; justify-content: space-between; align-items: center; margin: 6px 0 4px; padding: 14px 16px; border-radius: 16px; background: var(--primary-soft); border: 1px solid rgb(157 255 31 / .25); font-weight: 700; }
.eco-sum b { color: var(--lime); font-size: 20px; }
.eco-sum small { font-size: 12px; color: var(--muted); }
.eco-warn { font-size: 13.5px; color: var(--warn); margin: 10px 0 0; line-height: 1.5; }
.eco-active .bar, .eco-mini .bar { display: block; margin: 0 0 12px; }
.eco-mini { cursor: pointer; }
.eco-mini .card-head { margin-bottom: 12px; }
.eco-total { font-size: 13.5px; color: var(--text-2); margin: 0 0 10px; }
.eco-total b { color: var(--lime); }
.eco-limit { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.eco-limit .ic { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--card-2); font-size: 17px; }
.eco-limit .d { min-width: 0; }
.eco-limit .d b { display: block; font-size: 14px; }
.eco-limit .d small { display: block; font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: 5px; }
.eco-limit .pb { display: block; height: 5px; border-radius: 9px; background: var(--track); overflow: hidden; }
.eco-limit .pb i { display: block; height: 100%; border-radius: 9px; background: var(--lime); }
.eco-limit .pb.over i { background: var(--danger); }
.eco-limit .v { text-align: right; }
.eco-limit .v b { display: block; font-size: 14px; }
.eco-limit .v small { font-size: 11.5px; color: var(--muted); }
.eco-hist { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.eco-hist span { font-size: 12px; padding: 4px 10px; border-radius: 99px; background: var(--track); color: var(--muted); font-weight: 600; text-transform: capitalize; }
.eco-hist span.ok { background: var(--primary-soft); color: var(--lime); }
@media (min-width: 900px) { .top-gear { display: none; } }

/* ===== Contas do mês (lembretes) ===== */
.top-bell { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--text-2); }
.top-bell svg { width: 20px; height: 20px; }
.top-bell i { position: absolute; top: -3px; right: -3px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--danger); color: #fff; font: 800 11px/18px inherit; font-style: normal; text-align: center; box-shadow: 0 0 0 2px var(--bg); }
.bill { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); }
.card-head + .bill, .bar + .bill, .card > .bill:first-of-type { border-top: 0; }
.bill-main { flex: 1; min-width: 0; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left; border-radius: 12px; }
.bill-main .ic { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; background: var(--card-2); font-size: 18px; border: 1px solid transparent; }
.bill-main .d { min-width: 0; }
.bill-main .d b { display: block; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bill-main .d small { display: block; font-size: 12.5px; color: var(--muted); }
.bill-main .v { text-align: right; }
.bill-main .v b { display: block; font-size: 14.5px; letter-spacing: -.02em; }
.bill-main .v small { font-size: 11.5px; color: var(--muted); }
.bill.st-late .bill-st, .bill.st-today .bill-st { color: var(--danger); font-weight: 700; }
.bill.st-soon .bill-st { color: var(--warn); font-weight: 700; }
.bill.st-paid .bill-st { color: var(--lime); }
.bill.st-late .ic, .bill.st-today .ic { border-color: rgb(255 123 138 / .45); background: var(--danger-soft); }
.bill.st-soon .ic { border-color: rgb(255 194 74 / .4); background: rgb(255 194 74 / .1); }
.bill.st-paid .bill-main { opacity: .75; }
.bill-pay { flex: none; padding: 8px 14px; border-radius: 99px; font-size: 13px; font-weight: 800; background: var(--active); color: #fff; box-shadow: var(--active-shadow); transition: transform .2s var(--spring); }
.bill-pay:active { transform: scale(.92); }
.bill-ok { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--lime); font-weight: 900; }
.bill.sug { flex-direction: column; align-items: stretch; }
.bill.sug .bill-main { width: 100%; }
.bill-sug-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.bill-sug-btns .btn { padding: 9px 10px; font-size: 13px; }
.bill-alert { margin: 0 0 14px; padding: 12px 16px; border-radius: 16px; background: var(--danger-soft); border: 1px solid rgb(255 123 138 / .3); color: var(--text); font-size: 14px; line-height: 1.5; }
.check-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 14px; background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.check-row input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--primary); flex: none; }
.check-row b { display: block; font-size: 14.5px; }
.check-row small { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sheet-p { font-size: 14.5px; line-height: 1.55; color: var(--text-2); margin: 0 0 12px; }
.card > .bar { display: block; margin: -4px 0 6px; }
