/* style.css - Layout unificado e mais agradável */

/* RESET */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.5;
}

.container {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  padding: 20px;
}

h1, h2, h3 {
  margin-bottom: 16px;
  text-align: center;
  font-weight: 600;
  color: #212529;
}

/* Top Nav */
.top-nav {
  background-color: #333;
  overflow: hidden;
}
.top-nav > a,
.top-nav .dropbtn {
  float: left;
  display: block;
  color: #fff;
  text-align: center;
  padding: 12px 16px;
  text-decoration: none;
  font-size: 1em;
}
.top-nav > a:hover,
.top-nav .dropbtn:hover {
  background-color: #555;
}
.dropdown {
  float: left;
  overflow: hidden;
  position: relative;
}
.dropbtn {
  background: none;
  border: none;
  cursor: pointer;
}
.dropdown-content {
  display: none;
  position: absolute;
  background-color: #333;
  min-width: 160px;
  z-index: 999;
}
.dropdown-content a {
  float: none;
  color: #fff;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}
.dropdown-content a:hover {
  background-color: #555;
}
.dropdown:hover .dropdown-content {
  display: block;
}

/* Upload, Filter, Form sections */
.upload-section, .filter-section, .form-section {
  text-align: center;
  margin-bottom: 15px;
}
.filter-section label {
  font-weight: bold;
  margin-right: 5px;
}

/* Mensagens */
#message,
#cadastroMessage,
#loginMessage {
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
  color: #d9534f;
}
#topInfo {
  margin: 10px 0;
  text-align: center;
  font-weight: bold;
}

/* Botões */
button {
  background-color: #007bff;
  border: none;
  color: #fff;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 6px;
  font-size: 0.9em;
}
button:hover {
  background-color: #0056b3;
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 8px;
  margin: 6px 0;
  border: 1px solid #ced4da;
  border-radius: 4px;
  font-size: 0.9em;
  color: #495057;
}

/* Tabela */
.table-responsive {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
table {
  width: 100%;
  table-layout: auto;
  border-collapse: collapse;
  background-color: #fff;
}
th, td {
  border-bottom: 1px solid #eee;
  padding: 8px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9em;
  color: #333;
  word-wrap: break-word;
  white-space: normal;
}
th {
  background-color: #f0f0f0;
  font-weight: 600;
  white-space: nowrap;
}
tbody tr:nth-child(even) {
  background-color: #fafafa;
}
tbody tr:hover {
  background-color: #f1f3f5;
}

/* Sort Buttons */
.sortBtn {
  margin-left: 4px;
  cursor: pointer;
  background: none;
  border: none;
  font-size: 0.85em;
  opacity: 0.7;
}
.sortBtn:hover {
  opacity: 1;
}

/* Presente / Falta */
.presente {
  background-color: #d4edda;
}
.falta {
  background-color: #f8d7da;
}

/* Badges */
.badge {
  display: inline-block;
  background-color: #6c757d;
  color: #fff;
  padding: 3px 6px;
  border-radius: 4px;
  margin: 2px;
  font-size: 0.85em;
}
.badge.email {
  background-color: #17a2b8;
}
.badge.empresa {
  background-color: #28a745;
}

/* Ação nas tabelas */
.acao-btn {
  background-color: #28a745;
  border: none;
  color: #fff;
  padding: 4px 8px;
  margin: 2px 2px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.8em;
}
.acao-btn:hover {
  opacity: 0.85;
}
.acao-btn.reset {
  background-color: #dc3545;
}
.acao-btn.editar {
  background-color: #17a2b8;
}

/* Modal (genérico) */
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}
.modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 20px;
  width: 90%;
  max-width: 600px;
  border-radius: 4px;
  position: relative;
}
.close {
  color: #999;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover {
  color: #000;
}
.modal-content button {
  background-color: #28a745;
  margin-top: 10px;
}
.modal-content pre {
  max-height: 300px;
  overflow-y: auto;
}

/* Responsivo */
@media (max-width: 600px) {
  .top-nav a,
  .top-nav .dropbtn {
    float: none;
    display: block;
    text-align: left;
  }
  .dropdown-content {
    position: relative;
  }
  .container {
    padding: 10px;
  }
  table {
    table-layout: fixed;
  }
  th, td {
    font-size: 0.8em;
    padding: 6px;
  }
  button {
    padding: 6px 10px;
    font-size: 0.85em;
  }
}

/* NOVAS REGRAS PARA "Fiz a Mais" */
.eventoFizSpan {
  min-width: 28px;
  text-align: center;
  border-radius: 4px;
  margin: 2px;
  display: inline-block;
}
.colFizAMais {
  /* Customizações futuras */
}

/* Classe para itens de grupo no relatório */
.group-button {
  border: 2px solid #333;
  padding: 5px;
  display: inline-block;
  cursor: pointer;
}


/* Barra de medição fixa no topo */
#measurementBar.fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background-color: #f5f7fa;
  padding: 10px;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Ajuste opcional: se o measurementBar ficar sobre o conteúdo, aumente a margem superior do container */
.container {
  margin-top: 70px; /* ajuste conforme necessário */
}
