#admin-link { position: relative; }
.stage-monitoring-badge {
    position: absolute; top: -5px; right: -7px; min-width: 16px; height: 16px;
    padding: 0 4px; border: 2px solid #fff; border-radius: 9px; background: #dc3545;
    color: #fff; font-size: 9px; font-weight: 700; line-height: 12px; text-align: center;
}
.stage-monitoring-layout { display: flex; flex-direction: column; gap: 22px; }
.stage-monitoring-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.stage-monitoring-header-actions { display: flex; align-items: center; gap: 12px; }
.stage-monitoring-header-actions .is-loading { opacity: .6; pointer-events: none; }
.stage-monitoring-metrics { display: grid; grid-template-columns: repeat(6, minmax(120px, 1fr)); border: 1px solid #e5e9ef; border-radius: 6px; overflow: hidden; }
.stage-monitoring-metric { min-width: 0; padding: 14px 16px; border-right: 1px solid #e5e9ef; background: #fff; }
.stage-monitoring-metric:last-child { border-right: 0; }
.stage-monitoring-metric span, .stage-monitoring-metric small { display: block; color: #738094; font-size: 12px; }
.stage-monitoring-metric strong { display: block; margin: 3px 0; color: #243247; font-size: 20px; }
.stage-monitoring-metric.is-warning { box-shadow: inset 0 3px #e8a317; }
.stage-monitoring-metric.is-error { box-shadow: inset 0 3px #dc3545; }
.stage-monitoring-section { border-top: 1px solid #e5e9ef; padding-top: 18px; }
.stage-monitoring-section h6 { margin: 0 0 12px; font-weight: 700; }
.stage-monitoring-services { display: grid; grid-template-columns: repeat(2, minmax(260px, 1fr)); column-gap: 28px; }
.stage-monitoring-service { display: grid; grid-template-columns: 10px minmax(160px, 1fr) auto minmax(120px, auto); align-items: center; gap: 10px; min-height: 38px; border-bottom: 1px solid #eef1f5; font-size: 13px; }
.stage-monitoring-service small { color: #7a8596; text-align: right; }
.stage-monitoring-dot { width: 8px; height: 8px; border-radius: 50%; background: #a3acb9; }
.stage-monitoring-dot.is-ok { background: #198754; }
.stage-monitoring-dot.is-error { background: #dc3545; }
.stage-monitoring-dot.is-disabled { background: #a3acb9; }
.stage-monitoring-issues { display: flex; flex-direction: column; gap: 8px; }
.stage-monitoring-issue { display: flex; justify-content: space-between; gap: 16px; padding: 9px 12px; border-left: 3px solid #e8a317; background: #fff9e8; font-size: 13px; }
.stage-monitoring-issue.is-error { border-color: #dc3545; background: #fff1f2; }
.stage-monitoring-issue span { color: #667085; text-align: right; }
.stage-monitoring-db-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.stage-monitoring-table-wrap { overflow: auto; border: 1px solid #e5e9ef; border-radius: 6px; max-height: 280px; }
.stage-monitoring-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.stage-monitoring-table th { position: sticky; top: 0; z-index: 1; padding: 8px 10px; background: #f6f8fa; color: #667085; font-weight: 600; text-align: left; white-space: nowrap; }
.stage-monitoring-table td { padding: 8px 10px; border-top: 1px solid #edf0f3; vertical-align: top; }
.stage-monitoring-query { max-width: 380px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: ui-monospace, Consolas, monospace; }
.stage-monitoring-empty { padding: 14px; color: #7a8596; text-align: center; }
.stage-monitoring-empty.is-ok { color: #198754; background: #eef9f3; border-left: 3px solid #198754; text-align: left; }
.stage-monitoring-empty.is-error { color: #b42318; background: #fff1f2; border-left: 3px solid #dc3545; text-align: left; }
.stage-monitoring-http-status { display: inline-block; min-width: 34px; padding: 1px 5px; border-radius: 4px; text-align: center; }
.stage-monitoring-http-status.is-warning { background: #fff2cc; color: #8a5b00; }
.stage-monitoring-http-status.is-error { background: #ffe2e5; color: #b42318; }
.stage-monitoring-http-status.is-success { background: #dcf5e7; color: #137a45; }
.stage-monitoring-http-status.is-info { background: #e8f1ff; color: #245ea8; }
.stage-monitoring-table tr.is-realtime-missed td { background: #fff4f5; }
.stage-monitoring-table tr.is-realtime-recovered td { background: #f1fbf5; }
.stage-monitoring-table tr.is-realtime-catchup td { background: #f4f8ff; }
.stage-monitoring-table tr.is-automatic-check td { color: #7a8596; background: #fafbfc; }
.stage-monitoring-auto-badge { display: inline-block; margin-left: 7px; padding: 1px 5px; border: 1px solid #d9dee6; border-radius: 4px; background: #f2f4f7; color: #667085; font-size: 10px; white-space: nowrap; }
.stage-monitoring-http-tools { display: flex; align-items: center; gap: 16px; }
.stage-monitoring-auto-toggle { display: inline-flex; align-items: center; gap: 6px; color: #667085; font-size: 12px; white-space: nowrap; cursor: pointer; }
.stage-monitoring-auto-toggle input { margin: 0; }
.stage-monitoring-detail-button { white-space: nowrap; }
.stage-monitoring-detail-row { display: grid; grid-template-columns: 145px minmax(0, 1fr); gap: 16px; padding: 9px 0; border-bottom: 1px solid #edf0f3; font-size: 13px; }
.stage-monitoring-detail-row:last-child { border-bottom: 0; }
.stage-monitoring-detail-row span { color: #738094; }
.stage-monitoring-detail-row strong { min-width: 0; color: #253247; font-weight: 500; overflow-wrap: anywhere; }
@media (max-width: 1200px) {
    .stage-monitoring-metrics { grid-template-columns: repeat(3, 1fr); }
    .stage-monitoring-metric:nth-child(3) { border-right: 0; }
    .stage-monitoring-metric:nth-child(-n+3) { border-bottom: 1px solid #e5e9ef; }
}
@media (max-width: 800px) {
    .stage-monitoring-metrics, .stage-monitoring-services, .stage-monitoring-db-grid { grid-template-columns: 1fr; }
    .stage-monitoring-metric { border-right: 0; border-bottom: 1px solid #e5e9ef; }
    .stage-monitoring-service { grid-template-columns: 10px 1fr auto; }
    .stage-monitoring-service small { grid-column: 2 / -1; text-align: left; }
}
