/* «ESPERE UN MOMENTO, PROCESANDO…» (Luisito, 03/11/2026). Ver `core/js/procesando.js`.
   En modo nocturno no hace falta nada: `tema.css` le da la vuelta a la página entera, esta ventana incluida. */
.safi-proc { position: fixed; inset: 0; z-index: 2147483000; display: none; }
/* LOS PRIMEROS 3 SEGUNDOS: no se ve nada, pero la página no se puede pulsar (ni el mismo botón otra vez). */
.safi-proc.safi-proc-tapa { display: block; background: transparent; cursor: progress; }
.safi-proc.safi-proc-visible { display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(15, 23, 42, .45); cursor: progress; animation: safi-proc-entra .18s ease-out; }
.safi-proc-caja { width: 100%; max-width: 440px; box-sizing: border-box; background: #fff; color: #1f2937;
  border-radius: 16px; padding: 22px 22px 18px; box-shadow: 0 20px 50px rgba(15, 23, 42, .35); text-align: center;
  font: 15px/1.4 Geist, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; outline: none; cursor: default; }
.safi-proc-ruedita { width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%;
  border: 4px solid #dbe3ee; border-top-color: #1d4b7d; animation: safi-proc-gira .9s linear infinite; }
.safi-proc-fallo .safi-proc-ruedita { animation: none; border-color: #f3c2c2; border-top-color: #b91c1c; }
.safi-proc-tit { margin: 0 0 12px; font-size: 17px; font-weight: 700; color: #0f2a44; }
.safi-proc-fallo .safi-proc-tit { color: #9b1c1c; }
.safi-proc-barra { position: relative; height: 10px; border-radius: 999px; background: #e5e9f0; overflow: hidden; }
.safi-proc-barra > i { display: block; height: 100%; width: 0; background: #1d4b7d; border-radius: 999px;
  transition: width .3s ease; }
/* SIN % CONOCIDO: un trozo que va y viene, para que siempre se vea que se mueve. */
.safi-proc-barra.safi-proc-sinpct > i { position: absolute; width: 35%; animation: safi-proc-va 1.3s ease-in-out infinite; }
.safi-proc-fallo .safi-proc-barra { display: none; }
.safi-proc-linea { display: flex; justify-content: space-between; margin: 6px 0 0; font-size: 13px; color: #5d6a7c;
  font-variant-numeric: tabular-nums; }
.safi-proc-pct { font-weight: 700; color: #1d4b7d; }
.safi-proc-paso { margin: 8px 0 0; min-height: 1.2em; font-size: 13px; color: #5d6a7c; overflow-wrap: anywhere; }
.safi-proc-error { margin: 4px 0 0; padding: 10px 12px; border-radius: 10px; background: #fdecec; color: #9b1c1c;
  text-align: left; font-size: 14px; }
.safi-proc-error[hidden], .safi-proc-pie[hidden], .safi-proc-pie button[hidden] { display: none; }
.safi-proc-pie { display: flex; gap: 8px; justify-content: center; margin: 14px 0 0; }
.safi-proc-pie button { font: inherit; font-weight: 600; border-radius: 10px; padding: 9px 20px; cursor: pointer;
  border: 1px solid #1d4b7d; background: #1d4b7d; color: #fff; }
.safi-proc-pie .safi-proc-cancelar { background: #fff; color: #1d4b7d; }
.safi-proc-pie button:disabled { opacity: .5; cursor: default; }
/* EN NOCTURNO la página se invierte entera: un velo CLARO aquí sale oscuro en pantalla (y oscurece lo de detrás). */
html[data-tema="oscuro"] .safi-proc.safi-proc-visible { background: rgba(235, 240, 248, .5); }
html.safi-proc-ocupado, html.safi-proc-ocupado body { cursor: progress; }
@keyframes safi-proc-gira { to { transform: rotate(360deg); } }
@keyframes safi-proc-va { 0% { left: -35%; } 100% { left: 100%; } }
@keyframes safi-proc-entra { from { opacity: 0; } to { opacity: 1; } }
@media (max-width: 480px) { .safi-proc-caja { padding: 18px 16px 14px; } .safi-proc-tit { font-size: 16px; } }
@media (prefers-reduced-motion: reduce) {
  .safi-proc-ruedita { animation-duration: 2.5s; }
  .safi-proc-barra.safi-proc-sinpct > i { animation-duration: 3s; }
}
