/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

/* BASE */
body {
  font-family: Arial, sans-serif;
  width: 100%;
  max-width: 1200px; /* desktop bonito */
  margin: 0 auto;
  background-color: #000000; /* fundo escuro */
  color: #f0f0f0;
  overflow-y: visible;
}

/* HEADER */
header {
  height: 55px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Georgia, serif;
  font-weight: 700;
  color: #800af0;
  box-shadow: 0 1px 2px #ababab;
}

/* MAIN */
main {  
    flex: 1;
   display: flex;
   flex-direction: column;
   overflow-y: auto;
   padding-bottom: 70px;
}
.tela {
  display: none;
  width: 100%;
}

.tela.ativa {
    display: flex;
   width: 100%;

}
#editarFor,
#form-excluir {
  position: fixed;
  z-index: 3000;
}
#menu{
    display: flex;
    gap: 20px;
    position: fixed;  
    bottom: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    height: 75px;
     align-items: flex-end;
     padding-top: 20px;
        margin-bottom: -10px;
    background: #000;
  padding: 10px;
  text-align: center;
  z-index: 2000;
    box-shadow: 0 1px 4px rgba(33, 33, 33, 4);
  justify-content: space-around;
  align-items: center;
 overflow: auto;
    
}

#menu button {
  background: transparent;
  border: none;
  color: #666;
  padding: 8px 10px;
  font-weight: bold;
}
#menu button.ativo p {
  transform: translateY(-10px);
    transition: transform 0.3s ease;
  font-size: 17px;
}
#menu button.ativo {
  color: #800af0;
    transform: translateY(-8px);
  transition: transform 0.3s ease;
  border-bottom: 2px solid #800af0;
}

/* =====================
   FORMULÁRIO
===================== */
#informacoes {
  width: 100%;
  padding: 15px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

.campo {
  display: flex;
  flex-direction: column; /* label em cima, input embaixo */
  margin-bottom: 0.4rem;
}

.campo label {
  margin-bottom: 5px;
  font-weight: bold;
  font-size: 0.9rem;
}

.campo input {
  padding: 12px 20px;
  color: #c9c9c9;
  border-radius: 10px;
  border: 1px solid #fff;
  background-color: rgba(300, 300, 300, 0.1);
  font-size: 0.9rem;
}

#informacoes select {
  width: 50%;
  color: #fff;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #fff;
    background-color: rgba(300, 300, 300, 0.1);

}

.alinhar {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.5rem;
}

/* BOTÕES */
#calcular {
  width: 50%;
  padding: 17px 20px;
  border-radius: 10px;
  font-weight: bold;
  border: none;
  background: #5eea8a;
  font-weight: bold;
  cursor: pointer;
}

#calcular:hover {
  background-color: #5eea8a;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

#calcular:active {
  transform: scale(0.96);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

#calcular:focus-visible {
  outline: 3px solid #5eea8a;
  outline-offset: 3px;
}

.excluir {
  padding: 10px 20px;
  margin-left: 0.1rem;
  border-radius: 10px;
  background: #f00707;
}

/* =====================
   TABELA
===================== */
#tabela{
    width: 100%;
  flex-direction: column;
  align-items: center;
  gap: 5rem;
}
.botao-filtro{
    padding: 10px 20px;
    width: 90%;
    border-radius: 10px;
    color: #fff;
        background-color: transparent;
    border:1px solid #fff;
     box-shadow: 0 1px 4px #fff;
     align-items: center;
     text-align: center;
     margin-top: 1rem;

}
.botoes-filtro{
    display: flex;
    flex-direction: row;
    align-items: center;
    min-height: 15px;
    width: 100%;
    overflow-x: auto;
    gap: 8px;
}
.botao-filtro.ativo {
    border:1px solid #8905e8;
     box-shadow: 0 1px 4px #8905e8;
    background-color: transparent;
}
#header-tabela{
    min-width: 200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
#pesquisa-produto {
    margin-top: 1rem;
    width: 90%;
    padding: 15px 20px;
 box-shadow: 0 1px 4px #fff;
 border: none;
    border-radius: 15px;
    background-color: transparent;
    color: #fff;
}
#tabela-C {
  width: 98%;
  display: flex;
  flex-direction: column;
  height: 400px;
  overflow-x: auto;
  box-shadow: 0 1px 4px #fff;
}
#header-graficos {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 5px;
  color: #00000;
background-color: #11f04c;
box-shadow: inset 0 0 15px rgba(0,255,0,1), 0 0 10px rgba(0,255,0,0.4);
  font-weight: bold;
  border-radius: 6px;
}

#header-graficos p {
  text-align: center;
  font-size: 0.85rem;
}

#graficos {
  padding: 10px;
  display: flex;
  flex-direction: column;
}

.container-tabela {
  overflow-y: auto;
}

#header-graficos,
#graficos,.preenchimentop,
.container-tabela {
  min-width:700px; /* pode ajustar depois */
}

.linha {
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1fr;
  align-items: center;
  padding: 10px;
  border-radius: 6px;
  color: #000;
  overflow-x: auto;
}

