@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Bricolage Grotesque';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(fonts/bricolage-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/figtree-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/figtree-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Figtree';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(fonts/figtree-700.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Layout: uma coluna para o celular. Superfícies brancas flutuam sobre um fundo verde-acinzentado; o número principal fica tingido pela situação (verde sobra, vermelho falta); dourado só para o Natal. */
:root{
  --bg:#EBF1ED; --surface:#FFFFFF; --surface-2:#F4F8F5; --ink:#13211C; --muted:#586861; --line:#DFE7E2;
  --accent:#0B7A63; --accent-strong:#085F4D; --accent-ink:#FFFFFF; --accent-soft:#D6EEE6;
  --gold:#A8680A; --gold-soft:#FAEBCB;
  --ok:#15804D; --ok-soft:#D5EFDF; --warn:#9C5B00; --warn-soft:#F8E5C2; --bad:#B73424; --bad-soft:#FADFD9;
  --sh:0 1px 2px rgba(19,33,28,.06),0 12px 28px -14px rgba(19,33,28,.22);
  --f-display:'Bricolage Grotesque',system-ui,sans-serif; --f-body:'Figtree',system-ui,sans-serif;
  --ease:cubic-bezier(.16,1,.3,1);
}
@media (prefers-color-scheme: dark){:root:not([data-theme="light"]){
  --bg:#0B1311; --surface:#15201D; --surface-2:#1B2925; --ink:#E6F0EB; --muted:#8FA39B; --line:#26362F;
  --accent:#3EC7A5; --accent-strong:#7BE3C7; --accent-ink:#05201A; --accent-soft:#143A31;
  --gold:#E6B24A; --gold-soft:#3A2E12;
  --ok:#55CF93; --ok-soft:#14301F; --warn:#EBA843; --warn-soft:#3A2C12; --bad:#F27B69; --bad-soft:#3B201B;
  --sh:0 1px 2px rgba(0,0,0,.4),0 12px 28px -14px rgba(0,0,0,.6); color-scheme:dark}}
:root[data-theme="dark"]{
  --bg:#0B1311; --surface:#15201D; --surface-2:#1B2925; --ink:#E6F0EB; --muted:#8FA39B; --line:#26362F;
  --accent:#3EC7A5; --accent-strong:#7BE3C7; --accent-ink:#05201A; --accent-soft:#143A31;
  --gold:#E6B24A; --gold-soft:#3A2E12;
  --ok:#55CF93; --ok-soft:#14301F; --warn:#EBA843; --warn-soft:#3A2C12; --bad:#F27B69; --bad-soft:#3B201B;
  --sh:0 1px 2px rgba(0,0,0,.4),0 12px 28px -14px rgba(0,0,0,.6); color-scheme:dark}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html{scrollbar-color:var(--line) transparent}
body{background:var(--bg);color:var(--ink);font-family:var(--f-body);font-size:16px;line-height:1.45;-webkit-text-size-adjust:100%;accent-color:var(--accent);caret-color:var(--accent)}
::selection{background:var(--accent);color:var(--accent-ink)}
.wrap{max-width:520px;margin:0 auto;padding-block:18px 160px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
h1,h2,h3,p{margin:0}
svg{flex:none}

/* cabeçalho */
.top{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px}
.brand{display:flex;align-items:center;gap:10px}
.logo{width:38px;height:38px;border-radius:12px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center}
.logo svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.brand h1{font-family:var(--f-display);font-size:22px;font-weight:700;letter-spacing:-.015em}
.tagline{display:block;font-size:13px;font-weight:700;color:var(--accent-strong);margin-top:1px}
.date{font-size:13px;font-weight:700;color:var(--muted);background:var(--surface);padding:6px 12px;border-radius:99px;box-shadow:var(--sh)}

/* seletor de mês */
.mes{display:flex;gap:4px;margin:0 0 14px;background:var(--surface);border-radius:14px;padding:4px;box-shadow:var(--sh)}
.mes button{flex:1;border:0;background:none;border-radius:10px;padding:10px 6px;font-weight:700;font-size:15px;color:var(--muted);cursor:pointer;min-height:44px;transition:background .25s var(--ease),color .25s var(--ease)}
.mes button[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink)}

/* superfícies */
.card{background:var(--surface);border-radius:20px;padding:18px 16px;margin-bottom:14px;box-shadow:var(--sh)}
.h2{font-family:var(--f-display);font-size:19px;font-weight:700;letter-spacing:-.01em;line-height:1.2;text-wrap:balance}
.help{font-size:14px;color:var(--muted);margin:3px 0 12px}
.sub{font-size:14px;color:var(--muted);font-variant-numeric:tabular-nums}
.note{font-size:14px;color:var(--muted);margin:8px 0 0;max-width:62ch}
.card.gold{background:linear-gradient(180deg,var(--gold-soft),var(--surface) 55%)}

/* situação */
.hero{padding:22px 18px 18px}
.hero.pos{background:var(--ok-soft)} .hero.neg{background:var(--bad-soft)}
.hero .lbl{font-size:15px;font-weight:600;color:var(--ink);opacity:.8;max-width:30ch}
.hero .big{font-family:var(--f-display);font-size:58px;font-weight:700;letter-spacing:-.03em;font-variant-numeric:tabular-nums;line-height:1;margin:8px 0 10px}
.hero.pos .big,.hero.pos .tot{color:var(--ok)} .hero.neg .big,.hero.neg .tot{color:var(--bad)}
.hero p{font-size:15px;max-width:34ch}
.calc{margin:16px 0 0;background:var(--surface);border-radius:14px;padding:6px 14px}
.calc div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;font-variant-numeric:tabular-nums;font-size:15px}
.calc div+div{border-top:1px solid var(--line)}
.calc .neg{color:var(--bad)}
.calc div>span:last-child{white-space:nowrap}
.calc .tot{font-weight:700;font-size:17px;border-top:2px solid currentColor}

