/* Working on it: the moving bar across the top of the page while a form or a
   background save is on its way, and "Please wait…" on the button pressed. */
.busy-bar { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 2147483000; overflow: hidden; background: rgba(109, 40, 217, .14); pointer-events: none; }
.busy-bar[hidden] { display: none; }
.busy-bar > span { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 0 3px 3px 0; background: linear-gradient(90deg, #8b5cf6, #6d28d9); animation: busy-slide 1.1s ease-in-out infinite; }
@keyframes busy-slide { 0% { left: -40%; width: 30%; } 50% { width: 45%; } 100% { left: 100%; width: 30%; } }

.busy-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: progress; opacity: .9; }
.busy-button[disabled] { cursor: progress; }

form.is-busy input:not([type="hidden"]),
form.is-busy select,
form.is-busy textarea { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  .busy-bar > span { animation-duration: 2.4s; }
}

/* The loading card (owner rule, 22 November 2026; core 2.0.33). While a page
   takes longer than half a second to open, or a form is saving: a white card at
   the top right, where the saved message appears, with a soft lavender and blue
   wash, a purple bar on the left, a spinning ring and a sliding bar. Behind it
   the page has a light blur only, with no dark tint; the card stays sharp.
   busy.js shows the card only when this marker is present. */
:root { --loading-card-ready: 1; }
.loading-veil { position: fixed; inset: 0; z-index: 2147482990; background: transparent; -webkit-backdrop-filter: blur(1px); backdrop-filter: blur(1px); pointer-events: none; }
.loading-card {
  position: fixed; top: 84px; right: 28px; z-index: 2147482995;
  width: 340px; max-width: calc(100vw - 40px);
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 14px 18px 16px; overflow: hidden;
  border: 1px solid #e4dcfb; border-radius: 14px;
  background: radial-gradient(170px 95px at 0% 0%, rgba(237, 233, 254, 0.95), transparent 70%), radial-gradient(170px 95px at 100% 100%, rgba(219, 234, 254, 0.9), transparent 70%), #ffffff;
  box-shadow: inset 4px 0 0 #6d28d9, 0 16px 36px rgba(16, 24, 43, 0.16);
  font-family: inherit; cursor: default;
}
.loading-veil[hidden], .loading-card[hidden] { display: none; }
.loading-ring { width: 28px; height: 28px; flex: none; box-sizing: border-box; border: 3px solid #ede9fe; border-top-color: #6d28d9; border-radius: 50%; animation: loading-spin .8s linear infinite; }
.loading-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }
.loading-heading { font-size: 11.5px; font-weight: 800; color: #10182b; }
.loading-line { font-size: 10.5px; line-height: 1.45; color: #475569; }
.loading-track { position: absolute; left: 16px; right: 14px; bottom: 8px; height: 3px; overflow: hidden; border-radius: 3px; background: rgba(109, 40, 217, 0.12); }
.loading-track > span { position: absolute; top: 0; bottom: 0; left: -40%; width: 40%; border-radius: 3px; background: linear-gradient(90deg, #8b5cf6, #6d28d9); animation: busy-slide 1.1s ease-in-out infinite; }
@keyframes loading-spin { to { transform: rotate(360deg); } }
@media (max-width: 720px) {
  .loading-card { top: 72px; right: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .loading-ring { animation-duration: 1.6s; }
  .loading-track > span { animation-duration: 2.4s; }
}
