/* Rotina360 R533 — correção de sobreposição e espaçamento no Armazenamento.
   Escopo estrito da página Estoque E-commerce; não altera lógica, dados ou outras rotas. */

.page:has(.ecommerce-stock-page){
  scroll-margin-top:12px;
}

.page:has(.ecommerce-stock-page) .page-header{
  position:relative;
  padding-top:14px!important;
  overflow:visible!important;
}

.page:has(.ecommerce-stock-page) .page-header::before{
  top:0;
  left:2px;
  margin-top:0!important;
}

@media (min-width:981px){
  /* O menu lateral acompanha as duas linhas da aba de armazenamento. */
  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-tabs{
    grid-row:2 / span 2;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) > .ecommerce-stock-storage-form{
    grid-row:2;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) > .ecommerce-stock-list{
    grid-row:3;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active){
    row-gap:10px!important;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-form > header,
  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-list > header{
    padding:12px 15px 11px!important;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-grid{
    margin-top:10px!important;
    margin-bottom:10px!important;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-grid input,
  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-grid select{
    min-height:38px;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-submit{
    margin-top:0;
    padding-top:8px!important;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-storage-submit button{
    min-height:38px;
  }

  .ecommerce-stock-page:has(.ecommerce-stock-tabs button:nth-child(2).active) .ecommerce-stock-list > .ecommerce-stock-table-wrap{
    margin-top:8px!important;
    margin-bottom:12px!important;
  }
}

@media (max-width:980px){
  .ecommerce-stock-page .ecommerce-stock-tabs,
  .ecommerce-stock-page .ecommerce-stock-storage-form,
  .ecommerce-stock-page .ecommerce-stock-list{
    grid-row:auto!important;
  }
}
