* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8f9fa;
  color: #202124;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.app-loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.3s ease-out;
}

.app-loader.fade-out {
  opacity: 0;
  pointer-events: none;
}

.loader-content {
  text-align: center;
  padding: 20px;
}

.loader-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  background: white;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0,0,0,0.1);
  animation: pulse 2s ease-in-out infinite;
}

.loader-logo svg {
  width: 48px;
  height: 48px;
  fill: #667eea;
}

.loader-title {
  color: white;
  font-size: 24px;
  font-weight: 500;
  margin-bottom: 8px;
  font-family: 'Google Sans', 'Roboto', sans-serif;
}

.loader-subtitle {
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  margin-bottom: 32px;
}

.loader-spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto;
  border: 3px solid rgba(255,255,255,0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loader-progress {
  width: 200px;
  height: 4px;
  background: rgba(255,255,255,0.3);
  border-radius: 2px;
  margin: 24px auto 0;
  overflow: hidden;
}

.loader-progress-bar {
  height: 100%;
  background: white;
  border-radius: 2px;
  animation: progress 2s ease-in-out infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

@keyframes progress {
  0% { width: 0%; margin-left: 0; }
  50% { width: 60%; margin-left: 0; }
  100% { width: 100%; margin-left: 100%; }
}

app-root.app-loaded ~ .app-loader {
  display: none;
}

.skeleton-container {
  display: none;
  height: 100vh;
  background: #fff;
}

app-root:empty + .skeleton-container {
  display: block;
}

.skeleton-header {
  height: 64px;
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  padding: 0 24px;
}

.skeleton-sidebar {
  width: 256px;
  height: calc(100vh - 64px);
  background: #f8f9fa;
  border-right: 1px solid #e0e0e0;
  position: fixed;
  top: 64px;
  left: 0;
  padding: 24px 16px;
}

.skeleton-content {
  margin-left: 256px;
  padding: 24px;
  min-height: calc(100vh - 64px);
}

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

.skeleton-title {
  height: 32px;
  width: 200px;
}

.skeleton-title--wide {
  height: 32px;
  width: 300px;
  margin-bottom: 24px;
}

.skeleton-text {
  height: 16px;
  width: 100%;
  max-width: 400px;
}

.skeleton-nav-item {
  height: 36px;
  width: 100%;
  margin-bottom: 8px;
}

.skeleton-card {
  height: 120px;
  width: 100%;
  margin-bottom: 16px;
  border-radius: 8px;
}

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

@media (max-width: 768px) {
  .skeleton-sidebar {
    display: none;
  }

  .skeleton-content {
    margin-left: 0;
  }

  .loader-title {
    font-size: 20px;
  }
}
