* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: Arial, sans-serif;
}

body {
  background-color: #f4f4f9;
  color: #333;
}

.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.login-box {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  margin-bottom: 20px;
  text-align: center;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
}

.form-group input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

button {
  width: 100%;
  padding: 10px;
  background: #007bff;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
}

button:hover {
  background: #0056b3;
}

.panel-container {
  display: flex;
  height: 100vh;
}

.sidebar {
  width: 250px;
  background: #343a40;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.sidebar h2 {
  padding: 20px;
  text-align: center;
  background: #212529;
}

.sidebar ul {
  list-style: none;
  flex-grow: 1;
}

.sidebar ul li {
  padding: 15px 20px;
  cursor: pointer;
  border-bottom: 1px solid #495057;
}

.sidebar ul li:hover {
  background: #495057;
}

.user-info {
  padding: 15px 20px;
  background: #212529;
  text-align: center;
  font-size: 14px;
  border-top: 1px solid #495057;
}

.sidebar .logout {
  padding: 15px 20px;
  background: #dc3545;
  text-align: center;
  cursor: pointer;
}

.sidebar .logout:hover {
  background: #c82333;
}

.main-content {
  flex-grow: 1;
  padding: 30px;
  overflow-y: auto;
}

.hidden {
  display: none !important;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

table th, table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

table tr:hover {
  background-color: #f1f1f1;
}

.actions button {
  width: auto;
  padding: 5px 10px;
  margin-right: 5px;
  font-size: 14px;
}

.btn-edit {
  background: #ffc107;
  color: #000;
}
.btn-edit:hover { background: #e0a800; }

.btn-delete {
  background: #dc3545;
}
.btn-delete:hover { background: #c82333; }

.btn-add {
  width: auto;
  margin-bottom: 20px;
}

/* Modal */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  width: 400px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-actions button {
  width: auto;
}

.btn-cancel {
  background: #6c757d;
}
.btn-cancel:hover { background: #5a6268; }

/* Responsividade (Mobile) */
@media (max-width: 768px) {
  .login-box {
    width: 90%;
    padding: 20px;
  }

  .panel-container {
    flex-direction: column;
    height: 100vh;
  }

  .sidebar {
    width: 100%;
    height: auto;
    flex-direction: column;
  }

  .sidebar h2 {
    padding: 15px;
    font-size: 1.2rem;
  }

  .sidebar ul {
    display: flex;
    flex-direction: row;
    overflow-x: auto;
    flex-grow: 0;
  }

  .sidebar ul li {
    flex: 1;
    text-align: center;
    padding: 12px;
    border-bottom: none;
    border-right: 1px solid #495057;
    white-space: nowrap;
    font-size: 14px;
  }

  .sidebar ul li:last-child {
    border-right: none;
  }

  .user-info {
    padding: 10px;
    font-size: 14px;
    border-top: none;
    border-bottom: 1px solid #495057;
  }

  .sidebar .logout {
    padding: 10px;
    font-size: 14px;
  }

  .main-content {
    padding: 15px;
  }

  table {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
    width: 100%;
  }

  .modal-content {
    width: 95%;
    padding: 15px;
  }

  .btn-add {
    width: 100%;
    margin-bottom: 15px;
  }

  .modal-actions {
    flex-direction: column;
    gap: 10px;
  }

  .modal-actions button {
    width: 100%;
  }
}