/* Shaddai V1.47 - ajuste responsivo do Caixa Diario e do fechamento. */

/* Compra e venda permanecem lado a lado em monitores. */
#lancamentos .cash-market-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}

/* O fechamento deve usar a largura real do painel, sem ampliar a pagina. */
#lancamentos,
#lancamentos>.panel,
#lancamentos .cash-closing-v131{
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}

#lancamentos{
  overflow-x:hidden!important;
}

#lancamentos .cash-closing-v131{
  container-name:cash-closing;
  container-type:inline-size;
  overflow:hidden!important;
}

#lancamentos .cash-closing-v131 *,
#lancamentos .cash-closing-v131 *::before,
#lancamentos .cash-closing-v131 *::after{
  box-sizing:border-box;
}

#lancamentos .cash-closing-head{
  min-width:0;
  flex-wrap:wrap;
}

#lancamentos .cash-closing-head>div{
  min-width:0;
  flex:1 1 420px;
}

#lancamentos .cash-closing-toolbar{
  width:100%;
  max-width:100%;
  min-width:0;
  grid-template-columns:minmax(170px,220px) minmax(0,1fr) minmax(170px,max-content);
}

#lancamentos .cash-closing-toolbar>*,
#lancamentos .cash-closing-final>*,
#lancamentos .cash-closing-summary>*,
#lancamentos .cash-closing-accounts>*{
  min-width:0!important;
  max-width:100%;
}

#lancamentos .cash-closing-toolbar input,
#lancamentos .cash-closing-toolbar button,
#lancamentos .cash-closing-final input,
#lancamentos .cash-closing-final button{
  width:100%;
  max-width:100%;
  min-width:0;
}

#lancamentos .cash-closing-selection{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  min-width:0;
}

#lancamentos .cash-closing-summary{
  width:100%;
  max-width:100%;
  min-width:0;
  grid-template-columns:repeat(6,minmax(0,1fr));
}

#lancamentos .cash-closing-card{
  min-width:0!important;
  overflow:hidden;
}

#lancamentos .cash-closing-card strong,
#lancamentos .cash-closing-card small,
#lancamentos .cash-closing-card span{
  max-width:100%;
  overflow-wrap:anywhere;
}

#lancamentos .cash-closing-accounts{
  display:grid!important;
  width:100%;
  max-width:100%;
  min-width:0;
  grid-template-columns:minmax(88px,max-content) repeat(auto-fit,minmax(220px,1fr))!important;
  align-items:stretch;
  overflow:hidden!important;
}

#lancamentos .cash-closing-accounts article{
  width:auto!important;
  min-width:0!important;
  max-width:100%;
}

#lancamentos .cash-closing-table,
#lancamentos .cash-closing-history .table-wrap{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-inline:contain;
}

#lancamentos .cash-closing-table table{
  width:100%!important;
  max-width:100%!important;
  min-width:900px!important;
  table-layout:fixed!important;
}

#lancamentos .cash-closing-history table{
  width:100%!important;
  max-width:100%!important;
  min-width:820px!important;
}

#lancamentos .cash-closing-final{
  width:100%;
  max-width:100%;
  min-width:0;
  grid-template-columns:minmax(0,.9fr) minmax(0,1.25fr) minmax(0,1.05fr) minmax(0,.8fr) minmax(0,.9fr);
}

#lancamentos .cash-closing-stock span,
#lancamentos .cash-closing-difference,
#lancamentos .cash-closing-note{
  min-width:0;
  max-width:100%;
}

#lancamentos .cash-closing-stock small,
#lancamentos .cash-closing-stock strong,
#lancamentos .cash-closing-difference span,
#lancamentos .cash-closing-difference strong,
#lancamentos .cash-closing-difference small{
  overflow-wrap:anywhere;
}

@container cash-closing (max-width:1180px){
  #lancamentos .cash-closing-toolbar{
    grid-template-columns:minmax(180px,220px) repeat(2,minmax(135px,.9fr)) minmax(175px,1.15fr)!important;
    gap:10px;
    padding:10px 12px;
  }

  #lancamentos .cash-closing-selection{
    display:contents;
  }

  #lancamentos .cash-closing-refresh{
    grid-column:auto;
  }

  #lancamentos .cash-closing-summary{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  #lancamentos .cash-closing-accounts{
    grid-template-columns:minmax(88px,110px) minmax(0,1fr)!important;
  }

  #lancamentos .cash-closing-final{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  #lancamentos .cash-closing-stock{
    grid-column:1/-1!important;
  }

  #lancamentos .cash-closing-submit{
    grid-column:2!important;
  }
}

@container cash-closing (max-width:720px){
  #lancamentos .cash-closing-head{
    display:grid;
  }

  #lancamentos .cash-closing-badge{
    justify-self:start;
  }

  #lancamentos .cash-closing-toolbar,
  #lancamentos .cash-closing-final{
    grid-template-columns:1fr!important;
  }

  #lancamentos .cash-closing-selection{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  #lancamentos .cash-closing-refresh,
  #lancamentos .cash-closing-stock,
  #lancamentos .cash-closing-submit{
    grid-column:auto!important;
  }

  #lancamentos .cash-closing-summary{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  #lancamentos .cash-closing-accounts{
    grid-template-columns:1fr!important;
  }

  #lancamentos .cash-closing-account-title{
    min-width:0;
  }
}

@media(max-width:900px){
  #lancamentos .cash-market-grid{
    grid-template-columns:1fr!important;
  }
}

@media(max-width:480px){
  #lancamentos .cash-closing-selection,
  #lancamentos .cash-closing-summary{
    grid-template-columns:1fr!important;
  }
}
