* {
  margin: 0; 
  padding: 0;
  box-sizing: border-box;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

:root {
  --header-height: 6vh;
  --footer-height: 4vh;
}

html {
  font-size: 62.5%;
}

body {
  background-color: #fff;
  font-size: 1.4em;
}

header {
  background-color: #369;
  color: #fff;
  display: flex;
  position: fixed;
  top: 0;
  width: 100vw;
  height: var(--header-height);
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.cabecalho {display: flex; width: 100%; height: 50px;}
.cabecalho-esquerdo {display: flex; justify-content: left; align-items: center; width: 50%; padding-left: 2%;}
.cabecalho-direito {width: 50%; padding-right: 3%; line-height:50px; text-align: right;}
  
.cabecalho-direito a:link {text-decoration: none; color: #DAA520;}
.cabecalho-direito a:visited {text-decoration: none; color: #DAA520;}
.cabecalho-direito a:hover {color: #FFD700;}

#conteudo-bloqueado-ate-carregar {display: none;}
#mensagem-carregando {position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);}
 
main {
  display: flex;
  position: fixed;
  top: 15vh;
  left: 0;
  bottom: 5vh;
  width: 100vw;
  flex-direction: column;
  justify-content:space-evenly;
  text-align: center;
  align-items: center;
  overflow-y: auto;
}

footer {
  background-color: #369;
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  position: fixed;
  bottom: 0;
  width: 100vw;
  height: var(--footer-height);
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 2;
}

.form-legend {
  display: flex;
  position: fixed;
  top: 5vh;
  justify-content: center;
  margin-top: 2rem;
  margin-bottom: 3rem;
}

.group {
  display: flex;
  flex-wrap: wrap;  
  gap: 1.2rem;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

.buttons {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.8rem;
  min-width: 25vw;
  margin-top: 1.2rem;
  margin-bottom: 1.2rem;
}

a, a:visited {
  text-decoration: none; color: #666;
}

a:hover {
  color: #369;
}

h2::after {
  content: '';
  display: block;
  width: 8rem;
  height: 0.4rem;
  background-color: #369;
  margin: 0 auto;
  position: absolute;
  border-radius: 10px;
  margin-top: 0.3rem;
}

p {
  padding: 20px;
}

.input-box {
  position: relative;
  flex-direction: column;
  min-width: 25vw;
}



input[type=date] { 
  color: transparent; 
  transition: 0.6s ease-in-out;
  background-color: #fff;
}

input[type=date]:focus,
input[type=date]:valid { 
  color: black; 
}

.input-box input, select {
  padding: 0.8rem 1.2rem;
  border: 2px solid #666;
  border-radius: 5px;
  font-size: 1.4rem;
  width: 100%;
  background: #FFF;
}

.input-box label {
  position: absolute;
  left: 1.2rem;
  bottom: 1rem;
  cursor: text;
  font-size: 1.4rem;
  color: #666;
  transition: 0.15s ease-in-out;
}

.input-box input:focus,
.input-box select:focus{
  border: 2px solid #369;
  outline: none;
}

.input-box input:focus ~label,
.input-box input:not(:placeholder-shown) ~ label {
  transform: translateY(-1.8rem);
  font-size: 1.4rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  background-color: #fff;
}

.input-box select:focus ~ label,
.input-box select:valid ~ label {
  transform: translateY(-2rem);
  font-size: 1.4rem;
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  background-color: #fff;
}

.select-hora {
  min-width: 9vw;
}

fieldset {
  display: flex;
  padding: 0.8rem 1.2rem;
  border: 2px solid #666;
  border-radius: 5px;
  text-align: left;
  margin-bottom: 1.2rem;
  gap: 1.2rem;
}

.fieldset-legend {
  font-size: 1.4rem;
  color: #666;
  padding-left: 5px;
  padding-right: 5px;
}

.fieldset-item {
  margin-left: 1.2rem;
  margin-right: 0.2rem;
}

.fieldset-vertical {
  flex-direction: column;
  width: 50vw;
  max-width: 50vw;
}

.button {
  flex-grow: 1;
  padding: 0.8rem 1.2rem;
  border: 2px solid #369;
  border-radius: 5px;
  font-size: 1.4rem;
  background-color: #369;
  color: #fff;
  cursor: pointer;
  width: 100%;
}

.button-disabled {
  flex-grow: 1;
  padding: 0.8rem 1.2rem;
  border: 2px solid #aaaaaa;
  border-radius: 5px;
  font-size: 1.4rem;
  background-color: #aaaaaa;
  color: #fff;
  cursor: default;
}

.button:hover {
  background-color: rgb(72, 110, 180);
  border-color: rgb(72, 110, 180);
}

.button a {
  text-decoration: none;
  font-size: 1.4rem;
  font-weight: 500;
  color: #fff;
}

.caixa-mensagem-vermelho {
  display: flex;
  position: fixed;
  flex-direction: column;
  height: auto;
  padding: 2rem;
  bottom: 5vh;
  right: 1vw;
  background-color: red;
  --caixa-mensagem-bg-color: red;
  opacity: 0.95;
  color: #fff;
  border-radius: 5px;
  z-index: 3;
  animation: sumir 3s;
  animation-fill-mode: forwards;
  overflow-x: hidden;
  min-width: 350px;
  align-items: center;
}

.caixa-mensagem-verde {
  display: flex;
  position: fixed;
  flex-direction: column;
  height: auto;
  padding: 2rem;
  bottom: 5vh;
  right: 1vw;
  background-color: green;
  --caixa-mensagem-bg-color: green;
  opacity: 0.95;
  color: #fff;
  border-radius: 5px;
  z-index: 3;
  animation: sumir 3s;
  animation-fill-mode: forwards;
  overflow-x: hidden;
  min-width: 350px;
}

.sombra-caixa {
  background-color: #fff;
  opacity: 0.95;
  display: flex;
  position: fixed;
  top: var(--header-height);
  left: 0;
  bottom: var(--footer-height);
  width: 100vw;
  align-items: center;
  padding: 1rem;
  z-index: 1;
}

.caixa-informativo-verde {
  display: flex;
  align-items: center;      /* centraliza verticalmente */
  justify-content: center;  /* centraliza horizontalmente */
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem;
  background-color: green;
  color: #fff;
  border-radius: 5px;
  z-index: 3;
  width: 50vw;
  height: auto;
  min-height: 50%;
}

.caixa-informativo-vermelho {
  display: flex;
  align-items: center;      /* centraliza verticalmente */
  justify-content: center;  /* centraliza horizontalmente */
  flex-direction: column;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1rem;
  background-color: red;
  color: #fff;
  border-radius: 5px;
  z-index: 3;
  width: 50vw;
  height: auto;
  min-height: 50%;
}

.caixa-mensagem-vermelho a,
.caixa-mensagem-verde a {
  color: #fff;
  animation: sumir 3s;
}

.botao-fechar-caixa-mensagem {
  display: flex;
  position: absolute;
  top: 0.5rem;
  right: 1rem;
  font-weight: bold;
  font-size: 2.5rem;
}

.texto-mensagem {
  margin-top: 1rem;
  margin-bottom: 1rem;
  color: #fff;
  text-align: left;
}

.texto-informativo {
  margin-top: 1rem;
  margin-bottom: 2rem;
  color: #fff;
  text-align: center;
}

.loading {
  display: flex;
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  left: 1rem;
  height: 4px;
  overflow-x: hidden;
}

.loading::after {
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  content: "";
  width: 50%;
  height: 4px;
  background-color: #fff;
  border-radius: 50px;
  animation: correr 3s;
}

.container-tabela {
  width: 95vw; 
  height: 50vh; 
  margin: 1.2rem;
  overflow-y: scroll;
}

table {
  font-size: 1.2rem;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}

table caption {
  text-align: left;
  padding-left: 2px;
}

table td {
  padding: 2px; 
  padding-left: 5px;
}

table.sortable thead th, tfoot th {
  padding: 2px; 
  padding-left: 5px;
  border: none;
  background-color: #369;
  color: #fff; 
  font-weight: 500; 
  cursor: pointer;
  height: 20px;
}

.linha-tabela:hover {
  background: oldlace;
}

.botao-link {
  border: 0px; 
  background: none;
  cursor: pointer;
}

.coluna-botao-tabela {
  background: #fff;
}

@media screen and (max-width: 640px) {
  .input-box input {
    width: 100%;
  }
  
  .group, fieldset, .buttons, .container-tabela {
    flex-direction: column;
    flex-wrap: nowrap;
    width: 90vw;
  }

  .fieldset-item {
    margin-top: 0.4rem;
    margin-bottom: 0.4rem;
  }

  .caixa-mensagem-vermelho,
  .caixa-mensagem-verde {
    display: flex;
    position: fixed;
    left: 1vh;
    right: 2vw;
  }

  .caixa-informativo-verde,
  .caixa-informativo-vermelho {
    width: 95vw;
  }

  .fieldset-vertical .buttons {
    width: 85vw;
  }
}

@keyframes correr {
  0% {
    transform: translate(-150%);
  }
  100% {
    transform: translate(200%);
  }
}

@keyframes sumir {
  0% {
    background-color: transparent;
    color: transparent;
  }
  10% {
    background-color: var(--caixa-mensagem-bg-color);
    color: #fff;
  }
  90% {
    background-color: var(--caixa-mensagem-bg-color);
    color: #fff;
  }
  100% {
    background-color: transparent;
    color: transparent;
    display: none;
  }
}

/* não alterar cor preenchimento automático*/
input:-webkit-autofill,
textarea:-webkit-autofill,
select:-webkit-autofill {
  -webkit-text-fill-color: #000;
  -webkit-box-shadow: 0 0 0px 1000px #fff inset;
}
/* não alterar cor preenchimento automático*/

/* barra de rolagem estilizada */
::-webkit-scrollbar-track {
  background-color: #F4F4F4;
}
::-webkit-scrollbar {
  width: 10px;
  background: #F4F4F4;
}
::-webkit-scrollbar-thumb {
  background: #dad7d7;
  border-radius: 8px;
}
/* barra de rolagem estilizada */
