/* Meio-Termo · pastel, macio, leve */
:root {
  --bg: #FBF7F3; --card: #FFFFFF; --ink: #3B3552; --soft: #6E6886; --muted: #A19BB5; --line: #F0EAF3;
  --lav: #B9AAF6; --lav-d: #7B68D9; --lav-l: #F1EDFF;
  --mint: #9FDCC5; --mint-d: #2F9C77; --mint-l: #E6F7F0;
  --peach: #F7B9A9; --peach-d: #D2654F; --peach-l: #FDEEEA;
  --pink: #F7B3C2; --pink-l: #FDEDF1;
  --butter: #F8D98B; --butter-d: #B8862A; --butter-l: #FFF7E1;
  --sky: #A9D3F5; --sky-d: #3B82C4; --sky-l: #EAF4FD;
  --r: 22px; --shadow: 0 1px 2px rgba(59,53,82,.04), 0 8px 24px rgba(123,104,217,.08);
  --ease: cubic-bezier(.2,.9,.3,1.2); --ease-out: cubic-bezier(.16,1,.3,1);
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 600 15px/1.45 Nunito, 'Noto Color Emoji', system-ui, sans-serif; }
/* App "preso" na tela: sem folga para os lados, sem quique em cima/embaixo, sem zoom de toque duplo */
html, body { width: 100%; overflow-x: hidden; overflow-x: clip; overscroll-behavior: none; touch-action: pan-x pan-y; }
body { min-height: 100dvh; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
input, select, textarea { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 12px 14px; width: 100%; outline: none; transition: border-color .2s, box-shadow .2s; }
input:focus, select:focus, textarea:focus { border-color: var(--lav); box-shadow: 0 0 0 4px var(--lav-l); }
.num { font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.hide { display: none !important; }
svg.i { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Estrutura ---------- */
.wrap { max-width: 1120px; margin: 0 auto; padding: 18px 18px calc(110px + var(--safe-b)); }
.top { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-size: 22px; flex: none; box-shadow: inset 0 0 0 3px #fff, 0 2px 8px rgba(0,0,0,.06); }
.avatar.sm { width: 26px; height: 26px; font-size: 13px; box-shadow: inset 0 0 0 2px #fff; }
.hello b { display: block; font-size: 19px; font-weight: 900; line-height: 1.1; }
.hello span { color: var(--muted); font-size: 13px; }
.top .grow { flex: 1; }
.icon-btn { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--card); color: var(--soft); box-shadow: var(--shadow); transition: transform .2s var(--ease); }
.icon-btn:active { transform: scale(.9); }
.couple { display: flex; }
.couple .avatar { margin-left: -10px; }

/* meses */
.months { display: flex; align-items: center; gap: 6px; margin: 0 -18px 16px; padding: 4px 18px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
.months::-webkit-scrollbar { display: none; }
.mchip { flex: none; padding: 8px 14px; border-radius: 99px; background: var(--card); color: var(--soft); font-weight: 800; font-size: 13px; text-transform: capitalize; scroll-snap-align: center; transition: all .25s var(--ease); box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.mchip.on { background: var(--ink); color: #fff; transform: scale(1.06); }
.mchip.now:not(.on) { box-shadow: inset 0 0 0 2px var(--lav); }

.grid { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.side { display: grid; gap: 14px; }
@media (min-width: 900px) {
  .grid { grid-template-columns: 400px 1fr; align-items: start; }
  .grid > .side { position: sticky; top: 18px; }
}

/* ---------- Saldo (herói) ---------- */
.hero { position: relative; overflow: hidden; border-radius: 28px; padding: 22px 22px 18px; background: linear-gradient(135deg, #EDE7FF 0%, #FFE6EE 55%, #FFF1DC 100%); box-shadow: var(--shadow); }
.hero::before, .hero::after { content: ''; position: absolute; border-radius: 50%; filter: blur(2px); opacity: .55; animation: float 9s ease-in-out infinite; }
.hero::before { width: 160px; height: 160px; right: -40px; top: -50px; background: radial-gradient(circle at 30% 30%, #fff, var(--lav)); }
.hero::after { width: 110px; height: 110px; right: 70px; bottom: -60px; background: radial-gradient(circle at 30% 30%, #fff, var(--pink)); animation-delay: -4s; }
@keyframes float { 50% { transform: translate(-10px, 8px) scale(1.06); } }
.hero > * { position: relative; z-index: 1; }
.hero .lbl { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--soft); }
.hero .big { font-size: 40px; font-weight: 900; line-height: 1.1; margin: 4px 0 14px; }
.hero .big.neg { color: var(--peach-d); }
.hero .row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-top: 12px; border-top: 1.5px dashed rgba(123,104,217,.2); }
.hero .row b { font-size: 18px; font-weight: 900; }
.pill { white-space: nowrap; flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; background: rgba(255,255,255,.7); font-size: 12.5px; font-weight: 800; color: var(--soft); backdrop-filter: blur(6px); }

.flow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.flow .card { padding: 14px; display: flex; align-items: center; gap: 10px; min-width: 0; }
.flow .dot { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; flex: none; }
.flow .in .dot { background: var(--mint-l); color: var(--mint-d); }
.flow .out .dot { background: var(--peach-l); color: var(--peach-d); }
.flow small { display: block; font-size: 12px; color: var(--muted); font-weight: 700; }
.flow b { font-size: clamp(13.5px, 4.1vw, 16.5px); font-weight: 900; white-space: nowrap; }
.flow .card > div:last-child { min-width: 0; }
.flow .in b { color: var(--mint-d); }
.flow .out b { color: var(--peach-d); }

.card { background: var(--card); border-radius: var(--r); box-shadow: var(--shadow); }
.section-t { display: flex; align-items: center; justify-content: space-between; margin: 6px 4px 0; }
.section-t h3 { margin: 0; font-size: 16px; font-weight: 900; }
.section-t button { color: var(--lav-d); font-weight: 800; font-size: 13px; }

/* ---------- Caixinhas ---------- */
.boxes { display: grid; gap: 10px; }
.box { padding: 14px 16px; display: grid; grid-template-columns: 46px 1fr; gap: 4px 12px; align-items: center; }
.box .emo { grid-row: span 3; width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; }
.box .t { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.box .t b { font-weight: 900; }
.box .t span { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; }
.box .bar { height: 10px; border-radius: 99px; background: var(--line); overflow: hidden; }
.box .bar i { display: block; height: 100%; border-radius: 99px; width: 0; transition: width 1.1s var(--ease-out); }
.box .msg { font-size: 12.5px; color: var(--soft); font-weight: 700; }
.box.essencial .emo { background: var(--sky-l); } .box.essencial .bar i { background: linear-gradient(90deg, var(--sky), #7FB8EC); }
.box.guardar .emo { background: var(--mint-l); } .box.guardar .bar i { background: linear-gradient(90deg, var(--mint), #6CC9A6); }
.box.viver .emo { background: var(--butter-l); } .box.viver .bar i { background: linear-gradient(90deg, var(--butter), var(--pink)); }
.box.x0 .emo { background: var(--lav-l); } .box.x0 .bar i { background: linear-gradient(90deg, var(--lav), #9E8CF0); }
.box.x1 .emo { background: var(--pink-l); } .box.x1 .bar i { background: linear-gradient(90deg, var(--pink), #EE93A9); }
.box.x2 .emo { background: var(--peach-l); } .box.x2 .bar i { background: linear-gradient(90deg, var(--peach), #F09A86); }
.split .x0 { background: var(--lav); } .split .x1 { background: var(--pink); } .split .x2 { background: var(--peach); }
.xdel { color: var(--muted); vertical-align: middle; }
.xdel svg { width: 14px; height: 14px; }
.box.over .bar i { background: linear-gradient(90deg, var(--peach), var(--peach-d)); }
.boxes-empty { padding: 16px; font-size: 13.5px; color: var(--soft); text-align: center; }

.pending { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--butter-l); border-radius: 18px; font-weight: 800; color: var(--butter-d); width: 100%; text-align: left; }
.pending .grow { flex: 1; }

/* ---------- Lançamentos ---------- */
.day { margin: 14px 10px 4px; font-size: 13px; font-weight: 900; color: var(--muted); display: flex; justify-content: space-between; }
.day:first-child { margin-top: 6px; }
.list { padding: 6px; }
.tx { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 16px; text-align: left; transition: background .2s, transform .15s; animation: rise .45s var(--ease-out) both; }
.tx:hover { background: #FBF9FD; }
.tx:active { transform: scale(.985); }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
.tx .emo { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-size: 22px; flex: none; position: relative; }
.tx .emo .avatar { position: absolute; right: -6px; bottom: -6px; }
/* Identidade Tindin: o fundo do ícone é sempre a cor da caixinha (veja DESIGN.md) */
.tn-entrada { background: var(--mint-l); box-shadow: inset 0 0 0 1.5px #CFEFE2; }
.tn-essencial { background: var(--sky-l); box-shadow: inset 0 0 0 1.5px #D3E7F9; }
.tn-guardar { background: var(--mint-l); box-shadow: inset 0 0 0 1.5px #CFEFE2; }
.tn-viver { background: var(--butter-l); box-shadow: inset 0 0 0 1.5px #F8E7BC; }
.tn-x0 { background: var(--lav-l); box-shadow: inset 0 0 0 1.5px #DED6FB; }
.tn-x1 { background: var(--pink-l); box-shadow: inset 0 0 0 1.5px #F9D5DE; }
.tn-x2 { background: var(--peach-l); box-shadow: inset 0 0 0 1.5px #F9D9D0; }
.tn-conta { background: #F6F3F9; box-shadow: inset 0 0 0 1.5px var(--line); }
.tx .mid { flex: 1; min-width: 0; }
.tx .mid b { display: block; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx .mid small { color: var(--muted); font-weight: 700; font-size: 12.5px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tag { padding: 1px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; background: var(--line); color: var(--soft); }
.tag.wait { background: var(--butter-l); color: var(--butter-d); }
.tag.nota { background: var(--lav-l); color: var(--lav-d); }
.tx .val { font-weight: 900; font-size: 16px; white-space: nowrap; }
.tx.in .val { color: var(--mint-d); } .tx.out .val { color: var(--ink); }
.tx.unpaid { opacity: .62; }
.empty { text-align: center; padding: 40px 20px; color: var(--soft); }
.empty .big-emo { font-size: 54px; display: block; margin-bottom: 8px; animation: bob 3s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-6deg); } }

/* ---------- Barra de baixo ---------- */
.nav { position: fixed; left: 50%; bottom: max(12px, calc(8px + var(--safe-b))); transform: translateX(-50%); will-change: transform; z-index: 20; display: flex; align-items: center; gap: 4px; padding: 8px; background: rgba(255,255,255,.88); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 28px; box-shadow: 0 10px 40px rgba(59,53,82,.14); }
.nav button { width: 54px; height: 48px; border-radius: 18px; display: grid; place-items: center; color: var(--muted); transition: all .25s var(--ease); position: relative; }
.nav button.on { color: var(--lav-d); background: var(--lav-l); }
.nav button .badge { position: absolute; top: 8px; right: 11px; width: 9px; height: 9px; border-radius: 50%; background: var(--peach-d); box-shadow: 0 0 0 2px #fff; }
.nav .plus { width: 62px; height: 62px; margin: -18px 4px 0; border-radius: 22px; color: #fff; background: linear-gradient(135deg, #9C8AF0, #E79CB5); box-shadow: 0 10px 24px rgba(156,138,240,.45); }
.nav .plus svg { width: 28px; height: 28px; stroke-width: 2.6; }
.nav .plus:active { transform: scale(.9) rotate(90deg); }
.nav .cam { color: var(--lav-d); }

/* ---------- Folhas (bottom sheets) ---------- */
.sheet-bg { position: fixed; inset: 0; z-index: 50; background: rgba(59,53,82,.28); backdrop-filter: blur(3px); animation: fade .25s both; display: flex; align-items: flex-end; justify-content: center; }
.sheet-bg.closing { animation: fade .2s reverse both; }
@keyframes fade { from { opacity: 0; } }
.sheet { width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto; background: var(--bg); border-radius: 30px 30px 0 0; padding: 10px 20px calc(24px + var(--safe-b)); animation: up .42s var(--ease-out) both; overscroll-behavior: contain; }
.sheet-bg.closing .sheet { animation: up .22s reverse both; }
@keyframes up { from { transform: translateY(100%); } }
@keyframes popin { from { transform: scale(.94); opacity: 0; } }
@media (min-width: 700px) { .sheet-bg { align-items: center; } .sheet { border-radius: 30px; animation-name: popin; } .sheet-bg.closing .sheet { animation-name: popin; } }
.grab { width: 44px; height: 5px; border-radius: 9px; background: #E2DBEA; margin: 0 auto 12px; }
.sheet h2 { margin: 2px 0 14px; font-size: 21px; font-weight: 900; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sheet h2 .icon-btn { width: 36px; height: 36px; box-shadow: none; background: #fff; }
.field { margin-bottom: 14px; }
.field > label, .lbl2 { display: block; font-size: 12.5px; font-weight: 800; color: var(--soft); margin: 0 0 6px 4px; }

.seg { display: grid; grid-template-columns: 1fr 1fr; padding: 5px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 14px; position: relative; }
.seg button { padding: 11px; border-radius: 14px; font-weight: 900; color: var(--muted); position: relative; z-index: 1; transition: color .25s; }
.seg::before { content: ''; position: absolute; top: 5px; bottom: 5px; left: 5px; width: calc(50% - 5px); border-radius: 14px; background: var(--peach-l); transition: transform .35s var(--ease), background .35s; }
.seg.in::before { transform: translateX(100%); background: var(--mint-l); }
.seg button.on { color: var(--ink); }

.amount { text-align: center; padding: 16px 10px 12px; border-radius: 24px; margin-bottom: 14px; transition: background .35s; }
.amount.out { background: var(--peach-l); } .amount.in { background: var(--mint-l); }
.amount small { font-size: 12.5px; font-weight: 800; color: var(--soft); }
.amount input { border: 0; background: transparent; box-shadow: none !important; text-align: center; font-size: 42px; font-weight: 900; padding: 2px; caret-color: var(--lav-d); }
.amount.out input { color: var(--peach-d); } .amount.in input { color: var(--mint-d); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 9px 13px; border-radius: 14px; background: #fff; font-weight: 800; font-size: 13.5px; color: var(--soft); box-shadow: 0 1px 2px rgba(0,0,0,.04); display: inline-flex; align-items: center; gap: 6px; transition: all .22s var(--ease); border: 1.5px solid transparent; }
.chip:active { transform: scale(.94); }
.chip.on { background: var(--lav-l); color: var(--lav-d); border-color: var(--lav); }
.chip input[type=date] { border: 0; padding: 0; width: auto; background: transparent; box-shadow: none !important; font-weight: 800; color: inherit; }
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px; }
.cat { padding: 10px 4px 8px; border-radius: 16px; background: #fff; display: grid; justify-items: center; gap: 2px; font-size: 11.5px; font-weight: 800; color: var(--soft); border: 1.5px solid transparent; transition: all .22s var(--ease); line-height: 1.15; text-align: center; }
.cat span { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; margin-bottom: 4px; transition: transform .3s var(--ease); }
.cat-h { font-size: 12px; font-weight: 900; color: var(--soft); letter-spacing: .02em; margin: 12px 0 6px; }
#cats .cat-h:first-child, #catL .cat-h:first-child { margin-top: 4px; }
.cat.on { border-color: var(--lav); background: var(--lav-l); color: var(--lav-d); }
.cat.on span { transform: scale(1.18) rotate(-6deg); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.switch { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; background: #fff; border-radius: 16px; font-weight: 800; width: 100%; text-align: left; }
.switch small { display: block; font-weight: 700; color: var(--muted); font-size: 12.5px; }
.switch i { width: 46px; height: 28px; border-radius: 99px; background: #E6E0EE; position: relative; transition: background .25s; flex: none; }
.switch i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .3s var(--ease); }
.switch.on i { background: var(--mint-d); } .switch.on i::after { transform: translateX(18px); }

.btn { width: 100%; padding: 16px; border-radius: 18px; font-weight: 900; font-size: 16px; color: #fff; background: linear-gradient(135deg, #8F7CEB, #D98FB0); box-shadow: 0 10px 24px rgba(143,124,235,.32); transition: transform .2s var(--ease), opacity .2s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.out { background: linear-gradient(135deg, #F09A86, #E07BA0); box-shadow: 0 10px 24px rgba(224,123,160,.3); }
.btn.in { background: linear-gradient(135deg, #5BC59D, #7AC4E0); box-shadow: 0 10px 24px rgba(91,197,157,.32); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.btn.danger { background: var(--peach-l); color: var(--peach-d); box-shadow: none; }
.btn.sm { padding: 11px; font-size: 14px; border-radius: 14px; }
.btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.link { color: var(--lav-d); font-weight: 800; }
.hint { font-size: 12.5px; color: var(--muted); font-weight: 700; margin: 8px 4px 0; text-align: center; }

/* ---------- Detalhe ---------- */
.det-head { text-align: center; padding: 4px 0 16px; }
.det-head .emo { width: 78px; height: 78px; margin: 0 auto 10px; border-radius: 26px; display: grid; place-items: center; font-size: 38px; animation: pop2 .5s var(--ease) both; }
@keyframes pop2 { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.det-head .val { font-size: 34px; font-weight: 900; }
.det-head.in .emo { background: var(--mint-l); } .det-head.in .val { color: var(--mint-d); }
.det-head.out .emo { background: var(--peach-l); }
.det-head p { margin: 2px 0 0; color: var(--soft); font-weight: 700; }
.kv { padding: 4px 16px; margin-bottom: 14px; }
.kv > div { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1.5px solid var(--line); font-weight: 700; }
.kv > div:last-child { border: 0; }
.kv span { color: var(--muted); }

/* conselho */
.advice { position: relative; padding: 18px; border-radius: 24px; background: linear-gradient(135deg, #F4F0FF, #FFF1F5); margin-bottom: 14px; overflow: hidden; }
.advice .h { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; padding-right: 20px; }
.advice .h .e { font-size: 30px; animation: pop2 .6s var(--ease) both; }
.advice .h b { font-size: 16.5px; font-weight: 900; line-height: 1.2; }
.advice p { margin: 0; color: var(--ink); font-weight: 600; line-height: 1.55; }
.advice .priv { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-size: 11.5px; font-weight: 800; color: var(--lav-d); opacity: .8; }
.advice .priv svg { width: 13px; height: 13px; }
.swaps { margin-top: 12px; display: grid; gap: 8px; }
.swap { background: rgba(255,255,255,.75); border-radius: 14px; padding: 10px 12px; font-size: 13.5px; display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; }
.swap b { font-weight: 900; } .swap em { font-style: normal; font-weight: 900; color: var(--mint-d); grid-row: span 2; align-self: center; white-space: nowrap; }
.swap span { color: var(--soft); }
.thinking { display: flex; align-items: center; gap: 10px; color: var(--lav-d); font-weight: 800; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--lav); animation: dot 1.2s infinite; }
.dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 30% { transform: translateY(-6px); background: var(--pink); } }

/* nota fiscal */
.receipt { padding: 8px 14px; margin-bottom: 14px; }
.receipt .it { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1.5px dashed var(--line); font-size: 14px; }
.receipt .it:last-child { border: 0; }
.receipt .it .n { display: flex; gap: 8px; align-items: center; min-width: 0; }
.receipt .it .n b { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.receipt .it .p { font-weight: 800; white-space: nowrap; }
.kdot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.kdot.essencial { background: var(--sky); } .kdot.conveniencia { background: var(--butter); } .kdot.mimo { background: var(--pink); }
.mix { display: flex; height: 12px; border-radius: 99px; overflow: hidden; margin: 6px 0 8px; background: var(--line); }
.mix i { height: 100%; transition: width 1s var(--ease-out); }
.mix .essencial { background: var(--sky); } .mix .conveniencia { background: var(--butter); } .mix .mimo { background: var(--pink); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; font-weight: 800; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.scan { position: relative; border-radius: 22px; overflow: hidden; display: grid; place-items: center; background: #fff; margin-bottom: 14px; }
.scan img { width: 100%; max-height: 46dvh; object-fit: cover; filter: saturate(.8); display: block; }
.scan::after { content: ''; position: absolute; left: 0; right: 0; height: 90px; background: linear-gradient(180deg, transparent, rgba(185,170,246,.55), transparent); animation: scan 1.8s ease-in-out infinite; }
@keyframes scan { 0% { top: -90px; } 100% { top: 100%; } }

/* ---------- Avisos (toasts) ---------- */
#toasts { position: fixed; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(440px, calc(100% - 24px)); pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 20px; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); box-shadow: 0 12px 36px rgba(59,53,82,.18); font-weight: 700; animation: drop .5s var(--ease) both; cursor: pointer; }
.toast.bye { animation: drop .3s reverse both; }
@keyframes drop { from { transform: translateY(-30px) scale(.95); opacity: 0; } }
.toast.err { background: var(--peach-l); color: var(--peach-d); }

/* conselho que sobe depois de lançar */
.tipcard { position: fixed; left: 50%; bottom: calc(96px + var(--safe-b)); transform: translateX(-50%); width: min(460px, calc(100% - 24px)); z-index: 30; animation: tipin .55s var(--ease) both; box-shadow: 0 16px 40px rgba(123,104,217,.22); margin: 0; }
.tipcard.bye { animation: tipin .3s reverse both; }
@keyframes tipin { from { transform: translate(-50%, 40px) scale(.95); opacity: 0; } }
.tipcard .x { position: absolute; top: 10px; right: 10px; color: var(--muted); padding: 4px; z-index: 2; }

/* moedas voando */
.coin-fx { position: fixed; z-index: 95; pointer-events: none; font-size: 26px; animation: coinUp 1.1s var(--ease-out) forwards; }
.coin-fx.down { animation-name: coinDown; }
@keyframes coinUp { 0% { transform: translate(0,0) scale(.4); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), -240px) scale(1.1) rotate(var(--rot)); opacity: 0; } }
@keyframes coinDown { 0% { transform: translate(0,-60px) scale(.6); opacity: 0; } 15% { opacity: 1; } 100% { transform: translate(var(--dx), 180px) scale(.9) rotate(var(--rot)); opacity: 0; } }

/* ---------- Telas de entrada ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 10%, #EDE7FF 0, transparent 45%), radial-gradient(circle at 90% 30%, #FFE3EC 0, transparent 40%), radial-gradient(circle at 40% 100%, #E3F6EE 0, transparent 45%), var(--bg); }
.auth-card { width: 100%; max-width: 420px; }
.logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 22px; }
.logo img { width: 92px; height: 92px; animation: bob 4s ease-in-out infinite; }
.logo h1 { margin: 10px 0 2px; font-size: 32px; font-weight: 900; letter-spacing: -.02em; }
.logo p { margin: 0; color: var(--soft); font-size: 15.5px; }
.tabs { display: flex; gap: 6px; padding: 5px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); margin-bottom: 16px; }
.tabs button { flex: 1; padding: 10px 6px; border-radius: 14px; font-weight: 800; font-size: 13.5px; color: var(--muted); transition: all .25s; }
.tabs button.on { background: var(--lav-l); color: var(--lav-d); }
.styles { display: grid; gap: 8px; }
.style-opt { display: flex; gap: 12px; align-items: center; padding: 12px 14px; background: #fff; border-radius: 16px; text-align: left; border: 1.5px solid transparent; transition: all .2s var(--ease); }
.style-opt span { font-size: 26px; }
.style-opt b { display: block; font-weight: 900; }
.style-opt small { color: var(--muted); font-weight: 700; }
.style-opt.on { border-color: var(--lav); background: var(--lav-l); }
.emojis { display: flex; flex-wrap: wrap; gap: 6px; }
.emojis button { width: 42px; height: 42px; border-radius: 14px; background: #fff; font-size: 21px; transition: transform .2s var(--ease); border: 1.5px solid transparent; }
.emojis button.on { border-color: var(--lav); background: var(--lav-l); transform: scale(1.1); }
.err-msg { color: var(--peach-d); font-weight: 800; text-align: center; margin: 10px 0 0; min-height: 1em; }

/* ---------- Conselhos e Eu ---------- */
.page-t { font-size: 26px; font-weight: 900; margin: 8px 4px 4px; }
.page-s { color: var(--soft); margin: 0 4px 18px; }
.tips { display: grid; gap: 12px; }
@media (min-width: 900px) { .tips { grid-template-columns: 1fr 1fr; } }
.tips .advice { margin: 0; cursor: pointer; animation: rise .5s var(--ease-out) both; }
.tips .advice .from { font-size: 12px; color: var(--soft); font-weight: 800; margin-bottom: 8px; display: block; }
.me-grid { display: grid; gap: 0 16px; }
@media (min-width: 900px) { .me-grid { grid-template-columns: 1fr 1fr; align-items: start; } }
.set { padding: 6px 16px; margin-bottom: 14px; }
.set h4 { margin: 12px 0 4px; font-size: 15px; font-weight: 900; }
.set .line { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1.5px solid var(--line); width: 100%; text-align: left; font-weight: 800; }
.set .line:last-child { border: 0; }
.set .line span { color: var(--muted); font-weight: 700; font-size: 13.5px; }
.code { font-size: 28px; font-weight: 900; letter-spacing: .25em; color: var(--lav-d); text-align: center; padding: 14px; background: var(--lav-l); border-radius: 18px; margin: 6px 0 10px; }
.split { display: flex; height: 18px; border-radius: 99px; overflow: hidden; margin: 8px 0 14px; }
.split i { height: 100%; transition: width .3s; }
.split .essencial { background: var(--sky); } .split .guardar { background: var(--mint); } .split .viver { background: linear-gradient(90deg, var(--butter), var(--pink)); }
input[type=range] { padding: 0; border: 0; height: 30px; accent-color: var(--lav-d); box-shadow: none !important; background: transparent; }
.slider-t { display: flex; justify-content: space-between; font-weight: 800; font-size: 14px; margin-top: 6px; }
.mgr { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1.5px solid var(--line); font-weight: 700; }
.mgr button { color: var(--muted); }
.ti { width: 32px; height: 32px; border-radius: 11px; display: inline-grid; place-items: center; font-size: 17px; margin-right: 10px; vertical-align: middle; }
.edit-box { background: #FBF9FD; border-radius: 16px; padding: 10px; margin: 6px 0; }
.edit-box select { width: 100%; }
.mini { display: block; font-size: 12px; font-weight: 800; color: var(--soft); margin: 10px 0 4px; }
.mgr .mgr-e { color: var(--ink); font-weight: 700; text-align: left; flex: 1; padding: 0; }
.mgr-e .pen { font-style: normal; font-size: 11px; opacity: .45; margin-left: 2px; }
.addrow.edit { margin: 6px 0; }
.xname { display: flex; gap: 6px; align-items: center; flex: 1; min-width: 0; }
.xname input { padding: 4px 6px; border-radius: 10px; font-weight: 800; font-size: 14px; background: transparent; border: 1.5px dashed var(--line); }
.xname input:first-child { width: 40px; text-align: center; flex: none; }
.xname input:last-child { flex: 1; min-width: 0; }
.xname input:focus { background: #fff; border-style: solid; border-color: var(--lav); }
.addrow { display: grid; grid-template-columns: 64px 1fr auto; gap: 8px; margin: 10px 0 12px; }
.addrow input { padding: 10px; }

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

/* instalar no celular */
.install { display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; border-radius: 20px; text-align: left; background: linear-gradient(135deg, #EAF4FD, #F1EDFF); box-shadow: var(--shadow); animation: rise .5s var(--ease-out) both; }
.install .ie { font-size: 28px; animation: bob 3s ease-in-out infinite; }
.install .grow { flex: 1; } .install b { display: block; font-weight: 900; } .install small { color: var(--soft); font-weight: 700; font-size: 12.5px; }
.install .inst-x { color: var(--muted); padding: 6px; display: grid; }
.stepn { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--lav-l); color: var(--lav-d) !important; font-weight: 900 !important; flex: none; }

/* 👍/👎 no conselho */
.fb { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed rgba(123,104,217,.2); font-size: 13px; font-weight: 800; color: var(--soft); }
.fb > span:first-child { flex: 1; }
.fb button { width: 42px; height: 38px; border-radius: 14px; background: rgba(255,255,255,.85); font-size: 19px; transition: transform .2s var(--ease); }
.fb button:active { transform: scale(.85); }
.fb .fb-ok { color: var(--lav-d); }
.fb-form:empty { display: none; }
.fb-form { margin-top: 12px; padding-top: 12px; border-top: 1.5px dashed rgba(123,104,217,.2); }
.fb-q { margin: 0 0 10px; font-weight: 800; font-size: 14px; } .fb-q small { color: var(--muted); font-weight: 700; }
.fb-form .chip { font-size: 12.5px; padding: 7px 11px; }
.fb-txt { margin-top: 10px; }
.tipcard .fb { margin-top: 10px; padding-top: 10px; }
/* galeria na tela de novo lançamento */
.from-gal { width: 100%; text-align: center; padding: 10px; margin: -4px 0 12px; border-radius: 14px; font-size: 13.5px; font-weight: 700; color: var(--soft); background: var(--lav-l); }
.from-gal b { color: var(--lav-d); }

/* Saldo das contas e importação de extrato */
.acc-bal { margin-left: auto; font-size: 13.5px; font-weight: 800; color: var(--soft); padding-right: 10px; }
.acc-bal.neg { color: var(--peach-d); }
.mgr .mgr-e { display: flex; align-items: center; }
.init-row { display: grid; grid-template-columns: auto 1fr 170px; align-items: center; gap: 4px; padding: 8px 0; border-bottom: 1.5px solid var(--line); }
.init-v { display: flex; align-items: center; gap: 6px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 0 10px; }
.init-v span { color: var(--muted); font-weight: 800; font-size: 14px; }
.init-v input { border: 0; padding: 10px 0; text-align: right; font-weight: 800; width: 100%; background: transparent; }
.imp-list { max-height: 48vh; overflow: auto; margin: 4px -4px 0; padding: 0 4px; }
.imp-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; padding: 8px 0; border-bottom: 1.5px solid var(--line); transition: opacity .2s; }
.imp-row.off { opacity: .4; }
.imp-row .ti { position: relative; margin: 0; cursor: pointer; }
.imp-row .ti select { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.imp-row .mid { min-width: 0; }
.imp-row .mid b { display: block; font-size: 14px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.imp-row .mid small { color: var(--muted); font-weight: 700; font-size: 12px; }
.imp-row .num { font-weight: 900; font-size: 14px; white-space: nowrap; }
.imp-row .num.in { color: var(--mint-d); }
.imp-row input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--lav-d); }

/* ---------- Ícones Iconsax (contorno arredondado) ---------- */
.ix { width: 56%; height: 56%; display: block; fill: none; }
.cat span .ix, .ti .ix { width: 60%; height: 60%; }
.nav .i .b { display: none; }
.nav button.on .i .l { display: none; }
.nav button.on .i .b { display: inline; }
/* a cor do traço segue a caixinha (mesma regra do fundo, veja DESIGN.md) */
.tn-entrada, .tn-guardar, .box.guardar .emo { color: var(--mint-d); }
.tn-essencial, .box.essencial .emo { color: var(--sky-d); }
.tn-viver, .box.viver .emo { color: var(--butter-d); }
.tn-x0, .box.x0 .emo { color: var(--lav-d); }
.tn-x1, .box.x1 .emo { color: #C95A7C; }
.tn-x2, .box.x2 .emo { color: var(--peach-d); }
.tn-conta { color: var(--soft); }
.det-head .emo { color: var(--lav-d); }
.chip .ix, .from .ix, .cat-h .ix { width: 16px; height: 16px; display: inline-block; vertical-align: -3px; }
.pickb { width: 48px; height: 46px; border-radius: 14px; border: 1.5px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 22px; color: var(--lav-d); }
.pickb.sm { width: 36px; height: 34px; border-radius: 11px; font-size: 17px; flex: none; }
.pickb .ix { width: 24px; height: 24px; }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(52px, 1fr)); gap: 8px; margin: 4px 0 8px; }
.icon-grid button { aspect-ratio: 1; border-radius: 16px; background: #fff; display: grid; place-items: center; color: var(--ink); border: 1.5px solid transparent; transition: all .2s var(--ease); }
.icon-grid button .ix { width: 26px; height: 26px; }
.icon-grid button:active { transform: scale(.9); }
.icon-grid button.on { background: var(--lav-l); border-color: var(--lav); color: var(--lav-d); }
.tx .emo .ix { width: 50%; height: 50%; margin: -5px 0 0 -5px; }

/* ---------- Eu: cabeçalho com avatar, blocos que recolhem, senha ---------- */
.me-head { display: flex; align-items: center; gap: 14px; margin: 4px 0 16px; }
.me-av { position: relative; width: 64px; height: 64px; border-radius: 22px; font-size: 32px; display: grid; place-items: center; box-shadow: var(--shadow); flex: none; }
.me-av i { position: absolute; right: -6px; bottom: -6px; width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; color: var(--lav-d); box-shadow: 0 2px 8px rgba(59,53,82,.15); }
.me-av i svg { width: 14px; height: 14px; }
details.fold > summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 0; font-weight: 800; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary span { color: var(--muted); font-size: 13.5px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
details.fold > summary span::after { content: ''; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-3px); transition: transform .25s var(--ease); }
details.fold[open] > summary span::after { transform: rotate(-135deg) translateY(-1px); }
.card.set.fold > summary b { font-size: 15px; font-weight: 900; }
.card .fold:not(.card) { border-top: 1.5px solid var(--line); }
.card .fold:not(.card) > summary { padding: 12px 0; font-size: 14px; color: var(--soft); }
.prog { height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; margin: 0 0 6px; }
.prog i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--mint), #6CC9A6); }
.mini-link { color: var(--lav-d); font-weight: 800; font-size: 13px; padding: 4px 0; }
.pw { position: relative; }
.pw input { padding-right: 48px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; display: grid; place-items: center; color: var(--muted); border-radius: 12px; }
.pw-eye:active { background: var(--lav-l); }
.emo-grid button { font-size: 26px; }

/* ---------- Ícones de linha no lugar dos emojis decorativos ---------- */
.big-ic { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 10px; border-radius: 22px; background: var(--lav-l); color: var(--lav-d); }
.big-ic svg { width: 32px; height: 32px; }
.pill svg, .tag svg, .fb-ok svg, .chip svg, .seg svg, .btn svg, .from-gal svg, .ie svg, .mgr .pen svg, #styleNow .ix, .styles .ix, .slider-t .ix, .mgr .ix, .section-t h3 svg { vertical-align: -4px; }
.pill svg, .tag svg, .fb-ok svg, .mgr .pen svg { width: 15px; height: 15px; }
.chip svg, .seg svg, .from-gal svg, .btn.sm svg { width: 18px; height: 18px; }
#styleNow .ix, .slider-t .ix, .mgr > span .ix { width: 17px; height: 17px; display: inline-block; color: var(--lav-d); }
.style-opt > span { width: 42px; height: 42px; border-radius: 14px; background: var(--lav-l); color: var(--lav-d); display: grid; place-items: center; flex: none; }
.style-opt > span .ix { width: 24px; height: 24px; }
.fb button svg { width: 20px; height: 20px; }
.ie svg { width: 22px; height: 22px; }

/* ---------- Atalhos no Novo lançamento ---------- */
.from-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: -4px 0 12px; }
.from-row .from-gal { margin: 0; padding: 10px 6px; font-size: 13px; }

/* ---------- Importar: passos e escolha da conta ---------- */
.step { display: flex; align-items: center; gap: 8px; font-weight: 900; font-size: 14.5px; margin: 6px 0 8px; }
.step i { font-style: normal; width: 22px; height: 22px; border-radius: 50%; background: var(--lav-l); color: var(--lav-d); display: grid; place-items: center; font-size: 12px; }
.acc-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 8px; margin-bottom: 14px; }
.acc-pick button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 16px; background: #fff; border: 1.5px solid var(--line); font-weight: 800; font-size: 14px; text-align: left; transition: all .2s var(--ease); }
.acc-pick button .ti { margin: 0; width: 30px; height: 30px; flex: none; }
.acc-pick button.on { border-color: var(--lav); background: var(--lav-l); color: var(--lav-d); box-shadow: 0 0 0 3px var(--lav-l); }

/* ---------- Avatar: prévia e cores ---------- */
.av-prev { width: 84px; height: 84px; border-radius: 28px; margin: 0 auto 6px; display: grid; place-items: center; font-size: 44px; box-shadow: var(--shadow); transition: background .25s; }
.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatches button { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); transition: transform .2s var(--ease); }
.swatches button.on { box-shadow: 0 0 0 2.5px var(--lav-d); transform: scale(1.08); }

/* ---------- Nota: quanto conta no Viver ---------- */
.split-box { padding: 14px; margin-bottom: 14px; background: linear-gradient(135deg, var(--butter-l), #FFF1F4); }
.split-t { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 14.5px; }
.split-t .ix { width: 22px; height: 22px; flex: none; color: var(--butter-d); }
.split-box small { display: block; color: var(--soft); font-weight: 700; font-size: 12.5px; margin: 6px 0 0 32px; }
.seg3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; padding: 4px; background: #fff; border-radius: 14px; }
.seg3 button { padding: 9px 4px; border-radius: 11px; font-weight: 800; font-size: 13px; color: var(--soft); transition: all .2s var(--ease); }
.seg3 button.on { background: var(--butter); color: var(--ink); }

/* ---------- Lançamento compacto ---------- */
.txf h2 { margin-bottom: 10px; }
.txf .seg { margin-bottom: 8px; padding: 4px; }
.txf .seg button { padding: 8px; }
.txf .seg::before { top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); }
.txf .amount { padding: 6px 10px; margin-bottom: 8px; border-radius: 20px; }
.txf .amount input { font-size: 34px; }
.txf .desc { margin-bottom: 12px; }
.frow-t { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin: 0 4px 6px; font-size: 12.5px; font-weight: 800; color: var(--soft); }
.frow-t small { font-weight: 700; color: var(--lav-d); font-size: 12px; }
.frow { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.frow > label { flex: 0 0 58px; font-size: 12.5px; font-weight: 800; color: var(--soft); }
.frow .chips { flex: 1; min-width: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; padding: 2px 0; }
.frow .chips::-webkit-scrollbar { display: none; }
.frow .chip { padding: 7px 11px; font-size: 13px; white-space: nowrap; flex: none; }
.rep-n { display: flex; align-items: center; gap: 10px; color: var(--soft); font-weight: 700; font-size: 13px; }
.rep-n input { width: 70px; text-align: center; font-weight: 900; padding: 8px; }
.switch.sm { padding: 9px 12px; margin-top: 4px; font-size: 14px; }
.switch.sm small { font-size: 12px; }
.save-bar { position: sticky; bottom: calc(-24px - var(--safe-b)); margin: 12px -20px calc(-24px - var(--safe-b)); padding: 12px 20px calc(14px + var(--safe-b)); background: linear-gradient(180deg, rgba(251,247,243,0), var(--bg) 18px); z-index: 2; }
.from-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 12px; margin-top: 10px; font-size: 12.5px; color: var(--muted); font-weight: 700; }
.from-links button { color: var(--lav-d); font-weight: 800; display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; }
.from-links svg { width: 15px; height: 15px; }

/* saldo por conta, embaixo do saldo total */
.acc-bal { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: -8px 0 12px; font-size: 12px; font-weight: 700; color: var(--soft); text-align: left; }
.acc-bal span { display: inline-flex; align-items: center; gap: 4px; }
.acc-bal .ix, .acc-bal svg { width: 14px; height: 14px; }
.acc-bal b { font-weight: 800; color: var(--ink); }
.acc-bal b.neg { color: var(--peach-d); }
.acc-bal .ed { color: var(--lav-d); font-weight: 800; display: inline-flex; align-items: center; gap: 3px; }

/* lista suspensa com busca */
.dd { margin-bottom: 10px; }
.dd-btn { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 8px; background: #fff; border-radius: 16px; text-align: left; border: 1.5px solid transparent; transition: border-color .2s; }
.dd.open .dd-btn { border-color: var(--lav); }
.dd-ic { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.dd-ic svg, .dd-ic .ix { width: 60%; height: 60%; }
.dd-t { flex: 1; min-width: 0; }
.dd-t b { display: block; font-weight: 800; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dd-t b.ph { color: var(--muted); font-weight: 700; padding: 7px 4px; }
.dd-t small { display: block; color: var(--muted); font-weight: 700; font-size: 12px; }
.dd-chev { color: var(--muted); transition: transform .25s var(--ease); display: grid; }
.dd-chev svg { width: 18px; height: 18px; transform: rotate(90deg); }
.dd.open .dd-chev { transform: rotate(180deg); }
.dd-pop { margin-top: 6px; background: #fff; border-radius: 16px; padding: 8px; box-shadow: var(--shadow); animation: rise .25s var(--ease-out) both; }
.dd-q { display: flex; align-items: center; gap: 8px; padding: 0 10px; background: var(--bg); border-radius: 12px; color: var(--muted); }
.dd-q svg { width: 18px; height: 18px; flex: none; }
.dd-q input { border: 0; background: transparent; box-shadow: none !important; padding: 10px 0; }
.dd-list { max-height: 260px; overflow-y: auto; margin-top: 6px; overscroll-behavior: contain; }
.dd-g { font-size: 11.5px; font-weight: 900; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 10px 6px 4px; }
.dd-it { width: 100%; display: flex; align-items: center; gap: 10px; padding: 6px; border-radius: 12px; font-weight: 800; font-size: 14.5px; text-align: left; }
.dd-it .dd-ic { width: 30px; height: 30px; border-radius: 10px; }
.dd-it.on { background: var(--lav-l); color: var(--lav-d); }
.dd-it > svg { width: 18px; height: 18px; }
.dd-none { padding: 14px; text-align: center; color: var(--muted); font-weight: 700; }
.frow-t small { display: inline-flex; align-items: center; gap: 4px; }
.frow-t small svg { width: 14px; height: 14px; }
.frow-c { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; gap: 6px; margin-bottom: 8px; padding: 2px 0; }
.frow-c .chip { padding: 7px 11px; font-size: 13px; white-space: nowrap; flex: none; }
.amount small { display: block; margin-top: 4px; }
.rep-box { background: #fff; border-radius: 16px; padding: 10px 12px; margin-bottom: 8px; display: grid; gap: 8px; }
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; background: var(--bg); padding: 3px; border-radius: 12px; }
.seg2 button { padding: 7px 4px; border-radius: 10px; font-size: 12.5px; font-weight: 800; color: var(--muted); }
.seg2 button.on { background: #fff; color: var(--lav-d); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.rep-t { font-size: 13px; font-weight: 700; color: var(--soft); }
.rep-t b { color: var(--ink); font-weight: 900; }

/* linha entre um lançamento e outro */
.tx { position: relative; }
.tx + .tx::before { content: ''; position: absolute; top: 0; left: 68px; right: 10px; height: 1px; background: #E9E1EF; }
.tx .tick { display: none; }

/* seleção em massa */
.section-t .grow { flex: 1; }
.sel-btn { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; padding: 6px 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.sel-btn svg { width: 16px; height: 16px; }
.sel-btn.on { background: var(--lav-l); }
.selecting .tx .tick { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex: none; border: 2px solid #D9D1E6; color: transparent; transition: all .2s var(--ease); }
.selecting .tx .tick svg { width: 15px; height: 15px; stroke-width: 3; }
.selecting .tx.sel { background: var(--lav-l); }
.selecting .tx.sel .tick { background: var(--lav-d); border-color: var(--lav-d); color: #fff; transform: scale(1.08); }
.selecting .tx + .tx::before { left: 104px; }
.bulk { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(12px, calc(8px + var(--safe-b))); z-index: 30; width: min(560px, calc(100% - 24px)); background: rgba(255,255,255,.96); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-radius: 24px; box-shadow: 0 10px 40px rgba(59,53,82,.18); padding: 10px; animation: rise .3s var(--ease-out) both; }
.bulk-h { display: flex; align-items: center; gap: 10px; padding: 0 4px 8px; }
.bulk-h b { flex: 1; font-weight: 900; }
.bulk-h > button:not(.icon-btn) { color: var(--lav-d); font-weight: 800; font-size: 13px; }
.bulk-h .icon-btn { width: 32px; height: 32px; box-shadow: none; background: var(--bg); }
.bulk-a { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.bulk-a button { display: grid; justify-items: center; gap: 3px; padding: 8px 2px; border-radius: 14px; font-size: 11.5px; font-weight: 800; color: var(--soft); background: var(--bg); transition: all .2s var(--ease); }
.bulk-a button svg, .bulk-a button .ix { width: 20px; height: 20px; }
.bulk-a button[disabled] { opacity: .4; }
.bulk-a .del { color: var(--peach-d); }
.bulk-a .del.sure { background: var(--peach-d); color: #fff; }

/* saldo: sinal de menos */
.init-v .sign { width: 26px; height: 26px; border-radius: 8px; flex: none; font-weight: 900; font-size: 16px; color: var(--muted); background: var(--bg); line-height: 1; }
.init-v.neg { border-color: #F6C9BC; }
.init-v.neg .sign { background: var(--peach-d); color: #fff; }
.init-v.neg input { color: var(--peach-d); }

/* lançamento: data sem título, parcelas numa linha, rascunho */
.dates-c { justify-content: center; margin-bottom: 10px; }
.dates-c .chip { padding: 7px 12px; font-size: 13px; }
.rep-line { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--soft); flex-wrap: wrap; }
.rep-line input { width: 54px; text-align: center; font-weight: 900; padding: 7px 4px; }
.rep-line b { color: var(--ink); font-weight: 900; }
.rep-opt button { font-size: 12.5px; font-weight: 800; color: var(--lav-d); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(123,104,217,.35); }
.rep-box { gap: 4px; padding: 8px 10px; }
.draft-note { display: flex; align-items: center; gap: 8px; margin: -4px 0 10px; padding: 8px 12px; border-radius: 14px; background: var(--butter-l); font-size: 13px; font-weight: 700; color: var(--soft); }
.draft-note svg { width: 16px; height: 16px; flex: none; }
.draft-note button { color: var(--lav-d); font-weight: 800; font-size: 13px; }

/* fatura do cartão */
.bill-opts { display: grid; gap: 8px; margin-bottom: 8px; }
.bill-opt { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; padding: 12px; background: #fff; border-radius: 16px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .15s; }
.bill-opt:active { transform: scale(.98); }
.bill-opt > svg { grid-row: span 2; width: 40px; height: 40px; padding: 9px; border-radius: 12px; background: var(--lav-l); color: var(--lav-d); }
.bill-opt b { font-weight: 900; }
.bill-opt small { color: var(--muted); font-weight: 700; font-size: 12.5px; }
.bill-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 12px; margin: 10px 0 6px; text-align: center; }
.bill-head small { display: block; font-size: 11.5px; font-weight: 800; color: var(--muted); }
.bill-head b { font-weight: 900; font-size: 15px; }
.bill-head b.ok { color: var(--mint-d); } .bill-head b.warn { color: var(--peach-d); }
.bill-diff { text-align: left; display: flex; gap: 6px; align-items: flex-start; margin: 4px 0; }
.bill-diff svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.bill-rep { background: var(--butter-l); border-radius: 16px; padding: 10px 12px; margin: 8px 0; display: grid; gap: 6px; }
.bill-rep > small { color: var(--soft); font-weight: 700; font-size: 12.5px; margin-top: -4px; }
.bill-rep label { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; }
.bill-rep input { width: 18px; height: 18px; flex: none; }

/* fatura agrupada na lista */
.tx .emo.stack { background: #F4F0F8; box-shadow: inset 0 0 0 1.5px #ECE6F2; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; padding: 3px; place-items: stretch; }
.tx .emo.stack > span { border-radius: 7px; display: grid; place-items: center; min-height: 0; }
.tx .emo.stack > span:only-child { grid-column: span 2; grid-row: span 2; border-radius: 13px; }
.tx .emo.stack > span:nth-child(3) { grid-column: span 2; }
.tx .emo.stack > span svg { width: 13px; height: 13px; }
.tx .emo.stack > span:only-child svg { width: 22px; height: 22px; }
.bill-groups { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin: 12px 0 14px; }
.bill-g { padding: 6px; }
.bill-gh { display: flex; align-items: center; gap: 10px; padding: 6px 10px 8px; border-bottom: 1.5px dashed var(--line); margin-bottom: 2px; }
.bill-gh .ti { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.bill-gh .ti svg { width: 17px; height: 17px; }
.bill-gh b { flex: 1; font-weight: 900; }
.bill-gh .num { font-weight: 900; }
#bBtns input { flex: 1; min-width: 0; }
.bill-name { display: block; margin: 10px 0 0; }
.bill-name small { display: block; font-size: 12px; font-weight: 800; color: var(--soft); margin: 0 0 4px 4px; }
.tag.src { background: var(--lav-l); color: var(--lav-d); }
.tx .emo.stack { grid-template-rows: 1fr 1fr; }
.tx .emo.stack > span:first-child:nth-last-child(2), .tx .emo.stack > span:first-child:nth-last-child(2) ~ span { grid-row: span 2; }
.tx .emo.stack .ix { width: 13px; height: 13px; margin: 0; }
.tx .emo.stack > span:only-child .ix { width: 22px; height: 22px; }

/* barra de meses: ano pequeno em janeiro */
.mchip small { display: block; font-size: 9.5px; font-weight: 800; line-height: 1; margin-top: 1px; opacity: .7; }
.mchip:has(small) { padding-top: 5px; padding-bottom: 5px; }

/* contas recolhidas embaixo do saldo */
#accBal { display: block; margin-left: 0; padding-right: 0; }
.acc-tog { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 800; color: var(--soft); padding: 4px 10px 4px 8px; border-radius: 99px; background: rgba(255,255,255,.55); }
.acc-tog .dd-chev svg { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .25s var(--ease); }
.acc-tog.on .dd-chev svg { transform: rotate(-90deg); }
.acc-list { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; animation: rise .25s var(--ease-out) both; }

/* ---------- Pergunte ao Tindin ---------- */
.ai-btn { position: relative; color: var(--lav-d); background: linear-gradient(135deg, #F1EDFF, #FDEDF1); }
.ai-btn .badge { position: absolute; top: 7px; right: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--peach-d); box-shadow: 0 0 0 2px #fff; }
.chat { display: flex; flex-direction: column; min-height: 70dvh; }
.chat-t { display: inline-flex; align-items: center; gap: 8px; }
.chat-t svg { width: 24px; height: 24px; color: var(--lav-d); }
.chat-l { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; max-height: 58dvh; padding: 4px 2px 10px; }
.bub { display: flex; gap: 8px; align-items: flex-end; max-width: 88%; animation: rise .3s var(--ease-out) both; }
.bub p { margin: 0; padding: 10px 13px; border-radius: 18px; font-size: 14.5px; line-height: 1.45; font-weight: 600; }
.bub.ai p, .bub.them p { background: #fff; border-bottom-left-radius: 6px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.bub.me { align-self: flex-end; }
.bub.me p { background: var(--lav-d); color: #fff; border-bottom-right-radius: 6px; }
.bub .who { width: 28px; height: 28px; border-radius: 10px; flex: none; display: grid; place-items: center; background: var(--lav-l); color: var(--lav-d); }
.bub .who svg { width: 17px; height: 17px; }
.bub .who.av { border-radius: 50%; font-size: 15px; }
.bub.msg p { background: var(--pink-l); color: var(--ink); border: 1.5px solid #F6CFDA; }
.bub.msg.me > div { display: grid; justify-items: end; gap: 4px; }
.bub.msg.them > div { display: grid; gap: 4px; }
.tag-msg { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; color: #C0587A; }
.tag-msg svg { width: 13px; height: 13px; }
.orig { font-size: 12px; color: var(--muted); font-weight: 700; }
.msg-btns { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; margin-top: 4px; }
.msg-btns .btn { width: auto; padding: 9px 14px; font-size: 13.5px; }
.chat-empty { text-align: center; padding: 18px 6px; display: grid; gap: 12px; justify-items: center; color: var(--soft); }
.chat-empty .chips { justify-content: center; }
.chip.at { background: var(--pink-l); color: #C0587A; }
.chip.at small { font-weight: 700; opacity: .8; }
.chat-at { margin: 0 0 8px; }
.chat-in { display: flex; gap: 8px; align-items: flex-end; background: #fff; border-radius: 22px; padding: 6px 6px 6px 14px; box-shadow: var(--shadow); }
.chat-in textarea { flex: 1; border: 0; box-shadow: none !important; background: transparent; resize: none; padding: 8px 0; font-size: 15px; max-height: 120px; }
.chat-go { width: 42px; height: 42px; border-radius: 16px; flex: none; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, #9C8AF0, #E79CB5); }
.chat-go svg { width: 20px; height: 20px; }

/* ---------- Gráficos ---------- */
.charts { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
.chart { padding: 16px; }
.chart h3 { margin: 0; font-size: 16px; font-weight: 900; }
.chart-s { margin: 4px 0 10px; color: var(--soft); font-weight: 700; font-size: 13.5px; }
.chart-s b { color: var(--ink); }
.legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; font-size: 12.5px; font-weight: 800; color: var(--soft); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
.legend i.hatch { background: repeating-linear-gradient(45deg, #D2654F 0 3px, #E7A496 3px 5px); }
.hbars { display: grid; gap: 10px; }
.hbar { display: flex; align-items: center; gap: 10px; cursor: pointer; padding: 2px 0; }
.hbar .ti { width: 32px; height: 32px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.hbar .ti svg, .hbar .ti .ix { width: 17px; height: 17px; margin: 0; }
.hb-m { flex: 1; min-width: 0; }
.hb-t { display: flex; justify-content: space-between; gap: 8px; font-size: 13.5px; margin-bottom: 5px; }
.hb-t b { font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hb-t .num { font-weight: 800; color: var(--soft); white-space: nowrap; }
.hb-track { height: 10px; border-radius: 4px; background: #F3EFF6; overflow: hidden; }
.hb-track i { display: block; height: 100%; border-radius: 4px; transition: width .6s var(--ease-out); }
.cols { width: 100%; height: auto; display: block; overflow: visible; }
.cols .gl { stroke: #EEE9F2; stroke-width: 1; }
.cols .gt { font-size: 9px; fill: var(--muted); font-weight: 700; }
.cols .mt { font-size: 10.5px; fill: var(--soft); font-weight: 800; text-anchor: middle; text-transform: capitalize; }
.cols .col { cursor: pointer; }
.cols .col.on .mt { fill: var(--ink); font-weight: 900; }
.tbl { margin-top: 8px; font-size: 13px; }
.tbl summary { color: var(--lav-d); font-weight: 800; cursor: pointer; font-size: 12.5px; }
.tbl table { width: 100%; border-collapse: collapse; margin-top: 6px; }
.tbl th, .tbl td { padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--line); font-weight: 700; }
.tbl th:first-child, .tbl td:first-child { text-align: left; text-transform: capitalize; }
.tbl th { color: var(--muted); font-size: 11.5px; }
.chart-tip { position: fixed; z-index: 90; pointer-events: none; background: var(--ink); color: #fff; padding: 8px 11px; border-radius: 12px; font-size: 12.5px; font-weight: 600; line-height: 1.45; box-shadow: 0 8px 24px rgba(59,53,82,.25); max-width: 240px; }
.chart-tip b { display: block; font-weight: 900; }
.chart-tip small { opacity: .75; }

.bill-paid { margin: 4px 0 2px; }
