/* ==========================================
   ADMIN USER MANAGEMENT - ENHANCED STYLES
   ========================================== */

/* Badge styles */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-success {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-danger {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-warning {
  background: rgba(251, 191, 36, 0.2);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-primary {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}

.badge-info {
  background: rgba(14, 165, 233, 0.2);
  color: #0ea5e9;
  border: 1px solid rgba(14, 165, 233, 0.3);
}

.badge-purple {
  background: rgba(168, 85, 247, 0.2);
  color: #a855f7;
  border: 1px solid rgba(168, 85, 247, 0.3);
}

/* Admin section header */
.admin-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.admin-section-header h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

/* Admin filters */
.admin-filters {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.admin-filters input,
.admin-filters select {
  flex: 1;
  min-width: 150px;
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.admin-filters input:focus,
.admin-filters select:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.1);
}

.admin-filters input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

/* Fix dropdown options - make them readable */
.admin-filters select option {
  background-color: #1e293b;
  color: #f1f5f9;
  padding: 0.5rem;
}

/* Button icon styles */
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0 2px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.875rem;
}

.btn-icon:hover {
  background: rgba(255, 255, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 242, 254, 0.2);
}

.btn-icon:active {
  transform: translateY(0);
}

.btn-icon.btn-danger {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.btn-icon.btn-danger:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: #ef4444;
  color: #fff;
}

/* Admin stats grid */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: linear-gradient(135deg, rgba(0, 242, 254, 0.1), rgba(255, 0, 85, 0.1));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 242, 254, 0.2);
  border-color: var(--accent-cyan);
}

.stat-card.stat-warning {
  background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(239, 68, 68, 0.1));
}

.stat-card.stat-info {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.1), rgba(59, 130, 246, 0.1));
}

.stat-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
  opacity: 0.8;
}

.stat-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
}

.pagination .btn {
  min-width: 40px;
  height: 40px;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  border-radius: 8px;
}

/* Form group improvements */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.875rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 3px rgba(0, 242, 254, 0.1);
}

/* Fix modal form dropdown options */
.form-group select option {
  background-color: #1e293b;
  color: #f1f5f9;
  padding: 0.5rem;
}

/* Loading and error states */
.admin-loading {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.admin-loading i {
  font-size: 3rem;
  color: var(--accent-cyan);
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.admin-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 12px;
  padding: 1.5rem;
  color: #ef4444;
  text-align: center;
  margin: 2rem 0;
}

.admin-empty {
  text-align: center;
  padding: 3rem;
  color: var(--text-secondary);
}

.admin-empty i {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive improvements */
@media (max-width: 768px) {
  .admin-filters {
    flex-direction: column;
  }

  .admin-filters input,
  .admin-filters select {
    min-width: 100%;
  }

  .admin-stats-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

.password-modal-message {
  margin: 12px 0 14px;
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
  line-height: 1.4;
  border: 1px solid transparent;
}

.password-modal-message.success {
  color: #bbf7d0;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.35);
}

.password-modal-message.error {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.14);
  border-color: rgba(239, 68, 68, 0.35);
}

.password-modal-message.warning {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.14);
  border-color: rgba(245, 158, 11, 0.35);
}

.password-modal-message.info {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.35);
}

/* ==========================================================================
   ANALYTICS DASHBOARD STYLES
   ========================================================================== */

/* Cards hover and details */
.analytics-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.analytics-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent);
  pointer-events: none;
}

.analytics-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.35), 
              0 0 15px rgba(0, 242, 254, 0.15);
  border-color: rgba(0, 242, 254, 0.3) !important;
}

.analytics-card .card-icon {
  transition: all 0.3s ease;
}

.analytics-card:hover .card-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Bar charts */
.analytics-bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 90px;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 0.9rem;
}

.analytics-bar-label {
  color: #cbd5e1;
  font-weight: 500;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

.analytics-bar-track {
  height: 16px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.6);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.analytics-bar-fill {
  height: 100%;
  border-radius: 8px;
  background: linear-gradient(90deg, #ec4899, #8b5cf6, #3b82f6);
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.analytics-bar-value {
  color: #38bdf8;
  font-weight: 700;
  text-align: right;
}

/* Tab button active state */
.analytics-tab-btn {
  border-bottom: 2px solid transparent !important;
}

.analytics-tab-btn:hover {
  color: #e2e8f0 !important;
}

.analytics-tab-btn.active {
  color: #22d3ee !important;
  border-bottom: 2px solid #22d3ee !important;
  background: rgba(34, 211, 238, 0.05) !important;
  text-shadow: 0 0 10px rgba(34, 211, 238, 0.3);
}

/* General Layout spacing */
#admin-tab-dashboard h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, #94a3b8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Glass panel adjustments */
.glass-panel {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

