/* Animación única de «el listado se está cargando» (ver js/cargaListado.js). La marca es siempre la misma:
   <div class="kcarga" role="status"><span class="kcarga-aviso">Cargando cobros…</span></div>
   El aro, las líneas que imitan las filas y el brillo salen de aquí, así que también sirve escrita en el HTML. */

.kcarga {
  --kcarga-lineas: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100%25' height='170'%3E%3Cg%3E%3Crect x='2%25' y='12' width='5%25' height='11' rx='5'/%3E%3Crect x='10%25' y='12' width='24%25' height='11' rx='5'/%3E%3Crect x='38%25' y='12' width='19%25' height='11' rx='5'/%3E%3Crect x='61%25' y='12' width='14%25' height='11' rx='5'/%3E%3Crect x='83%25' y='12' width='15%25' height='11' rx='5'/%3E%3Crect x='2%25' y='46' width='5%25' height='11' rx='5'/%3E%3Crect x='10%25' y='46' width='19%25' height='11' rx='5'/%3E%3Crect x='38%25' y='46' width='21%25' height='11' rx='5'/%3E%3Crect x='61%25' y='46' width='18%25' height='11' rx='5'/%3E%3Crect x='83%25' y='46' width='11%25' height='11' rx='5'/%3E%3Crect x='2%25' y='80' width='5%25' height='11' rx='5'/%3E%3Crect x='10%25' y='80' width='26%25' height='11' rx='5'/%3E%3Crect x='38%25' y='80' width='15%25' height='11' rx='5'/%3E%3Crect x='61%25' y='80' width='12%25' height='11' rx='5'/%3E%3Crect x='83%25' y='80' width='15%25' height='11' rx='5'/%3E%3Crect x='2%25' y='114' width='5%25' height='11' rx='5'/%3E%3Crect x='10%25' y='114' width='21%25' height='11' rx='5'/%3E%3Crect x='38%25' y='114' width='20%25' height='11' rx='5'/%3E%3Crect x='61%25' y='114' width='17%25' height='11' rx='5'/%3E%3Crect x='83%25' y='114' width='13%25' height='11' rx='5'/%3E%3Crect x='2%25' y='148' width='5%25' height='11' rx='5'/%3E%3Crect x='10%25' y='148' width='23%25' height='11' rx='5'/%3E%3Crect x='38%25' y='148' width='17%25' height='11' rx='5'/%3E%3Crect x='61%25' y='148' width='13%25' height='11' rx='5'/%3E%3Crect x='83%25' y='148' width='15%25' height='11' rx='5'/%3E%3C/g%3E%3Cg fill-opacity='.55'%3E%3Crect x='2%25' y='34' width='96%25' height='1'/%3E%3Crect x='2%25' y='68' width='96%25' height='1'/%3E%3Crect x='2%25' y='102' width='96%25' height='1'/%3E%3Crect x='2%25' y='136' width='96%25' height='1'/%3E%3C/g%3E%3C/svg%3E");
  position: sticky;
  left: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 20px 16px 14px;
  text-align: center;
  white-space: normal;
}

.kcarga-aviso {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 16px;
  border: 1px solid #d5e4fb;
  border-radius: 999px;
  background: #f4f8ff;
  color: #17497f;
  font: 700 13px/1.25 'Segoe UI', system-ui, sans-serif;
  letter-spacing: 0;
  text-transform: none;
}

.kcarga-aviso::before {
  content: '';
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2.5px solid #c9dbfa;
  border-top-color: var(--brand-blue, #1f6feb);
  border-radius: 50%;
  animation: kcarga-giro 0.8s linear infinite;
}

/* Cinco «filas» que se van llenando: dicen que lo que viene es un listado. */
.kcarga::after {
  content: '';
  align-self: stretch;
  height: 170px;
  background: linear-gradient(100deg, #e6eefb 0%, #e6eefb 38%, #b9d1f9 50%, #e6eefb 62%, #e6eefb 100%) 0 0 / 220% 100%;
  -webkit-mask: var(--kcarga-lineas) no-repeat 0 0 / 100% 170px;
  mask: var(--kcarga-lineas) no-repeat 0 0 / 100% 170px;
  animation: kcarga-brillo 1.5s ease-in-out infinite;
}

.kcarga-demora {
  order: 1;
  color: #64748b;
  font: 500 12.5px/1.4 'Segoe UI', system-ui, sans-serif;
}

/* La fila que la contiene no hereda anchos, columnas fijas ni resaltados de cada tabla. */
tr.kcarga-fila,
tr.kcarga-fila:hover {
  background: #fff !important;
  cursor: default;
}

tr.kcarga-fila > td.kcarga-celda {
  position: static !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
  height: auto !important;
  padding: 0 !important;
  border-left: 0 !important;
  background: #fff !important;
  text-align: center !important;
  white-space: normal !important;
}

@keyframes kcarga-giro {
  to { transform: rotate(360deg); }
}

@keyframes kcarga-brillo {
  from { background-position: 110% 0; }
  to { background-position: -10% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .kcarga::after {
    animation: none;
  }

  .kcarga-aviso::before {
    animation-duration: 1.8s;
  }
}
