/* Page states: loading (skeleton in the real layout, a hidden status line),
   empty (harmless may be light; a problem is plain, with a warning glyph),
   load error with Retry, permission denied, not found, offline, stale
   (numbers dimmed to 75% and still readable), first run.
   Each template reserves the same regions in every state so nothing jumps. */

.pr-skel {
  display: block;
  height: 14px;
  border-radius: var(--pr-radius-sm);
  background: var(--pr-surface-nested);
  animation: pr-pulse var(--pr-dur-skeleton) ease-in-out infinite;
}
@keyframes pr-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
.pr-skel--line { width: 100%; }
.pr-skel--short { width: 60px; flex: none; }
.pr-skel-list { display: grid; gap: 10px; }
.pr-skel-list__row { display: flex; align-items: center; gap: var(--pr-space-sm); }
.pr-skel-list__row > .pr-skel:first-child { flex: 0 1 auto; }
.pr-skel-list__row:nth-child(4n + 1) > .pr-skel:first-child { width: 40%; }
.pr-skel-list__row:nth-child(4n + 2) > .pr-skel:first-child { width: 55%; }
.pr-skel-list__row:nth-child(4n + 3) > .pr-skel:first-child { width: 35%; }
.pr-skel-list__row:nth-child(4n + 4) > .pr-skel:first-child { width: 48%; }
.pr-skel-list__row > .pr-grow { flex: 1; }

.pr-empty {
  display: grid; justify-items: center; gap: var(--pr-space-sm);
  padding: var(--pr-space-3xl) var(--pr-space-xl);
  text-align: center;
  font-size: 0.85rem; line-height: 1.45;
  color: var(--pr-text-secondary);
}
.pr-empty__g { display: inline-grid; color: var(--pr-text-secondary); }
.pr-empty__g .pr-ico { width: 24px; height: 24px; }
.pr-empty--problem .pr-empty__g { color: var(--pr-warning-text); }
.pr-empty--error .pr-empty__g { color: var(--pr-danger-text); }
.pr-empty__t { font-size: 1.125rem; line-height: 1.35; font-weight: 600; color: var(--pr-text-primary); }
.pr-empty__b { max-width: 380px; }
.pr-empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--pr-space-sm); margin-top: var(--pr-space-xs); }
.pr-empty--compact { padding: var(--pr-space-sm); }

/* State region inside a card keeps the card's height steady */
.pr-state { min-height: 190px; display: grid; align-content: center; }

/* Stale: content dims to 75% but stays readable */
.pr-stale { opacity: 0.75; }

@media (max-width: 768px) {
  .pr-empty { padding: var(--pr-space-2xl) var(--pr-space-lg); }
  .pr-empty__actions { width: 100%; flex-direction: column; }
  .pr-empty__actions > .pr-btn { width: 100%; }
}
