:root{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:#eef4f8;background:#0a1320;--bg:#0a1320;--surface:#121f30;--surface2:#192a3d;--stroke:#2b3b4c;--sub:#9aaabd;--green:#42d3ad;--orange:#ffbd72;--red:#ff808d;--blue:#93b6ff}*{box-sizing:border-box}html,body{margin:0;min-height:100%}body{padding-bottom:94px}button,input,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,select:focus-visible{outline:2px solid var(--green);outline-offset:2px}button:disabled{opacity:.4;cursor:not-allowed}.shell{max-width:700px;margin:auto;padding:20px 17px}.top{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:3px 0 19px}.brand{display:flex;align-items:center;gap:11px}.mark{height:39px;width:39px;border-radius:13px;background:linear-gradient(135deg,#42d3ad,#417aa7);display:grid;place-items:center;color:#07171d;font-weight:900;letter-spacing:-1px}.brand h1{font-size:19px;margin:0;letter-spacing:-.5px}.eyebrow{font-size:11px;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:var(--sub)}.small{font-size:12px;color:var(--sub)}.month{background:var(--surface);border:1px solid var(--stroke);color:#fff;padding:10px 8px;border-radius:11px;width:143px;font-size:13px}.hero{border-radius:22px;padding:21px;background:linear-gradient(125deg,#1b3445,#102536 65%,#10212e);border:1px solid #2c5660;position:relative;overflow:hidden;margin-bottom:16px}.hero:after{content:"";position:absolute;right:-54px;top:-85px;width:190px;height:190px;background:radial-gradient(circle,#4adcb22a,transparent 70%);pointer-events:none}.hero .amount{font-size:32px;font-weight:800;letter-spacing:-1.3px;margin:8px 0 4px}.hero .amount.negative{color:#ffb4ae}.hero .detail{color:#bed5dc;font-size:12px;line-height:1.5}.pill{display:inline-flex;padding:6px 9px;border-radius:8px;background:#244a44;color:#b0f7dd;font-size:11px;font-weight:700;margin-top:11px}.metrics{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:18px}.metric{background:var(--surface);border:1px solid var(--stroke);border-radius:16px;padding:15px;min-height:103px}.metric .n{font-weight:750;font-size:21px;letter-spacing:-.6px;margin:9px 0 2px}.metric .label{font-size:12px;color:var(--sub)}.card{background:var(--surface);border:1px solid var(--stroke);border-radius:18px;padding:18px;margin:13px 0}.card h2{font-size:16px;margin:0 0 13px}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:9px;margin-bottom:12px}.section-heading h2{margin:0}.note{font-size:12px;line-height:1.55;color:var(--sub)}.note.warning{color:#ffcd8a}.rows{display:flex;flex-direction:column;gap:12px}.line{display:flex;justify-content:space-between;align-items:center;gap:11px}.line .name{font-size:14px;font-weight:600}.line .meta{font-size:12px;color:var(--sub);margin-top:2px}.value{font-weight:700;white-space:nowrap;font-variant-numeric:tabular-nums}.bar{height:10px;border-radius:99px;background:#223449;overflow:hidden;display:flex}.bar>span{height:100%;display:block}.sep{height:1px;background:var(--stroke);margin:13px 0}.btn{border:1px solid #3b665f;background:#1c433f;color:#b8f9e5;padding:10px 14px;border-radius:11px;font-weight:700;font-size:13px}.btn.secondary{background:#192b3c;color:#d4e4ee;border-color:#395066}.btn.danger{background:#42252f;color:#ffc2c4;border-color:#704653}.btn.ghost{padding:5px 9px;background:transparent;border:1px solid var(--stroke);color:#bac8d5;border-radius:8px;font-size:12px}.btn.full{width:100%}.tag{font-size:11px;background:#243445;color:#aebed0;border-radius:8px;padding:4px 7px;white-space:nowrap}.tag.green{background:#174f42;color:#b6f7e2}.tag.orange{background:#563d27;color:#fcd5a1}.tabs{position:fixed;z-index:10;bottom:0;left:0;right:0;background:#0c1726ed;backdrop-filter:blur(18px);border-top:1px solid var(--stroke);display:flex;justify-content:center;padding:8px max(8px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom))}.tabs-inner{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));max-width:700px;width:100%}.tab{background:none;border:0;color:#94a9b9;display:flex;align-items:center;gap:3px;flex-direction:column;font-size:10px;padding:4px 0}.tab .ic{font-size:21px}.tab.active{color:#53e3bc;font-weight:800}.progress{height:12px;border-radius:10px;background:#263a47;overflow:hidden;margin:13px 0}.progress div{height:100%;background:linear-gradient(90deg,#34b58f,#70e5b7);border-radius:10px;transition:width .2s}.field{display:flex;flex-direction:column;gap:6px;margin:12px 0}.field label{font-weight:700;font-size:12px;color:#c6d3e1}.field input,.field select{background:#0b1827;border:1px solid #3c5063;color:#f5fafc;border-radius:11px;padding:12px;min-height:44px;width:100%;font-size:14px}input::placeholder{color:#6e8498}.sheet{position:fixed;inset:0;background:#040a12c9;z-index:30;display:flex;align-items:flex-end;justify-content:center}.sheet .body{width:100%;max-width:700px;max-height:94vh;overflow:auto;background:#172638;border:1px solid #3b5266;border-radius:22px 22px 0 0;padding:21px 20px 36px}.sheet .body h2{margin:0 0 16px}.footer-actions{display:flex;gap:8px;margin-top:17px}.footer-actions>*{flex:1}.empty{text-align:center;padding:25px 9px;color:var(--sub);font-size:13px}.right{text-align:right}.stat-pair{display:grid;grid-template-columns:1fr 1fr;gap:10px}.stat-pair .stat{background:#152b3b;border-radius:12px;padding:11px}.stat .k{font-size:11px;color:var(--sub)}.stat .v{font-weight:800;font-size:18px;margin-top:4px}.scroll{overflow-x:auto}.installment-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;padding:11px 0;border-bottom:1px solid #223344}.installment-row:last-child{border:0}.good{color:var(--green)}.bad{color:var(--red)}.muted{color:var(--sub)}.info{border-left:3px solid #e9a758;padding:11px 12px;background:#3a302b;border-radius:0 9px 9px 0;color:#f0d1af;font-size:12px;line-height:1.5}.toast{position:fixed;z-index:50;bottom:100px;left:50%;transform:translateX(-50%);background:#dafce9;color:#062c25;padding:11px 18px;border-radius:12px;font-size:13px;font-weight:700;box-shadow:0 8px 30px #0009;max-width:90%;white-space:nowrap}.mini-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.mini-stat{border:1px solid var(--stroke);border-radius:12px;padding:12px;background:var(--surface2)}.mini-stat .number{font-weight:800;font-size:19px;margin-top:6px;overflow-wrap:anywhere}.wrap{flex-wrap:wrap}.btn.tiny{padding:6px 9px;font-size:11px}.editable{border-bottom:1px dashed #72a79b}.weekline{padding:9px 0;border-bottom:1px solid var(--stroke)}.weekline .line{padding-top:6px;font-size:12px;gap:5px}.weekline:last-child{border-bottom:0}.weekline strong{font-variant-numeric:tabular-nums}.hidden{display:none!important}@media(min-width:700px){.shell{padding-top:30px}.hero .amount{font-size:38px}}
.sortbar{display:flex;flex-wrap:wrap;align-items:end;gap:8px;margin:11px 0 12px}.sortbar label{font-size:11px;letter-spacing:.02em;color:var(--sub);display:flex;flex-direction:column;gap:5px;min-width:135px;flex:1}.sortbar select{width:100%;background:#0b1827;border:1px solid #405269;color:#e7f3f6;padding:9px 8px;border-radius:10px;font-size:12px;min-height:39px}.mutedtag{display:inline-block;font-size:11px;color:var(--sub);padding:4px 8px;border:1px solid #33485d;border-radius:8px}.status{font-size:11px;font-weight:700;display:inline-block;margin-top:5px}.status.paid{color:var(--green)}.status.overdue{color:var(--red)}.status.pending{color:var(--orange)}.summary-due{background:#0f2330;border:1px solid var(--stroke);padding:12px;border-radius:12px;margin:12px 0}.summary-due .stat-pair{margin-top:7px}.summary-due small{font-size:11px;color:var(--sub)}.summary-due .v{font-variant-numeric:tabular-nums}.line .name{overflow-wrap:anywhere}.installment-row .right{min-width:96px}.listhead{margin-top:15px}

.quicklinks{display:flex;gap:8px;flex-wrap:wrap;margin:12px 0}.quicklinks>*{flex:1}
.cal-week{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}.cal-week .dow{font-size:11px;text-align:center;color:var(--sub);padding:7px 0}.cal-day{background:#0e2131;border:1px solid #294255;border-radius:12px;min-height:62px;text-align:left;padding:7px 5px;color:#effafc;font-size:12px;display:flex;flex-direction:column;justify-content:space-between;gap:5px}.cal-day.empty{background:transparent;border:0;min-height:0}.cal-day.selected{border:2px solid var(--green);background:#17372f}.cal-day .dots{display:flex;flex-wrap:wrap;gap:3px}.cal-day .dots i{height:6px;width:6px;background:#ffbb75;border-radius:50%;display:block}.cal-day .dots i.paid{background:#40d7ac}.cal-day .dots i.card{background:#92b7ff}.cal-day .dots i.ir{background:#ff8895}.cal-day b{font-size:10px;color:#b6d2e3}.kpirow{display:flex;gap:8px;flex-wrap:wrap}.kpirow>div{flex:1;min-width:120px;padding:10px;border:1px solid var(--stroke);border-radius:11px}.chip{padding:6px 9px;border-radius:9px;background:#253a4b;border:1px solid #38556a;color:#cbe2f0;font-size:11px}.chip.active{background:#1b4b3f;color:#c5ffeb;border-color:#3cbf9c}.cat-badge{font-size:10px;display:inline-block;background:#243447;color:#c1d2e1;border-radius:7px;padding:3px 6px;margin:4px 0}.data-grid{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:9px 0;border-bottom:1px solid var(--stroke)}.data-grid:last-child{border:0}.data-grid .name{font-size:13px;font-weight:700}.data-grid .meta{color:var(--sub);font-size:11px;line-height:1.5}.data-grid .amount{font-size:13px;font-weight:750;white-space:nowrap}.field-help{color:var(--sub);font-size:11px}.note a{color:var(--green)}.file-action{display:inline-block;cursor:pointer}.tight{margin:4px 0}.data-grid .footer-actions{margin:5px 0 0}.data-grid .footer-actions .btn{font-size:11px}
@media(max-width:380px){.cal-week{gap:3px}.cal-day{padding:5px 3px;min-height:55px}.shell{padding-left:12px;padding-right:12px}}

.auth-shell{max-width:440px;margin:8vh auto 0;padding:25px;background:#121f30;border-radius:22px;border:1px solid var(--stroke)}.auth-shell h1{margin:0 0 10px}.auth-shell .info{margin:12px 0}.top{flex-wrap:wrap}.top #saveStatus{display:block;margin-top:3px;max-width:260px;line-height:1.3}.top .month{margin-left:auto}.top .btn{font-size:11px;padding:9px}
.tabs-inner.six{grid-template-columns:repeat(6,minmax(0,1fr))}.user-meta{min-width:0;overflow-wrap:anywhere}.data-grid .right{min-width:94px}.data-grid .right button{display:inline-block;margin:2px 0}a{color:#8ee7d2}a:focus-visible{outline:2px solid var(--green)}


/* 1.8 — seleção compacta de períodos ativos e interface reduzida */
.period-picker{display:flex;align-items:center;gap:3px;margin-left:auto;background:#121f30;border:1px solid #294055;border-radius:13px;padding:3px}
.period-picker .month{appearance:none;background:transparent;border:0;border-radius:8px;width:auto;max-width:166px;min-width:126px;flex:1;text-align:center;text-transform:capitalize;padding:8px 3px;font-weight:700;font-size:12px;color:#ecf7fb}
.period-arrow{border:0;background:none;color:#b8cfdb;font-size:25px;line-height:1;width:26px;height:34px;display:grid;place-items:center;border-radius:8px}
.period-arrow:not(:disabled):active{background:#274036}.period-arrow:disabled{opacity:.2}
.welcome{background:#15312f;border:1px solid #335c56;border-radius:17px;padding:16px;margin-bottom:14px}
.welcome h2{margin:0 0 6px;font-size:17px}.welcome p{margin:0;color:#b3cecd;font-size:13px;line-height:1.5}
.app-version{text-align:center;font-size:11px;color:#617c91;padding:15px 0}
@media(max-width:440px){.top{align-items:flex-start}.brand{min-width:145px}.brand h1{font-size:16px}.top .period-picker{margin:0 0 0 auto}.period-picker .month{min-width:100px;max-width:115px}.top #saveStatus{font-size:10px;max-width:175px}}

@media(max-width:520px){.top .period-picker{width:100%;margin-top:9px}.top .period-picker .month{min-width:0;max-width:none;width:100%;text-align:center;font-size:13px}.top .period-picker{margin-left:0}.brand{min-width:0}}

/* v1.9 — Resumo financeiro imediatamente após a seleção de mês */
.monthly-summary{position:relative;isolation:isolate;padding:20px 18px 18px;border:1px solid #324658;border-radius:20px;margin:-2px 0 16px;background:linear-gradient(135deg,#16283c,#101e30);overflow:hidden}
.monthly-summary.positive{background:linear-gradient(135deg,#123b34,#112f31 55%,#101e2c);border-color:#2b6e58}
.monthly-summary.negative{background:linear-gradient(135deg,#45232d,#30232e 55%,#1d2330);border-color:#925364}
.monthly-summary.neutral{background:linear-gradient(135deg,#1b2e40,#101d2d);border-color:#384e63}
.summary-topline{display:flex;align-items:center;justify-content:space-between;gap:8px}
.monthly-summary .eyebrow{color:#c3d4dd;font-size:11px;letter-spacing:.07em}
.summary-status{font-size:11px;font-weight:750;color:#b9cbd7;border:1px solid #56708388;border-radius:99px;padding:5px 10px;white-space:nowrap}
.monthly-summary.positive .summary-status{color:#88edc6;border-color:#58b58d80}
.monthly-summary.negative .summary-status{color:#ffadb5;border-color:#dc768980}
.summary-balance{font-size:clamp(31px,9vw,43px);font-weight:850;letter-spacing:-1.4px;line-height:1.12;margin:12px 0 17px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.monthly-summary.positive .summary-balance{color:#57e0b3}
.monthly-summary.negative .summary-balance{color:#ff97a3}
.monthly-summary.neutral .summary-balance{color:#e8f2fa}
.summary-totals{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.summary-total{background:#0b162580;border:1px solid #63768734;border-radius:13px;padding:12px 11px;min-width:0}
.summary-total span{color:#c3d1dc;display:block;font-size:12px;margin-bottom:5px}
.summary-total strong{font-size:clamp(16px,4.8vw,23px);display:block;overflow-wrap:anywhere;font-variant-numeric:tabular-nums;letter-spacing:-.5px}
.summary-breakdown{margin-top:14px;padding-top:10px;border-top:1px solid #7891a53d;display:grid;grid-template-columns:1fr 1fr;gap:9px 13px}
.summary-breakdown>div,.summary-reserve,.summary-after{display:flex;justify-content:space-between;align-items:baseline;gap:9px;font-size:12px}
.summary-breakdown>div span,.summary-reserve span,.summary-after span{color:#c0d0da}
.summary-breakdown>div strong,.summary-reserve strong,.summary-after strong{font-size:12px;white-space:nowrap;font-variant-numeric:tabular-nums}
.summary-reserve{margin-top:13px;padding-top:11px;border-top:1px solid #7891a53d}
.summary-after{margin-top:8px}.summary-after strong{font-size:14px}
.summary-footnote{margin:12px 0 0;font-size:11px;color:#b2c4d2}
.summary-actions{margin:4px 0 12px}
@media(max-width:375px){.monthly-summary{padding:17px 13px}.summary-breakdown{grid-template-columns:1fr}.summary-breakdown>div strong{font-size:13px}}

/* v2.0: avatar acionável, preferências e formulários de conta. */
.profile-avatar{border:1px solid #65bfaf;flex:none;cursor:pointer;padding:0;box-shadow:0 0 0 3px #44d4aa0b}
.profile-avatar:focus-visible{outline:3px solid var(--green);outline-offset:4px}
.profile-summary{display:flex;align-items:center;gap:14px;background:#112236;border:1px solid var(--stroke);border-radius:14px;padding:13px;margin-bottom:16px}
.profile-icon{flex:none}
.profile-summary strong{display:block;font-size:16px;margin-bottom:4px;word-break:break-word}
.profile-summary .small{word-break:break-word}
.profile-actions{display:flex;flex-direction:column;gap:10px;margin-top:15px}
.profile-actions .btn{padding:14px;text-align:left;font-size:14px}
#accountFeedback{min-height:20px;margin-top:8px}

/* Seletor de período ocupa toda a largura sem truncar o ano. */
.period-picker{display:grid;grid-template-columns:32px minmax(0,1fr) 32px;width:100%}
.period-picker .month{width:100%!important;min-width:0!important;max-width:none!important}
.period-arrow{width:32px}

/* v2.1 · entrada por e-mail/Google e cadastro com código */
.auth-switch{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px 0}
.auth-switch .btn{justify-content:center}
.auth-separator{display:flex;align-items:center;gap:10px;margin:15px 0;color:var(--sub);font-size:12px}
.auth-separator:before,.auth-separator:after{content:'';flex:1;height:1px;background:var(--stroke)}
.new-code{border:1px solid #3f9281;background:#13352f;border-radius:13px;padding:13px;margin:15px 0;overflow-wrap:anywhere}
.new-code strong{display:block;letter-spacing:1px;margin:6px 0 12px;color:#79e7c7;user-select:all}
.new-code .btn{width:100%}

/* Beta: opção Google deliberadamente desativada */
.auth-shell button:disabled{opacity:.65;cursor:not-allowed;border-style:dashed;color:#a1b1c0}


/* Vinera 2.4 — navegação adaptativa; não depende de scripts ou bibliotecas externas. */
.sidebar-brand{display:none}
.invite-row{align-items:flex-start}
.invite-row .user-meta{flex:1;min-width:0}
.invite-actions{display:flex;gap:6px;align-items:center;flex-wrap:wrap;justify-content:flex-end}
.inline-toggle{display:flex;gap:10px;align-items:center;color:#d7e7ed;font-size:13px;margin:14px 0}
.inline-toggle input{width:19px;height:19px;accent-color:var(--green)}
@media(max-width:599px){
  .shell{max-width:100%;padding:14px 14px 110px}
  .tabs{overflow-x:auto}
  .tabs-inner{min-width:0}
  .tab{font-size:10px;min-width:0}
  .tab .ic{font-size:20px}
  .section-heading{flex-wrap:wrap}
  .section-heading h2{min-width:0;overflow-wrap:anywhere}
  .invite-row{display:block}
  .invite-actions{justify-content:flex-start;margin-top:10px}
  .invite-actions .btn{min-height:40px}
  .summary-totals{grid-template-columns:repeat(2,minmax(0,1fr))}
  .footer-actions{flex-wrap:wrap}
  .monthly-summary{margin-top:8px}
}
@media(min-width:600px) and (max-width:979px){
  .shell{max-width:840px;padding:24px 24px 110px}
  .tabs-inner{max-width:840px}
  .tab{font-size:12px}
}
@media(min-width:980px){
  body{padding-bottom:0}
  .shell{max-width:1480px;margin-left:246px;margin-right:0;padding:34px clamp(24px,3vw,50px) 50px;width:calc(100% - 246px)}
  .tabs{position:fixed;top:0;bottom:0;left:0;right:auto;width:246px;border-top:0;border-right:1px solid var(--stroke);background:#0d1a2a;display:flex;align-items:stretch;justify-content:flex-start;padding:0 13px 20px;flex-direction:column;gap:18px}
  .sidebar-brand{display:flex;align-items:center;gap:10px;padding:28px 10px 12px;color:#eaf7f8;font-size:14px;font-weight:800;line-height:1.25}
  .sidebar-brand .mark{width:43px;height:43px;flex:none}
  .sidebar-brand small{font-weight:500;color:var(--sub);font-size:11px;display:block;margin-top:3px}
  .tabs-inner,.tabs-inner.six{display:flex;max-width:none;width:100%;flex-direction:column;gap:5px}
  .tab{flex-direction:row;width:100%;justify-content:flex-start;gap:12px;font-size:14px;text-align:left;padding:13px 15px;border-radius:12px}
  .tab:hover{background:#192e3c;color:#ecfaf4}
  .tab.active{background:#193e39;border:1px solid #2b6256}
  .tab .ic{font-size:23px;width:23px;text-align:center}
  .top{margin:0 0 18px}
  .top .brand h1{font-size:23px}
  .top .brand .small{font-size:13px}
  .period-picker{margin-bottom:20px;max-width:420px;margin-left:0}
  .month{font-size:14px}
  .monthly-summary{max-width:100%;padding:28px 30px}
  .summary-balance{font-size:48px}
  .summary-total strong{font-size:26px}
  .metrics{grid-template-columns:repeat(4,minmax(0,1fr))}
  .mini-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
  .card{padding:24px;margin:18px 0}
  .section-heading h2{font-size:18px}
  .auth-shell{max-width:470px;margin:7vh auto}
  .shell:has(.auth-shell){width:calc(100% - 246px)}
  .sheet{align-items:center;padding:30px}
  .sheet .body{max-width:590px;border-radius:20px;max-height:90vh;padding:26px 30px}
  .toast{bottom:32px}
  .data-grid{padding:14px 0}
}

@media(min-width:980px){
  body.is-auth .tabs{display:none}
  body.is-auth .shell{max-width:560px;width:100%;margin:0 auto;padding:28px 20px}
  body.is-auth .auth-shell{margin:6vh auto 0}
}

/* Vinera Finanças 2.5 — identidade pessoal, ajustes e experiência fluida */
.brand-mini{display:inline-block;margin-left:auto;color:var(--sub);font-size:12px;font-weight:650;white-space:nowrap}
.user-email{display:block;overflow:hidden;text-overflow:ellipsis;max-width:260px;white-space:nowrap}
.profile-summary .small{display:block;margin-top:3px}
.sidebar-brand{min-width:0}
.sidebar-brand strong{display:block;overflow:hidden;text-overflow:ellipsis;max-width:145px;white-space:nowrap}
.sidebar-brand small{overflow:hidden;text-overflow:ellipsis;max-width:145px;white-space:nowrap}
.summary-actions .btn{font-size:12px}
.reserve-sums{display:flex;justify-content:space-between;gap:20px;align-items:flex-end}
.reserve-sums>div{min-width:0}
.reserve-sums .small{display:block;margin-bottom:8px}
 .reserve-large{font-weight:850;font-size:clamp(24px,5vw,34px);letter-spacing:-.6px;display:block;overflow-wrap:anywhere}
 .reserve-goal{font-size:18px;display:block;overflow-wrap:anywhere}
.forecast{margin:17px 0 0;padding:13px 14px;border:1px solid #34766e;background:#12302d;border-radius:12px;font-size:13px;line-height:1.5;color:#bfefe0}
.forecast strong{text-transform:capitalize;color:#5aebc5;font-weight:800}
.settings-links{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
.settings-links .btn{text-align:center}
.compact-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}
.spaced{padding:10px 0;border-bottom:1px solid var(--stroke)}
.big-amount{font-size:clamp(20px,3vw,28px)}
.block{display:block;margin-top:5px;line-height:1.4}
@media(max-width:599px){
 .brand-mini{display:none}
 .top{margin-bottom:18px}
 .brand h1{font-size:18px}
 .tabs-inner.six{grid-template-columns:repeat(6,minmax(0,1fr))}
 .tab{font-size:9px;line-height:1.2;gap:6px;padding:8px 0}
 .tab .ic{font-size:20px}
 .settings-links{grid-template-columns:1fr}
 .reserve-sums{gap:8px}
 .reserve-goal{font-size:16px}
 .card .section-heading .compact-actions .btn{padding:8px 9px}
 .installment-row{grid-template-columns:minmax(0,1fr) auto}
 .installment-row .right{min-width:82px}
}
@media(min-width:980px){
 .top .brand{gap:14px}
 .top .brand h1{font-size:24px}
 .brand-mini{font-size:14px}
 .sidebar-brand{padding:25px 5px 10px}
 .sidebar-brand .profile-avatar{width:45px;height:45px}
 .sidebar-brand strong{max-width:160px;font-size:14px}
 .sidebar-brand small{max-width:162px;font-size:10px}
 .settings-links{grid-template-columns:repeat(3,minmax(0,1fr))}
 .reserve-large{font-size:36px}
}

/* 2.5.1 — topo com identidade fixa, perfil à direita no desktop e ao final no mobile */
.sidebar-brand{display:none!important}
.app-topbar{display:flex;align-items:center;justify-content:space-between;gap:12px;z-index:15;background:#0a1320}
.system-brand{min-width:0;gap:12px}
.system-logo{flex:none;box-shadow:none}
.system-name{min-width:0}
.app-topbar .system-name h1{font-size:20px;margin:0;white-space:nowrap;color:#f0f7ff}
.system-tagline{display:block;white-space:nowrap;color:#a8bccc}
.header-actions{display:flex;align-items:center;gap:10px;margin-left:auto}
.header-actions .save-status{display:block;max-width:175px;text-align:right}
.account-trigger{border:1px solid #476475;background:#162a3c;color:#e8fbf7;border-radius:30px;padding:4px 9px 4px 4px;display:flex;align-items:center;gap:7px;min-width:48px;min-height:48px;justify-content:center}
.account-trigger:hover{background:#264356}
.account-trigger .account-avatar{display:grid;place-items:center;width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,#51dbb6,#457aa6);font-size:13px;color:#041a22;font-weight:850}
.account-chevron{font-size:17px;line-height:1}
.person-svg{width:23px;height:23px;display:block;margin:auto}
.tab-label{display:block;white-space:nowrap}
.tab.nav-profile{display:none}
/* Menu flutuante de conta: sheet inferior em telas pequenas, popover superior direito em desktop. */
.account-panel .profile-summary{margin:10px 0 12px}
.account-menu-actions{gap:7px;margin-top:8px}
.account-menu-actions .btn{min-height:46px;border-radius:11px;text-align:left;padding:11px 15px}
@media(max-width:979px){
 body:not(.is-auth){padding-bottom:calc(93px + env(safe-area-inset-bottom))}
 .app-topbar{margin:2px 0 19px;justify-content:flex-start}
 .app-topbar .system-name h1{font-size:18px}
 .system-tagline{font-size:11px}
 .header-actions{display:none!important}
 .tabs{overflow:visible;width:100%;padding:6px max(5px,env(safe-area-inset-right)) calc(7px + env(safe-area-inset-bottom))}
 .tabs-inner,.tabs-inner.six{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));width:100%;max-width:700px;min-width:0;gap:0}
 .tab{min-width:0;width:100%;gap:3px;padding:7px 1px 6px;font-size:clamp(8px,1.9vw,11px);line-height:1.25;justify-content:center;text-align:center}
 .tab .ic{font-size:20px;line-height:24px;min-height:24px}
 .tab .ic .person-svg{width:21px;height:21px}
 .tab.nav-settings{display:none}
 .tab.nav-profile{display:flex}
 .sheet.account-sheet .body{padding-bottom:calc(28px + env(safe-area-inset-bottom))}
}
@media(max-width:365px){.app-topbar .system-name h1{font-size:17px}.tab{font-size:8px}.tab .ic{font-size:19px}}
@media(min-width:980px){
 .app-topbar{position:fixed;top:0;left:0;right:0;margin:0;height:78px;padding:0 32px 0 24px;border-bottom:1px solid var(--stroke);box-shadow:0 8px 20px #0001}
 .app-topbar .system-name h1{font-size:22px}
 .shell{padding-top:108px}
 .tabs{top:78px;padding-top:15px}
 .tabs-inner,.tabs-inner.six{display:flex;flex-direction:column;gap:5px}
 .tab.nav-settings{display:flex}
 .tab.nav-profile{display:none}
 .sheet.account-sheet{align-items:initial;justify-content:initial;background:transparent;padding:0}
 .sheet.account-sheet .body{position:fixed;top:83px;right:22px;left:auto;bottom:auto;max-width:min(370px,calc(100vw - 28px));width:370px;max-height:calc(100vh - 95px);padding:19px 19px 23px;border-radius:17px;box-shadow:0 16px 65px #000b;background:#162638}
 .sheet.account-sheet .account-panel-header{margin-bottom:0}
}
body.is-auth .tabs{display:none}

/* Cabeçalho enxuto: somente marca e nome. */
.system-tagline{display:none!important}

/* 2.5.2 — Layout revisado: alinhamento, hierarquia e atalhos sem repetição. */
.period-strip{display:flex;align-items:center;justify-content:space-between;gap:18px;width:100%;min-width:0;padding:11px 15px;margin:0 0 20px;background:#121f30;border:1px solid var(--stroke);border-radius:15px}
.period-caption{font-size:12px;color:#c1d3df;font-weight:700;white-space:nowrap}
.period-strip .period-picker{display:grid;grid-template-columns:36px minmax(0,1fr) 36px;gap:3px;flex:0 1 350px;max-width:350px;width:100%;margin:0!important;padding:2px;border:0;background:#0c1928;border-radius:10px}
.period-strip .period-picker select{min-width:0;max-width:none;font-size:14px;text-align:center;padding:9px 4px}
.period-strip .period-arrow{display:grid;place-items:center;width:36px;min-height:36px;border-radius:8px}
.page-titlebar{display:flex;justify-content:space-between;align-items:center;gap:18px;margin:0 0 16px;min-width:0}
.page-title{min-width:0}
.page-title h2{margin:0;font-size:23px;line-height:1.25;letter-spacing:-.35px}
.page-title p{font-size:12px;color:var(--sub);margin:5px 0 0;line-height:1.4}
.page-title-actions{display:flex;justify-content:flex-end;align-items:center;gap:9px;flex-wrap:wrap;flex-shrink:0}
.page-title-actions .btn{min-height:42px;white-space:nowrap;padding:10px 14px}
.settings-details{padding:0!important}
.settings-details summary{display:flex;justify-content:space-between;align-items:center;gap:14px;cursor:pointer;list-style:none;padding:22px 24px}
.settings-details summary::-webkit-details-marker{display:none}
.settings-details summary strong{font-size:17px;display:block;color:#edf5fa}
.settings-details summary small{font-size:12px;display:block;margin-top:5px;color:var(--sub);font-weight:400}
.settings-details .details-chevron{font-size:22px;color:var(--green);transition:transform .15s ease}
.settings-details[open] .details-chevron{transform:rotate(180deg)}
.settings-details .details-content{padding:0 24px 22px;border-top:1px solid var(--stroke)}
.settings-details .details-content .section-heading{margin-top:12px}
.settings-privacy h2{margin-bottom:15px}
.settings-danger{display:flex;gap:10px;flex-wrap:wrap;margin-top:20px;border-top:1px solid var(--stroke);padding-top:18px}
.settings-danger .btn{font-size:12px}
.header-actions{min-width:0}
.account-trigger{padding:5px 10px 5px 5px;gap:10px;border-radius:13px;min-height:54px;max-width:320px}
.account-identity{min-width:0;max-width:210px;text-align:left;display:flex;flex-direction:column;align-items:flex-start;gap:3px}
.account-identity strong{font-size:13px;font-weight:750;color:#edf7fa;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-identity small{font-size:11px;color:#aec0d0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-trigger .account-avatar{width:39px;height:39px;flex:none}
.account-chevron{margin-left:2px}
@media(max-width:899px){
 .period-strip{padding:9px 10px;gap:6px;margin-bottom:17px}
 .period-caption{font-size:11px}
 .period-strip .period-picker{flex:1 1 0;max-width:none;min-width:0;grid-template-columns:29px minmax(0,1fr) 29px}
 .period-strip .period-arrow{width:29px}
 .period-strip .period-picker select{font-size:12px}
 .page-titlebar{align-items:flex-start;gap:10px;flex-wrap:wrap}
 .page-title h2{font-size:20px}
 .page-title-actions{margin-left:auto}
 .page-title-actions .btn{padding:10px 11px;font-size:12px;min-height:42px}
 .tab.nav-users{display:none!important}
}
@media(max-width:380px){
 .period-strip{flex-wrap:wrap}
 .period-caption{flex-basis:100%}
 .period-strip .period-picker{flex-basis:100%}
 .page-titlebar{display:grid;grid-template-columns:1fr}
 .page-title-actions{margin-left:0;justify-content:flex-start}
}
@media(min-width:900px){
 body{padding-bottom:0}
 .shell{width:calc(100% - 246px);max-width:1320px;margin:0 auto 0 246px;padding:108px clamp(20px,3vw,45px) 45px}
 .top.app-topbar{position:fixed;top:0;left:0;right:0;margin:0;height:78px;padding:0 32px 0 24px;border-bottom:1px solid var(--stroke);z-index:15}
 .tabs{position:fixed;top:78px;left:0;right:auto;bottom:0;width:246px;border-top:0;border-right:1px solid var(--stroke);background:#0d1a2a;display:flex;align-items:stretch;justify-content:flex-start;padding:15px 13px 20px;flex-direction:column;gap:18px}
 .tabs-inner,.tabs-inner.six{display:flex;max-width:none;width:100%;flex-direction:column;gap:5px}
 .tab{flex-direction:row;width:100%;justify-content:flex-start;gap:12px;font-size:14px;text-align:left;padding:13px 15px;border-radius:12px}
 .tab:hover{background:#192e3c;color:#ecfaf4}
 .tab.active{background:#193e39;border:1px solid #2b6256}
 .tab .ic{font-size:23px;width:23px;text-align:center}
 .tab.nav-settings,.tab.nav-users{display:flex}
 .tab.nav-profile{display:none}
 .period-strip{margin:0 0 22px}
 .card{margin:16px 0;padding:22px}
 .sheet{align-items:center;padding:30px}
 .sheet .body{max-width:590px;border-radius:20px;max-height:90vh;padding:26px 30px}
 .sheet.account-sheet{align-items:initial;justify-content:initial;background:transparent;padding:0}
 .sheet.account-sheet .body{position:fixed;top:83px;right:22px;left:auto;bottom:auto;max-width:min(370px,calc(100vw - 28px));width:370px;max-height:calc(100vh - 95px);padding:19px 19px 23px;border-radius:17px;box-shadow:0 16px 65px #000b;background:#162638}
 .period-strip .period-picker{flex-basis:380px;max-width:380px}
 .page-titlebar{padding:2px 0}
 .section-heading h2{font-size:18px}
}
@media(min-width:900px) and (max-width:979px){
 .shell{max-width:unset}
 .tabs-inner,.tabs-inner.six{display:flex}
 .tabs{padding:15px 13px 20px}
 .header-actions{display:flex!important}
 .tab.nav-profile{display:none}
 .tab.nav-settings{display:flex}
 .tab.nav-users{display:flex}
}
@media(max-width:979px) and (min-width:900px){
 .app-topbar .header-actions{display:flex!important}
}

@media(min-width:900px) and (max-width:979px){
 body:not(.is-auth){padding-bottom:0}
 .app-topbar{justify-content:space-between;margin:0}
 .account-identity{display:flex}
 .tabs{overflow:visible}
 .shell{padding-bottom:50px}
}
@media(max-width:899px){.account-identity{display:none}}
@media(min-width:900px){body.is-auth .tabs{display:none};body.is-auth .shell{width:100%;margin:0 auto;max-width:560px;padding:28px 20px}}

/* Ajustes finais da barra mensal e ações na versão móvel. */
.period-strip .period-picker select{text-transform:none}
@media(max-width:599px){.page-title-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}.page-title-actions .btn{width:100%;text-align:center}}


/* Vinera 2.5.5 — avisos do aplicativo e categorias sempre acessíveis */
.notice-trigger{position:relative;display:inline-flex;align-items:center;justify-content:center;flex:none;
 width:44px;height:44px;border:1px solid var(--stroke,#31485b);border-radius:13px;
 color:#dceae9;background:#142739;cursor:pointer;transition:background .18s,border-color .18s}
.notice-trigger:hover,.notice-trigger:focus-visible{background:#254151;border-color:#4b8d8a}
.notice-trigger svg{width:23px;height:23px}
.notice-count{position:absolute;top:-6px;right:-6px;min-width:19px;height:19px;padding:0 4px;
 display:grid;place-items:center;border-radius:12px;background:#e85d65;color:white;
 font-size:11px;font-weight:800;border:2px solid #0a1320}
.notification-panel .note{line-height:1.55}
.notification-list{display:flex;flex-direction:column;gap:8px;max-height:min(54vh,480px);overflow-y:auto;margin:14px 0}
.notification-item{display:flex;align-items:center;gap:12px;min-width:0;border:1px solid var(--stroke,#31485b);
 border-radius:13px;padding:13px;background:#112335}
.notification-mark{width:7px;height:30px;border-radius:5px;background:#e1ab5d;flex-shrink:0}
.notification-item.overdue .notification-mark{background:#fa6b75}
.notification-text{display:flex;flex-direction:column;gap:4px;min-width:0;flex:1}
.notification-text strong{font-size:13px;overflow-wrap:anywhere}
.notification-text span{color:var(--sub,#a9bfcd);font-size:12px}
.notification-money{font-size:13px;white-space:nowrap}
.category-header{align-items:center;margin-bottom:12px}
.category-header .note{margin:5px 0 0}
.category-header h2{margin:0}
.category-list summary{cursor:pointer;color:#bcd3df;font-size:13px;padding:13px 0;
 border-top:1px solid var(--stroke,#31485b);display:flex;justify-content:space-between;gap:12px}
.category-list summary::-webkit-details-marker{display:none}
.category-list .details-chevron{font-size:19px;color:#50cbb9}
.category-list[open] .details-chevron{transform:rotate(180deg)}
.category-list .details-content{padding:0;border-top:0}
@media(max-width:600px){
 .header-actions{gap:7px}
 .notice-trigger{width:40px;height:40px;border-radius:12px}
 .notification-item{flex-wrap:wrap}
 .notification-money{margin-left:19px}
 .category-header{gap:12px;align-items:flex-start}
 .category-header .btn{flex:none;white-space:nowrap}
}

@media(max-width:899px){
 .app-topbar .header-actions{display:flex!important;margin-left:auto}
 .app-topbar .header-actions .account-trigger,.app-topbar .header-actions .save-status{display:none!important}
}

/* Vinera 2.5.6: modais de senha e recuperação, responsivos */
.password-reset-modal .temporary-secret{display:flex;flex-direction:column;gap:9px;padding:15px;background:#11372f;border:1px solid #358e75;border-radius:14px;margin:18px 0 14px}
.password-reset-modal .temporary-secret label{font-weight:700;font-size:13px;color:#b5f1de}
.password-reset-modal .temporary-secret input{width:100%;font-size:clamp(21px,4vw,27px);font-weight:800;letter-spacing:.07em;background:#102c28;color:#ebfff7;border:1px solid #4daa94;border-radius:10px;padding:14px 12px;text-align:center}
.reset-modal-buttons{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:16px}
.reset-modal-buttons .btn{min-height:46px;line-height:1.25;white-space:normal}
.password-reset-modal .note{line-height:1.65}
.recover-page>.btn{margin-top:16px;min-height:45px}
.recover-page form .btn{min-height:45px}
.recover-page h1{margin:12px 0}
@media(max-width:420px){.reset-modal-buttons{grid-template-columns:1fr}.password-reset-modal .temporary-secret input{font-size:21px}}


/* Vinera 2.5.7 — mês e ano independentes, com controle de largura responsivo. */
.period-strip .period-picker {
  display:grid;
  grid-template-columns:36px minmax(116px,1.55fr) minmax(78px,.85fr) 36px;
  align-items:center;
  gap:5px;
  flex:0 1 425px;
  max-width:425px;
  width:100%;
  min-width:0;
  background:#0c1a29;
  border:1px solid #31485d;
  padding:5px;
  border-radius:12px;
}
.period-strip .period-picker select,
.period-strip .period-picker .period-month,
.period-strip .period-picker .period-year {
  display:block;
  box-sizing:border-box;
  width:100%;min-width:0!important;max-width:none!important;
  min-height:39px;
  padding:8px 25px 8px 11px;
  appearance:none;
  background:#172c40 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23bbd5de' stroke-width='1.5' d='m1 1 5 5 5-5'/%3E%3C/svg%3E") no-repeat right 9px center;
  border:1px solid #375064;
  border-radius:9px;
  color:#f4f9fc;
  font-family:var(--vf-font);
  font-size:var(--vf-type-ui);
  line-height:1.3;
  font-weight:700;
  text-align:left;
  text-transform:none;
  cursor:pointer;
}
.period-strip .period-picker select:focus-visible {outline:2px solid var(--green);outline-offset:2px}
.period-strip .period-arrow {width:36px;min-height:39px;font-size:23px;border-radius:9px}
.income-list-row {display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:14px;padding:13px 0;min-height:72px;}
.income-list-row .income-item-description {min-width:0;overflow-wrap:anywhere}
.income-list-row .income-item-name {font-size:var(--vf-type-base);font-weight:700;line-height:1.45}
.income-list-row .income-value-actions {display:flex;flex-wrap:nowrap;align-items:center;justify-content:flex-end;gap:15px;min-width:0;text-align:right}
.income-list-row .income-item-value {display:block;white-space:nowrap;font-size:1.03rem;font-weight:780;line-height:1.3;font-variant-numeric:tabular-nums;background:none!important;box-shadow:none!important;margin:0;padding:0}
.income-list-row .income-value-actions .btn {display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;margin:0;min-height:34px}
@media(max-width:899px){
 .period-strip .period-picker {grid-template-columns:32px minmax(0,1.5fr) minmax(75px,.8fr) 32px;max-width:100%;gap:4px;flex:1 1 265px}
 .period-strip .period-arrow {width:32px;min-height:40px}
}
@media(max-width:640px){
 .period-strip{display:grid;grid-template-columns:1fr;gap:8px;align-items:stretch}
 .period-caption{font-size:var(--vf-type-sm)}
 .period-strip .period-picker{grid-template-columns:30px minmax(0,1.55fr) minmax(78px,.85fr) 30px;max-width:100%;width:100%;margin:0!important;gap:4px;flex-basis:auto}
 .period-strip .period-picker select{min-height:42px;font-size:14px;padding:8px 22px 8px 9px;background-position:right 7px center}
 .period-strip .period-arrow{width:30px;min-height:42px}
 .income-list-row{grid-template-columns:minmax(0,1fr);gap:8px;align-items:start}
 .income-list-row .income-value-actions{justify-content:space-between;width:100%;gap:12px}
 .income-list-row .income-item-value{font-size:1rem}
}
@media(max-width:350px){
 .period-strip .period-picker{grid-template-columns:24px minmax(0,1.4fr) minmax(70px,.75fr) 24px;padding:4px;gap:3px}
 .period-strip .period-arrow{width:24px}
 .period-strip .period-picker select{font-size:13px;padding-left:7px;padding-right:20px}
}


/* Pagamentos: valores e ações alinhados sem interferir nos demais cards. */
.payment-entry{grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:18px}
.payment-entry .payment-entry-info{min-width:0;overflow-wrap:anywhere}
.payment-entry .payment-entry-side{display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:7px;min-width:120px}
.payment-entry .payment-entry-buttons{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:7px}
.payment-entry .payment-entry-side>.btn{align-self:flex-end}
.payment-entry .value{font-variant-numeric:tabular-nums}
.payment-entry .meta{line-height:1.55}
@media(max-width:490px){
 .payment-entry{gap:10px;grid-template-columns:minmax(0,1fr)}
 .payment-entry .payment-entry-side{width:100%;min-width:0;flex-direction:row;justify-content:space-between;align-items:center;gap:12px;text-align:left}
 .payment-entry .payment-entry-buttons{justify-content:flex-end}
 .payment-entry .payment-entry-side>.btn{margin-left:auto}
}
