.operations-page .capture-health-panel {
  margin-top: 24px;
  padding: 26px;
  animation: dashboard-rise 580ms cubic-bezier(0.2, 0.75, 0.25, 1) 245ms both;
}

.operations-page .capture-health-heading-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.operations-page .capture-health-summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.operations-page .capture-health-updated {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  text-align: right;
}

.operations-page .capture-health-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding-top: 18px;
}

.operations-page .capture-health-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(32, 68, 116, 0.045);
  padding: 18px;
}

.operations-page .capture-health-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #a9bad0;
}

.operations-page .capture-health-card.is-healthy::before { background: linear-gradient(90deg, var(--green), #62d3bd); }
.operations-page .capture-health-card.is-warning::before { background: linear-gradient(90deg, #eea72c, #f4ca73); }
.operations-page .capture-health-card.is-critical::before { background: linear-gradient(90deg, var(--red), #f18aa1); }

.operations-page .capture-health-card-top,
.operations-page .capture-source-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operations-page .capture-health-identity { min-width: 0; }
.operations-page .capture-health-identity h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-page .capture-health-identity p { margin: 3px 0 0; overflow: hidden; color: var(--muted); font-size: 0.72rem; text-overflow: ellipsis; white-space: nowrap; }

.operations-page .capture-health-severity,
.operations-page .capture-source-badge {
  flex: 0 0 auto;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: #f4f7fb;
  color: var(--muted);
  padding: 6px 9px;
  font-size: 0.65rem;
  font-weight: 800;
}

.operations-page .is-healthy > .capture-health-card-top .capture-health-severity { border-color: #bcece1; background: var(--green-soft); color: #087e69; }
.operations-page .is-warning > .capture-health-card-top .capture-health-severity { border-color: #f0d5a8; background: var(--amber-soft); color: #9a6410; }
.operations-page .is-critical > .capture-health-card-top .capture-health-severity { border-color: #f2c4ce; background: var(--red-soft); color: #b13c5c; }

.operations-page .capture-health-sources {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 15px;
}

.operations-page .capture-source {
  min-width: 0;
  border: 1px solid #cfe2f5;
  border-radius: 13px;
  background: linear-gradient(135deg, #f3f9ff, #f8fcfb);
  padding: 11px;
}

.operations-page .capture-source.is-disabled { border-color: var(--line); background: #f5f7fa; }
.operations-page .capture-source.is-offline,
.operations-page .capture-source.is-disconnected,
.operations-page .capture-source.is-error,
.operations-page .capture-source.is-failed { border-color: #f2c4ce; background: var(--red-soft); }
.operations-page .capture-source.is-retrying,
.operations-page .capture-source.is-degraded,
.operations-page .capture-source.is-warning { border-color: #f0d5a8; background: var(--amber-soft); }

.operations-page .capture-source-icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: #dcefff;
  color: var(--teal-dark);
  font-size: 0.59rem;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.operations-page .capture-source-copy { min-width: 0; margin-right: auto; }
.operations-page .capture-source-copy strong,
.operations-page .capture-source-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-page .capture-source-copy strong { color: var(--ink); font-size: 0.75rem; }
.operations-page .capture-source-copy small { margin-top: 3px; color: var(--muted); font-size: 0.62rem; }
.operations-page .capture-source-badge { padding: 5px 7px; font-size: 0.57rem; }

.operations-page .capture-health-facts {
  display: grid;
  grid-template-columns: minmax(150px, 1.55fr) repeat(3, minmax(74px, 0.62fr));
  gap: 8px;
  margin-top: 10px;
}

.operations-page .capture-health-fact {
  min-width: 0;
  border-radius: 11px;
  background: #f5f8fc;
  padding: 9px 10px;
}

.operations-page .capture-health-fact span,
.operations-page .capture-health-fact strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operations-page .capture-health-fact span { color: var(--muted); font-size: 0.59rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.operations-page .capture-health-fact strong { margin-top: 4px; color: var(--ink); font-size: 0.73rem; }
.operations-page .capture-health-fact.is-warning { background: var(--amber-soft); }
.operations-page .capture-health-fact.is-critical { background: var(--red-soft); }

.operations-page .capture-gap-note { margin: 10px 0 0; border-radius: 10px; background: var(--amber-soft); color: #80530d; padding: 9px 11px; font-size: 0.7rem; }

.operations-page .capture-health-state {
  grid-column: 1 / -1;
  display: grid;
  justify-items: center;
  min-height: 180px;
  place-content: center;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  background: #f8faff;
  padding: 28px;
  text-align: center;
}

.operations-page .capture-health-state-icon { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 13px; background: #e4effc; color: var(--blue); font-weight: 900; }
.operations-page .capture-health-state strong { margin-top: 10px; color: var(--ink); }
.operations-page .capture-health-state p { max-width: 460px; margin: 5px 0 0; color: var(--muted); font-size: 0.76rem; }
.operations-page .capture-health-state button { margin-top: 14px; }
.operations-page .capture-health-state.is-error .capture-health-state-icon { background: var(--red-soft); color: var(--red); }

@media (max-width: 1120px) {
  .operations-page .capture-health-list { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .operations-page .capture-health-panel { padding: 21px; }
  .operations-page .capture-health-heading-actions { width: 100%; justify-content: space-between; }
  .operations-page .capture-health-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .operations-page .capture-health-panel .panel-heading { align-items: stretch; }
  .operations-page .capture-health-heading-actions { align-items: stretch; flex-direction: column; }
  .operations-page .capture-health-summary,
  .operations-page .capture-health-updated { text-align: left; }
  .operations-page .capture-health-heading-actions .secondary-button { width: 100%; }
  .operations-page .capture-health-sources { grid-template-columns: 1fr; }
  .operations-page .capture-health-card-top { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .operations-page .capture-health-panel { animation: none !important; }
}
