/* Batch 154 — Scanner monitor loading + pool state UI fix */
:root {
  --batch154-panel-bg: rgba(255, 255, 255, 0.035);
  --batch154-panel-border: rgba(255, 255, 255, 0.12);
  --batch154-muted: rgba(255, 255, 255, 0.62);
}

.batch154-monitored-panel {
  position: relative !important;
  min-width: 0 !important;
  width: 100% !important;
}

.batch154-monitor-grid-fix,
.batch154-monitor-grid-fix > *,
.batch154-monitored-panel > * {
  min-width: 0 !important;
}

.batch154-monitor-grid-fix {
  width: 100% !important;
  max-width: none !important;
}

.batch154-monitor-grid-fix:is(.grid, [class*="grid"], [class*="cards"], [class*="candidate"], [class*="monitor"]) {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)) !important;
  align-items: stretch !important;
}

.batch154-context-loading .batch154-monitored-panel {
  min-height: 132px !important;
}

.batch154-monitor-loading {
  display: none;
  position: absolute;
  inset: 0;
  z-index: 20;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border-radius: 14px;
  border: 1px solid var(--batch154-panel-border);
  background: color-mix(in srgb, #05070b 74%, transparent);
  backdrop-filter: blur(2px);
  color: var(--batch154-muted);
  font-size: 13px;
  pointer-events: none;
}

.batch154-context-loading .batch154-monitored-panel .batch154-monitor-loading {
  display: flex;
}

.batch154-monitor-spinner {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.82);
  animation: batch154-spin .8s linear infinite;
}

@keyframes batch154-spin { to { transform: rotate(360deg); } }

.batch154-context-busy-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--batch154-panel-border);
  background: var(--batch154-panel-bg);
  color: var(--batch154-muted);
  font-size: 12px;
  line-height: 1.2;
  vertical-align: middle;
}

.batch154-pool-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.batch154-pool-state-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
  flex: 0 0 auto;
  background: currentColor;
}

.batch154-pool-state-zero { color: #ff5a66; }
.batch154-pool-state-drain { color: #ffb020; }
.batch154-pool-state-refill { color: #30d158; }
.batch154-pool-state-unstable { color: #bf7cff; }
.batch154-pool-state-stable { color: #c9d1d9; }
.batch154-pool-state-unknown { color: #8b949e; }