/* barras */
.bar{height:12px;border-radius:99px;background:var(--surface-2);overflow:hidden;margin:7px 0;box-shadow:inset 0 0 0 1px var(--line)}
.bar>i{display:block;height:100%;background:var(--accent);border-radius:99px}
.bar.warn>i{background:var(--warn)} .bar.bad>i{background:var(--bad)} .bar.gold>i{background:var(--gold)}
.catrow{display:flex;justify-content:space-between;gap:10px;font-size:15px;font-variant-numeric:tabular-nums}

/* linhas de conta e lançamento */
.item{display:grid;grid-template-columns:40px minmax(0,1fr);column-gap:12px;align-items:start;padding:14px 0;border-top:1px solid var(--line)}
.item:first-of-type{border-top:0}
.ico{width:40px;height:40px;border-radius:13px;display:grid;place-items:center;background:var(--accent-soft);color:var(--accent)}
.ico svg{width:21px;height:21px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.ico.ok{background:var(--ok-soft);color:var(--ok)} .ico.bad{background:var(--bad-soft);color:var(--bad)} .ico.idle{background:var(--surface-2);color:var(--muted)} .ico.gold{background:var(--gold-soft);color:var(--gold)}
.item .l1{display:flex;justify-content:space-between;gap:10px;align-items:baseline}
.item .nm{font-weight:700;font-size:16px;overflow-wrap:anywhere;line-height:1.3}
.item .val{font-weight:700;font-size:16px;font-variant-numeric:tabular-nums;white-space:nowrap}
.item .l2{display:flex;justify-content:space-between;gap:10px;align-items:center;margin-top:4px;flex-wrap:wrap}
.item .meta{font-size:14px;color:var(--muted)}
.item .meta.bad{color:var(--bad);font-weight:600}
.item .acts{margin-top:8px;grid-column:2}

/* botões e campos */
button,input,select{font:inherit;color:inherit}
.btn{border:0;background:var(--surface-2);border-radius:12px;padding:9px 14px;font-weight:700;cursor:pointer;min-height:44px;box-shadow:inset 0 0 0 1px var(--line);transition:transform .15s var(--ease),background .2s}
.btn:active{transform:scale(.97)}
.btn.pri{background:var(--accent);color:var(--accent-ink);box-shadow:none}
.btn.sm{padding:6px 13px;min-height:38px;font-size:14px;border-radius:10px}
.btn.ghost{background:transparent}
.btn.danger{color:var(--bad);box-shadow:inset 0 0 0 1.5px var(--bad);background:transparent}
.btn.block{width:100%}
.btn:focus-visible,input:focus-visible,select:focus-visible,.tab:focus-visible,.chip:focus-visible,.mes button:focus-visible,.seg button:focus-visible,.fab:focus-visible{outline:3px solid var(--accent);outline-offset:2px}
input,select{width:100%;border:0;box-shadow:inset 0 0 0 1px var(--line);background:var(--surface-2);border-radius:12px;padding:10px 14px;min-height:46px}
input:focus{box-shadow:inset 0 0 0 2px var(--accent)}
input::placeholder{color:var(--muted);opacity:.8}
label{display:block;font-size:13px;font-weight:700;color:var(--muted);margin:12px 0 5px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sec{font-family:var(--f-display);font-size:15px;color:var(--muted);margin:18px 2px 4px;font-weight:700}
.amount{font-family:var(--f-display);font-size:36px;font-weight:700;text-align:center;font-variant-numeric:tabular-nums;letter-spacing:-.02em;line-height:1.1}
.amount.left{text-align:left}
.empty{color:var(--muted);text-align:center;padding:24px 8px;display:flex;flex-direction:column;align-items:center;gap:8px}
.empty .ico{width:46px;height:46px}
ol.prio{padding:0;margin:10px 0 0;list-style:none;counter-reset:p}
ol.prio li{counter-increment:p;display:flex;gap:12px;align-items:center;padding:8px 0}
ol.prio li::before{content:counter(p);width:28px;height:28px;border-radius:50%;background:var(--accent-soft);color:var(--accent);font-weight:700;font-size:14px;display:grid;place-items:center;flex:none}

/* abas e botão flutuante */
.tabs{position:fixed;left:0;right:0;bottom:0;background:var(--surface);box-shadow:0 -8px 24px -16px rgba(19,33,28,.35);display:flex;justify-content:center;padding-bottom:env(safe-area-inset-bottom,0px);z-index:20}
.tabs>div{display:flex;width:100%;max-width:520px;padding-left:env(safe-area-inset-left,0px);padding-right:env(safe-area-inset-right,0px)}
.tab{flex:1;background:none;border:0;padding:8px 4px 8px;display:flex;flex-direction:column;align-items:center;gap:3px;font-size:12px;font-weight:700;color:var(--muted);cursor:pointer;min-height:60px}
.tab .ic{width:56px;height:30px;border-radius:99px;display:grid;place-items:center;transition:background .3s var(--ease),color .3s var(--ease)}
.tab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.tab[aria-current="page"]{color:var(--accent-strong)}
.tab[aria-current="page"] .ic{background:var(--accent-soft)}
.fab{position:fixed;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(76px + env(safe-area-inset-bottom,0px));z-index:21;background:var(--accent);color:var(--accent-ink);border:0;border-radius:99px;padding:0 22px 0 16px;height:54px;font-weight:700;font-size:16px;box-shadow:0 14px 26px -8px rgba(11,122,99,.55),0 2px 4px rgba(0,0,0,.18);cursor:pointer;display:flex;align-items:center;gap:8px;transition:transform .15s var(--ease)}
.fab:active{transform:scale(.96)}
.fab svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:2.4;stroke-linecap:round}

/* janelas */
.sheet-bg{position:fixed;inset:0;background:rgba(8,16,13,.55);z-index:30;display:flex;align-items:flex-end;justify-content:center}
.sheet{background:var(--surface);width:100%;max-width:520px;border-radius:26px 26px 0 0;padding:10px 18px 18px;padding-bottom:calc(18px + env(safe-area-inset-bottom,0px));max-height:92%;overflow-y:auto;box-shadow:0 -20px 40px -20px rgba(0,0,0,.4)}
.sheet.in{animation:up .45s var(--ease)}
.sheet::before{content:"";display:block;width:42px;height:4px;border-radius:99px;background:var(--line);margin:0 auto 14px}
.sheet h3{font-family:var(--f-display);font-size:22px;margin-bottom:6px}
.seg{display:flex;gap:6px;margin:10px 0;background:var(--surface-2);padding:4px;border-radius:14px}
.seg button{flex:1;border:0;background:none;border-radius:10px;padding:9px 10px;font-weight:700;cursor:pointer;min-height:42px;color:var(--muted)}
.seg button[aria-pressed="true"]{background:var(--surface);color:var(--ink);box-shadow:var(--sh)}
.chips{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.chip{border:0;box-shadow:inset 0 0 0 1px var(--line);background:var(--surface-2);border-radius:99px;padding:8px 14px;font-weight:700;cursor:pointer;min-height:40px;font-size:15px}
.chip[aria-pressed="true"]{background:var(--accent);color:var(--accent-ink);box-shadow:none}
.toast{position:fixed;left:50%;transform:translateX(-50%);bottom:calc(140px + env(safe-area-inset-bottom,0px));background:var(--ink);color:var(--bg);padding:11px 18px;border-radius:14px;z-index:40;font-weight:700;max-width:90%;box-shadow:var(--sh);animation:up .4s var(--ease)}

/* entrada ao trocar de tela */
@keyframes up{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:none}}
@keyframes fill{from{width:0}}
@media (prefers-reduced-motion:no-preference){
  .enter>*{animation:up .55s var(--ease) both}
  .enter>*:nth-child(2){animation-delay:.05s}.enter>*:nth-child(3){animation-delay:.1s}.enter>*:nth-child(4){animation-delay:.15s}.enter>*:nth-child(5){animation-delay:.2s}.enter>*:nth-child(n+6){animation-delay:.25s}
  .enter .bar>i{animation:fill .9s var(--ease) .2s both}
}
@media (prefers-reduced-motion:reduce){.sheet.in,.toast{animation:none}}
@media (max-width:360px){.hero .big{font-size:50px}}

/* páginas de entrada e segurança */
a.btn{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;color:inherit}
.auth-box{max-width:440px;margin:0 auto;padding-block:32px 60px;padding-left:max(16px,env(safe-area-inset-left,0px));padding-right:max(16px,env(safe-area-inset-right,0px))}
.auth-logo{width:56px;height:56px;border-radius:18px;background:var(--accent);color:var(--accent-ink);display:grid;place-items:center;margin-bottom:14px}
.auth-logo svg{width:30px;height:30px;stroke:currentColor;fill:none;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.auth-title{font-family:var(--f-display);font-size:30px;font-weight:700;letter-spacing:-.02em;margin-bottom:14px}
.auth-form{display:block;margin-bottom:6px}
.auth-form .btn{margin-top:16px}
.auth-form .h2{margin:20px 0 4px}
.auth-err{background:var(--bad-soft);color:var(--bad);font-weight:600;padding:12px 14px;border-radius:12px;margin-bottom:14px}
.auth-ok{background:var(--ok-soft);color:var(--ok);font-weight:600;padding:12px 14px;border-radius:12px;margin-bottom:14px}
.back{color:var(--accent-strong);font-weight:700;text-decoration:none}
.codes{list-style:none;padding:0;margin:8px 0 0;display:grid;grid-template-columns:1fr 1fr;gap:8px}
.codes li{background:var(--surface-2);border-radius:10px;padding:10px;text-align:center;font-variant-numeric:tabular-nums;font-weight:700;letter-spacing:.04em}
.secret{font-family:ui-monospace,Consolas,monospace;font-size:20px;font-weight:700;letter-spacing:.08em;background:var(--surface-2);padding:14px;border-radius:12px;overflow-wrap:anywhere;margin:6px 0 10px}
.ev{padding:7px 0;align-items:baseline;flex-wrap:wrap}
code{background:var(--surface-2);padding:1px 6px;border-radius:6px}
.auth-box .card{margin-top:14px}
.tagline-auth{font-weight:700;color:var(--accent-strong);margin:-8px 0 16px}
.tagline{display:block;font-size:13px;font-weight:700;color:var(--accent-strong);margin-top:1px}
