// Enhanced Dashboard Styles
.dashboard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 40px;
  
  .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
  }
  
  .loading-text {
    text-align: center;
    
    h3 {
      color: #333;
      margin-bottom: 10px;
      font-size: 18px;
    }
    
    p {
      color: #666;
      font-size: 14px;
      margin: 0;
    }
  }
}

.dashboard-error {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  padding: 40px;
  
  .error-content {
    text-align: center;
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 30px;
    max-width: 500px;
    
    h3 {
      color: #e53e3e;
      margin-bottom: 15px;
      font-size: 18px;
    }
    
    p {
      color: #666;
      font-size: 14px;
      margin: 0;
      line-height: 1.5;
    }
  }
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

// Data refresh indicator
.data-refresh-indicator {
  position: fixed;
  top: 20px;
  right: 20px;
  background: #007cba;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 1000;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  
  &.visible {
    opacity: 1;
    transform: translateY(0);
  }
  
  .refresh-icon {
    animation: spin 1s linear infinite;
    margin-right: 8px;
  }
}

// Enhanced widget loading states
.widget-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  opacity: 0.7;
  
  .loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007cba;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
  }
}

// Context provider wrapper
.dashboard-data-provider {
  position: relative;
  
  &.loading {
    pointer-events: none;
    
    &::after {
      content: '';
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(255, 255, 255, 0.8);
      z-index: 999;
    }
  }
}