/* Hamburgos Finanças v1.21.9 — reforço mobile global
   Corrige deslocamentos laterais, empilhamento de ações e leitura dos cards
   nas telas de Início, Contas e cartões, Configurações e fluxos relacionados. */

@media (max-width:900px){
  html,
  body,
  body.sidebar-collapsed,
  body.sidebar-open{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0!important;
    padding-left:0!important;
    padding-right:0!important;
    overflow-x:hidden!important;
    position:relative!important;
    left:0!important;
    right:auto!important;
    transform:none!important;
  }

  .sidebar-backdrop{
    display:none!important;
    opacity:0!important;
    pointer-events:none!important;
  }
  body.sidebar-open .sidebar-backdrop,
  .sidebar-backdrop.open,
  .sidebar-backdrop.is-open{
    display:block!important;
    opacity:1!important;
    pointer-events:auto!important;
  }

  .topbar,
  .dashboard,
  main.dashboard,
  .invoice-dashboard,
  .account-dashboard,
  .page-head,
  .overview-head,
  .movements-head,
  .invoice-page-head,
  .settings-head,
  .head-actions,
  .overview-actions,
  .movements-head-actions,
  .accounts-head-actions,
  .invoice-head-actions,
  .invoice-toolbar,
  .invoice-summary-grid,
  .invoice-card-grid,
  .invoice-detail-panel,
  .invoice-note,
  .financial-glance,
  .dashboard-focus-grid,
  .settings-grid,
  .admin-grid,
  .grouped-accounts-panel,
  .overview-recent-panel,
  .analytics-grid,
  .movement-summary-strip,
  .movement-filters,
  .movement-list-v2,
  .panel,
  section,
  article{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin-left:0!important;
    margin-right:0!important;
    left:auto!important;
    right:auto!important;
    transform:none!important;
    translate:none!important;
  }

  .dashboard>*,
  .invoice-dashboard>*,
  .account-dashboard>*{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .page-head,
  .overview-head,
  .movements-head,
  .invoice-page-head,
  .settings-head,
  .invoice-head-actions,
  .accounts-head-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
    align-items:stretch!important;
  }

  .head-actions > *,
  .overview-actions > *,
  .movements-head-actions > *,
  .accounts-head-actions > *,
  .invoice-head-actions > *{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .space-switch,
  .invoice-space-switch{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }
  .invoice-space-switch label,
  .invoice-space-switch select,
  .invoice-family-manage,
  .invoice-new-purchase,
  .invoice-manage-link{
    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
  }

  .invoice-toolbar{
    padding:14px!important;
    display:grid!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px!important;
  }

  .month-nav{
    width:100%!important;
    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 42px!important;
    gap:8px!important;
    align-items:center!important;
  }
  .month-nav a{
    width:42px!important;
    height:42px!important;
    min-width:42px!important;
    display:grid!important;
    place-items:center!important;
  }
  .month-nav > div{
    min-width:0!important;
    text-align:center!important;
  }
  .month-nav > div span{
    display:block!important;
    font-size:.72rem!important;
    line-height:1.2!important;
    letter-spacing:.12em!important;
    text-transform:uppercase!important;
  }
  .month-nav > div strong{
    display:block!important;
    font-size:1.3rem!important;
    line-height:1.08!important;
    overflow-wrap:anywhere!important;
    white-space:normal!important;
  }

  .financial-glance{
    padding:16px!important;
  }
  .financial-glance-head{
    display:flex!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:12px!important;
  }
  .financial-glance-heading{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:10px!important;
  }
  .financial-month-status{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:flex-start!important;
    width:auto!important;
    max-width:100%!important;
    min-height:42px!important;
    padding:8px 14px 8px 10px!important;
    gap:10px!important;
  }
  .financial-month-status-icon{
    width:28px!important;
    height:28px!important;
    flex:0 0 28px!important;
  }
  .financial-month-status > span:last-child{
    display:block!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
    font-size:1rem!important;
    line-height:1.05!important;
  }
  .financial-month-message{
    width:100%!important;
    font-size:1rem!important;
    line-height:1.5!important;
  }

  .financial-glance-metrics,
  .invoice-summary-grid,
  .planning-overview-total,
  .movement-summary-strip{
    grid-template-columns:1fr!important;
    gap:10px!important;
  }
  .financial-glance-metrics article{
    min-height:0!important;
    grid-template-columns:44px minmax(0,1fr)!important;
    gap:10px!important;
    padding:14px!important;
  }
  .financial-metric-icon{
    width:44px!important;
    height:44px!important;
    flex:0 0 44px!important;
  }
  .financial-glance-metrics article > div > span{
    font-size:.76rem!important;
  }
  .financial-glance-metrics article strong{
    font-size:1.22rem!important;
  }
  .financial-glance-metrics article small{
    font-size:.8rem!important;
    line-height:1.4!important;
  }

  .invoice-card-grid,
  .bank-account-grid,
  .overview-recent-list,
  .settings-grid,
  .admin-grid{
    width:100%!important;
  }
  .invoice-credit-card,
  .bank-account-card,
  .dashboard-focus-card,
  .settings-card,
  .panel.settings-card{
    width:100%!important;
    min-width:0!important;
  }
  .invoice-credit-brand span,
  .invoice-credit-card h3,
  .bank-brand-line strong,
  .credit-brand-line strong,
  .invoice-transaction-main strong,
  .movement-copy strong,
  .movement-title-line strong{
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  .invoice-transaction-row,
  .movement-row-v2,
  .transfer-row-v2{
    grid-template-columns:42px minmax(0,1fr)!important;
  }
  .invoice-transaction-value,
  .movement-value,
  .transfer-row-v2>b,
  .transfer-row-v2>.amount{
    grid-column:2!important;
    justify-self:start!important;
    text-align:left!important;
  }
}

@media (max-width:560px){
  .topbar{
    padding:10px 12px!important;
  }
  .topbar .brand{
    gap:10px!important;
  }
  .topbar .brand-mark.brand-mark-image{
    width:56px!important;
    height:48px!important;
    min-width:56px!important;
    flex:0 0 56px!important;
    border-radius:10px!important;
  }
  .topbar .brand>span:last-child{
    font-size:1rem!important;
  }

  .page-head h1,
  .overview-head h1,
  .movements-head h1,
  .invoice-page-head h1,
  .settings-head h1{
    font-size:clamp(1.9rem,10vw,2.45rem)!important;
  }

  .financial-month-status{
    padding:8px 12px!important;
  }
  .financial-month-status > span:last-child{
    font-size:.95rem!important;
  }
}
