.vmm {
  --vmm-s: var(--surface, #fff);
  --vmm-s2: var(--surface-2, #f6f8f8);
  --vmm-b: var(--border, #e4e9e9);
  --vmm-t: var(--text, #0a1719);
  --vmm-dim: var(--text-dim, #59655f);
  --vmm-faint: var(--text-faint, #93999a);
  --vmm-acc: var(--accent-deep, #c2e22c);
  --vmm-ok: var(--badge-ok-fg, #0b7a3b);
  --vmm-ok-bg: var(--badge-ok-bg, rgba(18, 161, 80, .12));
  --vmm-warn: var(--badge-warn-fg, #8a6608);
  --vmm-err: var(--badge-err-fg, #c40820);
  --vmm-err-bg: var(--badge-err-bg, rgba(241, 10, 38, .1));
  --vmm-net2: #1f6fd0;
  --vmm-track: rgba(5, 17, 20, .1);
  --vmm-mono: var(--mono, ui-monospace, Menlo, monospace);
  position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0; padding: 20px 22px;
  background: var(--vmm-s); border: 1px solid var(--vmm-b); border-radius: var(--radius, 14px); box-shadow: var(--shadow-sm, none); color: var(--vmm-t);
}
:root[data-theme="dark"] .vmm { --vmm-net2: #7cc0ff; --vmm-track: rgba(255, 255, 255, .12); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .vmm { --vmm-net2: #7cc0ff; --vmm-track: rgba(255, 255, 255, .12); }
}

.vmm-head { display: flex; align-items: center; justify-content: space-between; gap: 10px 14px; flex-wrap: wrap; }
.vmm-title { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; }
.vmm-title .vmm-ic { width: 30px; height: 30px; padding: 7px; border-radius: 9px; background: var(--vmm-s2); color: var(--vmm-dim); flex: 0 0 auto; }

.vmm-status { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.3; background: var(--vmm-s2); color: var(--vmm-dim); border: 1px solid var(--vmm-b); }
.vmm-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.vmm-status small { font-size: 11.5px; font-weight: 500; opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmm-status--on { color: var(--vmm-ok); background: var(--vmm-ok-bg); border-color: transparent; }
.vmm-status--off { color: var(--vmm-err); background: var(--vmm-err-bg); border-color: transparent; }
.vmm-status--wait i, .vmm--loading .vmm-status--wait i { animation: vmmPulse 1.3s ease-in-out infinite; }
@keyframes vmmPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(.55); opacity: .45; } }

.vmm-hint { font-size: 13px; line-height: 1.5; color: var(--vmm-dim); }
.vmm-err { padding: 10px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.45; background: var(--vmm-err-bg); color: var(--vmm-err); }
.vmm-sys { display: flex; flex-wrap: wrap; gap: 4px 16px; font-family: var(--vmm-mono); font-size: 12px; color: var(--vmm-dim); }
.vmm-sys span { min-width: 0; overflow-wrap: anywhere; }

.vmm-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.vmm-tile { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding: 12px 13px; border-radius: 12px; background: var(--vmm-s2); }
.vmm-tile__l { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--vmm-dim); }
.vmm-tile__v { font-size: 19px; font-weight: 720; letter-spacing: -.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmm-tile__s { font-size: 11.5px; color: var(--vmm-faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vmm-bar { height: 5px; margin-top: 7px; border-radius: 999px; background: var(--vmm-track); overflow: hidden; }
.vmm-bar i { display: block; height: 100%; max-width: 100%; border-radius: 999px; background: var(--vmm-acc); transition: width .4s ease; }
.vmm-bar.warm i { background: var(--vmm-warn); }
.vmm-bar.hot i { background: var(--vmm-err); }
.vmm--stale .vmm-tiles, .vmm--stale .vmm-sys { opacity: .6; }

.vmm-charts { display: flex; flex-direction: column; gap: 12px; }
.vmm-charts__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.vmm-charts__t { font-size: 13px; font-weight: 600; color: var(--vmm-dim); }
.vmm-ranges { display: inline-flex; gap: 2px; padding: 3px; border-radius: 10px; background: var(--vmm-s2); }
.vmm-rbtn { height: 28px; padding: 0 12px; border: 0; border-radius: 8px; background: transparent; color: var(--vmm-dim); font-size: 12.5px; font-weight: 600; letter-spacing: 0; box-shadow: none; cursor: pointer; }
.vmm-rbtn:hover { background: var(--vmm-s); color: var(--vmm-t); transform: none; box-shadow: none; }
.vmm-rbtn.on { background: var(--vmm-s); color: var(--vmm-t); box-shadow: 0 1px 2px rgba(5, 17, 20, .1); }
.vmm-rbtn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring, rgba(206, 250, 5, .45)); }

.vmm-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.vmm-chart { min-width: 0; padding: 12px 12px 8px; border: 1px solid var(--vmm-b); border-radius: 12px; }
.vmm-chart__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; font-size: 12.5px; font-weight: 600; color: var(--vmm-dim); }
.vmm-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500; }
.vmm-legend i { width: 12px; height: 3px; border-radius: 2px; background: var(--vmm-acc); margin-left: 8px; }
.vmm-legend i:first-child { margin-left: 0; }
.vmm-legend i.tx { background: var(--vmm-net2); }
.vmm-canvas { position: relative; width: 100%; height: 170px; }
.vmm-canvas canvas { display: block; width: 100%; height: 100%; }
.vmm--loading .vmm-canvas { opacity: .45; transition: opacity .2s; }

.vmm-mini { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-dim, #59655f); }
.vmm-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--badge-ok-fg, #0b7a3b); flex: 0 0 auto; }
.vmm-mini__c { position: relative; display: inline-flex; align-items: baseline; gap: 4px; min-width: 54px; padding-bottom: 6px; }
.vmm-mini__c::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; border-radius: 2px; background: rgba(128, 128, 128, .18); }
.vmm-mini__c small { font-size: 10px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.vmm-mini__c b { font-size: 12px; font-variant-numeric: tabular-nums; color: var(--text, #0a1719); }
.vmm-mini__c i { position: absolute; left: 0; bottom: 0; z-index: 1; height: 3px; max-width: 100%; border-radius: 2px; background: var(--accent-deep, #c2e22c); }

.vmm-cell { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.vmm-cell i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.vmm-cell small { font-size: 11.5px; font-weight: 500; color: var(--text-dim, #59655f); }
.vmm-cell--on { color: var(--badge-ok-fg, #0b7a3b); }
.vmm-cell--off { color: var(--badge-err-fg, #c40820); }
.vmm-cell--none { color: var(--text-faint, #93999a); font-weight: 400; }

@media (max-width: 1100px) {
  .vmm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .vmm-grid2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .vmm { padding: 16px; gap: 12px; }
  .vmm-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .vmm-tile { padding: 10px 11px; }
  .vmm-tile__v { font-size: 16px; }
  .vmm-canvas { height: 150px; }
  .vmm-status small { display: none; }
  .vmm-mini { gap: 8px; }
}
@media (max-width: 420px) {
  .vmm-tile__v { font-size: 14.5px; }
  .vmm-rbtn { padding: 0 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .vmm-status--wait i { animation: none; }
  .vmm-bar i { transition: none; }
}
