/* Scoped presentation of the existing performance monitor. */
html[data-theme] .perf-modal-v2.ant-modal { max-width:calc(100vw - 32px); }
html[data-theme] .perf-modal-v2 .ant-modal-content,
html[data-theme] .perf-modal-v2 .ant-modal-header,
html[data-theme] .perf-modal-v2 .ant-modal-body { background:var(--ui-surface)!important; }
html[data-theme] .perf-modal-v2 .ant-modal-content { padding:0!important; border:1px solid var(--ui-border); border-radius:18px!important; box-shadow:0 24px 80px #07162830; }
html[data-theme] .perf-modal-v2 .ant-modal-header { margin:0!important; padding:20px 24px 16px!important; border-bottom:1px solid var(--ui-border)!important; }
html[data-theme] .perf-modal-v2 .ant-modal-title { font-size:15px; color:var(--ui-text); font-weight:600; }
html[data-theme] .perf-modal-v2 .ant-modal-close { top:14px; right:16px; color:var(--ui-muted); }
html[data-theme] .perf-modal-v2 .ant-modal-body { padding:0!important; max-height:calc(100vh - 120px); overflow-y:auto; }
.perf-monitor-v2 { padding:20px 24px; text-align:left; color:var(--ui-text); font-size:12px; }
.perf-monitor-v2 h3 { margin:0; font-size:13px; font-weight:600; color:var(--ui-text); }
.perf-v2-health { padding:13px 16px; border:1px solid var(--ui-green-border); border-radius:12px; background:var(--ui-green-soft); }
.perf-v2-health.warning { border-color:var(--ui-gold-border); background:var(--ui-gold-soft); }
.perf-v2-health.danger { border-color:var(--ui-red-border); background:var(--ui-red-soft); }
.perf-v2-status-line { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.perf-v2-health-title { display:inline-flex; align-items:center; gap:8px; font-weight:600; font-size:14px; }
.perf-v2-status-dot { width:7px; height:7px; border-radius:50%; background:var(--ui-green); }
.perf-v2-health.warning .perf-v2-status-dot { background:var(--ui-gold); }
.perf-v2-health.danger .perf-v2-status-dot { background:var(--ui-red); }
.perf-v2-network { flex-shrink:0; color:var(--ui-green); font-size:11px; }
.perf-v2-network.offline { color:var(--ui-red); }
.perf-v2-suggestion { margin:7px 0 0; color:var(--ui-muted); line-height:1.7; font-size:12px; }
.perf-v2-metrics { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin:16px 0 20px; }
.perf-v2-metric { border:1px solid var(--ui-border); border-radius:12px; padding:14px 16px; background:var(--ui-subtle); min-width:0; }
.perf-v2-metric-heading { display:flex; align-items:center; gap:6px; color:var(--ui-muted); font-size:12px; }
.perf-v2-metric-value { margin:6px 0 3px; font-size:32px; font-weight:600; line-height:1.2; letter-spacing:-.7px; font-variant-numeric:tabular-nums; }
.perf-v2-metric-value small { font-size:12px; font-weight:500; margin-left:4px; letter-spacing:0; }
.perf-v2-app-memory { color:var(--ui-accent); }
.perf-v2-metric .ant-progress { margin:0; line-height:1; }
.perf-v2-metric .ant-progress-inner { background:var(--ui-border)!important; }
.perf-v2-metric-sub { margin:9px 0 0; color:var(--ui-muted); font-size:11px; line-height:1.6; overflow-wrap:anywhere; }
.perf-v2-app-cpu { margin:12px 0 0; color:var(--ui-muted); font-size:11px; line-height:1.2; }
.perf-v2-runtime-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; margin-top:8px; }
.perf-v2-row { display:flex; justify-content:space-between; align-items:baseline; gap:12px; padding:9px 0; border-bottom:1px solid var(--ui-border); min-width:0; }
.perf-v2-label { color:var(--ui-muted); font-size:11px; flex-shrink:0; }
.perf-v2-value { color:var(--ui-text); font-size:12px; text-align:right; overflow-wrap:anywhere; font-variant-numeric:tabular-nums; }
.perf-v2-concurrency .perf-v2-value { color:var(--ui-accent); font-weight:600; }
.perf-v2-runtime-note { margin:10px 0 16px; color:var(--ui-muted); font-size:11px; line-height:1.6; }
.perf-v2-diagnostics { border:1px solid var(--ui-border); border-radius:10px; background:var(--ui-subtle); }
.perf-v2-diagnostics summary { cursor:pointer; padding:12px 14px; color:var(--ui-text); font-weight:500; }
.perf-v2-diagnostics summary::marker { color:var(--ui-muted); }
.perf-v2-diagnostics summary:focus-visible { outline:2px solid var(--ui-accent); outline-offset:2px; border-radius:8px; }
.perf-v2-details-hint { float:right; color:var(--ui-muted); font-size:11px; font-weight:400; }
.perf-v2-diagnostics[open] .perf-v2-details-hint { visibility:hidden; }
.perf-v2-breakdowns { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; border-top:1px solid var(--ui-border); padding:16px; }
.perf-v2-breakdown { min-width:0; }
.perf-v2-breakdown h3 { margin-bottom:5px; font-size:12px; }
.perf-v2-breakdown .perf-v2-row:last-child { border-bottom:0; padding-bottom:0; }
.perf-v2-footer { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-top:18px; }
.perf-v2-footer>span { color:var(--ui-muted); font-size:11px; }
.perf-v2-refresh.ant-btn { height:34px; padding:0 16px; border-radius:8px; font-size:12px; }
@media(max-width:760px) {
  .perf-monitor-v2 { padding:18px; }
  .perf-v2-runtime-grid,.perf-v2-breakdowns { grid-template-columns:1fr; }
  .perf-v2-metrics { gap:8px; }
  .perf-v2-metric { padding:12px; }
  .perf-v2-metric-value { font-size:28px; }
}
@media(max-width:480px) {
  .perf-v2-metrics { grid-template-columns:1fr; }
  .perf-v2-footer { align-items:flex-start; }
}
