/* ============================================
   SKELETON LOADERS - Progressive Loading UI
   ============================================ */

.skeleton {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Skeleton variants */
.skeleton-text {
  height: 16px;
  margin: 8px 0;
  border-radius: 4px;
}

.skeleton-text-lg {
  height: 24px;
  margin: 12px 0;
  border-radius: 6px;
}

.skeleton-card {
  height: 120px;
  border-radius: 12px;
  margin: 12px 0;
}

.skeleton-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.skeleton-kpi {
  height: 100px;
  border-radius: 12px;
}

/* Show skeletons while loading */
.dashboard-loading .kpi-value,
.dashboard-loading .kpi-trend {
  opacity: 0;
}

.dashboard-loading .kpi-value::before {
  content: '';
  display: block;
  width: 60px;
  height: 32px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* List item skeletons */
.skeleton-list-item {
  height: 60px;
  margin: 8px 0;
  border-radius: 8px;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* Hide when loaded */
.loaded .skeleton {
  display: none !important;
}
