/* Wepesi site-wide skeleton loaders */
:root {
  --sk-base: #e8eef5;
  --sk-shine: #f7fafc;
  --sk-radius: 10px;
}

@keyframes wepesi-sk-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.sk {
  display: block;
  background: linear-gradient(90deg, var(--sk-base) 25%, var(--sk-shine) 37%, var(--sk-base) 63%);
  background-size: 400% 100%;
  animation: wepesi-sk-shimmer 1.25s ease-in-out infinite;
  border-radius: var(--sk-radius);
  color: transparent !important;
  pointer-events: none;
  user-select: none;
}

.sk-line { height: 12px; width: 100%; margin: 0.35rem 0; }
.sk-line.sm { height: 8px; width: 55%; }
.sk-line.md { height: 12px; width: 75%; }
.sk-line.lg { height: 16px; width: 90%; }
.sk-title { height: 22px; width: 42%; margin-bottom: 0.85rem; border-radius: 8px; }
.sk-avatar { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; }
.sk-thumb { width: 64px; height: 64px; border-radius: 12px; flex-shrink: 0; }
.sk-btn { height: 36px; width: 96px; border-radius: 999px; display: inline-block; }
.sk-chip { height: 22px; width: 72px; border-radius: 999px; display: inline-block; }

.sk-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 1rem;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
}

.sk-row {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.sk-col { flex: 1; min-width: 0; }

.sk-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.sk-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.55rem;
}
.sk-table td { padding: 0.15rem 0.35rem; vertical-align: middle; }
.sk-table .sk-line { margin: 0; }

.sk-page {
  padding: 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.sk-page-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
  align-items: center;
}
.sk-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.25rem;
}
@media (max-width: 768px) {
  .sk-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sk-stat {
  height: 88px;
  border-radius: 14px;
}

/* Top progress + page transition overlay */
#wepesi-sk-progress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 20000;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
  background: transparent;
  overflow: hidden;
}
#wepesi-sk-progress.is-on { opacity: 1; }
#wepesi-sk-progress > span {
  display: block;
  height: 100%;
  width: 35%;
  background: linear-gradient(90deg, #0d9488, #0c2d5c);
  animation: wepesi-sk-progress 1s ease-in-out infinite;
  border-radius: 0 2px 2px 0;
}
@keyframes wepesi-sk-progress {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}

#wepesi-sk-overlay {
  position: fixed;
  inset: 0;
  z-index: 19990;
  background: rgba(248, 250, 252, 0.72);
  backdrop-filter: blur(2px);
  display: none;
  overflow: auto;
  padding: 1rem;
}
#wepesi-sk-overlay.is-on { display: block; }

@media (prefers-reduced-motion: reduce) {
  .sk, #wepesi-sk-progress > span { animation: none !important; }
}
