/* Finnanza 1.16.1 — tipografia fluida responsiva
   Princípios:
   - rem como unidade base;
   - html em 100% para respeitar preferências do navegador;
   - clamp() para escalar conforme viewport sem ultrapassar limites;
   - vw usado apenas como parcela intermediária, nunca isoladamente. */

:root{
  /* Texto */
  --type-caption:clamp(.75rem,.72rem + .12vw,.8125rem);
  --type-small:clamp(.8125rem,.79rem + .12vw,.875rem);
  --type-ui:clamp(.875rem,.84rem + .16vw,.9375rem);
  --type-body:clamp(1rem,.96rem + .18vw,1.0625rem);
  --type-body-lg:clamp(1rem,.94rem + .28vw,1.125rem);

  /* Títulos */
  --type-h4:clamp(1.0625rem,1rem + .28vw,1.125rem);
  --type-h3:clamp(1.1875rem,1.08rem + .48vw,1.25rem);
  --type-h2:clamp(1.4375rem,1.28rem + .68vw,1.5rem);
  --type-h1:clamp(1.75rem,1.45rem + 1.25vw,2rem);
  --type-page:clamp(1.5rem,1.25rem + 1vw,1.75rem);
  --type-topbar:clamp(1.25rem,1.16rem + .38vw,1.375rem);

  /* Marketing, mais expressivo porém controlado */
  --type-display:clamp(2.15rem,1.55rem + 3vw,3.25rem);
  --type-section-display:clamp(1.65rem,1.35rem + 1.45vw,2.25rem);
  --type-final-display:clamp(1.9rem,1.5rem + 1.9vw,2.75rem);

  --line-body:1.55;
  --line-compact:1.4;

  --contrast-heading:#092536;
  --contrast-text:#35505B;
  --contrast-muted:#667A82;
  --contrast-muted-strong:#4F6670;
  --contrast-success:#00745F;
  --contrast-danger:#b42318;
  --contrast-warning:#854a0e;
  --contrast-primary:#00745F;
}

/* Respeita a preferência de tamanho de fonte definida no navegador/OS. */
html{
  font-size:100%;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
}

body{
  font-size:var(--type-body)!important;
  line-height:var(--line-body)!important;
  color:var(--contrast-text);
}

h1,h2,h3,h4,h5,h6{
  margin-top:0;
  color:var(--contrast-heading);
  font-weight:500;
  text-wrap:balance;
  word-break:normal;
  overflow-wrap:normal;
}

h1{
  font-size:var(--type-h1)!important;
  line-height:1.16!important;
  letter-spacing:-.035em;
}
h2{
  font-size:var(--type-h2)!important;
  line-height:1.22!important;
  letter-spacing:-.025em;
}
h3{
  font-size:var(--type-h3)!important;
  line-height:1.28!important;
  letter-spacing:-.018em;
}
h4{
  font-size:var(--type-h4)!important;
  line-height:1.32!important;
}
h5,h6{
  font-size:var(--type-body)!important;
  line-height:1.35!important;
}

p,li,dd,dt{
  font-size:var(--type-body)!important;
  line-height:var(--line-body)!important;
  word-break:normal;
  overflow-wrap:normal;
}

small,.text-small{
  font-size:var(--type-caption)!important;
  line-height:1.45!important;
}

.text-muted,.muted,small{
  color:var(--contrast-muted);
}

/* Navegação e UI */
.sidebar-nav a,
.dropdown a,
.dropdown button,
.menu-link{
  font-size:var(--type-ui)!important;
  line-height:1.35!important;
}
.nav-section-label,
.eyebrow,
.divider{
  font-size:var(--type-caption)!important;
  line-height:1.35!important;
}
.sidebar-brand strong{
  font-size:var(--type-ui)!important;
}
.sidebar-brand small{
  font-size:var(--type-caption)!important;
}

.button,
button{
  font-size:var(--type-ui)!important;
  line-height:1.2!important;
}
.button{
  min-height:2.5rem;
}

/* Formulários */
label,
.field label,
.field-label,
.form-field label{
  font-size:var(--type-small)!important;
  line-height:1.4!important;
}
.field input,
.field select,
.field textarea,
input,
select,
textarea{
  font-size:var(--type-ui)!important;
  line-height:1.4!important;
}
.field-help,
.field-hint,
.field-error,
.help-text,
.form-section-head p,
.recurrence-copy p{
  font-size:var(--type-caption)!important;
  line-height:1.45!important;
}
.form-section-head h3,
.recurrence-copy h3{
  font-size:var(--type-h4)!important;
  line-height:1.3!important;
}

/* Cabeçalhos internos */
.topbar-title h1{
  font-size:var(--type-topbar)!important;
  line-height:1.2!important;
  letter-spacing:-.025em!important;
}
.topbar-title p{
  font-size:var(--type-caption)!important;
}

