.cluster-container {
  padding: 16px;
}

// ── Header ────────────────────────────────────────────────────────────────

.cluster-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  color: #212121;
}

// ── Node grid ─────────────────────────────────────────────────────────────

.nodes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.node-card {
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  padding: 16px;
  cursor: pointer;
  background: #fff;
  transition: box-shadow 0.2s ease;

  &:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }

  &.active {
    border-left: 4px solid #2e7d32;
  }

  &.stale {
    border-left: 4px solid #c62828;
    background: #fff8f8;
  }
}

// ── Node card internals ───────────────────────────────────────────────────

.node-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.state-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;

  &.active { background: #4caf50; }
  &.stale  { background: #f44336; }
}

.node-name {
  font-weight: 600;
  font-size: 14px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-state-label {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;

  &.active { background: #e8f5e9; color: #2e7d32; }
  &.stale  { background: #ffebee; color: #c62828; }
}

.node-body {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.node-stat {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.stat-label {
  color: #888;
}

.stat-value {
  font-weight: 500;

  &.has-jobs {
    color: #1976d2;
    font-weight: 700;
  }
}

.node-footer {
  font-size: 11px;
  color: #bbb;
  text-align: right;
  min-height: 20px;
}

.selected-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #2e7d32;
  font-weight: 600;
  font-size: 11px;
}

.check-icon {
  font-size: 14px;
  width: 14px;
  height: 14px;
  line-height: 14px;
  vertical-align: middle;
}

// ── Comparison bar ────────────────────────────────────────────────────────

.comparison-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding: 12px 16px;
  background: #e3f2fd;
  border: 1px solid #90caf9;
  border-radius: 8px;
  font-size: 13px;
  color: #1565c0;

  mat-icon {
    font-size: 18px;
    width: 18px;
    height: 18px;
  }
}

.node-chip {
  background: #fff;
  border: 1px solid #90caf9;
  border-radius: 12px;
  padding: 2px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #1565c0;
}

// ── Empty / access denied ─────────────────────────────────────────────────

.empty-state {
  text-align: center;
  color: #9e9e9e;
  padding: 48px;
  font-size: 14px;
}

.access-denied {
  text-align: center;
  padding: 64px;
  color: #9e9e9e;

  mat-icon {
    font-size: 48px;
    width: 48px;
    height: 48px;
  }
}
