body {
  font-family: "Inter", sans-serif;
  background-color: #f2f2f2;
  margin: 0;
  padding: 0;
  color: #333;
  align-items: center;
  justify-content: center;
}

.container {
  max-width: 1100px;
  margin: 50px auto;
  padding: 30px;
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

h1 {
  text-align: center;
  font-weight: 600;
  margin-bottom: 30px;
}

.search-bar {
  display: flex;
  justify-content: space-between;
  margin-bottom: 20px;
  align-items: center;
}

.search-bar input {
  width: 70%;
  padding: 12px 20px;
  border-radius: 25px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.search-bar button {
  background-color: #1976d2;
  border: none;
  padding: 12px 20px;
  border-radius: 25px;
  color: white;
  cursor: pointer;
}

.user-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.user-card {
  background-color: #fff;
  border-radius: 16px;
  padding: 25px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.user-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
}

.user-info p {
  color: #777;
}

.permissions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.permission {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 calc(50% - 10px);
  background-color: #f9f9f9;
  padding: 10px;
  border-radius: 10px;
}

.toggle-button {
  width: 80px;
  padding: 10px;
  text-align: center;
  font-size: 16px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: white;
}

.toggle-button.on {
  background-color: #4caf50;
}

.toggle-button.off {
  background-color: #f44336;
}

.actions {
  display: flex;
  justify-content: space-between;
  margin-top: 15px;
}

.actions button {
  padding: 10px;
  font-size: 1rem;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  width: 48%;
}

.actions button.edit {
  background-color: #42a5f5;
  color: white;
}

.actions button.delete {
  background-color: #e53935;
  color: white;
}

.pagination {
  display: flex;
  justify-content: center;
  margin-top: 30px;
}

.pagination button {
  padding: 10px 15px;
  border-radius: 8px;
  border: none;
  background-color: #42a5f5;
  color: white;
  margin: 0 5px;
  cursor: pointer;
  transition: background-color 0.3s;
}

.pagination button.active {
  background-color: #1976d2;
}

.pagination button:hover {
  background-color: #1e88e5;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  width: 50%;
  box-shadow: 0px 5px 15px rgba(0, 0, 0, 0.3);
}

.close-btn {
  color: red;
  float: right;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
}

.close-btn:hover {
  color: darkred;
}

/* Form inside modal */
#editUserForm {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#editUserForm label {
  font-weight: bold;
}

#editUserForm input {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

#editUserForm button {
  padding: 10px;
  border-radius: 4px;
  background-color: #1976d2;
  color: white;
  border: none;
  cursor: pointer;
}

#editUserForm button:hover {
  background-color: #145a86;
}

/* Add User Button */
.add-user-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #1976d2;
  color: white;
  border: none;
  border-radius: 50%;
  padding: 20px;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.add-user-btn i {
  margin-right: 0;
  font-size: 20px;
}

.add-user-btn:hover {
  background-color: #145a86;
}

.modal form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal form label {
  font-weight: bold;
}

.modal form input {
  padding: 8px;
  border-radius: 4px;
  border: 1px solid #ddd;
  font-size: 1rem;
}

.modal form button {
  padding: 10px;
  border-radius: 4px;
  background-color: #1976d2;
  color: white;
  border: none;
  cursor: pointer;
}

.modal form button:hover {
  background-color: #145a86;
}

.password-container {
  position: relative;
  display: inline-block;
}

.password-container input {
  padding-right: 40px;
}

.password-container button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}

.password-container button i {
  font-size: 18px;
  color: #555;
}

.loading-spinner {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 50px;
  color: #007bff;
  z-index: 9999;
  display: block;
}
