.admin-dashboard {
  display: flex;
  min-height: 100vh;
  background-color: #f4f7f6;
  color: #333;
}

.admin-sidebar {
  width: 250px;
  background-color: #2c3e50; /* Dark blue/grey */
  color: white;
  padding: 20px;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
}

.admin-sidebar h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #ecf0f1;
}

.admin-sidebar ul {
  list-style: none;
  padding: 0;
}

.admin-sidebar li {
  margin-bottom: 15px;
}

.admin-sidebar a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: white;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.admin-sidebar a:hover,
.admin-sidebar a.active { /* Add 'active' class via NavLink if using it */
  background-color: #34495e;
}

.admin-content {
  flex-grow: 1;
  padding: 20px;
  background-color: #ffffff;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.05);
}

.admin-page {
  background-color: #ffffff;
  padding: 25px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.admin-page h2 {
  color: #2c3e50;
  margin-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 10px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
}

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

.admin-table th {
  background-color: #ecf0f1;
  color: #2c3e50;
  font-weight: bold;
}

.admin-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

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

.action-button {
  padding: 8px 12px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  margin-right: 5px;
  transition: background-color 0.2s ease;
}

.edit-button {
  background-color: #2196f3;
  color: white;
}
.edit-button:hover {
  background-color: #1769aa;
}

.delete-button {
  background-color: #f44336;
  color: white;
}
.delete-button:hover {
  background-color: #d32f2f;
}

.view-button {
  background-color: #4CAF50;
  color: white;
  text-decoration: none; /* For the <a> tag */
  display: inline-block; /* For the <a> tag */
}
.view-button:hover {
  background-color: #45a049;
}

.add-button {
  background-color: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  margin-bottom: 20px;
  font-size: 16px;
}
.add-button:hover {
  background-color: #0056b3;
}

/* Loading and Error styles */
.loading, .error {
    text-align: center;
    padding: 20px;
    font-size: 1.2em;
}
.error {
    color: red;
}
/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000; /* Ensure it's on top */
}

.modal-content {
  background-color: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  width: 450px;
  max-width: 90%;
  position: relative;
}

.modal-content h3 {
  margin-top: 0;
  color: #2c3e50;
  text-align: center;
  margin-bottom: 25px;
}

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

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select {
  width: calc(100% - 20px); /* Account for padding */
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
}

.form-group small {
    color: #888;
    margin-left: 10px;
}

.modal-actions {
  margin-top: 30px;
  display: flex;
  justify-content: flex-end; /* Align buttons to the right */
  gap: 10px;
}

.modal-actions .submit-button {
  background-color: #28a745; /* Green for submit */
  color: white;
}
.modal-actions .submit-button:hover {
  background-color: #218838;
}

.modal-actions .cancel-button {
  background-color: #6c757d; /* Grey for cancel */
  color: white;
}
.modal-actions .cancel-button:hover {
  background-color: #5a6268;
}

.error-in-modal {
    color: red;
    background-color: #ffe0e0;
    border: 1px solid red;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    text-align: center;
}

/* Checkbox specific styling for form-group */
.form-group.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px; /* Space between checkbox and label */
}

.form-group.checkbox-group input[type="checkbox"] {
    width: auto; /* Override 100% width */
    margin-right: 0; /* Remove default margin */
}

.form-group.checkbox-group label {
    margin-bottom: 0; /* Align label with checkbox */
    font-weight: normal; /* Make label less bold than other labels */
}