* {
  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; }

/* Classes Desktop */
.mobile-header {
  display: none;
}
.sidebar-overlay {
  display: none;
}

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

  .mobile-header {
    display: flex;
    align-items: center;
    background: #343a40;
    color: white;
    padding: 10px 20px;
  }

  .hamburger {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    margin-right: 15px;
    cursor: pointer;
  }

  .panel-container {
    flex-direction: column;
    height: calc(100vh - 50px); /* desconta o header mobile */
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -250px;
    width: 250px;
    height: 100vh;
    z-index: 1000;
    transition: left 0.3s ease;
    flex-direction: column;
  }

  .sidebar.open {
    left: 0;
  }

  .sidebar-overlay.show {
    display: block;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }

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

  .sidebar ul {
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
  }

  .sidebar ul li {
    text-align: left;
    padding: 15px 20px;
    border-bottom: 1px solid #495057;
    border-right: none;
    font-size: 16px;
  }

  .main-content {
    padding: 15px;
  }

  /* Transformando Tabela em Cards no Mobile */
  table, thead, tbody, th, td, tr {
    display: block;
  }

  thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  tr {
    margin-bottom: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    background: #fff;
    border: 1px solid #ddd;
    padding: 10px;
  }

  td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 40%;
    text-align: right;
    min-height: 40px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
  }

  td:before {
    position: absolute;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    width: 35%;
    padding-right: 10px;
    white-space: nowrap;
    content: attr(data-label);
    font-weight: bold;
    text-align: left;
  }

  td:last-child {
    border-bottom: 0;
  }

  .actions button {
    margin-bottom: 5px;
  }

  .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%;
  }
}