.vivo-monitor {
  --vm-surface:#122032;
  --vm-border:#516781;
  --vm-text:#f1f6ff;
  --vm-muted:#c5d2e3;
  --vm-grid:#a2d3f315;
  display:grid;
  align-content:start;
  gap:5px;
  min-width:0;
  padding:clamp(6px,1.15vw,13px);
  border:1px solid var(--vm-border);
  border-radius:12px;
  background:var(--vm-surface);
  color:var(--vm-text);
  color-scheme:dark;
}
.vm-bar,.vm-controls {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:6px;
}
.vm-bar > strong { font-size:clamp(14px,1.8vw,18px); }
.vm-controls { flex-wrap:wrap; justify-content:flex-end; }
.vm-control {
  min-height:44px;
  min-width:44px;
  padding:3px 8px;
  border:1px solid #647c9d;
  border-radius:6px;
  background:#243852;
  color:var(--vm-text);
  font:700 clamp(12px,1.55vw,15px)/1.15 var(--body,system-ui);
  cursor:pointer;
}
.vm-control:hover,.vm-control[aria-pressed=true] { background:#334d70; }
.vm-control:focus-visible { outline:3px solid #b5cbff; outline-offset:1px; }
.vm-alarm {
  min-height:26px;
  max-width:none;
  margin:0;
  padding:4px 7px;
  border-left:3px solid #6f87ac;
  background:#1d3049;
  color:var(--vm-muted);
  font-size:clamp(11px,1.2vw,14px);
  line-height:1.2;
}
.vm-alarm[data-level=warning] { border-color:#ffc775; color:#ffe5bc; }
.vm-alarm[data-level=urgent] { border-color:#ff818e; color:#ffdadb; font-weight:750; }
.vm-lanes { display:grid; min-width:0; }
.vm-lane {
  --vm-channel:#9deaff;
  display:grid;
  grid-template-columns:minmax(106px,.84fr) minmax(0,1.35fr);
  align-items:center;
  gap:6px;
  min-width:0;
  min-height:clamp(44px,5.3vw,60px);
  padding:3px 0;
  border-bottom:1px solid #a3c7ee21;
  color:var(--vm-channel);
}
.vm-pleth { --vm-channel:#ffd090; }
.vm-capno { --vm-channel:#d4c4ff; }
.vm-art { --vm-channel:#ffa6ab; }
.vm-lane:last-child { border-bottom:0; }
.vm-reading {
  display:grid;
  grid-template-columns: minmax(59px,2fr) minmax(25px,1fr);
  align-items:end;
  gap:2px 5px;
  line-height:1.08;
  min-width:0;
}
.vm-name { white-space:nowrap; font-size:12px; font-weight:700; }
.vm-limit { justify-self:end; color:var(--vm-muted); font-size:11px; text-align:right; white-space:nowrap; }
.vm-value { display:flex; align-items:baseline; gap:3px; min-width:0; white-space:nowrap; font-variant-numeric:tabular-nums; }
.vm-value strong {
  font:600 clamp(22px,3.1vw,32px)/1 var(--mono,monospace);
  letter-spacing:-.055em;
}
.vm-value small { font-size:10px; }
.vm-direction { font:750 13px/1 var(--body,system-ui); }
.vm-trend { display:block; width:100%; height:14px; align-self:end; }
.vm-plot {
  position:relative;
  min-width:0;
  height:clamp(34px,4.7vw,51px);
  overflow:hidden;
  border-radius:3px;
  background:
    linear-gradient(90deg,var(--vm-grid) 1px,transparent 1px) 0 0/19px 100%,
    linear-gradient(0deg,var(--vm-grid) 1px,transparent 1px) 0 0/100% 13px,
    #101c2d;
}
.vm-plot canvas { display:block; width:100%; height:100%; }
.vm-sweep {
  position:absolute;
  top:0;
  bottom:0;
  left:0;
  width:2px;
  opacity:.55;
  background:var(--vm-channel);
  pointer-events:none;
}
.vm-pressure {
  position:absolute;
  right:4px;
  top:3px;
  padding:1px 4px;
  border-radius:3px;
  background:#101c2de6;
  color:var(--vm-muted);
  font-size:clamp(11px,1.2vw,15px);
  font-variant-numeric:tabular-nums;
}
.vm-pressure strong { color:var(--vm-text); }
.vivo-monitor:not([data-arterial=true]) .vm-art .vm-plot { background:#101c2d; }
.vivo-monitor:not([data-arterial=true]) .vm-art :is(canvas,.vm-sweep) { visibility:hidden; }
.vivo-monitor:not([data-arterial=true]) .vm-art .vm-pressure {
  right:7px;
  top:50%;
  translate:0 -50%;
  font-size:clamp(13px,1.7vw,20px);
}
@media (max-width:760px) {
  .vivo-monitor { gap:3px; border-radius:8px; padding:5px 7px; }
  .vm-lane { min-height:43px; grid-template-columns:112px minmax(0,1fr); padding:2px 0; }
  .vm-reading { grid-template-columns:minmax(70px,1fr) 37px; gap:2px 4px; }
  .vm-bar > strong { font-size:13px; }
  .vm-controls { gap:4px; }
  .vm-alarm { min-height:21px; padding-block:3px; }
}