.page-head h1,
.page-head h2,
.form-page-head h1,
.form-page-head h2,
.page-title-with-icon h2{
  font-size:var(--type-page)!important;
  line-height:1.2!important;
  letter-spacing:-.03em!important;
}
.page-head p,
.form-page-head p{
  font-size:var(--type-ui)!important;
  line-height:1.5!important;
}

.panel-head h2,
.panel>h2,
.empty-state h2{
  font-size:var(--type-h3)!important;
  line-height:1.28!important;
}
.panel-head>span,
.panel-head>a,
.entity-link{
  font-size:var(--type-small)!important;
}

/* Cards e métricas */
.metric-label{
  font-size:var(--type-small)!important;
  line-height:1.35!important;
}
.metric-value{
  font-size:clamp(1.375rem,1.18rem + .82vw,1.625rem)!important;
  line-height:1.16!important;
}
.metric small,
.metric .muted{
  font-size:var(--type-caption)!important;
}

.entity-card h3,
.mobile-card h3,
.account-card h3,
.transaction-card h3{
  font-size:var(--type-h4)!important;
}
.entity-card p,
.mobile-card p,
.account-card p,
.transaction-card p{
  font-size:var(--type-ui)!important;
}
.entity-card small,
.mobile-card small,
.account-card small,
.transaction-card small{
  font-size:var(--type-caption)!important;
}

/* Tabelas */
.data-table th{
  font-size:var(--type-caption)!important;
  line-height:1.35!important;
}
.data-table td{
  font-size:var(--type-ui)!important;
  line-height:1.45!important;
}
.data-table td small{
  font-size:var(--type-caption)!important;
}
[data-responsive-table] td::before{
  font-size:var(--type-caption)!important;
}

/* Badges, tags, paginação */
.badge,
[class*="badge-"],
.schedule-origin-tag,
.payment-timing-tag{
  font-size:clamp(.7rem,.68rem + .08vw,.75rem)!important;
  line-height:1.25!important;
}
.pagination a,
.pagination span{
  font-size:var(--type-small)!important;
}

/* Modais / voz / recorrência */
.modal-card h2,
.voice-entry-head h2{
  font-size:var(--type-h3)!important;
}
.modal-card p,
.voice-entry-head p,
.voice-example p,
.voice-status,
.voice-transcript{
  font-size:var(--type-ui)!important;
}
.entry-mode-option strong,
.repeat-mode-selector strong,
.recurrence-end-choice strong{
  font-size:var(--type-ui)!important;
}
.entry-mode-option small,
.repeat-mode-selector small,
.recurrence-end-choice small,
.voice-privacy,
.voice-processing small{
  font-size:var(--type-caption)!important;
}

/* Dashboard */
.dashboard-secondary-card span,
.dashboard-debt-card small,
.dashboard-grid small{
  font-size:var(--type-small)!important;
}
.dashboard-secondary-card strong,
.dashboard-debt-card strong{
  font-size:clamp(1.25rem,1.12rem + .55vw,1.5rem)!important;
}
.category-list-row,
.category-list-row span,
.category-list-row strong{
  font-size:var(--type-ui)!important;
}

/* Contas / extratos / movimentações */
.account-statement-title p,
.account-balance-hero span,
.account-balance-hero small,
.account-statement-explain,
.account-statement-row p,
.account-statement-row small,
.transaction-mobile-meta,
.transaction-mobile-meta span{
  font-size:var(--type-small)!important;
  line-height:1.45!important;
}
.account-statement-row strong,
.transaction-timeline strong,
.transaction-card strong{
  font-size:var(--type-ui)!important;
}

/* Previsão */
.next-month-status h2{
  font-size:var(--type-h3)!important;
}
.next-month-status p{
  font-size:var(--type-ui)!important;
}
.next-month-need span,
.next-month-kpis span,
.next-month-coverage-head span,
.next-month-list-panel .panel-head span,
.next-month-row>div span{
  font-size:var(--type-small)!important;
}
.next-month-kpis strong,
.next-month-row>div strong,
.next-month-row>b{
  font-size:var(--type-ui)!important;
}
.next-month-coverage>p{
  font-size:var(--type-small)!important;
}

/* Dívidas */
.debt-panel-title p,
.debt-payoff-advice,
.debt-payment-adjustments>p{
  font-size:var(--type-small)!important;
}
.debt-smart-summary span,
.debt-payoff-results span,
.debt-card-balance span,
.debt-card-facts span{
  font-size:var(--type-small)!important;
}
.debt-smart-summary strong{
  font-size:clamp(1.2rem,1.08rem + .5vw,1.375rem)!important;
}

