/* Visual state for grid cell writes (grid-manager.js saveCell/toggleCheckbox):
   'saving' while a PATCH is in flight, 'save-failed' when it errored/timed out
   and is queued for retry. The user's value stays visible in both cases — no
   silent revert on a transient failure (2026-09-09 incident, block 74e804e3). */

.grid-container td.cell-saving {
  position: relative;
  box-shadow: inset 0 0 0 1px #0d6efd;
}

.grid-container td.cell-saving::after {
  content: '';
  position: absolute;
  top: 2px;
  right: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0d6efd;
  animation: grid-cell-saving-pulse 1s infinite;
}

@keyframes grid-cell-saving-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.grid-container td.cell-save-failed {
  position: relative;
  box-shadow: inset 0 0 0 1px #dc3545;
  background-color: rgba(220, 53, 69, 0.08);
}

.grid-container td .cell-retry-btn {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  line-height: 14px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: #dc3545;
  color: #fff;
  font-size: 11px;
  cursor: pointer;
}

.grid-container td .cell-retry-btn:hover {
  background: #b02a37;
}
