/* ============================================
   Admin Users Page - Modern Stílusok
   Elsys CO2 dizájn mintájára
   ============================================ */

/* ==================== PAGE HEADER - Elsys stílus ==================== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  border: 1px solid #bae6fd;
  border-radius: var(--radius-xl, 16px);
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(59, 130, 246, 0.1);
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
}

.header-left h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #0c4a6e;
  margin: 0 0 0.25rem 0;
}

.subtitle {
  color: #0369a1;
  font-size: 0.9rem;
  margin: 0;
  opacity: 0.9;
}

.header-right {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* ==================== STATISTICS CARDS - Elsys stílus ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1rem;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Gradient top border hover */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #06b6d4 0%, #3b82f6 50%, #8b5cf6 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: linear-gradient(135deg, var(--accent-primary, #3b82f6) 0%, #2563eb 100%);
  border-radius: var(--radius-md, 10px);
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
  margin-bottom: 0.5rem;
}

.stat-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.stat-content h3 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
  margin: 0;
  line-height: 1.2;
  text-align: center;
}

.stat-content p {
  font-size: 0.8rem;
  color: var(--text-secondary, #6b7280);
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
  text-align: center;
}

/* ✅ FONTOS: stat-status is középre */
.stat-status {
  font-size: 0.75rem;
  color: var(--text-tertiary, #9ca3af);
  display: flex;
  align-items: center;
  justify-content: center;  /* ← KÖZÉPRE */
  gap: 0.25rem;
  width: 100%;
  margin-top: 0.25rem;
  text-align: center;  /* ← KÖZÉPRE */
}

.stat-status.positive {
  color: var(--success, #10b981);
}

.stat-status.negative {
  color: var(--danger, #ef4444);
}

/* ==================== FILTERS BAR - Elsys stílus ==================== */
.filters-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
  flex-wrap: wrap;
  align-items: center;
}

/* ==================== TABLE CONTAINER - Elsys stílus ==================== */
.table-container {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.users-table-container {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-xl, 16px);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.table-header {
  padding: 1.25rem 1.5rem;
  background: var(--bg-secondary, #f9fafb);
  border-bottom: 1px solid var(--border, #e5e7eb);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.table-header h2 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin: 0;
}

.table-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
}

/* Search Box */
.search-box {
  position: relative;
  min-width: 250px;
}

.search-input {
  width: 100%;
  padding: 0.65rem 1rem;
  padding-left: 2.5rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  color: var(--text-primary, #1a1a1a);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.search-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.95rem;
  color: var(--text-secondary, #6b7280);
  pointer-events: none;
}

/* Filter Select */
.filter-select {
  padding: 0.65rem 2.5rem 0.65rem 1rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  color: var(--text-primary, #1a1a1a);
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
}

.filter-select:hover {
  border-color: var(--accent-primary, #3b82f6);
}

.filter-select:focus {
  outline: none;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

/* Table Styles */
.table,
.users-table {
  width: 100%;
  border-collapse: collapse;
}

.table thead,
.users-table thead {
  background: var(--bg-secondary, #f9fafb);
  border-bottom: 2px solid var(--border, #e5e7eb);
}

.table th,
.users-table th {
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr,
.users-table tbody tr {
  border-bottom: 1px solid var(--border, #e5e7eb);
  transition: all 0.2s ease;
}

.table tbody tr:hover,
.users-table tbody tr:hover {
  background: var(--bg-hover, #f3f4f6);
}

.table td,
.users-table td {
  padding: 1rem 1.5rem;
  font-size: 0.9rem;
  color: var(--text-primary, #1a1a1a);
}

/* User Avatar */
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: white;
  background: linear-gradient(135deg, var(--accent-primary, #3b82f6) 0%, #2563eb 100%);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.875rem;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin-bottom: 0.15rem;
}

.user-email {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
}

/* Role Badge */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.role-admin {
  background: rgba(239, 68, 68, 0.1);
  color: #dc2626;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.role-user {
  background: rgba(59, 130, 246, 0.1);
  color: #2563eb;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.role-viewer {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

/* Status Badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-active {
  background: rgba(16, 185, 129, 0.1);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.status-inactive {
  background: rgba(107, 114, 128, 0.1);
  color: #6b7280;
  border: 1px solid rgba(107, 114, 128, 0.3);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-active .status-dot {
  animation: online-pulse 2s ease-in-out infinite;
  box-shadow: 0 0 6px currentColor;
}

@keyframes online-pulse {
  0%, 100% { 
    opacity: 1; 
    transform: scale(1); 
  }
  50% { 
    opacity: 0.6; 
    transform: scale(0.9); 
  }
}

/* Action Buttons */
.action-buttons {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.action-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-sm, 8px);
  color: var(--text-secondary, #6b7280);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 1rem;
}

.action-btn:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--accent-primary, #3b82f6);
  color: var(--text-primary, #1a1a1a);
}

.action-btn.edit:hover {
  background: rgba(59, 130, 246, 0.1);
  border-color: #3b82f6;
  color: #3b82f6;
}

.action-btn.delete:hover {
  background: rgba(239, 68, 68, 0.1);
  border-color: #ef4444;
  color: #ef4444;
}

/* ==================== MODAL - Elsys stílus ==================== */
/* JÓ - alapból rejtett, csak nyitáskor látható */
.modal-overlay,
.config-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;  /* ← ALAPBÓL REJTETT */
  align-items: center;
  justify-content: center;
  z-index: 10000;
  animation: modalFadeIn 0.2s ease;
}

/* Amikor display: flex-re állítjuk JS-ből, akkor látható */
.modal-overlay.show,
.config-modal.show {
  display: flex;
}

@keyframes modalFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal,
.config-modal .modal-content {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-xl, 16px);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow: hidden;
  animation: modalSlideUp 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  position: relative;
}

@keyframes modalSlideUp {
  from {
    transform: translateY(30px) scale(0.95);
    opacity: 0;
  }
  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
  background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
}

.modal-header h2,
.modal-header h3,
.config-modal .modal-content h2 {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: #0c4a6e;
}

.modal-close,
.config-modal .close {
  background: rgba(0, 0, 0, 0.05);
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-secondary, #6b7280);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.4rem 0.6rem;
  line-height: 1;
  border-radius: var(--radius-sm, 8px);
  transition: all 0.2s ease;
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-close:hover {
  color: var(--text-primary, #1a1a1a);
  border-color: var(--accent-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.1);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 60vh;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 1.25rem 1.5rem;
  border-top: 1px solid var(--border, #e5e7eb);
  background: var(--bg-secondary, #f9fafb);
}

/* ==================== FORM ELEMENTS - Elsys stílus ==================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  color: var(--text-primary, #1a1a1a);
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  color: var(--text-primary, #1a1a1a);
  font-size: 0.95rem;
  transition: all 0.2s ease;
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: var(--bg-card, #ffffff);
}

.form-control:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  background: var(--bg-secondary, #f9fafb);
}

select.form-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group small {
  display: block;
  color: var(--text-tertiary, #9ca3af);
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

/* ==================== BUTTONS - Elsys stílus ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius-md, 10px);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  color: var(--text-secondary, #6b7280);
}

.btn-secondary:hover {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--text-secondary, #6b7280);
  color: var(--text-primary, #1a1a1a);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.2);
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-danger:hover {
  background: #ef4444;
  border-color: #ef4444;
  color: white;
}

.btn-sm {
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* ==================== LOADING CELL ==================== */
.loading-cell {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-secondary, #6b7280);
}

.loading-cell .loader {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border, #e5e7eb);
  border-top-color: var(--accent-primary, #3b82f6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 2rem;
  color: var(--text-secondary, #6b7280);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.4;
  filter: grayscale(100%);
}

.empty-state h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary, #1a1a1a);
  margin: 0 0 0.5rem 0;
}

.empty-state p {
  color: var(--text-secondary, #6b7280);
  margin: 0 0 1.5rem 0;
  max-width: 400px;
}

/* ==================== LOADING ==================== */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease;
}

[data-theme="dark"] .loading-overlay {
  background: rgba(15, 23, 42, 0.95);
}

.loading-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border, #e5e7eb);
  border-top-color: var(--accent-primary, #3b82f6);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.loading-text {
  color: var(--text-secondary, #6b7280);
  font-size: 0.95rem;
  font-weight: 500;
}

/* ==================== PAGINATION ==================== */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  background: var(--bg-secondary, #f9fafb);
  border-top: 1px solid var(--border, #e5e7eb);
}

.pagination-btn {
  padding: 0.6rem 1rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-md, 10px);
  color: var(--text-secondary, #6b7280);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--bg-hover, #f3f4f6);
  border-color: var(--accent-primary, #3b82f6);
  color: var(--text-primary, #1a1a1a);
}

.pagination-btn.active {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border-color: transparent;
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.pagination-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pagination-info {
  color: var(--text-secondary, #6b7280);
  font-size: 0.9rem;
  margin: 0 0.5rem;
}

/* ==================== DARK MODE ==================== */
[data-theme="dark"] .page-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  border-color: #3b82f6;
}

[data-theme="dark"] .header-left h1 {
  color: #e0f2fe;
}

[data-theme="dark"] .subtitle {
  color: #93c5fd;
}

[data-theme="dark"] .stat-card,
[data-theme="dark"] .users-table-container,
[data-theme="dark"] .table-container,
[data-theme="dark"] .filters-bar {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
}

.table-header,
[data-theme="dark"] .users-table thead,
[data-theme="dark"] .table thead,
[data-theme="dark"] .pagination {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .users-table tbody tr:hover,
[data-theme="dark"] .table tbody tr:hover {
  background: var(--bg-hover, #374151);
}

[data-theme="dark"] .users-table tbody tr,
[data-theme="dark"] .table tbody tr {
  border-color: var(--border, #374151);
}

[data-theme="dark"] .search-input,
[data-theme="dark"] .filter-select {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
  color: var(--text-primary, #f9fafb);
}

[data-theme="dark"] .search-input:focus,
[data-theme="dark"] .filter-select:focus {
  background: var(--bg-card, #1f2937);
}

[data-theme="dark"] .action-btn {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .action-btn:hover {
  background: var(--bg-hover, #374151);
}

[data-theme="dark"] .modal,
[data-theme="dark"] .config-modal .modal-content {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .modal-header {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .modal-header h3 {
  color: #e0f2fe;
}

[data-theme="dark"] .modal-footer {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
}

[data-theme="dark"] .form-control {
  background: var(--bg-secondary, #111827);
  border-color: var(--border, #374151);
  color: var(--text-primary, #f9fafb);
}

[data-theme="dark"] .form-control:focus {
  background: var(--bg-card, #1f2937);
}

[data-theme="dark"] .btn-secondary {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text-secondary, #9ca3af);
}

[data-theme="dark"] .btn-secondary:hover {
  background: var(--bg-hover, #374151);
  color: var(--text-primary, #f9fafb);
}

[data-theme="dark"] .pagination-btn {
  background: var(--bg-card, #1f2937);
  border-color: var(--border, #374151);
  color: var(--text-secondary, #9ca3af);
}

[data-theme="dark"] .pagination-btn:hover:not(:disabled) {
  background: var(--bg-hover, #374151);
  color: var(--text-primary, #f9fafb);
}

/* ==================== CONTAINER ==================== */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem;
}

/* ==================== NAVBAR SPECIFIC ELEMENTS ==================== */
.user-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  background: var(--bg-hover, #f3f4f6);
  border-radius: var(--radius-md, 10px);
  cursor: pointer;
  transition: all 0.2s ease;
}

.user-badge:hover {
  background: var(--bg-tertiary, #e5e7eb);
}

.user-badge .user-avatar {
  width: 36px;
  height: 36px;
  font-size: 0.85rem;
}

.user-badge span {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary, #1a1a1a);
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1.25rem;
    padding: 1.25rem;
  }
  
  .header-right {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .header-right .btn {
    flex: 1;
    min-width: 120px;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .table-header {
    flex-direction: column;
    align-items: stretch;
  }
  
  .search-box {
    min-width: 100%;
  }
  
  .table-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  
  .filter-select {
    flex: 1;
  }
  
  /* Hide table on mobile, show cards instead */
  .users-table {
    display: none;
  }
  
  .users-mobile-cards {
    display: block;
  }
  
  .modal {
    width: 95%;
    max-width: none;
  }
  
  .modal-body {
    max-height: 50vh;
  }
}

@media (max-width: 480px) {
  .header-left h1 {
    font-size: 1.5rem;
  }
  
  .page-header {
    padding: 1rem;
    border-radius: 12px;
  }
  
  .stat-card {
    padding: 1rem;
  }
  
  .stat-content h3 {
    font-size: 1.5rem;
  }
  
  .stat-icon {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ==================== MOBILE USER CARDS ==================== */
.users-mobile-cards {
  display: none;
  padding: 1rem;
  gap: 1rem;
  flex-direction: column;
}

.user-mobile-card {
  background: var(--bg-secondary, #f9fafb);
  border: 1px solid var(--border, #e5e7eb);
  border-radius: var(--radius-lg, 12px);
  padding: 1rem;
}

.user-mobile-card .user-info {
  margin-bottom: 0.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border, #e5e7eb);
}

.user-mobile-card .user-meta {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.user-mobile-card .action-buttons {
  justify-content: stretch;
}

.user-mobile-card .action-btn {
  flex: 1;
  width: auto;
  height: 40px;
}

@media (max-width: 768px) {
  .users-mobile-cards {
    display: flex;
  }
}