.preenchimentop {
  display: contents;
  width: 100%;/* deixa o grid mandar */
}

#header-graficos .preenchimento {
  display: contents;
  width: 100%;
}

.preenchimentop p {
  padding: 8px;
  text-align: center;
  font-size: 0.85rem;
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border: 1px solid #ccc;
  border-radius: 4px;
}

/* SCROLL */
#tabela::-webkit-scrollbar {
  height: 6px;
}

#tabela::-webkit-scrollbar-thumb {
  background: #bbb;
  border-radius: 4px;
}

/* =====================
   GRÁFICOS
===================== */
.graficos-coluna {
  width: 100%;
  padding: 10px;
  flex-direction: column;
  gap: 1.5rem;
}

.grafico-box {
  height: auto;
  padding: 5px;
  text-align: center;
  border-radius: 20px;
  background-color: rgba(255, 255, 255, 0.05);
  color: #fff;
  box-shadow: 0 1px 4px rgba(33, 33, 33, 3);
}

.grafico-scroll {
    margin-top: 5px;
  width: 100%;
  max-width: 100%;
  height: 90%;
  border-radius: 20px;
  box-shadow: 0 1px 4px rgba(33, 33, 33, 1);
  overflow-x: auto;
}

.grafico-scroll canvas {
  min-width: 200px; /* cresce conforme barras */
}




/* =====================
   FOOTER
===================== */
#editarFor input {
    color: #fff;
}
#editarFor {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  width: 90%;
  max-height: 90%;
  padding: 10px 20px;
  border-radius: 20px;
  box-shadow: 0 1px 4px rgb(240,255,240);
  border: 1px solid rgb(240,255,240);
  background-color: #000000;
  z-index: 1000;
  overflow-y: auto;
}
#editarFor h3{
    width: 90%;
        text-align: center;
        color:  #0ffc03;
    margin: 0.5rem;
    font-family: Georgia;
    font-weight: bold;
}
#sair {
    margin-bottom: 0.5rem;
       padding: 5px 10px;
       background-color: transparent;
       color: red;
 
}
.editar {
    padding: 12px 15px;
    margin: 0.2rem;
    border: none;
    background-color: #F0FFF0;
    color: #000000;
    border-radius: 8px;
}
#form-excluir {
      position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  align-items: center;
  width: 90%;
  max-height: 90%;
  padding: 30px 60px;
  border-radius: 20px;
  box-shadow: 0 1px 4px rgb(240,255,240);
  border: 1px solid rgb(240,255,240);
  background-color: #000000;
  z-index: 1000;
  overflow-y: auto;
}
#form-excluir button{
    margin-top: 1rem;
    border-radius: 8px;
    color: #ffffff;
     gap: 0.5rem;
      padding: 10px 15px;

}
.confirmar {
    background-color: red;
}
.cancelar {
    background-color: blue;
}
.relatorio {
    width: 100%;
    text-align: center;
}
.relatorio h2{
    margin-top: 5px;
}

.container-coluna {
  text-align: center;
  min-width: 100%;
  max-width: 100%;
  display: flex;
  flex-direction: row;
  overflow-x: auto;
}
.coluna{
    text-align: center;
    width: 100%;
   min-width: 285px;
   gap: 20px;
   margin: 0.5rem;
    padding: 20px;
    border-radius: 8px;
    align-items: center;
}
.separar-local {
    width: 100%;
    margin-bottom: 20px;
    margin-top: 10px;
    align-items: center;
    height: 200px;
    max-height: 150px;
    overflow-y: auto;
     box-shadow: 0 1px 4px rgba(33, 33, 33, 2);
 
    
}
.coluna p {
display:flex;
justify-content:space-between;
    margin-top: 5px;
    padding: 5px 10px;
    width: 100%;    
    margin-bottom: 6px;
  box-shadow: 0 4px 4px rgba(33, 33, 33, 3);

}

.container-produtos {
    width: 100%;
    max-height: 50px;
    overflow-y: auto;
}
.container-relatorioN {
    width: 100%;
      box-shadow: 0 1px 3px 3px rgba(33, 33, 33, 4);

    border-radius: 5px;
    margin-bottom: 2rem;
    
}
/* =====================
   RESPONSIVIDADE
===================== */
@media (max-width: 768px) {
  /* Formulário full width */
  #informacoes select,
  #calcular {
    width: 50%;
  }
  .container-coluna {
width: 365px;
min-width: 200px;
  max-width: 365px;
  max-height: 400px;

}

  /* Botões alinhamento vertical */
  .alinhar {
      align-items: center;
    flex-direction: row;
    width: 100%;
    align-items: stretch;
  }

  /* Tabela scroll horizontal */
   .linha {
       overflow-y: auto;
   }
  
   #header-graficos, #graficos {
    min-width: 700px;
}

  /* Gráficos ajustam largura */

}
@media (min-width: 768px) {

#menu{
    top: 55px;
    bottom: auto;
}

main{
    padding-bottom: 0;
    padding-top: 80px;
}

}