/* Importando uma fonte moderna */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: "Poppins", sans-serif;
  background-color: #ffffff;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* HEADER */
header {
  width: 100%;
  background: linear-gradient(135deg, #ffc107, #ffa000);
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}

header .system-name {
  font-size: 26px;
  font-weight: 600;
  color: #fff;
}

/* Botão que só aparece no mobile para abrir/fechar menu */
.menu-toggle {
  display: none; /* some no desktop */
  font-size: 24px;
  background: none;
  border: none;
  color: #fff;
  cursor: pointer;
}

.btn-group {
  display: flex;
  gap: 15px;
}

.btn {
  cursor: pointer;
  background: white;
  color: #333;
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.1s ease-in-out;
}

.btn:hover {
  background: #ffc107;
  color: white;
  border-color: #ffffff;
  box-shadow: 0px 4px 6px rgba(255, 193, 7, 0.4);
}

.small-button {
  cursor: pointer;
  background: white;
  color: #000000;
  margin-top: 20px;
  box-shadow: 0px 2px 6px rgba(255, 193, 7, 0.3);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #ffa000;
  transition: all 0.1s ease-in-out;
}

.small-button:hover {
  background: #ffa000;
  color: #ffffff;
  box-shadow: 0px 4px 6px rgba(255, 193, 7, 0.3);
}

/* CONTEÚDO PRINCIPAL */
.container {
  width: 100%;
  max-width: 1200px;
  padding: 20px;
  background: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-top: 150px; /* Ajuste para dar espaço para o header fixo */
  box-sizing: border-box;
}

.input-field {
  flex: 1;
  margin-right: 20px;
}

.input-field:last-child {
  margin-right: 0;
}
.input-field input,
.input-field select,
.input-field textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 5px;
  box-sizing: border-box;
}

textarea#observacoes {
  height: 40px; /* Ajuste a altura conforme necessário */
}

.input-field label {
  font-size: 14px;
  color: black;
  margin-bottom: 5px;
  display: block;
}

.input-field span {
  cursor: pointer;
  color: #00796b;
  font-size: 14px;
}

#myModal {
  display: none;
  position: fixed;
  z-index: 3;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgb(0, 0, 0);
  background-color: rgba(0, 0, 0, 0.4);
}

.form-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
}

/* FORMULÁRIOS */
.form-group {
  margin-top: 30px;
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-weight: 500;
  margin-bottom: 8px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}

.form-group input:focus {
  border-color: #ffc107;
  outline: none;
}

/* LOADING SPINNER */
#loadingSpinner {
  display: none;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.9);
  z-index: 4;
}

.spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-top: 4px solid #ffc107;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* MODAL */
.modal-content {
  background-color: white;
  padding: 25px;
  width: 90%;
  max-width: 400px;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.2);
}

.modal-content-success {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 300px;
  text-align: center;
  border-radius: 10px;
}

/* Estilo para os textos dentro do modal */
.modal-content h2,
.modal-content h3 {
  color: #333;
  font-weight: 600;
  margin-bottom: 15px;
}

/* Parágrafos dentro do modal */
.modal-content p {
  background: #f8f9fa;
  padding: 10px;
  border-radius: 6px;
  font-weight: 500;
  color: #333;
}

/* Formulário dentro do modal */
.modal-content form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Campos de entrada */
.modal-content input,
.modal-content select {
  width: 100%;
  padding: 10px;
  border: 2px solid #ddd;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s;
}
.modal-content input:focus,
.modal-content select:focus {
  border-color: #ffa000;
  outline: none;
  box-shadow: 0px 2px 6px rgba(255, 193, 7, 0.3);
}

.modal-content .small-button {
  cursor: pointer;
  background: white;
  color: #000000;
  margin-top: 20px;
  box-shadow: 0px 2px 6px rgba(255, 193, 7, 0.3);
  text-decoration: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  border: 2px solid #ffa000;
  transition: all 0.1s ease-in-out;
}

.modal-content .small-button:hover {
  background: #ffa000;
  color: #ffffff;
  box-shadow: 0px 4px 6px rgba(255, 193, 7, 0.3);
}

.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.844);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2;
}

.close {
  color: #666;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close:hover {
  color: black;
}

.table-container {
  width: 100%;
  overflow-x: auto;
  margin-top: 20px; /* Ajuste para separar do formulário */
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

table,
th,
td {
  border: 1px solid #ddd;
}

th,
td {
  padding: 8px;
  text-align: left;
}

th {
  background-color: #ffa000;
  color: rgb(255, 255, 255);
}

/* Responsividade */
@media (max-width: 480px) {
  .modal-content {
    width: 95%;
    padding: 20px;
  }
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  /* Reorganiza o header no mobile */
  header {
    flex-direction: row;
    justify-content: space-between; /* ou flex-start / center */
    align-items: center;
  }

  /* Mostra o ícone do menu no mobile */
  .menu-toggle {
    display: block;
  }

  .btn-group {
    display: none; /* some totalmente */
  }

  .btn-group {
    position: absolute;
    top: 60px; /* abaixo do header (ajuste conforme a altura do seu header) */
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #ffc107, #ffa000);
    padding: 10px;
    border-radius: 8px;

    flex-direction: column;
    gap: 10px;
    width: auto; /* pode ajustar para 100% se quiser ocupar toda largura */
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  }

  /* Classe "show" exibindo o menu ao clicar no botão */
  .btn-group.show {
    display: flex;
  }

  .container {
    width: 90%;
  }
}
