.monitor-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px;
  min-width: 0;
}

.monitor-summary article {
  min-width: 0;
  border: 1px solid #dfe4eb;
  border-radius: 10px;
  padding: 10px;
}

.monitor-summary article span {
  display: block;
  color: #687487;
  font-size: 12px;
}

.monitor-summary article strong {
  display: block;
  margin-top: 3px;
  font-size: clamp(17px, 1.5vw, 23px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.monitor-summary .good strong { color: #07834d; }
.monitor-summary .warning strong { color: #9a6500; }
.monitor-summary .bad strong,
.bad-text { color: #b52d2d; }

.monitor-summary-note { margin: 0; color: #687487; font-size: 13px; }

.agent-monitor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 10px;
}

.agent-monitor-card {
  border: 1px solid #dfe4eb;
  border-left: 5px solid #c23636;
  border-radius: 10px;
  padding: 11px;
}

.agent-monitor-card.online { border-left-color: #07834d; }

.agent-monitor-card > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.agent-monitor-card small {
  display: block;
  margin-top: 5px;
  color: #687487;
}

.agent-monitor-card ul {
  margin: 9px 0 0;
  padding-left: 20px;
  font-size: 13px;
}

.monitor-jobs-wrap {
  max-height: 48vh;
}

.monitor-page {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 86px);
  padding: 8px 4px 0;
}

body.print-control-mode { min-width: 0; }

body.print-control-mode main { min-width: 0; }

.monitor-page[hidden] {
  display: none;
}

.monitor-page-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: calc(100vh - 104px);
  padding: 18px;
  border: 1px solid #dfe4eb;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 18px #1822370b;
}

.monitor-page-content > .dialog-title,
.monitor-page-content h3 {
  margin: 0;
}

.monitor-page-content > section { min-width: 0; max-width: 100%; }

.monitor-page-content section > .dialog-title { flex-wrap: wrap; }

.monitor-page-content section > .dialog-title .row-actions { flex-wrap: wrap; }

.monitor-page .agent-monitor-grid {
  grid-template-columns: minmax(0, 1fr);
}

.monitor-page .agent-monitor-card {
  width: 100%;
}

.monitor-page .monitor-jobs-wrap {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 510px);
  min-height: 220px;
  overflow: auto;
}

.monitor-page .monitor-pagination {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #f7f9fc;
}

.monitor-page #monitorPageSize { flex: 0 0 90px; width: 90px; }

.monitor-page .monitor-jobs-wrap table { min-width: 1150px; }

.monitor-page .monitor-pagination .pagination-label {
  color: #58677c;
  font-size: 13px;
  font-weight: 700;
}

.monitor-stale {
  background: #fff8e7;
}

.monitor-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.monitor-tabs button.active {
  color: #fff;
  background: #2563eb;
  border-color: #2563eb;
}

.monitor-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.monitor-filters select { min-width: 0; }

@media (max-width: 900px) {
  .monitor-summary {
    grid-template-columns: repeat(2, 1fr);
  }
}

.button-link {
  border-radius: 9px;
  background: #e9eef7;
  color: #253550;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  text-decoration: none;
}

.pill.success {
  border-color: #72d7aa;
  background: #dcf8e9;
  color: #08633d;
}

.status.MATCHED {
  background: #dcf8e9;
  color: #08633d;
}

.status.AMBIGUOUS {
  background: #fff2cf;
  color: #7b5200;
}

.status.UNMATCHED {
  background: #fee7e7;
  color: #9e2525;
}
