/* ============================================================================
   ADMIN ENHANCEMENTS - Superior Design Upgrades
   Enhanced cards, animations, and visual hierarchy for admin dashboard
   ============================================================================ */

/* Enhanced Stat Cards with Hover Effects */
.stat-card {
  transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  border: 1px solid rgba(0, 0, 0, 0.06) !important;
  overflow: hidden;
  position: relative;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.03) 0%, rgba(37, 99, 235, 0.08) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -8px rgba(37, 99, 235, 0.2), 0 4px 12px -2px rgba(0, 0, 0, 0.1) !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card .card-body {
  position: relative;
  z-index: 1;
}

/* Enhanced Icon Chips */
.icon-chip {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s cubic-bezier(0.34, 1.45, 0.44, 1);
}

.stat-card:hover .icon-chip {
  transform: scale(1.1) rotate(5deg);
}

.float-soft {
  animation: floatSoft 3s ease-in-out infinite;
}

@keyframes floatSoft {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

/* Enhanced Color Chips */
.chip-green {
  background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  color: #065f46;
}

.chip-blue {
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1e40af;
}

.chip-orange {
  background: linear-gradient(135deg, #fed7aa 0%, #fdba74 100%);
  color: #9a3412;
}

.chip-red {
  background: linear-gradient(135deg, #fecaca 0%, #fca5a5 100%);
  color: #991b1b;
}

.chip-violet {
  background: linear-gradient(135deg, #e9d5ff 0%, #d8b4fe 100%);
  color: #6b21a8;
}

.chip-gray {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #374151;
}

/* Enhanced Page Headers */
.page-head {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 2px solid #f3f4f6;
  position: relative;
}

.page-head::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 80px;
  height: 2px;
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
}

.section-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  background: #f3f4f6;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
}

/* Enhanced Cards */
.card {
  border-radius: 12px !important;
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: 0 8px 16px -4px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
  border-radius: 12px 12px 0 0 !important;
  background: #ffffff !important;
  border-bottom: 1px solid #f3f4f6 !important;
  padding: 1rem 1.25rem !important;
  font-weight: 600 !important;
}

/* Enhanced Tables */
.table {
  --bs-table-hover-bg: rgba(59, 130, 246, 0.03);
}

.table thead th {
  font-weight: 600;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #6b7280;
  border-bottom: 2px solid #e5e7eb !important;
}

.table tbody tr {
  transition: all 0.2s ease;
}

.table tbody tr:hover {
  background: linear-gradient(90deg, rgba(59, 130, 246, 0.03) 0%, rgba(59, 130, 246, 0.06) 100%) !important;
  transform: scale(1.002);
}

/* Enhanced Buttons */
.btn {
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  border-radius: 8px;
}

.btn-success {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 60%, #1e40af 100%);
  border: none;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.4);
}

.btn-success:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 60%, #1e3a8a 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px -4px rgba(37, 99, 235, 0.5);
}

.btn-outline-success {
  color: #2563eb;
  border-color: #bfdbfe;
}

.btn-outline-success:hover {
  background: #eff6ff;
  color: #1e40af;
  border-color: #93c5fd;
}

/* Enhanced Badges */
.badge {
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 6px;
  letter-spacing: 0.01em;
}

.bg-success {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
}

.bg-primary {
  background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%) !important;
}

/* Live Dot Animation */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  50% {
    transform: scale(1.1);
    box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
  }
}

.live-dot.off {
  background: #9ca3af;
  animation: none;
  box-shadow: none;
}

/* Enhanced Alerts */
.alert {
  border-radius: 10px;
  border: 1px solid;
  font-weight: 500;
}

.alert-success {
  background: linear-gradient(135deg, #dbeafe 0%, #eff6ff 100%);
  border-color: #bfdbfe;
  color: #1e40af;
}

.alert-danger {
  background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
  border-color: #fecaca;
  color: #991b1b;
}

/* Enhanced Forms */
.form-control:focus,
.form-select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.form-label {
  font-weight: 600;
  color: #374151;
  margin-bottom: 0.5rem;
}

/* Enhanced Modal */
.modal-content {
  border-radius: 16px;
  border: none;
  box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.15);
}

.modal-header {
  border-radius: 16px 16px 0 0;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 1.5rem;
}

.modal-title {
  font-weight: 700;
  color: #1e40af;
}

/* Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

[data-counter] {
  animation: countUp 0.6s ease-out;
}

/* Enhanced List Groups */
.list-group-item {
  border-color: #f3f4f6 !important;
  transition: all 0.2s ease;
}

.list-group-item:hover {
  background: #f9fafb !important;
  transform: translateX(4px);
}

.list-group-item-action:hover {
  background: linear-gradient(90deg, #eff6ff 0%, #ffffff 100%) !important;
}

/* Enhanced Status Pills */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.875rem;
}

/* Panel Enhancement */
.panel {
  border-radius: 12px;
  overflow: hidden;
}

.panel .card-header {
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%) !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Feed Line Enhancement */
.feed-line {
  list-style: none;
  padding-left: 1.5rem;
}

.feed-line li {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 1.5rem;
  border-left: 2px solid #e5e7eb;
}

.feed-line li:last-child {
  border-left: 2px solid transparent;
}

.feed-ico {
  position: absolute;
  left: -14px;
  top: 0;
  width: 28px;
  height: 28px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  box-shadow: 0 2px 8px -2px rgba(37, 99, 235, 0.4);
}

/* Reveal Animation */
.reveal {
  animation: revealUp 0.6s cubic-bezier(0.22, 1, 0.36, 1) backwards;
}

.reveal:nth-child(1) { animation-delay: 0.1s; }
.reveal:nth-child(2) { animation-delay: 0.15s; }
.reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal:nth-child(4) { animation-delay: 0.25s; }
.reveal:nth-child(5) { animation-delay: 0.3s; }
.reveal:nth-child(6) { animation-delay: 0.35s; }
.reveal:nth-child(7) { animation-delay: 0.4s; }
.reveal:nth-child(8) { animation-delay: 0.45s; }
.reveal:nth-child(9) { animation-delay: 0.5s; }

@keyframes revealUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Enhanced Progress Bars */
.progress {
  background: #f3f4f6;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #3b82f6 0%, #2563eb 100%);
  transition: width 0.6s ease;
}

/* Smooth Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f3f4f6;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #93c5fd 0%, #60a5fa 100%);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #60a5fa 0%, #3b82f6 100%);
}

/* Loading State */
.loading-shimmer {
  background: linear-gradient(90deg, #f3f4f6 0%, #e5e7eb 50%, #f3f4f6 100%);
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Admin Power Badge */
.admin-power-badge {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  color: #78350f;
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  font-weight: 700;
  font-size: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  box-shadow: 0 2px 8px -2px rgba(245, 158, 11, 0.4);
}

/* Responsive Enhancements */
@media (max-width: 768px) {
  .page-head {
    flex-direction: column;
    align-items: flex-start !important;
  }
  
  .head-actions {
    width: 100%;
    margin-top: 1rem;
  }
  
  .head-actions .btn {
    width: 100%;
  }
  
  .stat-card:hover {
    transform: none;
  }
}
