body {
  font-family: Arial, sans-serif;
  background: #f5f5f5;
  margin: 0;
  padding: 0;
}

/* ====== HEADER COM LOGO ====== */

.header {
  background: #1a1a1a;
  padding: 30px 0;
  border-bottom: 2px solid #4CAF50;
  margin-bottom: 0;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-section {
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 48px;
  color: white;
  font-weight: bold;
  letter-spacing: 8px;
}

.logo-text h1 {
  color: white;
  font-size: 36px;
  margin: 0;
  letter-spacing: 4px;
  font-weight: 300;
}

.logo-text p {
  color: #aaa;
  font-size: 12px;
  margin: 0;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.app {
  max-width: 1200px;
  margin: 20px auto;
  background: #fff;
  padding: 20px 30px;
  border-radius: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

h1 {
  text-align: center;
  margin-bottom: 20px;
  color: #333;
}

h2 {
  color: #333;
  margin-top: 20px;
  margin-bottom: 15px;
}

label {
  display: block;
  margin: 10px 0;
  font-weight: 500;
  color: #555;
}

input[type="text"],
input[type="password"],
select {
  width: 100%;
  max-width: 300px;
  padding: 8px 10px;
  margin-top: 4px;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  font-size: 14px;
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
  outline: none;
  border-color: #4CAF50;
  box-shadow: 0 0 4px rgba(76, 175, 80, 0.2);
}

button {
  margin-top: 10px;
  padding: 10px 20px;
  background: #4CAF50;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s;
}

button:hover {
  background: #45a049;
}

button:active {
  background: #3d8b40;
}

.error {
  color: #c0392b;
  font-size: 14px;
  margin-top: 8px;
}

.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 10px 0;
  border-bottom: 2px solid #f0f0f0;
}

#user-role {
  font-weight: 600;
  color: #4CAF50;
  font-size: 16px;
}

#logout-btn {
  background: #f44336;
  padding: 8px 16px;
  margin-top: 0;
  font-size: 13px;
}

#logout-btn:hover {
  background: #da190b;
}

#results-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 13px;
}

#results-table th {
  background: #f0f0f0;
  color: #333;
  padding: 10px 8px;
  text-align: left;
  font-weight: 600;
  border: 1px solid #ddd;
  position: sticky;
  top: 0;
}

#results-table td {
  padding: 8px 8px;
  border: 1px solid #ddd;
  word-wrap: break-word;
}

#results-table tbody tr:hover {
  background: #f9f9f9;
}

#results-table tbody tr:nth-child(even) {
  background: #fafafa;
}

/* Dashboard */
#master-dashboard {
  background: #f9f9f9;
  padding: 20px;
  border-radius: 6px;
  border-left: 4px solid #4CAF50;
}

#master-dashboard p {
  margin: 10px 0;
  font-size: 16px;
  color: #555;
}

#master-dashboard span {
  font-weight: 700;
  color: #4CAF50;
}

/* ====== MODAL DE OBSERVAÇÕES ====== */

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 70%;
  max-width: 700px;
  max-height: 70vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-header {
  background: #4CAF50;
  color: white;
  padding: 20px;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 20px;
}

.modal-close {
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s;
}

.modal-close:hover {
  transform: scale(1.2);
}

.modal-body {
  padding: 20px;
  font-size: 15px;
  line-height: 1.6;
  color: #333;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.modal-footer {
  padding: 15px 20px;
  background: #f9f9f9;
  border-top: 1px solid #ddd;
  border-radius: 0 0 8px 8px;
  text-align: right;
}

.modal-btn-close {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: background 0.3s;
}

.modal-btn-close:hover {
  background: #45a049;
}

/* Responsivo */
@media (max-width: 768px) {
  .header {
    padding: 20px 0;
  }

  .header-container {
    padding: 0 20px;
  }

  .logo-section {
    gap: 10px;
  }

  .logo {
    font-size: 36px;
  }

  .logo-text h1 {
    font-size: 24px;
  }

  .app {
    padding: 15px 20px;
    margin: 10px;
  }

  #results-table {
    font-size: 12px;
  }

  #results-table th,
  #results-table td {
    padding: 6px 4px;
  }

  input[type="text"],
  input[type="password"],
  select {
    max-width: 100%;
  }

  .top-bar {
    flex-direction: column;
    align-items: flex-start;
  }

  #user-role {
    margin-bottom: 10px;
  }

  #logout-btn {
    align-self: flex-end;
  }

  .modal-content {
    width: 90%;
    max-height: 80vh;
  }
}