/* User Cards in Admin Dashboard */
.users-list {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  padding: 20px;
}

.user-card {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  width: 320px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.user-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  flex: 1;
}

.user-info h3 {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

.status.active {
  color: green;
}
.status.inactive {
  color: #888;
}

.token-count {
  font-weight: bold;
  color: #2a5298;
}

.requested-tokens {
  font-weight: bold;
  color: #c0392b;
}

.user-profile-details {
  margin-top: 5px;
  cursor: pointer;
}
.user-profile-details summary {
  font-weight: 600;
}
.user-profile-details p {
  margin-left: 10px;
  margin-top: 4px;
}

.token-update {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.token-update input.new-token-value {
  width: 90px;
  padding: 6px 8px;
  font-size: 0.95rem;
  border-radius: 6px;
  border: 1px solid #ccc;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.token-update input.new-token-value:focus {
  outline: none;
  border-color: #2a5298;
  box-shadow: 0 0 4px rgba(42,82,152,0.3);
}
.token-update button.update-token-btn {
  background: linear-gradient(90deg, #2a5298, #1d3c70);
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 6px 16px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background 0.3s;
}
.token-update button.update-token-btn:hover {
  background: linear-gradient(90deg, #1f3b70, #16284f);
}

.request-actions {
  display: flex;
  gap: 8px;
}
.request-actions button {
  background: #3498db;
  color: #fff;
  border: none;
  border-radius: 20px;
  padding: 5px 12px;
  cursor: pointer;
  font-size: 0.8rem;
  transition: background 0.3s;
}
.request-actions button:hover {
  background: #297cb8;
}

.toggle-btn {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 1.6rem;
  transition: transform 0.2s;
}
.toggle-btn:hover {
  transform: scale(1.15);
}
.toggle-btn.activate {
  color: #888;
}
.toggle-btn.deactivate {
  color: green;
}

/* Tab Navigation for Admin Dashboard */
.tab-container .tab-nav {
  display: flex;
  background: #2a5298;
  padding: 5px;
  border-radius: 30px 30px 0 0;
  margin-bottom: 20px;
}
.tab-container .tab-nav .tab-btn {
  flex: 1;
  padding: 10px;
  background: #2a5298;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: background 0.3s;
  margin: 0 3px;
  text-align: center;
  border-radius: 20px;
}
.tab-container .tab-nav .tab-btn.active,
.tab-container .tab-nav .tab-btn:hover {
  background: #1f3b70;
}

/* Tab panels */
.tab-container .tab-panel {
  display: none;
}
.tab-container .tab-panel.active {
  display: block;
}

/* Datasets Update Box (for built-in and custom sections) */
.datasets-update-box {
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  padding: 20px;
  max-width: 600px;
  margin: 0 auto;
  margin-top: 20px;
  font-family: 'Roboto', sans-serif;
}
.datasets-update-box h2 {
  margin-top: 0;
  text-align: center;
  margin-bottom: 10px;
}
.datasets-update-box p {
  margin-bottom: 15px;
  line-height: 1.4;
}
#updateDatasetForm .input-group,
#adminCustomDatasetForm .input-group {
  margin-bottom: 15px;
}
#updateDatasetForm label,
#adminCustomDatasetForm label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
}
#updateDatasetForm select,
#updateDatasetForm input[type="file"],
#adminCustomDatasetForm input[type="text"],
#adminCustomDatasetForm input[type="file"] {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  box-sizing: border-box;
}
#updateDatasetForm button,
#adminCustomDatasetForm button {
  display: inline-block;
  padding: 10px 20px;
  background: linear-gradient(90deg, #2a5298, #1f3b70);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
  margin-top: 10px;
}
#updateDatasetForm button:hover,
#adminCustomDatasetForm button:hover {
  background: linear-gradient(90deg, #1f3b70, #16284f);
}
#updateDatasetResult,
#adminCustomDatasetResult {
  margin-top: 15px;
  font-weight: 500;
  text-align: center;
}

/* Additional styles for dataset hints */
.dataset-hint {
  background: #f9f9f9;
  border-left: 4px solid #2a5298;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 4px;
}
.dataset-hint p {
  font-weight: 600;
  margin-bottom: 5px;
}
.dataset-hint ul {
  list-style: disc inside;
  margin: 0;
  padding: 0;
}
.dataset-hint ul li {
  margin-bottom: 5px;
}

/* Styles for Dataset History Table */
#historyResult table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}
#historyResult th,
#historyResult td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}
#historyResult th {
  background: #2a5298;
  color: #fff;
  font-weight: bold;
}
/* ---------- New: Logs Search & Delete Boxes ---------- */
.logs-search-box, .logs-delete-box {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 20px;
}
.logs-search-box .input-group,
.logs-delete-box .input-group {
  flex: 1 1 200px;
}
.btn.danger {
  background: #c0392b;
  color: #fff;
}
.btn.danger:hover {
  background: #992d22;
}

/* Logs Table */
#logsTable table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
#logsTable th,
#logsTable td {
  border: 1px solid #ccc;
  padding: 8px;
  text-align: left;
}
#logsTable th {
  background: #2a5298;
  color: #fff;
  font-weight: bold;
}

/* Status-code coloring */
.status-2xx {
  color: green;
  font-weight: bold;
}
.status-4xx {
  color: orange;
  font-weight: bold;
}
.status-5xx {
  color: red;
  font-weight: bold;
}

/* Pagination buttons */
#logsPagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 15px;
}
#logsPagination .btn {
  padding: 6px 12px;
  border: none;
  background: #2a5298;
  color: #fff;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s;
}
#logsPagination .btn:hover {
  background: #1f3b70;
}
