.monitor-main { padding: 32px clamp(16px, 3vw, 48px); }
.monitor-header, .monitor-actions, .monitor-status, .monitor-footer { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.monitor-header { justify-content: space-between; margin-bottom: 22px; }
.monitor-header h1 { font-size: clamp(28px, 3vw, 40px); margin-bottom: 6px; }
.monitor-header p { margin: 4px 0; }
.monitor-actions label, .monitor-footer label { display: flex; flex-direction: column; gap: 6px; font-size: 12px; color: var(--muted); }
.monitor-page input, .monitor-page select { min-height: 38px; max-width: 100%; padding: 8px 10px; border: 1px solid #cadfd1; border-radius: 10px; background: white; color: var(--ink); font: inherit; }
.monitor-page button { cursor: pointer; }
.monitor-page button:disabled { cursor: not-allowed; opacity: .45; }
.monitor-page :focus-visible { outline: 3px solid #177cbb; outline-offset: 3px; }
.monitor-status { font-size: 12px; color: var(--muted); margin-bottom: 20px; }
.monitor-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 5px 10px; font-size: 11px; font-weight: 600; background: #edf0f2; color: #525964; white-space: nowrap; }
.monitor-pill.good { background: #dcf5e6; color: #086b39; }
.monitor-pill.bad { background: #fce7e2; color: #9c3323; }
.monitor-notice { border-left: 3px solid #c18822; background: #fff8e8; padding: 12px 16px; border-radius: 8px; overflow-wrap: anywhere; }
.monitor-tabs { display: flex; gap: 6px; overflow-x: auto; border-bottom: 1px solid #cee2d4; margin-bottom: 24px; padding-bottom: 10px; }
.monitor-tabs button { flex-shrink: 0; border: 0; padding: 10px 16px; background: transparent; color: var(--muted); border-radius: 999px; font: inherit; font-size: 14px; }
.monitor-tabs [aria-selected="true"] { color: white; background: var(--accent-2); }
.monitor-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 20px; }
.monitor-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin-bottom: 20px; }
.monitor-card, .monitor-metric { border: 1px solid #deebe2; background: rgba(255,255,255,.96); border-radius: 18px; padding: 20px; min-width: 0; }
.monitor-metric .metric-label { font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.monitor-metric .metric-value { font: 600 23px var(--mono); overflow-wrap: anywhere; }
.monitor-card h2 { font-size: 17px; margin: 0 0 14px; }
.monitor-card h3 { margin: 0 0 12px; font-size: 15px; }
.monitor-chart { width: 100%; height: 180px; display: block; }
.monitor-chart text { font: 10px var(--sans); fill: var(--muted); }
.chart-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11px; color: var(--muted); min-height: 30px; }
.chart-legend span::before { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--series); margin-right: 5px; }
.monitor-empty { color: var(--muted); padding: 30px 10px; text-align: center; }
.monitor-section { margin: 25px 0 12px; font-size: 19px; }
.monitor-card dl { display: grid; grid-template-columns: minmax(100px, 1fr) minmax(0, 2fr); gap: 9px; font-size: 12px; }
.monitor-card dt { color: var(--muted); }
.monitor-card dd { margin: 0; overflow-wrap: anywhere; }
.monitor-page pre { white-space: pre-wrap; overflow-wrap: anywhere; font: 12px var(--mono); max-height: 260px; overflow: auto; }
.monitor-page progress { width: 100%; height: 14px; accent-color: var(--accent); }
.monitor-table-scroll { overflow: auto; max-height: 520px; overflow-anchor: none; border: 1px solid #e2ebe5; border-radius: 10px; }
.monitor-table { border-collapse: collapse; width: 100%; font-size: 12px; }
.monitor-table th, .monitor-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #e7eee9; vertical-align: top; min-width: 100px; max-width: 400px; overflow-wrap: anywhere; }
.monitor-table th { background: #f1f8f3; position: sticky; top: 0; z-index: 1; }
.monitor-table th button { border: 0; background: transparent; padding: 4px; color: var(--accent-2); }
.monitor-table th details { display: inline-block; font-weight: 400; }
.monitor-table th summary { cursor: pointer; }
.monitor-table th label { display: flex; align-items: center; gap: 6px; padding: 3px; }
.monitor-table input[type="checkbox"], .monitor-follow input { min-height: auto; }
.monitor-column-picker { margin: 12px 0; font-size: 12px; }
.monitor-column-picker label { display: inline-flex; gap: 5px; margin: 10px 12px 0 0; align-items: center; }
.monitor-actions .monitor-follow { flex-direction: row; align-items: center; }
.monitor-footer { padding-top: 14px; font-size: 12px; }
.monitor-footer label { flex-direction: row; align-items: center; }
.monitor-footnote { color: var(--muted); font-size: 11px; padding-top: 24px; }
.monitor-search { flex: 1; min-width: 180px; }
.monitor-page [hidden] { display: none !important; }
@media (max-width: 1000px) { .monitor-grid { grid-template-columns: 1fr; } .monitor-page .sidebar { width: 195px; flex-shrink: 0; } }
@media (max-width: 700px) {
  .monitor-page .app-shell { display: block; }
  .monitor-page .sidebar { position: static; width: 100%; height: auto; padding: 16px; }
  .monitor-page .nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .monitor-page .nav-group, .monitor-page .nav-footer { display: contents; }
  .monitor-page .nav-group-title { display: none; }
  .monitor-page .nav-link { padding: 7px 10px; font-size: 12px; }
  .monitor-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .monitor-card { padding: 14px; }
}
