/* Thin top progress — no full-screen overlay */
#sfNavProgress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0;
  z-index: 200000;
  pointer-events: none;
  background: linear-gradient(90deg, #f4a137, #ff6b35);
  opacity: 0;
  transition: width .35s ease, opacity .2s ease;
}
#sfNavProgress.is-active {
  opacity: 1;
  width: 72%;
  animation: sfNavPulse 1.1s ease-in-out infinite;
}
#sfNavProgress.is-done {
  opacity: 1;
  width: 100%;
  transition: width .18s ease, opacity .25s ease .1s;
  animation: none;
}
@keyframes sfNavPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .65; }
}

/* Loading popup */
#sfLoadingPop {
  position: fixed;
  inset: 0;
  z-index: 199999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, .18);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s ease, visibility .15s ease;
  pointer-events: none;
}
#sfLoadingPop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  cursor: progress;
}
#sfLoadingPop .sf-lp-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, .18);
  font: 600 14px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1f2937;
  transform: scale(.96);
  transition: transform .15s ease;
}
#sfLoadingPop.is-active .sf-lp-card { transform: scale(1); }
#sfLoadingPop.is-active.is-passive { pointer-events: none; }
#sfLoadingPop .sf-lp-spin {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 3px solid #fde3c2;
  border-top-color: #f4a137;
  animation: sfLpSpin .7s linear infinite;
}
@keyframes sfLpSpin { to { transform: rotate(360deg); } }

/* Keep old id harmless if present */
#appPageLoader { display: none !important; }

button.is-loading, .btn.is-loading {
  pointer-events: none;
  opacity: .85;
}
