/* Estilo global "Batman Tecnológico" */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #0a0f14 0%, #101820 100%);
  color: #e0e0e0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 30px 15px;
}

.container {
  background-color: #1a202c;
  border-radius: 12px;
  border: 1px solid #00aaff40;
  box-shadow: 0 10px 30px rgba(0, 170, 255, 0.1), 0 0 15px rgba(0, 0, 0, 0.3);
  width: 95%;
  max-width: 1400px;
  padding: 30px 40px;
  overflow: hidden;
}

.section {
  margin-bottom: 35px;
}

.section h3 {
  font-size: 1.7rem;
  font-weight: 600;
  color: #00aaff;
  text-align: center;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 10px;
}

.section h3::after {
  content: '';
  display: block;
  width: 70px;
  height: 3px;
  background-color: #00aaff;
  margin: 10px auto 0;
  border-radius: 2px;
  box-shadow: 0 0 8px rgba(0, 170, 255, 0.7);
}

label {
  font-size: 0.95rem;
  font-weight: 500;
  color: #a0b3c2;
  margin-bottom: 8px;
  display: block;
}

input,
select {
  font-size: 1rem;
  font-weight: 400;
  padding: 12px 15px;
  border: 1px solid #304057;
  border-radius: 6px;
  background-color: #0f172a;
  color: #e0e0e0;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  width: 100%;
  margin-bottom: 15px;
}

input:focus,
select:focus {
  outline: none;
  border-color: #00aaff;
  background-color: #1a202c;
  box-shadow: 0 0 10px rgba(0, 170, 255, 0.5);
}

input::placeholder {
  color: #506070;
}

button {
  font-size: 1rem;
  font-weight: 600;
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  background-color: #00aaff;
  color: #ffffff;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
  width: 100%;
  margin-top: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

button:hover {
  background-color: #0088cc;
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 170, 255, 0.3);
}
button:active {
  transform: translateY(0px);
  box-shadow: 0 2px 8px rgba(0, 170, 255, 0.2);
}
button:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 170, 255, 0.4);
}

#btnCancelarEdicao {
    background-color: #4a5568;
    color: #e0e0e0;
}
#btnCancelarEdicao:hover {
    background-color: #2d3748;
    box-shadow: 0 4px 15px rgba(100, 116, 139, 0.3);
}

td button {
  font-size: 0.8rem;
  padding: 6px 10px;
  border-radius: 4px;
  margin: 0 5px;
  width: auto;
  min-width: 70px;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
}

.btn-editar {
  background-color: #00bfa5;
  color: #ffffff;
}
.btn-editar:hover {
  background-color: #008c7a;
  box-shadow: 0 2px 10px rgba(0, 191, 165, 0.3);
}

.btn-excluir {
  background-color: #ff5252;
  color: #ffffff;
}
.btn-excluir:hover {
  background-color: #cc2222;
  box-shadow: 0 2px 10px rgba(255, 82, 82, 0.3);
}

.button-container {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 25px;
}
.button-container button {
  width: auto;
  padding: 12px 25px;
  flex-grow: 1;
  max-width: 250px;
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin-top: 20px;
  background-color: #1f2937;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0,0,0, 0.2);
}

th, td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid #304057;
  color: #c0d0e0;
  font-size: 0.875rem;
}
tr:last-child td {
    border-bottom: none;
}
th:not(:last-child),
td:not(:last-child) {
    border-right: 1px solid #304057;
}

th {
  background-color: #0077aa;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#mensagem.sucesso {
    background-color: rgba(0, 191, 165, 0.2);
    color: #00bfa5;
    border: 1px solid #00bfa5;
}
#mensagem.erro {
    background-color: rgba(255, 82, 82, 0.2);
    color: #ff5252;
    border: 1px solid #ff5252;
}
#mensagem.info {
    background-color: rgba(0, 170, 255, 0.2);
    color: #00aaff;
    border: 1px solid #00aaff;
}

@media (max-width: 768px) {
  .container { padding: 20px 15px; }
  .section h3 { font-size: 1.4rem; }
  label, input, select, button { font-size: 0.9rem; }
  th, td { padding: 8px; font-size: 0.75rem; }
}

/* --- ESTILOS DO CABEÇALHO OTIMIZADOS --- */

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
}

.logo-link {
    flex-shrink: 0; /* Impede que o logo encolha */
}

.logo-img {
    height: 220px; /* Altura ajustada do logo */
    width: auto;
    display: block;
    border-radius: 6px;
}

.header-title-container {
    flex-grow: 1; /* Ocupa o espaço central */
    text-align: center;
}

.header-title-container h3 {
    margin-bottom: 0; /* Remove a margem extra do H3 */
}

.header-buttons-container {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0; /* Impede que os botões encolham */
}

.btn-header {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    color: #f0f0f0;
    background-color: #0d6efd;
    border: 1px solid #0d6efd;
    border-radius: 5px;
    cursor: pointer;
    text-align: center;
    transition: background-color 0.2s, border-color 0.2s;
    font-family: inherit;
}

.btn-header:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    color: #ffffff;
}

/* --- ESTILOS PARA CHECKBOXES --- */

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.checkbox-container input[type="checkbox"] {
    width: auto;
    height: 18px;
    margin: 0;
    flex-shrink: 0;
}

.checkbox-container label {
    margin-bottom: 0;
    font-weight: normal;
    cursor: pointer;
}