:root{--bg: #f4f5f2;--surface: #ffffff;--text: #1c1f1d;--muted: #6b716d;--line: #e3e5e1;--accent: #0f766e;--accent-soft: #e2f1ef;--in: #15803d;--out: #b42318;--warn-bg: #fdecea;--radius: 14px;color-scheme:light}@media(prefers-color-scheme:dark){:root{--bg: #121413;--surface: #1c1f1e;--text: #eceeec;--muted: #9aa19d;--line: #2c302e;--accent: #2dd4bf;--accent-soft: #163633;--in: #4ade80;--out: #f87171;--warn-bg: #3a1d1b;color-scheme:dark}}*{box-sizing:border-box}html,body{margin:0;background:var(--bg);color:var(--text);font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;font-size:16px;-webkit-tap-highlight-color:transparent}button,input,select{font:inherit;color:inherit}h1,h2,h3{margin:0 0 8px}h2{font-size:1.05rem}.app{max-width:560px;margin:0 auto;min-height:100vh;padding-bottom:96px}.topbar{position:sticky;top:0;z-index:5;display:flex;justify-content:space-between;align-items:center;padding:14px 16px;background:var(--bg);border-bottom:1px solid var(--line)}.topbar-title{font-weight:700;font-size:1.15rem}.topbar-sub{color:var(--muted);font-size:.85rem}.content{padding:16px}.stack{display:flex;flex-direction:column;gap:14px}.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px}.page-title{margin:4px 0 0}.tabbar{position:fixed;bottom:0;left:0;right:0;z-index:10;display:flex;justify-content:center;background:var(--surface);border-top:1px solid var(--line);padding-bottom:env(safe-area-inset-bottom)}.tabbar button{flex:1;max-width:140px;background:none;border:0;padding:8px 4px 10px;display:flex;flex-direction:column;align-items:center;gap:2px;font-size:.75rem;color:var(--muted)}.tabbar button.active{color:var(--accent);font-weight:600}.tab-icon{font-size:1.2rem;line-height:1}.fab{position:fixed;right:max(16px,calc(50vw - 264px));bottom:calc(76px + env(safe-area-inset-bottom));z-index:11;width:56px;height:56px;border-radius:50%;border:0;background:var(--accent);color:#fff;font-size:1.9rem;line-height:1;box-shadow:0 6px 16px #0003}.muted{color:var(--muted)}.small{font-size:.82rem}.money{font-variant-numeric:tabular-nums;white-space:nowrap}.money.in,.negative .money,.money.out{font-weight:600}.money.in{color:var(--in)}.money.out,.negative,.negative .money{color:var(--out)}.hero-value{font-size:2rem;font-weight:700;margin:4px 0 12px}.hero-split{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:10px}.tiles{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:8px}.tile{background:var(--accent-soft);border-radius:10px;padding:10px;min-width:0}.tile .money{font-weight:600;font-size:.95rem}.rows{list-style:none;margin:0;padding:0}.rows li{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0;border-bottom:1px solid var(--line)}.rows li:last-child{border-bottom:0}.rows li.total{font-weight:700}.grow{flex:1;min-width:0}.row-end{display:flex;align-items:center;gap:6px}.row-between{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}.day{font-size:.85rem;color:var(--muted);font-weight:600;text-transform:capitalize}.badge{display:inline-block;margin-left:6px;padding:1px 7px;border-radius:999px;background:var(--accent-soft);color:var(--accent);font-size:.72rem;font-weight:600;vertical-align:middle}.badge.status-paga{background:#dcfce7;color:#166534}.badge.status-fechada,.badge.status-vencida{background:#fef3c7;color:#92400e}.month-nav{display:flex;justify-content:space-between;align-items:center}.month-nav button{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:var(--surface);font-size:1.3rem}.month-nav button:disabled{opacity:.4}.segmented{display:flex;gap:4px;background:var(--line);padding:4px;border-radius:12px;overflow-x:auto}.segmented button{flex:1;border:0;background:none;padding:8px 10px;border-radius:9px;font-size:.88rem;white-space:nowrap}.segmented button.active{background:var(--surface);font-weight:600;box-shadow:0 1px 3px #0000001f}.field{display:flex;flex-direction:column;gap:6px;margin-bottom:12px}.field-label{font-size:.85rem;font-weight:600}.field-hint{font-size:.78rem;color:var(--muted)}input,select{width:100%;padding:11px 12px;border:1px solid var(--line);border-radius:10px;background:var(--surface);min-height:44px}input:focus,select:focus{outline:2px solid var(--accent);outline-offset:-1px}.check{display:flex;align-items:center;gap:8px;margin-bottom:12px;font-size:.92rem}.check input{width:20px;min-height:20px;height:20px}button{cursor:pointer;border-radius:10px;border:1px solid var(--line);background:var(--surface);padding:10px 14px;min-height:44px}button:disabled{opacity:.6;cursor:default}button.primary{background:var(--accent);border-color:var(--accent);color:#fff;font-weight:600;width:100%}.segmented.type-choice button.active.out{color:var(--out)}.segmented.type-choice button.active.in{color:var(--in)}.eye-button{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-height:40px;padding:0;border:0;border-radius:50%;background:none;color:var(--muted)}.eye-button:hover{color:var(--text)}.eye-button.active{color:var(--accent);background:var(--accent-soft)}.form-row{display:grid;grid-template-columns:1fr 1fr;gap:10px}.hidden-value{letter-spacing:1px}input.masked{-webkit-text-security:disc}.password-input{position:relative}.password-input input{padding-right:48px}.password-input .eye-button{position:absolute;right:4px;top:50%;transform:translateY(-50%)}.topbar-actions{display:flex;align-items:center;gap:4px}.dash-tiles{display:grid;grid-template-columns:1fr 1fr;gap:10px}.dash-tile{padding:14px;min-width:0}.dash-tile .money{display:block;margin-top:4px;font-size:1.2rem;font-weight:700}.dash-tile.balance{grid-column:1 / -1}.dash-tile.balance .money{font-size:1.8rem}.dash-tile.balance.positive .money{color:var(--in)}.chart{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;height:160px;margin-top:8px}.chart-col{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:6px;height:100%;min-height:auto;padding:6px 0 4px;border:0;border-radius:10px;background:none}.chart-col.selected{background:var(--accent-soft)}.bars{display:flex;align-items:flex-end;justify-content:center;gap:3px;width:100%;flex:1}.bar{width:11px;border-radius:4px 4px 0 0}.bar.in,.dot.in{background:var(--in)}.bar.out,.dot.out{background:var(--out)}.chart-label{font-size:.75rem;color:var(--muted);text-transform:capitalize}.chart-col.selected .chart-label{color:var(--accent);font-weight:700}.legend{display:flex;gap:16px;justify-content:center;margin-top:8px}.dot{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:4px;vertical-align:middle}.category-row .row-between{align-items:center}.progress{height:6px;margin:6px 0 4px;border-radius:999px;background:var(--line);overflow:hidden}.progress-fill{height:100%;border-radius:999px;background:var(--out)}button.expand{display:flex;justify-content:space-between;align-items:center;width:100%;margin-top:4px;padding:8px 2px;min-height:40px;border:0;background:none;color:var(--accent);font-weight:600}.chevron{display:inline-block;font-size:1.3rem;line-height:1;transition:transform .15s ease}.chevron.open{transform:rotate(90deg)}button.danger{margin-top:10px;width:100%;background:none;border-color:var(--out);color:var(--out);font-weight:600}.list-header{display:flex;justify-content:space-between;align-items:center;margin-top:8px}.rows li.clickable{cursor:pointer}.badge.paused{background:var(--line);color:var(--muted)}button.link{background:none;border:0;padding:4px;min-height:auto;color:var(--accent);font-weight:600}button.link.center{align-self:center}button.icon{background:none;border:0;min-height:36px;width:36px;padding:0;font-size:1.3rem;color:var(--muted)}.inline-form{display:grid;grid-template-columns:1fr auto auto;gap:8px;margin-top:12px}.inline-form button.primary{width:auto}.error-box{display:flex;justify-content:space-between;align-items:center;gap:8px;background:var(--warn-bg);color:var(--out);padding:10px 12px;border-radius:10px;font-size:.88rem;margin:8px 0}.loading,.empty{text-align:center;color:var(--muted);padding:24px 8px}.sheet-backdrop{position:fixed;inset:0;z-index:20;background:#00000073;display:flex;align-items:flex-end;justify-content:center}.sheet{width:100%;max-width:560px;max-height:92vh;overflow-y:auto;background:var(--bg);border-radius:20px 20px 0 0;padding:16px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column}.sheet .segmented{margin-bottom:14px}.login{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}.login-card{width:100%;max-width:380px}.login-card p{margin-top:0}
