/* ===== MANAGE USERS TAB STYLES ===== */

.manage-users-section {
  width: 100%;
}

.manage-users-header {
  padding-bottom: 20px;
  border-bottom: 2px solid #e0e0e0;
}

/* Settings Card Styles */
.settings-card {
  background: white;
  border: 2px solid #e0e0e0;
  border-radius: 15px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: all 0.3s ease;
}

.settings-card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  border-color: #8b7ff5;
}

.settings-card-header {
  background: linear-gradient(135deg, #f8f7fc 0%, #f0eeff 100%);
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
}

.settings-card-title {
  margin: 0;
  color: #241443;
  font-size: 1.1rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-card-title i {
  font-size: 1.3rem;
  color: #8b7ff5;
}

.settings-card-body {
  padding: 25px;
}

/* Add User Form Styles */
.add-user-form {
  background: linear-gradient(135deg, #f8fffe 0%, #ffffff 100%);
  padding: 20px;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
}

.add-user-form .form-label {
  font-weight: 600;
  color: #241443;
  margin-bottom: 8px;
  font-size: 0.95rem;
}

.add-user-form .form-control,
.add-user-form .form-select {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.add-user-form .form-control:focus,
.add-user-form .form-select:focus {
  border-color: #8b7ff5;
  box-shadow: 0 0 0 0.2rem rgba(139, 127, 245, 0.15);
  outline: none;
}

.add-user-form textarea {
  resize: vertical;
  font-family: inherit;
}

/* Action Buttons */
.btn-success {
  background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
  border: none;
  color: white;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 20px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 12px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #20c997 0%, #17a2b8 100%);
  box-shadow: 0 5px 20px rgba(40, 167, 69, 0.4);
  transform: translateY(-2px);
}

.btn-success:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #e0e0e0;
  border: none;
  color: #333;
  font-weight: 600;
  border-radius: 10px;
  padding: 10px 20px;
  transition: all 0.3s ease;
}

.btn-secondary:hover {
  background: #d0d0d0;
}

/* Users Table Styles */
.users-table-wrapper {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid #e0e0e0;
  background: white;
}

.table {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.table thead th {
  font-weight: 700;
  padding: 14px 12px;
  white-space: nowrap;
  border: none;
}

.table tbody td {
  padding: 14px 12px;
  vertical-align: middle;
  border-color: #f0f0f0;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f7fc;
}

/* Status Badge Styles */
.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.status-active {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-inactive {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.status-pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

/* Role Badge Styles */
.role-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.role-admin {
  background-color: linear-gradient(135deg, #8b7ff5 0%, #a89ff7 100%);
  color: white;
  border: none;
}

.role-user {
  background-color: #e7e5ff;
  color: #241443;
  border: 1px solid #d4d0ff;
}

/* Action Buttons in Table */
.table-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-action-small {
  padding: 6px 12px;
  font-size: 0.85rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.btn-edit {
  background: linear-gradient(135deg, #6b5fd9 0%, #5849c4 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(91, 73, 196, 0.2);
}

.btn-edit:hover {
  background: linear-gradient(135deg, #5849c4 0%, #3f34a8 100%);
  box-shadow: 0 4px 12px rgba(91, 73, 196, 0.3);
  transform: translateY(-1px);
}

.btn-remove {
  background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(220, 53, 69, 0.2);
}

.btn-remove:hover {
  background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
  transform: translateY(-1px);
}

.btn-action-small:active {
  transform: translateY(0);
}

/* Empty State Styles */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: #999;
}

.empty-state i {
  font-size: 4rem;
  color: var(--border-color);
  opacity: 0.5;
  margin-bottom: 20px;
}

.empty-state p {
  font-size: 1.1rem;
  color: #666;
}

/* Loading State Styles */
.loading-state {
  text-align: center;
  padding: 40px;
}

.spinner-border {
  width: 2.5rem;
  height: 2.5rem;
}

/* Modal Styles for User Details */
.user-modal {
  background: white;
  border-radius: 15px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  border: 2px solid #8b7ff5;
}

.user-modal-header {
  background: linear-gradient(135deg, #241443 0%, #3d2a5c 100%);
  color: white;
  padding: 20px;
  border: none;
}

.user-modal-body {
  padding: 25px;
}

.user-modal-footer {
  padding: 15px 20px;
  background: #f8f9fa;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

/* Responsive Design */
@media (max-width: 768px) {
  .settings-card-header {
    padding: 15px;
  }

  .settings-card-body {
    padding: 15px;
  }

  .table-actions {
    flex-direction: column;
  }

  .btn-action-small {
    width: 100%;
    justify-content: center;
  }

  .add-user-form {
    padding: 15px;
  }

  .role-badge,
  .status-badge {
    font-size: 0.8rem;
    padding: 4px 10px;
  }
}

@media (max-width: 480px) {
  .manage-users-header h4 {
    font-size: 1.2rem;
  }

  .settings-card-title {
    font-size: 1rem;
  }

  .table {
    font-size: 0.85rem;
  }

  .table thead th,
  .table tbody td {
    padding: 10px 8px;
  }
}

/* Animation for adding user */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-row-new {
  animation: slideIn 0.3s ease;
}

/* Toast/Alert Styles */
.alert-success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 2px solid #28a745;
  color: #155724;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
  border: 2px solid #dc3545;
  color: #721c24;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeeba 100%);
  border: 2px solid #ffc107;
  color: #856404;
  border-radius: 12px;
  padding: 15px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
