/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f4f6f9;
  color: #333;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 20px;
}

/* CONTAINER GERAL */
.container, .form-container {
  background: #fff;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 1100px;
  margin: auto;
}

/* TÍTULOS */
h2 {
  margin-bottom: 20px;
  color: #222;
  font-size: 1.6rem;
  font-weight: bold;
  text-align: center;
}

/* BOTÕES SUPERIORES */
.top-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 15px;
}

.top-buttons a {
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #fff;
  transition: 0.3s;
}

.top-buttons .usuario {
  background: #007bff;
}
.top-buttons .usuario:hover {
  background: #0062cc;
}

.top-buttons .registro {
  background: #28a745;
}
.top-buttons .registro:hover {
  background: #1e7e34;
}

.top-buttons .sair {
  background: #dc3545;
}
.top-buttons .sair:hover {
  background: #a71d2a;
}

/* FORMULÁRIO */
form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

form label {
  font-weight: 500;
  margin-bottom: 4px;
}

form input, form select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
  width: 100%;
}

form button {
  background: #28a745;
  color: white;
  padding: 12px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}
form button:hover {
  background: #1e7e34;
}

/* TABELA */
table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

thead {
  background: #007bff;
  color: white;
}

thead th {
  padding: 12px;
  text-align: center;
  font-size: 14px;
}

tbody td {
  padding: 12px;
  text-align: center;
  font-size: 14px;
  border-bottom: 1px solid #eee;
}

tbody tr:hover {
  background: #f8f9fa;
}

/* BOTÕES DE AÇÃO NA TABELA */
.action-buttons {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.action-buttons a {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  color: #fff;
  transition: 0.3s;
}

.action-buttons .editar {
  background: #ffc107;
}
.action-buttons .editar:hover {
  background: #e0a800;
}

.action-buttons .apagar {
  background: #dc3545;
}
.action-buttons .apagar:hover {
  background: #a71d2a;
}

/* RESPONSIVIDADE */
@media (max-width: 768px) {
  .top-buttons {
    justify-content: center;
  }

  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead {
    display: none;
  }

  tbody tr {
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    background: #fff;
  }

  tbody td {
    text-align: left;
    padding: 8px;
    display: flex;
    justify-content: space-between;
    border: none;
  }

  tbody td::before {
    content: attr(data-label);
    font-weight: bold;
    margin-right: 10px;
    color: #007bff;
  }
  /* Ações */
.acoes {
  display: flex;
  gap: 8px;
}

.btn-editar {
  background: #f39c12;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.btn-editar:hover {
  background: #e67e22;
}

.btn-apagar {
  background: #e74c3c;
  color: #fff;
  padding: 6px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 14px;
  transition: 0.3s;
}

.btn-apagar:hover {
  background: #c0392b;
}

}
