#modal[hidden]{display:none!important}
*{box-sizing:border-box}
html,body{margin:0;min-height:100%;background:#E9E4D8}
body{font-family:'Manrope',system-ui,-apple-system,'Segoe UI',sans-serif;color:#1E2A24;-webkit-text-size-adjust:100%}
#app{max-width:480px;margin:0 auto;min-height:100vh;background:#F5F2EA;display:flex;flex-direction:column}
.banner{background:#FFF4D6;color:#6B4E00;font-size:12px;font-weight:600;text-align:center;padding:6px 12px}
.top{position:sticky;top:0;z-index:5;padding:12px 16px;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#1F5B43;color:#fff}
.top b{font-size:16px;font-weight:800;display:block}.top small{font-size:12px;opacity:.85}
.avatar{width:38px;height:38px;border-radius:50%;background:#fff;color:#1F5B43;font-weight:800;display:flex;align-items:center;justify-content:center;border:0;font:inherit;font-weight:800;cursor:pointer}
main{flex:1;padding:16px 16px 100px;display:flex;flex-direction:column;gap:14px}
h1{margin:8px 0 0;font-size:28px;font-weight:800}
h2{margin:0;font-size:22px;font-weight:800}
h3{margin:0;font-size:16px;font-weight:800}
.card{background:#fff;border-radius:18px;padding:16px;border:1px solid #E6E0D3;display:flex;flex-direction:column;gap:8px}
.hero{background:#1F5B43;color:#fff;border:0}
.hero .lbl{opacity:.85;font-size:13px;font-weight:600}
.hero .val{font-size:34px;font-weight:800;letter-spacing:-.5px}
.muted{color:#5B6660}.sm{font-size:13px}.xs{font-size:12px}
.btn{font:inherit;font-weight:700;border:0;border-radius:12px;min-height:46px;padding:0 16px;cursor:pointer;background:#1F5B43;color:#fff;width:100%}
.btn.light{background:#fff;color:#1F5B43}
.btn2{font:inherit;font-weight:600;border:1px solid #CFC8B8;border-radius:12px;min-height:40px;padding:0 14px;cursor:pointer;background:#fff;color:#1E2A24}
.link{font:inherit;font-weight:700;font-size:13px;border:0;background:none;color:#1F5B43;cursor:pointer;padding:6px 0}
.between{display:flex;justify-content:space-between;align-items:center;gap:12px}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;border-radius:999px;padding:5px 10px;background:#E4EFE9;color:#1F5B43;white-space:nowrap}
.chip.red{background:#FCE8E6;color:#B42318}.chip.amber{background:#FFF1D6;color:#7A4B00}
.chip svg{width:14px;height:14px}
.alert{display:flex;gap:10px;align-items:flex-start;background:#FFF1D6;color:#5C3A00;border-radius:14px;padding:12px 14px;font-size:14px}
.alert.red{background:#FCE8E6;color:#8A1B12}
.alert svg{flex:none;width:20px;height:20px;margin-top:1px}
.qa{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.qa button{font:inherit;font-size:11.5px;font-weight:700;border:1px solid #E6E0D3;background:#fff;border-radius:14px;min-height:76px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;cursor:pointer;color:#1E2A24;padding:6px 2px}
.qa svg{width:24px;height:24px;color:#1F5B43}
.inp{font:inherit;font-size:16px;border:1px solid #CFC8B8;border-radius:10px;min-height:46px;padding:0 12px;background:#fff;color:#1E2A24;width:100%}
textarea.inp{min-height:90px;padding:10px 12px}
label{display:flex;flex-direction:column;gap:4px;font-size:13px;font-weight:600}
.g2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.segs{display:flex;gap:4px;background:#E9E4D8;border-radius:12px;padding:4px}
.seg{font:inherit;font-size:13px;font-weight:700;border:0;border-radius:10px;min-height:40px;flex:1;cursor:pointer;background:transparent;color:#5B6660}
.seg.on{background:#fff;color:#1F5B43;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.ctr{font:inherit;font-size:20px;font-weight:800;width:46px;height:46px;border-radius:12px;border:1px solid #CFC8B8;background:#fff;cursor:pointer;color:#1E2A24}
.cnt{display:flex;align-items:center;gap:10px}.cnt span{width:22px;text-align:center;font-weight:800}
.msg{font-size:13px;font-weight:600;border-radius:10px;padding:10px 12px}
.msg.ok{background:#E4EFE9;color:#1F5B43}.msg.err{background:#FCE8E6;color:#B42318}
/* finance visuals */
.flow{display:flex;flex-direction:column;gap:10px}
.flow .bar{height:12px;border-radius:6px;background:#EEE9DD;overflow:hidden}
.flow .bar i{display:block;height:100%;border-radius:6px}
.in{background:#1F5B43}.out{background:#C2553D}
.big{font-size:22px;font-weight:800}
.hb{display:flex;flex-direction:column;gap:4px}
.hb .track{height:10px;border-radius:5px;background:#EEE9DD}
.hb .track i{display:block;height:100%;border-radius:5px;background:#C2553D}
.months{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
.mo{border-radius:10px;padding:6px 0;text-align:center;font-size:11px;font-weight:700;display:flex;flex-direction:column;align-items:center;gap:2px}
.mo svg{width:16px;height:16px}
.mo.pg{background:#E4EFE9;color:#1F5B43}.mo.at{background:#FCE8E6;color:#B42318}.mo.fu{background:#F1EEE6;color:#5B6660}
.ring{display:flex;align-items:center;gap:16px}
.person{display:flex;align-items:center;gap:12px;padding:10px 0;border-top:1px solid #EEE9DD}
.person:first-child{border-top:0}
.ini{width:36px;height:36px;border-radius:50%;background:#F1EEE6;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:13px;flex:none}
.tl{display:flex;gap:12px;padding:10px 0;border-top:1px solid #EEE9DD;align-items:center}
.tl:first-child{border-top:0}
.tl .ic{width:36px;height:36px;border-radius:12px;display:flex;align-items:center;justify-content:center;flex:none}
.tl .ic svg{width:18px;height:18px}
.ic.in{background:#E4EFE9;color:#1F5B43}.ic.out{background:#FBEAE5;color:#A3402B}
.pos{color:#1F5B43;font-weight:800;white-space:nowrap}.neg{color:#A3402B;font-weight:800;white-space:nowrap}
/* calendar */
.cal{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:4px}
.wd{text-align:center;font-size:11px;font-weight:700;color:#5B6660;padding:4px 0}
.day{font:inherit;border:1px solid transparent;border-radius:10px;min-height:48px;background:#fff;cursor:pointer;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;color:#1E2A24;padding:0}
.day b{font-size:14px}.day small{font-size:10px;font-weight:700}
.day.p1{background:#E4EFE9}.day.p1 small{color:#1F5B43}
.day.p2{background:#FFE7C2}.day.p2 small{color:#7A4B00}
.day.p3{background:#F6CFC7}.day.p3 small{color:#8A1B12}
.day.sel{border-color:#1F5B43;border-width:2px}
.day.today b{text-decoration:underline}
.day.empty{background:transparent;cursor:default}
.legend{display:flex;flex-wrap:wrap;gap:10px;font-size:11px;color:#5B6660}
.legend i{display:inline-block;width:12px;height:12px;border-radius:4px;margin-right:4px;vertical-align:-2px}
.pbar{height:10px;border-radius:5px;background:#EEE9DD;overflow:hidden}.pbar i{display:block;height:100%;background:#1F5B43;border-radius:5px}
/* login */
.pin{display:flex;gap:14px;justify-content:center;margin:6px 0}
.pin i{width:16px;height:16px;border-radius:50%;border:2px solid #1F5B43}
.pin i.f{background:#1F5B43}
.keys{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}
.key{font:inherit;font-size:22px;font-weight:700;min-height:58px;border-radius:16px;border:1px solid #E6E0D3;background:#fff;cursor:pointer;color:#1E2A24}
.logo{width:56px;height:56px;border-radius:16px;background:#1F5B43;color:#fff;display:flex;align-items:center;justify-content:center;font-weight:800;font-size:22px}
.menu{display:flex;flex-direction:column}
.mi{font:inherit;display:flex;align-items:center;gap:14px;border:0;background:none;padding:14px 4px;border-top:1px solid #EEE9DD;cursor:pointer;text-align:left;color:#1E2A24;width:100%}
.mi:first-child{border-top:0}
.mi svg{width:22px;height:22px;color:#1F5B43;flex:none}
.mi b{display:block;font-size:15px}.mi span{font-size:12px;color:#5B6660}
.opt{font:inherit;text-align:left;border:1px solid #CFC8B8;border-radius:12px;padding:10px 12px;background:#fff;cursor:pointer;display:flex;flex-direction:column;gap:6px;color:#1E2A24}
.opt.on{border-color:#1F5B43;border-width:2px}
nav{position:fixed;bottom:0;left:0;right:0;max-width:480px;margin:0 auto;display:flex;border-top:1px solid #E6E0D3;background:#fff;padding:4px 4px calc(8px + env(safe-area-inset-bottom));z-index:6}
.nav{font:inherit;font-size:11px;font-weight:600;border:0;background:none;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:52px;flex:1;color:#5B6660;position:relative}
.nav.on{color:#1F5B43}.nav svg{width:22px;height:22px}
.dot{position:absolute;top:4px;right:calc(50% - 16px);width:8px;height:8px;border-radius:50%;background:#B42318}
.pix{font-family:ui-monospace,monospace;font-size:12px;background:#F5F2EA;border-radius:10px;padding:10px;word-break:break-all}
.back{font:inherit;font-weight:700;border:0;background:none;color:#1F5B43;cursor:pointer;padding:4px 0;display:flex;align-items:center;gap:4px;font-size:14px}

/* ── acréscimos da versão real ── */
.sheet{position:fixed;inset:0;background:rgba(20,30,25,.55);z-index:50;display:flex;align-items:flex-end;justify-content:center}
.sheet[hidden]{display:none!important}
.sheet>div{background:#fff;border-radius:20px 20px 0 0;max-width:480px;width:100%;max-height:92vh;overflow:auto;padding:20px 20px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:12px}
.sheet .txt{white-space:pre-line;font-size:15px;line-height:1.5}
.qr{display:flex;justify-content:center;padding:8px}.qr img,.qr canvas{width:200px;height:200px}
.row{display:flex;gap:8px;align-items:center}.row>*{flex:1}
.btn.red{background:#B42318}.btn2.red{color:#B42318;border-color:#F0B8B0}
.btn:disabled,.btn2:disabled{opacity:.5;cursor:default}
.mini{min-height:34px!important;font-size:12px!important;padding:0 10px!important;width:auto}
.thumb{width:100%;max-height:220px;object-fit:cover;border-radius:12px}
.loading{padding:60px 20px;text-align:center;color:#5B6660}
.toast{position:fixed;left:50%;bottom:90px;transform:translateX(-50%);background:#1E2A24;color:#fff;font-size:14px;font-weight:600;border-radius:12px;padding:10px 16px;z-index:60;max-width:90vw;text-align:center}
.mo.click{cursor:pointer;border:0;font:inherit;font-size:11px;font-weight:700}
.file{font-size:13px}
@media print{nav,.top,.no-print,.back{display:none!important}#app{max-width:none}main{padding:0}.card{break-inside:avoid}body,html,#app{background:#fff}}
.mi[hidden],[hidden]{display:none!important}
