.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--dark-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.spinner-sm { width: 20px; height: 20px; border-width: 2px; }
.spinner-lg { width: 48px; height: 48px; border-width: 4px; }

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

.skeleton {
  background: linear-gradient(90deg, var(--dark-200) 25%, var(--dark-100) 50%, var(--dark-200) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  display: inline-block;
}

.skeleton-light {
  background: linear-gradient(90deg, rgba(255,255,255,0.1) 25%, rgba(255,255,255,0.3) 50%, rgba(255,255,255,0.1) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 6px;
  display: inline-block;
}

.skeleton-title { width: 140px; height: 24px; }
.skeleton-text { width: 100%; height: 16px; margin-bottom: 8px; }
.skeleton-text-sm { width: 60%; height: 14px; }

.skeleton-card {
  background: #fff;
  border-radius: 20px;
  padding: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.skeleton-tile {
  background: #fff;
  border-radius: 20px;
  padding: 28px 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.skeleton-icon { width: 48px; height: 48px; border-radius: 12px; }
.skeleton-value { width: 60px; height: 28px; }
.skeleton-label { width: 80px; height: 12px; }
.skeleton-strip { width: 100%; height: 80px; border-radius: 20px; }
.skeleton-progress { width: 100%; height: 8px; border-radius: 4px; margin-top: 8px; }

.loading-overlay {
  position: fixed;
  top: 68px;
  right: 0;
  bottom: 0;
  left: 280px;
  background: rgba(241, 245, 249, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

@media (max-width: 1023px) {
  .loading-overlay { left: 0; }
}

.loading-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.skeleton-row td {
  padding: 14px 16px !important;
}

.skeleton-row .skeleton {
  height: 14px;
  border-radius: 4px;
  vertical-align: middle;
}

.skeleton-module {
  pointer-events: none;
}
