.cfg-grid .cmd-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.top-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.link-btn {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

.defect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.defect-item {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 8px;
  padding: 10px;
}

.defect-item .name {
  font-size: 0.72rem;
  color: #8b949e;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.defect-item .pct {
  font-size: 1.4rem;
  font-weight: 700;
  margin-top: 4px;
}

.defect-item .sub {
  font-size: 0.75rem;
  color: #8b949e;
  margin-top: 2px;
}

.defect-bar {
  height: 6px;
  background: #21262d;
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.defect-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #3fb950, #d29922, #f85149);
  width: 0;
}

.defect-item.warn .pct { color: #d29922; }
.defect-item.alert .pct { color: #f85149; }

.valve-match.ok { color: #3fb950; }
.valve-match.bad { color: #f85149; }

.cfg-inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.btn.danger {
  background: #da3633;
  border: 1px solid #f85149;
  color: #fff;
}

.btn.danger:hover {
  background: #b62324;
}
