@font-face {
  font-family: Orbitron;
  src: url('fonts/Orbitron-Bold.ttf?v=2.3.9') format('truetype');
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
:root {
  color-scheme: normal;
  --accent: #9c5d63;
  --ecg: #6cff98;
  --cyan: #59e5f4;
  --amber: #f3c778;
  --text: #c7d6df;
  --dim: #758d9a;
  --line: #23343d;
  font-family: Orbitron, Arial, sans-serif;
  font-synthesis: none;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: transparent; color-scheme: normal; overflow: hidden; }
[hidden] { display: none !important; }
.monitor {
  --plasma-display-signature: plasma_m16_display_v238;
  position: absolute;
  inset: 0;
  width: 100vw;
  height: 100vh;
  flex-direction: column;
  background: #03080b;
  color: var(--text);
  overflow: hidden;
  user-select: none;
  cursor: default;
  color-scheme: dark;
  font-size: clamp(9px, 1.17vw, 12px);
}
.status-bar {
  height: 6.875%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2%;
  background: linear-gradient(#27191d, #190f13);
  border-bottom: 1px solid #344650;
}
.device-brand { display: flex; align-items: center; gap: 8px; font-size: 1.17em; letter-spacing: 1.2px; color: #d0dde4; }
.device-brand > span { color: #d2a6ac; }
.device-brand svg { width: 21px; height: 21px; margin-right: 3px; fill: none; stroke: #c89ba1; stroke-width: 1.6; stroke-linejoin: round; }
.device-status { display: flex; align-items: center; gap: 22px; font-size: .83em; letter-spacing: .6px; color: #94aab6; }
.status-power { display: flex; align-items: center; gap: 7px; }
.status-power::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #7998a7; }
.monitor.powered .status-power::before { background: var(--accent); box-shadow: 0 0 7px #9c5d6366; }
#deviceClock { border-left: 1px solid #344650; padding-left: 20px; font-size: 1.25em; color: #e0e8ed; font-variant-numeric: tabular-nums; letter-spacing: 1px; }
.patient-bar { height: 5.3125%; flex-shrink: 0; padding: 0 2%; display: flex; gap: 15px; align-items: center; border-bottom: 1px solid var(--line); color: #b0c3cf; background: #080f14; font-size: .92em; }
.patient-bar strong { color: #e1ebef; font-size: 1em; font-weight: 700; white-space: nowrap; }
.patient-divider { width: 1px; height: 12px; background: #344650; flex-shrink: 0; }
#patientLabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitoring-label { color: #5e7886; font-size: .7em; letter-spacing: 1px; margin-left: auto; white-space: nowrap; }
.clinical-grid { height: 78.125%; min-height: 0; flex-shrink: 0; display: grid; grid-template-columns: 72% 28%; grid-template-rows: 39% 39% 22%; }
.channel { position: relative; min-width: 0; overflow: hidden; border-bottom: 1px solid var(--line); padding: 13px 21px; }
.channel-label { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 1em; letter-spacing: .6px; }
.channel-label b { font-weight: 700; font-size: 1.17em; display: flex; align-items: center; gap: 14px; }
.channel-label > span { font-size: .75em; letter-spacing: .3px; font-weight: 700; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lead-label { border: 1px solid #30503a; border-radius: 3px; padding: 2px 8px; font-size: .75em; }
.ecg { color: var(--ecg); }
.pleth { color: var(--cyan); }
.channel canvas { position: absolute; top: 26%; left: 2.8%; width: 94.4%; height: 63%; background-image: linear-gradient(#8497a406 1px, transparent 1px), linear-gradient(90deg, #8497a406 1px, transparent 1px); background-size: 24px 24px; }
.wave-source { position: absolute; left: 21px; bottom: 9px; font-size: .67em; letter-spacing: 1px; opacity: .4; }
.wave-empty { position: absolute; inset: 28% 0 10%; display: flex; align-items: center; justify-content: center; color: #7d99aa; font-size: 1.17em; letter-spacing: .3px; text-align: center; padding: 12px; }
.wave-empty.disconnected { color: var(--amber); }
.parameter { border-left: 1px solid #30414b; border-bottom: 1px solid var(--line); padding: 13px 21px 10px; display: flex; flex-direction: column; justify-content: space-between; min-width: 0; overflow: hidden; background: #081116; }
.caption { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.caption b { font-size: 1.5em; font-weight: 700; letter-spacing: .6px; }
.caption > span { font-size: .83em; opacity: .7; }
.primary-value { font: 700 clamp(58px, 9.375vw, 96px)/1 Orbitron, Arial, sans-serif; text-align: right; letter-spacing: -4px; font-variant-numeric: tabular-nums; }
.parameter-source { font-size: .67em; letter-spacing: .7px; opacity: .62; text-align: right; white-space: nowrap; }
.ecg-parameter { color: var(--ecg); background: linear-gradient(100deg, #08120f, #0a1711); }
.saturation { color: var(--cyan); background: linear-gradient(100deg, #071217, #09191f); }
.saturation .primary-value { font-size: clamp(54px, 8.6vw, 88px); }
.pulse-value { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding-top: 7px; border-top: 1px solid #1b3b44; }
.pulse-value > span { font-size: .75em; letter-spacing: .6px; color: #68c5d0; }
.pulse-value small { font-size: .8em; margin-left: 7px; opacity: .7; }
.pulse-value strong { font-size: 2.33em; line-height: 1; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.pressure { color: var(--amber); padding-top: 10px; background: linear-gradient(100deg, #16120b, #1d170d); }
.pressure .caption b { font-size: 1.17em; }
.pressure-values { display: flex; align-items: baseline; justify-content: flex-end; gap: 5px; font-family: Orbitron, Arial, sans-serif; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pressure-values strong { font-size: clamp(28px, 4.68vw, 48px); line-height: 1; font-weight: 700; letter-spacing: -2px; }
.pressure-values i { font-size: 2em; font-weight: 700; font-style: normal; opacity: .6; }
.pressure-channel { display: flex; flex-direction: column; color: var(--amber); gap: 9px; padding-top: 10px; padding-bottom: 9px; }
.pressure-channel .channel-label b { font-size: 1em; }
.pressure-channel > strong { font-size: 1.08em; font-weight: 700; color: #d0d9df; }
.pressure-channel > span { font-size: .83em; line-height: 1.4; color: #7992a1; }
.pressure-channel.disconnected > strong { color: var(--amber); }
.pressure-progress { height: 4px; min-height: 4px; margin-top: auto; margin-right: 20%; background: #303128; border-radius: 3px; overflow: hidden; }
.pressure-progress > span { display: block; height: 100%; width: 0; background: var(--amber); box-shadow: 0 0 6px #f3c77855; }
.condition-line { height: 4.6875%; display: flex; align-items: center; gap: 16px; padding: 0 2%; border-bottom: 1px solid var(--line); font-size: .75em; color: #a5bdca; background: #081116; white-space: nowrap; overflow: hidden; }
.condition-label { color: #587582; font-size: .78em; letter-spacing: 1px; flex-shrink: 0; }
.condition-line > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.control-status { height: 5%; display: flex; align-items: center; gap: 10px; padding: 0 2%; font-size: .75em; color: #8ea8b7; letter-spacing: .1px; background: #0d1a22; white-space: nowrap; overflow: hidden; }
.control-status svg { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: #66889b; stroke-width: 1.4; }
#controlHint { overflow: hidden; text-overflow: ellipsis; }
.standby-overlay { position: absolute; inset: 12.1875% 0 9.6875%; z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; background: #03080b; color: #4d6c7b; }
.standby-overlay svg { width: 58px; height: 58px; }
.standby-overlay strong { font-size: 1.67em; letter-spacing: 4px; font-weight: 700; color: #91aab8; }
.standby-overlay span { font-size: 1em; color: #5a7c8e; }
html.dui-surface body { background: #03080b; }
html.dui-surface .monitor { display: flex !important; }
body.preview .monitor { display: flex !important; }
@media (max-width: 800px) {
  .channel, .parameter { padding-left: 13px; padding-right: 13px; }
  .device-status { gap: 12px; }
  #deviceClock { padding-left: 12px; }
  .device-brand { gap: 5px; letter-spacing: .5px; }
  .device-brand svg { width: 16px; height: 16px; }
  .patient-bar { gap: 10px; }
  .wave-source { left: 13px; }
  .pulse-value { padding-top: 4px; }
  .pressure-channel { gap: 6px; }
}
/* Cattura trasparente del mouse; il display esiste soltanto sulla superficie DUI. */
html.monitor-input-active:not(.dui-surface), html.monitor-input-active:not(.dui-surface) body { width: 100%; height: 100%; background: transparent !important; cursor: default; user-select: none; touch-action: none; }
html.monitor-input-active:not(.dui-surface) body > * { pointer-events: none; }
