/* UI kit · chips, waffle and data states. */
/* Chips: one state, one colour, everywhere. */
.kit-chip {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  padding: 2px 9px 2px 7px;
  border-radius: 999px;
  background: var(--neutral-soft);
  color: var(--neutral);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.kit-chip[data-state='abierta'] {
  background: var(--info-soft);
  color: var(--info);
}
.kit-chip[data-state='en-curso'],
.kit-chip[data-state='espera'],
.kit-chip[data-state='alerta'] {
  background: var(--warn-soft);
  color: var(--warn);
}
.kit-chip[data-state='cerrada'],
.kit-chip[data-state='normal'] {
  background: var(--ok-soft);
  color: var(--ok);
}
.kit-chip[data-state='vencida'],
.kit-chip[data-state='critico'] {
  background: var(--bad-soft);
  color: var(--bad);
}

/* Waffle: 10 × 10, each square 1 %. */
.kit-waffle {
  display: grid;
  gap: 8px;
  justify-items: start;
  margin: 0;
}
.kit-waffle div {
  display: grid;
  grid-template-columns: repeat(10, 12px);
  gap: 2px;
}
.kit-waffle i {
  width: 12px;
  height: 12px;
  border-radius: 2px;
  background: var(--surface-sunk, #e3e8eb);
}
.kit-waffle i.on {
  background: var(--accent);
}
.kit-waffle figcaption {
  color: var(--hud-muted);
}
.kit-waffle figcaption b {
  color: var(--hud-text);
  font-size: 17px;
}

/* Data states: skeleton, empty, error, stale. */
.kit-skeleton {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 13px;
}
.kit-skeleton i {
  height: 14px;
  border-radius: 7px;
  background: linear-gradient(
      90deg,
      var(--surface-sunk, #e3e8eb) 30%,
      rgb(255 255 255 / 0.7) 50%,
      var(--surface-sunk, #e3e8eb) 70%
    )
    0 0 / 300% 100%;
  animation: kit-shimmer 1.4s linear infinite;
}
.kit-skeleton i:nth-child(2) {
  width: 70%;
}
.kit-skeleton i:nth-child(3) {
  width: 45%;
}
@keyframes kit-shimmer {
  to {
    background-position: -300% 0;
  }
}
.kit-state {
  margin: 0;
  padding: 13px;
  border-radius: 10px;
  color: var(--hud-muted);
}
.kit-state.is-error {
  background: var(--bad-soft);
  color: var(--bad);
}
.is-stale {
  color: var(--hud-muted);
}
.is-stale small {
  display: block;
  font-size: 11px;
}
@media (prefers-reduced-motion: reduce) {
  .kit-skeleton i {
    animation: none;
  }
}

/* Pager under a bounded list. */
.kit-pager {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-end;
  margin-top: 13px;
}
.kit-pager span {
  margin-right: auto;
  color: var(--hud-muted);
  font-variant-numeric: tabular-nums;
}
.kit-pager button {
  min-width: 34px;
  height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: var(--surface, #fff);
  box-shadow: var(--raised, 0 1px 2px rgb(0 0 0 / 0.12));
  color: var(--hud-text);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}
.kit-pager button[aria-current='page'] {
  box-shadow: var(--inset, inset 0 1px 3px rgb(0 0 0 / 0.2));
  color: var(--accent-strong, #7a4a00);
}
.kit-pager button:disabled {
  opacity: 0.4;
  cursor: default;
}
.kit-pager i {
  color: var(--hud-muted);
}
