/* Tema chiaro "Healix": struttura e grafica dedicate. Attivo con <html data-theme="healix">. */
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin-ext.woff2) format('woff2-variations');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter Variable'; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(/fonts/inter-latin.woff2) format('woff2-variations');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

html[data-theme='healix'] {
  --bg: #f2f3f5;
  --fg: #15181e;
  --muted: #858c96;
  --dim: #a3a9b2;
  --line: #eceef2;
  --line2: #e3e6eb;
  --card: #ffffff;
  --tile: #f5f6f8;
  --blue: #1f6bff;
  --blue2: #1f6bff;
  --hx-blue: #1f6bff;
  --hx-blue-d: #1459e6;
  --hx-green: #34b27b;
  --hx-pink: #ec6e78;
  --hx-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 10px 30px rgba(16, 24, 40, 0.05);
  --font: 'Inter Variable', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
html[data-theme='healix'] body { background: var(--bg); color: var(--fg); font-size: 13px; letter-spacing: -0.005em; }
html[data-theme='healix'] ::selection { background: rgba(31, 107, 255, 0.2); }
html[data-theme='healix'] ::-webkit-scrollbar-thumb { background: rgba(20, 30, 50, 0.12); }

/* ---------- Guscio ---------- */
.hx { height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.hx-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 16px 24px 12px 22px; }
.hx-brand { display: flex; align-items: center; gap: 11px; font-size: 18px; font-weight: 600; letter-spacing: -0.02em; color: #15181e; }
.hx-brand span { white-space: nowrap; }
.hx-brand b { font-weight: 600; color: #0f9f90; }
.hx-nav { display: flex; gap: 8px; }
.hx-tab { position: relative; display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 17px 0 14px; border-radius: 999px; background: #fff;
  border: 1px solid #e8eaee; color: #22262d; font-size: 13px; font-weight: 500; white-space: nowrap; transition: background 0.15s, border-color 0.15s, box-shadow 0.15s; }
.hx-tab:hover { border-color: #d5dae1; }
.hx-tab.active { color: #fff; background: linear-gradient(180deg, #2c7bff, #1662f5); border-color: #1a66fa; box-shadow: 0 6px 16px rgba(31, 107, 255, 0.28); }
.hx-count { position: absolute; top: -7px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--hx-blue); color: #fff;
  font-size: 10px; font-weight: 600; font-style: normal; display: grid; place-items: center; border: 2px solid var(--bg); }
.hx-tab.active .hx-count { background: #fff; color: var(--hx-blue); }
.hx-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
/* App Windows: barra trascinabile e spazio per i pulsanti finestra a destra */
.hx.is-electron .hx-top { -webkit-app-region: drag; padding-right: 150px; }
.hx.is-electron .hx-top button, .hx.is-electron .hx-top .hx-avatar { -webkit-app-region: no-drag; }
.hx-avatar { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: linear-gradient(160deg, #dfe6f1, #c4cfdf); display: grid; place-items: center;
  font-size: 13px; font-weight: 600; color: #3a4556; box-shadow: 0 0 0 2px #fff, 0 2px 8px rgba(16, 24, 40, 0.12); }
.hx-avatar img { width: 100%; height: 100%; object-fit: cover; }
.hx-share { display: flex; align-items: center; gap: 8px; margin: 0 24px 8px 86px; padding: 8px 14px; border-radius: 12px; background: #eaf1ff; color: #2a4f9a; font-size: 12px; }

.hx-circle { position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #262b33;
  border: 1px solid #e8eaee; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); transition: background 0.15s, color 0.15s, border-color 0.15s; }
.hx-circle:hover { border-color: #d3d8df; }
.hx-circle.on { background: #eaf1ff; color: var(--hx-blue); border-color: #cfe0ff; }
.hx-circle.blue { background: linear-gradient(180deg, #2c7bff, #1662f5); color: #fff; border-color: #1a66fa; box-shadow: 0 6px 14px rgba(31, 107, 255, 0.3); }
.hx-circle.soft { background: #f1f3f6; border-color: transparent; box-shadow: none; }
.hx-circle.soft:hover { background: #e8ebf0; }
.hx-circle.bordered { background: #fff; }
.hx-dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--hx-blue); border: 1.5px solid #fff; }
.hx-mini { position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--hx-blue); color: #fff;
  font-size: 9.5px; font-weight: 600; font-style: normal; display: grid; place-items: center; border: 1.5px solid #fff; }

.hx-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 64px minmax(0, 1fr); }
.hx-rail { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 18px 12px; min-height: 0; }
.hx-rail-group { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; }
.hx-rail-btn { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; color: #2d323a; transition: background 0.15s, color 0.15s; }
.hx-rail-btn:hover { background: #fff; }
.hx-rail > .hx-rail-btn:first-child { background: #fff; border: 1px solid #e8eaee; }
.hx-rail-btn.active { background: linear-gradient(180deg, #2c7bff, #1662f5); color: #fff; box-shadow: 0 6px 14px rgba(31, 107, 255, 0.3); }
.hx-rail-btn.spin svg { animation: spin 0.6s linear; }
.hx-rail-foot { margin-top: auto; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.hx-mode { display: flex; flex-direction: column; gap: 4px; padding: 4px; border-radius: 999px; background: #fff; border: 1px solid #e8eaee; }
.hx-mode button { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #5b626c; }
.hx-mode button.active { background: linear-gradient(180deg, #2c7bff, #1662f5); color: #fff; box-shadow: 0 4px 10px rgba(31, 107, 255, 0.3); }
.hx-main { min-width: 0; min-height: 0; overflow: auto; padding: 6px 22px 20px 12px; }
.hx-main.view-overview { overflow: hidden; }
.hx-bottom { display: none; }

/* ---------- Panoramica ---------- */
.hx-ov { position: relative; height: 100%; display: grid; grid-template-columns: 262px minmax(0, 1fr) 322px; gap: 20px; }
.hx-left { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding-bottom: 2px; }
.hx-left::-webkit-scrollbar { display: none; }
.hx-card { position: relative; background: #fff; border: 1px solid #eef0f3; border-radius: 24px; box-shadow: var(--hx-shadow); }

.hx-patient { position: relative; flex: none; min-height: 172px; border-radius: 24px; background: #e8eaee; overflow: hidden; padding: 16px 16px 30px; }
.hx-patient-t { position: relative; z-index: 1; width: 58%; }
.hx-plan { display: flex; align-items: center; gap: 4px; color: var(--hx-blue); font-size: 10.5px; font-weight: 600; }
.hx-patient h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; margin-top: 3px; line-height: 1.2; }
.hx-patient dl, .hx-id dl { margin: 8px 0 0; }
.hx-patient dt, .hx-id dt { font-size: 10px; color: #8a9099; margin-top: 7px; }
.hx-patient dd, .hx-id dd { margin: 1px 0 0; font-size: 12px; font-weight: 600; color: #1b1f26; }
.hx-photo { position: absolute; right: 0; bottom: 0; top: 0; width: 50%; display: block; cursor: default; }
.hx-photo.can { cursor: pointer; }
.hx-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 15%;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 22%); mask-image: linear-gradient(90deg, transparent, #000 22%); }
.hx-photo svg { position: absolute; right: 6px; bottom: 0; width: 88%; height: 88%; }
.hx-photo-edit { position: absolute; right: 10px; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: rgba(255, 255, 255, 0.9); color: #2d323a;
  display: grid; place-items: center; opacity: 0; transition: opacity 0.15s; }
.hx-photo.can:hover .hx-photo-edit { opacity: 1; }
.hx-photo.busy { opacity: 0.5; }

.hx-id { margin-top: -38px; z-index: 2; padding: 16px 14px 14px; flex: none; }
.hx-grip { position: absolute; top: -12px; left: 50%; width: 22px; height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.95); transform: translateX(-50%); }
.hx-id-actions { display: flex; gap: 8px; align-items: center; }
.hx-primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; flex: 1; border-radius: 999px; color: #fff;
  font-size: 13px; font-weight: 600; background: linear-gradient(180deg, #2c7bff, #1662f5); box-shadow: 0 6px 16px rgba(31, 107, 255, 0.28); white-space: nowrap; transition: filter 0.15s; }
.hx-primary:hover { filter: brightness(1.06); }
.hx-primary.big { height: 46px; font-size: 13.5px; }
.hx-menu-wrap { position: relative; }
.hx-menu { position: absolute; right: 0; top: 46px; z-index: 30; width: 170px; padding: 6px; border-radius: 16px; background: #fff; border: 1px solid #eceef2;
  box-shadow: 0 16px 40px rgba(16, 24, 40, 0.14); }
.hx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: 10px; font-size: 12.5px; }
.hx-menu button:hover { background: #f3f5f8; }
.hx-id-body { display: flex; gap: 12px; margin-top: 14px; align-items: flex-start; }
.hx-qr { flex: none; padding: 6px; border-radius: 14px; border: 1px solid #eceef2; background: #fff; line-height: 0; }
.hx-id dl { margin: 0; min-width: 0; }
.hx-id dt:first-child { margin-top: 0; }
.hx-id dd { overflow-wrap: anywhere; }
.mono-s { font-size: 11px !important; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }

.hx-vital { padding: 14px 14px 10px; flex: none; }
.hx-vital-h { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.hx-ico { width: 36px; height: 36px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #eef3ff; color: var(--hx-blue); }
.hx-ico.sm { width: 34px; height: 34px; background: #f1f4f8; color: #3c4450; }
.hx-lbl { font-size: 10.5px; color: #8a9099; line-height: 1.3; }
.hx-val { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; color: #15181e; line-height: 1.25; }
.hx-val small { font-size: 12px; font-weight: 600; }
.hx-foot-note { font-size: 10px; color: #a0a6af; margin-top: 2px; }
.hx-chart { position: relative; width: 100%; user-select: none; }
.hx-chart svg { display: block; overflow: visible; }
.hx-ax { font-size: 9.5px; fill: #9aa1ab; font-family: var(--font); }
.hx-ax.strong { fill: #15181e; font-weight: 650; }
.hx-grid { stroke: #f1f2f5; stroke-width: 1; }
.hx-ecg { fill: none; stroke: var(--hx-blue); stroke-width: 1.6; stroke-linejoin: round; }
.hx-ecg.faded { stroke: #bcd1fb; }
.hx-line { fill: none; stroke: var(--hx-blue); stroke-width: 1.8; }
.hx-line.green { stroke: var(--hx-green); }
.hx-dash { stroke: var(--hx-blue); stroke-width: 1; stroke-dasharray: 3 3; }
.hx-pt { fill: #fff; stroke: var(--hx-blue); stroke-width: 2; }
.hx-pill { position: absolute; transform: translateX(-50%); padding: 3px 8px; border-radius: 999px; background: var(--hx-blue); color: #fff; font-size: 10px; font-weight: 600;
  white-space: nowrap; box-shadow: 0 4px 10px rgba(31, 107, 255, 0.3); pointer-events: none; }

/* Figura */
.hx-stage { position: relative; min-width: 0; min-height: 0; overflow: hidden; container-type: size; border-radius: 24px;
  background-image: radial-gradient(#d3d8df 1px, transparent 1.3px); background-size: 16px 16px; background-position: 8px 8px; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
/* Figura già ingrandita o spostata: un dito la muove. Alla grandezza normale un dito fa scorrere la pagina. */
.hx-stage.fig-changed { touch-action: none; }
.hx-stage.fig-drag, .hx-stage.fig-drag * { cursor: grabbing !important; }
.hx-stage.fig-moving .hx-figure { will-change: transform; }
.hx-stage.fig-moving .hx-mk, .hx-stage.fig-moving .hx-spot { transition: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.hx-stage:fullscreen { background-color: #f2f3f5; border-radius: 0; }
.hx-stage.pan { cursor: grab; }
.hx-stage.pan:active { cursor: grabbing; }
.hx-tools { position: absolute; z-index: 10; display: flex; gap: 8px; user-select: auto; -webkit-user-select: auto; cursor: default; }
.hx-tools.bc { left: 50%; bottom: 12px; transform: translateX(-50%); }
.hx-tools.tl { top: 10px; left: 10px; right: 170px; z-index: 12; flex-wrap: wrap; align-items: center; }
.hx-chip-n { font-style: normal; font-size: 11px; font-weight: 700; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; display: inline-grid; place-items: center; background: var(--hx-blue); color: #fff; }
.hx-chip.on .hx-chip-n { background: #fff; color: var(--hx-blue); }
.hx-menu.left { left: 0; right: auto; }
.hx-menu.scans { width: 310px; max-height: 62vh; overflow-y: auto; }
.hx-scans { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.hx-scans .hx-lbl { margin-bottom: 1px; }
.hx-scan { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border-radius: 12px; background: #f6f7f9; border: 1px solid #ececf0; text-align: left; transition: background 0.15s, border-color 0.15s; }
.hx-scan:hover { background: #eef3ff; border-color: #cfdcf7; }
.hx-scan-t { flex: 0 0 44px; width: 44px; height: 44px; border-radius: 9px; overflow: hidden; display: grid; place-items: center; background: #11151c; color: #fff; }
.hx-scan-t img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hx-scan > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.hx-scan b { font-size: 13px; font-weight: 600; color: #1a1f27; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-scan small { font-size: 11.5px; color: #6b7280; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-tools.tr { top: 10px; right: 10px; z-index: 12; }
.hx-tools.side { right: 10px; top: 50%; transform: translateY(-50%); flex-direction: column; gap: 10px; }
.hx-tools.br { right: 10px; bottom: 14px; flex-direction: column; gap: 10px; }
.hx .hx-tools .search .icon-btn.big { width: 40px; height: 40px; background: #fff; border: 1px solid #e8eaee; color: #262b33; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04); }
.hx .hx-tools .search-pop { left: 0; right: auto; top: 50px; }

.hx-figure { position: absolute; left: 50%; top: 1.5%; height: min(97cqh, 194cqw); aspect-ratio: 1 / 2; transform: translate(-50%, 0); transform-origin: 50% 45%; }
.hx-body-img { position: absolute; inset: 0; z-index: 1; transition: transform 0.19s ease-in, opacity 0.19s ease-in; }
.hx-body-img.turn1 { transform: perspective(1400px) rotateY(88deg); opacity: 0.4; }
.hx-body-img.turn-1 { transform: perspective(1400px) rotateY(-88deg); opacity: 0.4; transition: none; }
.hx-body-img img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 26px 30px rgba(120, 40, 40, 0.1)); }
.hx-orbit { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.hx-orbit.back { z-index: 0; }
.hx-orbit.front { z-index: 2; }
.hx-orbit path { fill: none; stroke: #2f7bff; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.hx-orbit.back path { opacity: 0.55; }
.hx-turn { position: relative; width: 42px; height: 42px; border-radius: 50%; background: #fff;
  color: #262b33; display: grid; place-items: center; box-shadow: 0 6px 18px rgba(16, 24, 40, 0.16); border: 1px solid #eef0f3; transition: transform 0.15s; }
.hx-turn:hover { transform: scale(1.04); }

.hx-mk { position: absolute; z-index: 5; width: 38px; height: 38px; transform: translate(-50%, -50%) scale(var(--fig-iz, 1)); border-radius: 50%; display: grid; place-items: center; color: #fff;
  background: rgba(88, 76, 82, 0.34); border: 1.5px solid rgba(255, 255, 255, 0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(40, 20, 20, 0.18); transition: transform 0.15s, background 0.15s; }
.hx-mk:hover { transform: translate(-50%, -50%) scale(calc(var(--fig-iz, 1) * 1.08)); background: rgba(88, 76, 82, 0.5); }
.hx-mk i { position: absolute; top: -5px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--hx-blue); color: #fff;
  font-size: 9.5px; font-weight: 600; font-style: normal; display: grid; place-items: center; border: 1.5px solid #fff; }
.hx-mk.sel { width: 46px; height: 46px; background: linear-gradient(180deg, #2c7bff, #1662f5); border-color: #fff; border-width: 2px;
  box-shadow: 0 0 0 7px rgba(31, 107, 255, 0.16), 0 8px 22px rgba(31, 107, 255, 0.45); }
.hx-mk.sel:hover { background: linear-gradient(180deg, #2c7bff, #1662f5); }
.hx-spot { position: absolute; z-index: 4; width: 20px; height: 20px; transform: translate(-50%, -50%) scale(var(--fig-iz, 1)); border-radius: 50%; background: rgba(236, 110, 120, 0.62);
  border: 2px solid rgba(255, 225, 228, 0.95); box-shadow: 0 0 0 4px rgba(236, 110, 120, 0.16), 0 4px 10px rgba(120, 30, 40, 0.2); transition: transform 0.15s; }
.hx-spot:hover { transform: translate(-50%, -50%) scale(calc(var(--fig-iz, 1) * 1.15)); }
.hx-spot::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 8px); transform: translateX(-50%); padding: 5px 9px; border-radius: 8px;
  background: #15181e; color: #fff; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.hx-spot:hover::after { opacity: 1; }

.hx-curve { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 8; overflow: visible; }
.hx-curve path { fill: none; stroke: var(--hx-blue); stroke-width: 1.6; }
.hx-curve circle { fill: #fff; stroke: var(--hx-blue); stroke-width: 1.6; }

/* Scheda di destra */
.hx-panel { position: relative; min-height: 0; display: flex; flex-direction: column; background: #fff; border: 1px solid #eef0f3; border-radius: 24px; box-shadow: var(--hx-shadow); }
.hx-anchor { position: absolute; left: 0; top: 96px; width: 8px; height: 8px; transform: translate(-50%, -50%); pointer-events: none; }
.hx-panel-in { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; scrollbar-width: none; border-radius: 24px; }
.hx-panel-in::-webkit-scrollbar { display: none; }
.hx-p-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; padding: 18px 18px 12px; }
.hx-p-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.hx-updated { font-size: 10.5px; color: #1b1f26; margin-top: 3px; font-weight: 500; }
.hx-updated span { color: #8a9099; font-weight: 400; }
.hx-p-sec { padding: 14px 18px; border-top: 1px solid #f0f1f4; }
.hx-p-sec.grow { flex: 1; }
.hx-check { display: flex; align-items: center; gap: 10px; min-width: 0; }
.hx-check b { font-size: 13px; font-weight: 650; letter-spacing: -0.01em; display: block; }
.hx-desc { font-size: 11px; color: #8a9099; line-height: 1.55; margin-top: 10px; }
.hx-metrics { display: flex; flex-wrap: wrap; gap: 5px 14px; margin-top: 10px; font-size: 10.5px; color: #8a9099; }
.hx-metrics b { color: #15181e; font-weight: 650; }
.hx-strip-wrap { position: relative; margin-top: 12px; }
.hx-strip { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x mandatory; }
.hx-strip::-webkit-scrollbar { display: none; }
.hx-film { flex: 0 0 66px; height: 78px; border-radius: 10px; scroll-snap-align: start; overflow: hidden; position: relative; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: flex-start; gap: 1px; padding: 6px; text-align: left; color: #eef2f7;
  background: radial-gradient(70% 55% at 50% 38%, rgba(214, 224, 236, 0.55), transparent 70%), radial-gradient(120% 90% at 50% 40%, #56606e, #151a22 72%); }
.hx-film > svg { position: absolute; top: 8px; left: 8px; opacity: 0.8; }
.hx-film.img { padding: 0; }
.hx-film.img img { width: 100%; height: 100%; object-fit: cover; }
.hx-film-t { font-size: 9px; font-weight: 600; line-height: 1.15; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hx-film-d { font-size: 8.5px; opacity: 0.7; }
.hx-strip-next { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 24px; height: 24px; border-radius: 50%; background: rgba(255, 255, 255, 0.92);
  display: grid; place-items: center; color: #262b33; box-shadow: 0 2px 8px rgba(16, 24, 40, 0.2); }
.hx-doc { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.hx-doc b { font-size: 12px; font-weight: 650; }
.hx-doc-av { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: #3a4556;
  background: linear-gradient(160deg, #e7ecf4, #cfd8e5); }
.hx-p-actions { display: flex; gap: 8px; margin-top: 12px; }
.hx-soft-btn { flex: 1; min-width: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 999px;
  background: #f1f3f6; font-size: 12.5px; font-weight: 600; color: #1b1f26; transition: background 0.15s; }
.hx-soft-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hx-soft-btn:hover { background: #e8ebf0; }
.hx-trend-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.hx-legend { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; font-size: 10px; color: #8a9099; white-space: nowrap; }
.hx-legend b { color: #15181e; font-weight: 650; }
.hx-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 5px; vertical-align: 1px; }
.hx-legend i.b { background: var(--hx-blue); }
.hx-legend i.g { background: var(--hx-green); }
.hx-p-foot { margin-top: auto; display: flex; gap: 8px; align-items: center; padding: 14px 18px 18px; border-top: 1px solid #f0f1f4; }
.hx-p-foot .hx-circle { width: 46px; height: 46px; }
.hx-dx { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.hx-dx li { display: flex; gap: 10px; align-items: flex-start; }
.hx-dx b { display: block; font-size: 12px; font-weight: 600; }
.hx-dx span { font-size: 11px; color: #8a9099; }
.lv { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 4px; background: var(--hx-blue); }
.lv.bad { background: #ef4b56; } .lv.warn { background: #f3a221; } .lv.good { background: var(--hx-green); }
.hx-zones { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.hx-zones button { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 14px; text-align: left; transition: background 0.15s; }
.hx-zones button:hover { background: #f4f6f9; }
.hx-zones b { display: block; font-size: 12px; font-weight: 600; }
.hx-zones span:not(.hx-ico) { font-size: 11px; color: #8a9099; }
.hx-kv { display: grid; grid-template-columns: 130px 1fr; gap: 9px 14px; margin: 0; font-size: 13px; }
.hx-kv dt { color: var(--muted); }
.hx-kv dd { margin: 0; }

/* ---------- Altre pagine nel tema chiaro ---------- */
.hx-page { max-width: 1400px; }
html[data-theme='healix'] .page-head h1 { font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
html[data-theme='healix'] .card { background: #fff; border: 1px solid #eef0f3; box-shadow: var(--hx-shadow); backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: 24px; }
html[data-theme='healix'] .card-head h3 { font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
html[data-theme='healix'] .dot { box-shadow: none; }
html[data-theme='healix'] .round-btn { background: #fff; border-color: #e8eaee; color: #262b33; }
html[data-theme='healix'] .round-btn:hover { background: #f4f6f9; }
html[data-theme='healix'] .btn { background: #fff; border-color: #e3e6eb; color: #1b1f26; }
html[data-theme='healix'] .btn:hover { background: #f4f6f9; }
html[data-theme='healix'] .btn.primary { background: linear-gradient(180deg, #2c7bff, #1662f5); border-color: #1a66fa; color: #fff; box-shadow: 0 6px 16px rgba(31, 107, 255, 0.28); }
html[data-theme='healix'] .tabs { background: #fff; border-color: #e8eaee; }
html[data-theme='healix'] .tabs button { color: #3a414b; }
html[data-theme='healix'] .tabs button.active { color: #fff; background: linear-gradient(180deg, #2c7bff, #1662f5); border-color: #1a66fa; }
html[data-theme='healix'] .table-wrap { border-color: #eceef2; }
html[data-theme='healix'] th { background: #f7f8fa; color: #7c838d; }
html[data-theme='healix'] td { border-bottom-color: #f0f1f4; }
html[data-theme='healix'] tr.click:hover td { background: #f7f9fc; }
html[data-theme='healix'] tr.total td { background: #f7f8fa; }
html[data-theme='healix'] tr.planned td { background: #f1f6ff; }
html[data-theme='healix'] .chip, html[data-theme='healix'] .p-stat, html[data-theme='healix'] .metric, html[data-theme='healix'] .act, html[data-theme='healix'] .med,
html[data-theme='healix'] .img-item, html[data-theme='healix'] .doc-item, html[data-theme='healix'] .share { background: #f6f7f9; border-color: #eceef2; }
html[data-theme='healix'] .badge.good { color: #16804f; background: #e7f7ef; border-color: #c6ecd8; }
html[data-theme='healix'] .badge.warn { color: #9a5b00; background: #fff4e0; border-color: #ffe2a8; }
html[data-theme='healix'] .badge.bad { color: #c02631; background: #fdecee; border-color: #f8c9cd; }
html[data-theme='healix'] .badge.info { color: #1f5fd6; background: #eaf1ff; border-color: #cfe0ff; }
html[data-theme='healix'] .note.info { background: #f1f6ff; border-color: #d6e5ff; color: #2a4f9a; }
html[data-theme='healix'] .note.bad { background: #fdf0f1; border-color: #f6cfd3; color: #a3222c; }
html[data-theme='healix'] .note.good { background: #eefaf3; border-color: #cdeedb; color: #1c6b44; }
html[data-theme='healix'] .note.warn { background: #fff7e8; border-color: #fbe2b4; color: #8a5300; }
html[data-theme='healix'] .timeline li::before { background: #fff; border-color: #c5ccd6; }
html[data-theme='healix'] .timeline li.key::before { background: var(--hx-blue); border-color: var(--hx-blue); box-shadow: none; }
html[data-theme='healix'] .lab-item:hover { background: #f4f6f9; }
html[data-theme='healix'] .lab-item.active { background: #eaf1ff; border-color: #cfe0ff; }
html[data-theme='healix'] .search-in, html[data-theme='healix'] .search-pop input { background: #f6f7f9; border-color: #e3e6eb; }
html[data-theme='healix'] .doc-ico { background: #eaf1ff; color: var(--hx-blue); }
html[data-theme='healix'] .appt-date { background: #eaf1ff; border-color: #cfe0ff; }
html[data-theme='healix'] .doctor.primary { border-color: #cfe0ff; box-shadow: 0 0 0 3px #eef4ff; }
html[data-theme='healix'] .avatar { background: linear-gradient(160deg, #dfe6f1, #c4cfdf); color: #3a4556; box-shadow: none; }
html[data-theme='healix'] .lgd.none { background: #e9ecf0; }
html[data-theme='healix'] .tip { background: #15181e; color: #fff; border-color: #15181e; }
html[data-theme='healix'] .modal, html[data-theme='healix'] .drawer, html[data-theme='healix'] .popover, html[data-theme='healix'] .search-pop {
  background: #fff; color: var(--fg); border-color: #eceef2; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18); }
html[data-theme='healix'] .modal-back { background: rgba(20, 26, 36, 0.35); }
html[data-theme='healix'] .drawer-back { background: rgba(20, 26, 36, 0.2); }
html[data-theme='healix'] .form input:not([type='checkbox']), html[data-theme='healix'] .form select, html[data-theme='healix'] .form textarea { background: #f6f7f9; border-color: #e3e6eb; color: var(--fg); }
html[data-theme='healix'] .form select option, html[data-theme='healix'] .form select optgroup { background: #fff; }
html[data-theme='healix'] .link-box { background: #f6f7f9; }
html[data-theme='healix'] .new-link { background: #eefaf3; border-color: #cdeedb; }
html[data-theme='healix'] .search-hits button:hover { background: #f4f6f9; }
html[data-theme='healix'] .icon-btn { color: #2d323a; }
html[data-theme='healix'] .icon-btn:hover, html[data-theme='healix'] .icon-btn.on { background: #f1f3f6; }
html[data-theme='healix'] .splash { background: #f2f3f5; }
html[data-theme='healix'] .login { background: #fff; }
html[data-theme='healix'] .login input { background: #f6f7f9; border-color: #e3e6eb; color: var(--fg); }
html[data-theme='healix'] .loader { border-color: #e3e6eb; border-top-color: var(--hx-blue); }
html[data-theme='healix'] .tp:hover { background: #f4f6f9; }
html[data-theme='healix'] .labchart .ax { fill: #8a9099; }
html[data-theme='healix'] .labchart line[stroke='rgba(255,255,255,0.05)'], html[data-theme='healix'] .labchart line[stroke='rgba(255,255,255,0.08)'] { stroke: #eceef2; }
html[data-theme='healix'] .labchart line[stroke='rgba(255,255,255,0.2)'] { stroke: #c5ccd6; }
html[data-theme='healix'] .labchart circle[fill='#05070c'] { fill: #fff; }

/* ---------- Schermi più piccoli ---------- */
@media (max-width: 1360px) {
  .hx-ov { grid-template-columns: 240px minmax(0, 1fr) 300px; gap: 16px; }
  .hx-qr svg { width: 70px; height: 70px; }
  .hx-id-body { gap: 10px; }
  .mono-s { font-size: 10.5px !important; }
  .hx-tab { padding: 0 14px 0 12px; }
}
@media (max-width: 1180px) {
  .hx-tab span { display: none; }
  .hx-tab { padding: 0 12px; }
  .hx-main.view-overview { overflow: auto; }
  .hx-ov { height: auto; grid-template-columns: 250px minmax(0, 1fr); }
  .hx-left { overflow: visible; }
  .hx-stage { min-height: 640px; }
  .hx-panel { grid-column: 1 / -1; }
  .hx-panel-in { overflow: visible; }
  .hx-anchor { display: none; }
}
@media (max-width: 860px) {
  .hx-top { grid-template-columns: 1fr auto; padding: 12px 14px 8px; }
  .hx-nav, .hx-rail { display: none; }
  .hx-body { grid-template-columns: minmax(0, 1fr); }
  .hx-main { padding: 4px 12px 90px; }
  .hx-share { margin: 0 12px 8px; }
  .hx-ov { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .hx-stage { order: -1; min-height: 0; height: 72vh; height: 72dvh; }
  /* figura intera: un po' più bassa, così il pulsante «Gira» resta sopra la barra in basso */
  .hx-figure { height: min(88cqh, 176cqw); }
  .hx-panel { order: 0; }
  .hx-left { order: 1; }
  .hx-tools.side { top: 62px; transform: none; }
  .hx-tools.tl { right: 10px; gap: 6px; }
  .hx-tools.tl > .hx-menu-wrap { position: static; }
  .hx-tools.tl .hx-menu.scans { left: 0; right: 0; width: auto; }
  .hx-chip-mini { padding: 0 12px; }
  .hx-chip-mini span { display: none; }
  .hx-tools.tl .ms-pop { left: 0; right: 0; width: auto; }
  .ms-btn .ms-text { max-width: 96px; }
  .hx-bottom { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 20; justify-content: space-around; padding: 6px;
    border-radius: 22px; background: rgba(255, 255, 255, 0.94); border: 1px solid #e8eaee; box-shadow: 0 10px 30px rgba(16, 24, 40, 0.12);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .hx-bottom button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; font-size: 10px; color: #4a515b; min-width: 52px; }
  .hx-bottom button.active { color: #fff; background: linear-gradient(180deg, #2c7bff, #1662f5); }
}

@media print {
  .hx-top, .hx-rail, .hx-tools, .hx-bottom, .hx-turn, .hx-curve, .hx-p-foot { display: none !important; }
  .hx, .hx-main { height: auto; overflow: visible; }
}
html[data-theme='healix'] .splash h2 b { color: #0f9f90; }
