 /* Fundo com imagem */
body {
  background: 
    linear-gradient(rgba(18,18,18,0.85), rgba(18,18,18,0.85)),
    url('https://images.unsplash.com/photo-1506744038136-46273834b3fb?auto=format&fit=crop&w=1400&q=80') no-repeat center center fixed;
  background-size: cover;
  color: #eee;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}

h1 {
  text-align: center;
  text-shadow: 0 0 5px #007bff;
}

p {
  text-align: center;
  margin-bottom: 1.5em;
}

/* Botões */
.btn-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px; /* espaço entre linhas e colunas */
  justify-items: stretch; /* faz os botões ocuparem toda a largura da célula */
  max-width: 600px; /* opcional, para controlar largura máxima */
  margin: 0 auto 2em; /* centraliza e dá margem embaixo */
}

.btn-group button {
  min-width: unset; /* libera o min-width padrão */
  width: 100%; /* faz o botão ocupar toda célula */
  box-sizing: border-box;
}

button {
  background: linear-gradient(145deg, #0056b3, #007bff);
  border: none;
  color: white;
  padding: 12px 22px;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 6px rgba(0,123,255,0.4);
  transition: all 0.25s ease;
  user-select: none;
  min-width: 150px;
  box-sizing: border-box;
}

button:hover, button:focus {
  background: linear-gradient(145deg, #007bff, #3399ff);
  box-shadow: 0 6px 15px rgba(0,123,255,0.7);
  outline: none;
  transform: translateY(-2px);
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(0,0,0,0.9);
  justify-content: center;
  align-items: center;
  padding: 20px;
  box-sizing: border-box;
  overflow: auto;
  z-index: 9999;
  backdrop-filter: blur(6px);
}

.modal.show {
  display: flex;
}

.modal-content {
  background-color: #222;
  padding: 25px 30px;
  border-radius: 12px;
  max-width: 1200px;
  width: 95vw;
 position: relative; /* mantém contexto para posicionamento absoluto */
  max-height: 90vh;
  overflow-y: auto;
  font-size: 14px;
  color: #eee;
  /*box-shadow: 0 0 40px #c13cc4;*/
  position: relative;
  animation: fadeInUp 0.3s ease forwards;
  -webkit-overflow-scrolling: touch; /* para scroll suave no iOS */
}

/* Scrollbar estilizada */
.modal-content::-webkit-scrollbar {
  width: 10px;
}
.modal-content::-webkit-scrollbar-track {
  background: #222;
  border-radius: 8px;
}
.modal-content::-webkit-scrollbar-thumb {
  background-color: #007bff;
  border-radius: 8px;
}
/* Firefox */
.modal-content {
  scrollbar-width: thin;
  scrollbar-color: #007bff #222;
}

/* Botão fechar */
.close-btn {
  position: sticky;
  top: 0;
  float: right;
  background-color: #007bff;
  border: none;
  color: white;
  font-size: 16px;
  padding: 16px 32px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  line-height: 1;
  width: auto;
  min-width: unset;
  transition: background-color 0.2s, color 0.2s;
  z-index: 11000;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  margin-left: auto; /* garante alinhamento à direita */
  display: block;
}


/* Opcional: adicionar sombra para o botão não "sumir" sobre o conteúdo */
.close-btn {
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
  
}

.close-btn:hover, .close-btn:focus {
  color: white;
  outline: none;
}

/* Container para tabela com scroll horizontal */
.table-container {
  overflow-x: auto;
  margin-top: 1em;
}

/* Tabela */
table {
  border-collapse: collapse;
  width: 100%;
  table-layout: fixed;
  word-wrap: break-word;
}
th, td {
  border: 1px solid #444;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}
th {
  background-color: #333;
}

/* Colunas fixas */
.col-data { width: 80px; }
.col-direcao { width: 90px; }
.col-resultado { width: 140px; }
.col-observacao { width: auto; }

/* Alinhamento do texto */
.left-align {
  text-align: left;
  margin-top: 1em;
  margin-bottom: 1em;
  line-height: 1.5;
}

/* Responsividade */
@media (max-width: 600px) {
.btn-group button {
  white-space: normal;       /* permite quebra de linha */
  word-wrap: break-word;     /* permite quebra dentro da palavra se necessário */
  text-align: center;        /* centraliza o texto dentro do botão */
  padding: 12px 10px;        /* ajuste fino no padding para encaixar melhor */
  min-width: unset;          /* evita largura mínima fixa */
  width: 100%;               /* para ocupar a largura da coluna */
  box-sizing: border-box;    /* para considerar padding na largura */
}

button {
  white-space: nowrap; /* evita quebra de linha no texto */
  overflow: hidden;
  text-overflow: ellipsis; /* se o texto for muito grande, mostra reticências */
  padding: 12px 18px;
  font-size: 15px;
  box-sizing: border-box;
  width: 100%; /* ocupa toda a célula da grid */
}

  .modal-content {
    max-width: 95vw;
    max-height: 90vh;
    font-size: 13px;
    padding: 18px 22px;
  }

  .close-btn {
    font-size: 14px !important;
    padding: 6px 12px !important;
    top: 8px !important;
    right: 8px !important;
  }

  .table-container {
    overflow-x: auto;
  }

  table {
    table-layout: auto !important;
    width: 100% !important;
  }
  th, td {
    padding: 4px 6px !important;
    font-size: 12px !important;
    white-space: normal !important;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  } 
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeOutDown {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

.modal-content.hide {
  animation: fadeOutDown 0.3s ease forwards;
}

.back-to-site {
  margin-top: 40px;
  text-align: center;
}

.site-button {
  background: linear-gradient(145deg, #0056b3, #007bff);
  color: white;
  padding: 14px 28px;
  font-size: 16px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 6px rgba(0,123,255,0.4);
  transition: all 0.25s ease;
}

.site-button:hover {
  background: linear-gradient(145deg, #007bff, #3399ff);
  box-shadow: 0 6px 12px rgba(0,123,255,0.7);
  transform: translateY(-2px);
}