/* Login */
.auth-login-only-heading h1{
  font-size:var(--type-page)!important;
  line-height:1.2!important;
}
.auth-login-only-heading p{
  font-size:var(--type-body)!important;
}
.auth-card-kicker,
.auth-login-only-meta,
.auth-login-only-footer,
.auth-session-note{
  font-size:var(--type-caption)!important;
}

/* Marketing */
.marketing-page{
  font-size:var(--type-body)!important;
}
.marketing-page .tm-hero h1{
  font-size:var(--type-display)!important;
  line-height:1.06!important;
  letter-spacing:-.045em!important;
}
.marketing-page .tm-hero-copy>p{
  font-size:var(--type-body-lg)!important;
  line-height:1.62!important;
}
.marketing-page .tm-section h2,
.marketing-page .tm-forecast-copy h2,
.marketing-page .tm-voice-copy h2,
.marketing-page .tm-simulator-copy h2{
  font-size:var(--type-section-display)!important;
  line-height:1.16!important;
}
.marketing-page .tm-section-head>p,
.marketing-page .tm-forecast-copy>p,
.marketing-page .tm-voice-copy>p,
.marketing-page .tm-simulator-copy>p,
.marketing-page .tm-final-content>p{
  font-size:var(--type-body)!important;
  line-height:1.6!important;
}
.marketing-page .tm-feature-card h3,
.marketing-page .tm-resource-card h3{
  font-size:var(--type-h4)!important;
}
.marketing-page .tm-feature-card p,
.marketing-page .tm-resource-card p,
.marketing-page .tm-faq-grid p{
  font-size:var(--type-ui)!important;
}
.marketing-page .tm-faq-grid summary{
  font-size:var(--type-ui)!important;
}
.marketing-page .tm-final h2{
  font-size:var(--type-final-display)!important;
}

