/* Page loader for the public website — the same look as the Command Center and portal:
   a thin progress bar across the top, and (only when a page is slow) the R-Code mark in a badge with a spinning ring. */

/* The old full-screen dark preloader is replaced by this */
.preloader { display: none !important; }

.rl { --rl-primary: #4D44C5; --rl-primary-2: #8C85EC; --rl-card: #fff; --rl-veil: rgba(247, 247, 251, .55);
  position: fixed; inset: 0; z-index: 2147483000; pointer-events: none; visibility: hidden; }
.rl.is-active { visibility: visible; }
.rl__bar { position: absolute; top: 0; left: 0; height: 3px; width: 100%; overflow: hidden; opacity: 0; transition: opacity .2s; }
.rl.is-active .rl__bar { opacity: 1; }
.rl__bar::before { content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 0 3px 3px 0;
  background: linear-gradient(90deg, rgba(77, 68, 197, 0), var(--rl-primary) 40%, var(--rl-primary-2)); box-shadow: 0 0 10px var(--rl-primary); animation: rl-bar 1.1s ease-in-out infinite; }
.rl.is-done .rl__bar::before { left: 0; width: 100%; animation: none; transition: width .25s; }
@keyframes rl-bar { 0% { left: -40%; } 100% { left: 100%; } }

.rl__veil { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .2s ease;
  background: var(--rl-veil); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.rl.is-slow .rl__veil { opacity: 1; pointer-events: auto; cursor: progress; }
.rl.is-done .rl__veil { opacity: 0; }
.rl__badge { position: relative; display: flex; align-items: center; justify-content: center; width: 96px; height: 96px;
  background: var(--rl-card); border-radius: 28px; box-shadow: 0 24px 50px -18px rgba(20, 20, 43, .45); transform: scale(.92); transition: transform .25s ease; }
.rl.is-slow .rl__badge { transform: scale(1); }
.rl__ring { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); animation: rl-spin 1s linear infinite; }
.rl__ring circle { fill: none; stroke: var(--rl-primary); stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 60 120; }
.rl__logo { width: 40px; height: auto; animation: rl-pulse 1.4s ease-in-out infinite; }
@keyframes rl-spin { to { transform: rotate(360deg); } }
@keyframes rl-pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.88); opacity: .75; } }
@media (prefers-reduced-motion: reduce) {
  .rl__bar::before { animation: none; left: 0; width: 100%; opacity: .7; }
  .rl__ring, .rl__logo { animation: none; }
}
html[aria-busy="true"] body { cursor: progress; }
@media print { .rl { display: none !important; } }