/* Contraste */
.text-success,.income{color:var(--contrast-success)!important}
.text-danger,.expense{color:var(--contrast-danger)!important}
.button-primary{background:#00745F!important;border-color:#00745F!important;color:#fff!important}
.button-primary:hover{background:#005F50!important;border-color:#005F50!important}
.button-success{background:#087b6e!important;border-color:#087b6e!important;color:#fff!important}
.button-outline{background:#fff!important;color:#35505B!important;border-color:#CBD4D1!important}
.alert-success{color:#00745F!important;background:#EAF6F1!important;border-color:#BFE6D9!important}
.alert-error{color:#b42318!important;background:#fef3f2!important;border-color:#fecdca!important}

/* Mobile: os mesmos tokens continuam fluidos, sem salto abrupto de breakpoint. */
@media(max-width:47.9375rem){
  :root{
    --type-body:1rem;
    --type-body-lg:1rem;
    --type-page:clamp(1.375rem,1.2rem + .8vw,1.5rem);
    --type-topbar:clamp(1.25rem,1.17rem + .35vw,1.375rem);
  }

  /* 1rem computado garante os 16px necessários para evitar zoom no iOS
     quando o navegador usa o tamanho padrão de fonte. */
  input,
  select,
  textarea,
  button{
    font-size:1rem!important;
  }

  .button{
    min-height:2.75rem;
    font-size:var(--type-ui)!important;
  }

  .bottom-nav a,
  .bottom-nav button{
    font-size:var(--type-small)!important;
  }
  .bottom-nav span,
  .bottom-nav small{
    font-size:var(--type-caption)!important;
  }

  .data-table td,
  .responsive-table-card,
  .responsive-table-card *{
    font-size:var(--type-ui)!important;
  }

  .transaction-card,
  .transaction-card p,
  .transaction-timeline,
  .transaction-timeline p,
  .account-card p,
  .account-statement-row p{
    font-size:var(--type-ui)!important;
  }

  .transaction-card strong,
  .transaction-timeline strong,
  .account-card strong,
  .account-statement-row strong{
    font-size:var(--type-body)!important;
  }

  .auth-login-only-heading h1{
    font-size:var(--type-page)!important;
  }
  .auth-login-only-heading p{
    font-size:var(--type-ui)!important;
  }
}

/* Telas muito grandes: mantém limites do clamp e evita crescimento exagerado. */
@media(min-width:100rem){
  :root{
    --type-body:1.0625rem;
    --type-ui:.9375rem;
  }
}


/* Finnanza 1.17.2 — padrão global único para campos */
:root{
  --control-height:3rem;
  --control-radius:.625rem;
  --control-padding-x:.875rem;
  --control-border:#CBD4D1;
  --control-border-hover:#9BA7AA;
  --control-focus:#2F8D79;
  --control-bg:#fff;
}

.form-grid{
  align-items:start;
}

.field{
  min-width:0;
  align-content:start;
}

input:not([type]),
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="month"],
input[type="tel"],
input[type="url"],
input[type="search"],
select{
  box-sizing:border-box;
  width:100%;
  height:var(--control-height)!important;
  min-height:var(--control-height)!important;
  padding-block:0!important;
  padding-inline:var(--control-padding-x)!important;
  border:1px solid var(--control-border)!important;
  border-radius:var(--control-radius)!important;
  background:var(--control-bg)!important;
  line-height:1.25!important;
  box-shadow:0 1px 2px rgba(16,24,40,.05)!important;
}

textarea{
  box-sizing:border-box;
  width:100%;
  min-height:7rem!important;
  padding:.75rem var(--control-padding-x)!important;
  border:1px solid var(--control-border)!important;
  border-radius:var(--control-radius)!important;
  background:var(--control-bg)!important;
  line-height:1.45!important;
  box-shadow:0 1px 2px rgba(16,24,40,.05)!important;
}

input:not([type]):hover,
input[type="text"]:hover,
input[type="email"]:hover,
input[type="password"]:hover,
input[type="number"]:hover,
input[type="date"]:hover,
input[type="month"]:hover,
input[type="tel"]:hover,
input[type="url"]:hover,
input[type="search"]:hover,
select:hover,
textarea:hover{
  border-color:var(--control-border-hover)!important;
}

input:not([type]):focus,
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
select:focus,
textarea:focus{
  outline:none!important;
  border-color:var(--control-focus)!important;
  box-shadow:0 0 0 .25rem rgba(0,116,95,.12)!important;
}

.input-prefix,
.input-suffix{
  box-sizing:border-box;
  display:flex!important;
  align-items:stretch!important;
  width:100%;
  height:var(--control-height)!important;
  min-height:var(--control-height)!important;
  overflow:hidden;
  border:1px solid var(--control-border)!important;
  border-radius:var(--control-radius)!important;
  background:var(--control-bg)!important;
  box-shadow:0 1px 2px rgba(16,24,40,.05)!important;
}

.input-prefix:hover,
.input-suffix:hover{
  border-color:var(--control-border-hover)!important;
}

.input-prefix:focus-within,
.input-suffix:focus-within{
  border-color:var(--control-focus)!important;
  box-shadow:0 0 0 .25rem rgba(0,116,95,.12)!important;
}

.input-prefix>span,
.input-suffix>span{
  box-sizing:border-box;
  display:flex!important;
  align-items:center!important;
  justify-content:center;
  flex:0 0 auto;
  min-width:2.75rem;
  height:100%;
  padding:0 .75rem!important;
  background:#F1F0EC!important;
  color:#4F6670!important;
  border:0!important;
  font-size:var(--type-small)!important;
  font-weight:500;
  white-space:nowrap;
}

.input-prefix>span{
  border-right:1px solid #DDE3E1!important;
}

.input-suffix>span{
  border-left:1px solid #DDE3E1!important;
}

.input-prefix>input,
.input-suffix>input{
  flex:1 1 auto;
  min-width:0;
  width:auto!important;
  height:100%!important;
  min-height:0!important;
  padding:0 var(--control-padding-x)!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  box-shadow:none!important;
  outline:none!important;
}

.password-control{
  min-height:var(--control-height);
}

.password-control>input{
  height:var(--control-height)!important;
  min-height:var(--control-height)!important;
}

/* Cores continuam sendo controles compactos próprios. */
input[type="color"]{
  min-height:var(--control-height);
}

/* Dívidas: grade visual uniforme sem campos opcionais extras. */
.debt-essential-grid{
  grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:1rem;
  row-gap:1rem;
}

.debt-essential-grid .field{
  grid-template-rows:auto var(--control-height) auto;
}

.debt-essential-grid .field>.input-prefix,
.debt-essential-grid .field>.input-suffix,
.debt-essential-grid .field>input,
.debt-essential-grid .field>select{
  grid-row:2;
}

.debt-essential-grid .field>.field-error,
.debt-essential-grid .field>.field-help{
  grid-row:3;
}

@media(max-width:47.9375rem){
  :root{
    --control-height:3rem;
    --control-padding-x:.8125rem;
  }

  .debt-essential-grid{
    grid-template-columns:1fr;
  }

  /* Mantém 1rem real nos campos para impedir zoom automático do Safari/iOS. */
  input:not([type]),
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="month"],
  input[type="tel"],
  input[type="url"],
  input[type="search"],
  select,
  textarea,
  .input-prefix>input,
  .input-suffix>input{
    font-size:1rem!important;
  }
}


/* Finnanza 1.18.3 — Movimentações: desktop e mobile nunca simultâneos */
.transactions-desktop-table{
  display:block!important;
}
.transaction-timeline{
  display:none!important;
}

@media(max-width:56.25rem){
  .transactions-desktop-table{
    display:none!important;
  }
  .transaction-timeline{
    display:grid!important;
  }
}

/* Resumo e previsão da competência selecionada */
.smart-forecast-hero{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:1.25rem;
  align-items:center;
  margin-bottom:1rem;
  padding:1.25rem;
  border:1px solid #DDE3E1;
  border-radius:1rem;
  background:#fff;
}
.smart-forecast-hero.is-covered{
  border-color:#BFE6D9;
  background:#f6fef9;
}
.smart-forecast-hero.needs-attention{
  border-color:#fed7aa;
  background:#fffbf5;
}
.smart-forecast-hero-main{
  display:flex;
  align-items:flex-start;
  gap:.85rem;
  min-width:0;
}
.smart-forecast-hero-main .smart-summary-icon{
  flex:0 0 auto;
  width:2.75rem;
  height:2.75rem;
  display:grid;
  place-items:center;
  border-radius:.75rem;
  background:#F1F0EC;
  color:#4F6670;
}
.smart-forecast-hero.is-covered .smart-summary-icon{
  background:#dcfae6;
  color:#00745F;
}
.smart-forecast-hero.needs-attention .smart-summary-icon{
  background:#ffead5;
  color:#b54708;
}
.smart-forecast-hero-main .smart-summary-icon .icon{
  width:1.2rem;
  height:1.2rem;
}
.smart-forecast-hero h2{
  margin:.12rem 0 .25rem;
  font-size:var(--type-h3)!important;
}
.smart-forecast-hero p{
  margin:0;
  color:#667A82;
  font-size:var(--type-ui)!important;
}
.smart-forecast-hero-value{
  min-width:11rem;
  text-align:right;
}
.smart-forecast-hero-value span{
  display:block;
  color:#667A82;
  font-size:var(--type-small)!important;
  font-weight:500;
}
.smart-forecast-hero-value strong{
  display:block;
  margin-top:.2rem;
  font-size:clamp(1.45rem,1.25rem + .8vw,1.9rem)!important;
  color:#092536;
}
.smart-forecast-hero.needs-attention .smart-forecast-hero-value strong{color:#b42318}
.smart-forecast-hero.is-covered .smart-forecast-hero-value strong{color:#00745F}

.smart-forecast-kpis{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:.75rem;
  margin-bottom:1rem;
}
.smart-forecast-kpi{
  display:grid;
  grid-template-columns:2.5rem minmax(0,1fr) 1rem;
  gap:.7rem;
  align-items:center;
  min-width:0;
  padding:1rem;
  border:1px solid #DDE3E1;
  border-radius:.875rem;
  background:#fff;
  color:inherit;
  text-decoration:none;
}
.smart-forecast-kpi>div{
  min-width:0;
}
.smart-forecast-kpi small,
.smart-forecast-kpi span{
  display:block;
  color:#667A82;
  font-size:var(--type-small)!important;
}
.smart-forecast-kpi strong{
  display:block;
  margin:.2rem 0;
  font-size:clamp(1.15rem,1.05rem + .45vw,1.4rem)!important;
  white-space:nowrap;
}
.smart-forecast-kpi>.metric-icon{
  width:2.5rem;
  height:2.5rem;
  display:grid;
  place-items:center;
  border-radius:.7rem;
}
.smart-forecast-kpi>.metric-icon .icon{width:1.1rem;height:1.1rem}
.smart-forecast-kpi.is-income>.metric-icon{background:#EAF6F1;color:#00745F}
.smart-forecast-kpi.is-income strong{color:#00745F}
.smart-forecast-kpi.is-expense>.metric-icon{background:#fef3f2;color:#b42318}
.smart-forecast-kpi.is-expense strong{color:#b42318}
.smart-forecast-kpi.is-gap>.metric-icon{background:#fff6ed;color:#b54708}
.smart-forecast-kpi.is-gap strong{color:#b42318}
.smart-forecast-kpi.is-surplus>.metric-icon{background:#EAF6F1;color:#00745F}
.smart-forecast-kpi.is-surplus strong{color:#00745F}
.smart-forecast-kpi>.icon:last-child{
  width:1rem;height:1rem;color:#9BA7AA;
}

.smart-forecast-formula{
  display:grid;
  grid-template-columns:1fr auto 1fr auto 1fr;
  align-items:center;
  gap:1rem;
  margin-bottom:1rem;
  padding:1rem 1.15rem;
}
.smart-forecast-formula>div{
  min-width:0;
}
.smart-forecast-formula span,
.smart-forecast-formula small{
  display:block;
  color:#667A82;
  font-size:var(--type-small)!important;
}
.smart-forecast-formula strong{
  display:block;
  margin:.2rem 0;
  font-size:var(--type-h4)!important;
}
.smart-formula-symbol{
  font-size:1.25rem!important;
  color:#9BA7AA!important;
}
.smart-realized-strip{
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:.5rem;
  margin-bottom:1rem;
}
.smart-realized-strip>div{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.7rem;
  padding:.7rem .85rem;
  border:1px solid #E5E9E7;
  border-radius:.7rem;
  background:#F7F5F0;
}
.smart-realized-strip span{
  color:#667A82;
  font-size:var(--type-small)!important;
}
.smart-realized-strip strong{
  font-size:var(--type-ui)!important;
  white-space:nowrap;
}

@media(max-width:47.9375rem){
  .smart-forecast-hero{
    grid-template-columns:1fr;
    gap:.8rem;
    padding:.9rem;
  }
  .smart-forecast-hero-main{
    gap:.65rem;
  }
  .smart-forecast-hero-main .smart-summary-icon{
    width:2.4rem;height:2.4rem;
  }
  .smart-forecast-hero p{
    font-size:var(--type-small)!important;
  }
  .smart-forecast-hero-value{
    min-width:0;
    text-align:left;
    padding-top:.7rem;
    border-top:1px solid rgba(16,24,40,.08);
  }
  .smart-forecast-kpis{
    grid-template-columns:1fr 1fr;
    gap:.5rem;
  }
  .smart-forecast-kpi{
    grid-template-columns:2.2rem minmax(0,1fr);
    gap:.55rem;
    padding:.75rem;
  }
  .smart-forecast-kpi:nth-child(3){
    grid-column:1/-1;
  }
  .smart-forecast-kpi>.metric-icon{
    width:2.2rem;height:2.2rem;
  }
  .smart-forecast-kpi>.icon:last-child{
    display:none;
  }
  .smart-forecast-kpi strong{
    white-space:normal;
  }
  .smart-forecast-formula{
    grid-template-columns:1fr;
    gap:.55rem;
    padding:.85rem;
  }
  .smart-formula-symbol{
    display:none!important;
  }
  .smart-forecast-formula>div{
    display:grid;
    grid-template-columns:1fr auto;
    align-items:center;
    gap:.25rem .75rem;
  }
  .smart-forecast-formula>div small{
    grid-column:1/-1;
  }
  .smart-realized-strip{
    grid-template-columns:1fr;
  }
}


/* Finnanza 1.18.9 — sidebar compacta para telas intermediárias */
@media(min-width:768px) and (max-width:1199px){
  :root{
    --compact-sidebar-width:4.75rem;
  }

  .sidebar{
    width:var(--compact-sidebar-width)!important;
    padding:1rem .625rem!important;
    transform:none!important;
    transition:width .18s ease!important;
    overflow:visible!important;
  }

  .app-main{
    margin-left:var(--compact-sidebar-width)!important;
  }

  .sidebar-backdrop{
    display:none!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  .bottom-nav{
    display:none!important;
  }

  [data-sidebar-open].mobile-only{
    display:none!important;
  }

  .sidebar-brand{
    min-height:3.5rem;
    justify-content:center;
    padding:.15rem 0 1rem!important;
    gap:0!important;
  }

  .sidebar-brand .brand-logo{
    width:2.7rem!important;
    height:2.7rem!important;
    flex:0 0 2.7rem;
    border-radius:.75rem!important;
  }

  .sidebar-brand .brand-copy,
  .sidebar-brand .sidebar-close,
  .sidebar .nav-section-label{
    display:none!important;
  }

  .sidebar-nav{
    width:100%;
    gap:.35rem!important;
    margin-top:.75rem!important;
  }

  .sidebar-nav-bottom{
    margin-top:auto!important;
    padding-top:.75rem!important;
  }

  .sidebar-nav a{
    position:relative!important;
    display:grid!important;
    place-items:center!important;
    width:3.5rem!important;
    min-width:3.5rem!important;
    min-height:3.25rem!important;
    margin-inline:auto!important;
    padding:.7rem!important;
    border-radius:.75rem!important;
    gap:0!important;
    overflow:visible!important;
  }

  .sidebar-nav a>span{
    display:none!important;
  }

  .sidebar-nav a>.icon{
    width:1.25rem!important;
    height:1.25rem!important;
    margin:0!important;
    flex:none!important;
  }

  .sidebar-nav a:hover{
    transform:none!important;
  }

  .sidebar-nav a.is-active{
    box-shadow:none!important;
  }

  /* Tooltip textual: o ícone nunca fica ambíguo quando houver mouse. */
  .sidebar-nav a::after{
    content:attr(data-nav-label);
    position:absolute;
    left:calc(100% + .65rem);
    top:50%;
    z-index:100;
    transform:translate(.2rem,-50%);
    width:max-content;
    max-width:13rem;
    padding:.45rem .6rem;
    border:1px solid rgba(255,255,255,.1);
    border-radius:.5rem;
    background:#092536;
    color:#fff;
    box-shadow:0 .5rem 1.2rem rgba(16,24,40,.22);
    font-size:.75rem!important;
    font-weight:500;
    line-height:1.2;
    white-space:nowrap;
    opacity:0;
    visibility:hidden;
    pointer-events:none;
    transition:opacity .12s ease,transform .12s ease,visibility .12s ease;
  }

  .sidebar-nav a:hover::after,
  .sidebar-nav a:focus-visible::after{
    opacity:1;
    visibility:visible;
    transform:translate(0,-50%);
  }

  .topbar{
    padding-left:1.25rem!important;
    padding-right:1.25rem!important;
  }

  .content{
    padding-left:1.25rem!important;
    padding-right:1.25rem!important;
  }

  html.pwa-standalone .sidebar{
    padding-top:max(1rem,env(safe-area-inset-top,0px))!important;
  }
}

/* Mobile real: mantém sidebar off-canvas + navegação inferior. */
@media(max-width:47.9375rem){
  .sidebar{
    width:272px!important;
  }

  .app-main{
    margin-left:0!important;
  }

  .bottom-nav{
    display:grid!important;
  }
}


/* Finnanza 1.18.10 — controles de data/mês clicáveis por toda a área */
input[type="date"],
input[type="month"],
[data-native-picker-surface]{
  cursor:pointer;
}

.dashboard-month-form{
  position:relative;
  display:block;
  min-width:10.5rem;
  border-radius:var(--control-radius,.625rem);
}

.dashboard-month-form>input[type="month"]{
  cursor:pointer!important;
  padding-right:2.75rem!important;
}

/* O ícone nativo não é o único alvo; o input completo controla o picker. */
.dashboard-month-form>input[type="month"]::-webkit-calendar-picker-indicator,
input[data-native-picker][type="date"]::-webkit-calendar-picker-indicator,
input[data-native-picker][type="month"]::-webkit-calendar-picker-indicator{
  cursor:pointer;
}

/* Cópias responsivas: conteúdo é condensado; fonte não é comprimida para caber. */
.responsive-copy-mobile{
  display:none!important;
}

@media(max-width:47.9375rem){
  .responsive-copy-desktop{
    display:none!important;
  }

  .responsive-copy-mobile{
    display:block!important;
  }

  .debt-evolution-title h2.responsive-copy-mobile,
  .debt-payoff-simulator .debt-panel-title h2.responsive-copy-mobile{
    margin:.1rem 0 .2rem!important;
    font-size:var(--type-h4)!important;
    line-height:1.25!important;
  }

  .debt-evolution-title p.responsive-copy-mobile,
  .debt-payoff-simulator .debt-panel-title p.responsive-copy-mobile{
    margin:0!important;
    max-width:none!important;
    font-size:var(--type-small)!important;
    line-height:1.4!important;
  }

  .debt-evolution-title .eyebrow.responsive-copy-mobile,
  .debt-payoff-simulator .eyebrow.responsive-copy-mobile{
    font-size:var(--type-caption)!important;
  }

  .debt-evolution-callout .responsive-copy-mobile{
    line-height:1.4!important;
  }

  .debt-evolution-legend .responsive-copy-mobile{
    max-width:100%;
    line-height:1.35;
  }
}

@media(max-width:26.875rem){
  .dashboard-month-form{
    min-width:0;
    width:100%;
  }
}


/* 1.18.17 — seletor de mês único em todas as páginas */
@media(max-width:47.9375rem){
  .system-month-form,
  .system-month-form .dashboard-month-trigger{
    width:100%;
    max-width:none;
  }
  .system-month-form .dashboard-month-trigger{
    min-width:0;
  }
  .smart-toolbar .system-month-form{
    margin:0;
  }
  .simulator-month-panel{
    display:block;
    padding:.75rem!important;
  }
}


/* Finnanza 1.24.25 — escala tipográfica global realmente responsiva
   Objetivo: manter leitura proporcional em celular, tablet, notebook e monitores amplos.
   A raiz cresce suavemente de 16px a 18px; componentes continuam usando rem/clamp.
   Em mobile, campos permanecem em 16px computados para evitar zoom automático no iOS. */
html{
  font-size:clamp(16px,calc(15px + .15vw),18px)!important;
}

:root{
  --type-caption:clamp(.75rem,.72rem + .10vw,.8125rem);
  --type-small:clamp(.8125rem,.78rem + .12vw,.875rem);
  --type-ui:clamp(.875rem,.83rem + .16vw,.9375rem);
  --type-body:clamp(.9375rem,.90rem + .18vw,1rem);
  --type-body-lg:clamp(1rem,.96rem + .20vw,1.0625rem);

  --type-h4:clamp(1.02rem,.98rem + .18vw,1.10rem);
  --type-h3:clamp(1.10rem,1.02rem + .32vw,1.20rem);
  --type-h2:clamp(1.22rem,1.10rem + .50vw,1.40rem);
  --type-h1:clamp(1.45rem,1.22rem + .90vw,1.75rem);
  --type-page:clamp(1.35rem,1.18rem + .62vw,1.50rem);
  --type-topbar:clamp(1.12rem,1.04rem + .30vw,1.25rem);

  --type-display:clamp(2rem,1.55rem + 2.25vw,3rem);
  --type-section-display:clamp(1.55rem,1.30rem + 1.15vw,2.10rem);
  --type-final-display:clamp(1.75rem,1.42rem + 1.55vw,2.50rem);
}

/* Garante que controles, navegação e conteúdo estrutural usem a mesma escala. */
body{
  font-size:var(--type-body)!important;
}

button,
.button,
input,
select,
textarea,
.sidebar-nav a,
.menu-link,
.dropdown a,
.dropdown button,
.workspace-switcher summary,
.workspace-switcher-menu button,
.workspace-switcher-menu a,
.bottom-nav a,
.bottom-nav button{
  font-size:var(--type-ui)!important;
}

small,
.text-small,
.nav-section-label,
.eyebrow,
.field-help,
.field-hint,
.field-error,
.help-text,
.data-table th,
[data-responsive-table] td::before,
.workspace-switcher-title,
.workspace-switcher-copy small,
.workspace-switcher-menu small,
.topbar-user small,
.master-user small,
.master-brand small{
  font-size:var(--type-caption)!important;
}

label,
.field label,
.field-label,
.form-field label,
.metric-label,
.panel-head>span,
.panel-head>a,
.entity-link,
.pagination a,
.pagination span{
  font-size:var(--type-small)!important;
}

/* Tabelas e cards não podem ficar microscópicos em desktop amplo. */
.data-table td,
.responsive-table-card,
.mobile-card,
.transaction-card,
.transaction-timeline,
.account-statement-row,
.category-list-row{
  font-size:var(--type-ui)!important;
}

/* Mobile: leitura mínima explícita, sem comprimir fonte para fazer conteúdo caber. */
@media(max-width:47.9375rem){
  html{font-size:16px!important}
  :root{
    --type-caption:.8125rem;
    --type-small:.875rem;
    --type-ui:.9375rem;
    --type-body:1rem;
    --type-body-lg:1rem;
    --type-h4:1.0625rem;
    --type-h3:1.125rem;
    --type-h2:1.25rem;
    --type-h1:1.5rem;
    --type-page:clamp(1.375rem,1.28rem + .42vw,1.5rem);
    --type-topbar:1.1875rem;
  }

  input,
  select,
  textarea{
    font-size:1rem!important;
  }

  button,
  .button{
    font-size:var(--type-ui)!important;
  }

  .page-head h1,
  .page-head h2,
  .form-page-head h1,
  .form-page-head h2,
  .page-title-with-icon h2{
    font-size:var(--type-page)!important;
  }

  .data-table td,
  .responsive-table-card,
  .responsive-table-card *,
  .mobile-card,
  .transaction-card,
  .transaction-timeline,
  .account-statement-row{
    font-size:var(--type-ui)!important;
  }
}

/* Tablet: aumenta gradualmente sem usar escala de desktop grande. */
@media(min-width:48rem) and (max-width:74.9375rem){
  :root{
    --type-body:clamp(.9375rem,.90rem + .16vw,1rem);
    --type-page:clamp(1.375rem,1.24rem + .38vw,1.5rem);
  }
}

/* Monitores largos: o clamp da raiz amplia leitura, mas mantém limites para evitar títulos gigantes. */
@media(min-width:100rem){
  :root{
    --type-caption:.8125rem;
    --type-small:.875rem;
    --type-ui:.9375rem;
    --type-body:1rem;
    --type-body-lg:1.0625rem;
    --type-page:1.5rem;
  }
}

/* Finnanza 1.24.26 — pesos tipográficos globais
   Regra única do sistema:
   - textos e controles: 500;
   - títulos e cabeçalhos: 600;
   - pesos 700/800/900 ou intermediários acima de 600 não são permitidos. */
body,
button,
input,
select,
textarea,
option{
  font-weight:500!important;
}

body :where(p,span,a,li,dt,dd,label,small,button,input,select,textarea,option,summary,caption,legend){
  font-weight:500!important;
}

strong,
b{
  font-weight:500!important;
}

h1,
h2,
h3,
h4,
h5,
h6,
th,
[class*="-title"],
[class*="_title"],
[class*="heading"]{
  font-weight:600!important;
}
