/* Tema "Vetro": corpo di vetro, organi illuminati, schede smerigliate. Attivo con <html data-theme="glass">. */
html[data-theme='glass'] {
  --bg: #eef2f8;
  --fg: #1c2838;
  --muted: #6b7788;
  --dim: #97a2b1;
  --line: rgba(28, 40, 56, 0.08);
  --line2: rgba(28, 40, 56, 0.12);
  --card: rgba(255, 255, 255, 0.55);
  --tile: rgba(255, 255, 255, 0.62);
  --blue: #2f6fd8;
  --blue2: #2f6fd8;
  --gl-navy: #1f3b63;
  --gl-navy-g: linear-gradient(180deg, #27477a, #1b365c);
  --gl-ink: #16202e;
  --gl-text: #2a3547;
  --gl-muted: #6b7788;
  --gl-red: #e5483b;
  --gl-orange: #f09a2c;
  --gl-green: #2fae78;
  --gl-glass: rgba(255, 255, 255, 0.52);
  --gl-glass2: rgba(255, 255, 255, 0.7);
  --gl-edge: rgba(255, 255, 255, 0.86);
  --gl-shadow: 0 1px 1px rgba(31, 59, 99, 0.03), 0 12px 34px rgba(31, 59, 99, 0.08);
  --font: 'Inter Variable', 'Segoe UI Variable Text', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: light;
}
html[data-theme='glass'] body { background: #eef2f8; color: var(--fg); font-size: 13px; letter-spacing: -0.005em; }
html[data-theme='glass'] ::selection { background: rgba(47, 111, 216, 0.2); }
html[data-theme='glass'] ::-webkit-scrollbar-thumb { background: rgba(28, 40, 56, 0.14); }

/* ---------- Guscio ---------- */
.gl { position: relative; height: 100vh; height: 100dvh; display: flex; flex-direction: column; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(238, 242, 248, 0.9), rgba(238, 242, 248, 0) 120px),
    radial-gradient(900px 600px at 0% 0%, rgba(255, 255, 255, 0.85), transparent 60%),
    url(/img/glass/bg.webp) center / cover no-repeat,
    #e8eef6; }
.gl-top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 18px 26px 16px 30px; position: relative; z-index: 20; }
.gl-brand { display: flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 650; letter-spacing: -0.035em; color: #1b2a44; white-space: nowrap; }
.gl-brand i { font-style: normal; color: #0f9f90; }
.gl-nav { display: flex; gap: 2px; padding: 4px; border-radius: 14px; background: var(--gl-glass); border: 1px solid var(--gl-edge); box-shadow: var(--gl-shadow);
  backdrop-filter: blur(18px) saturate(1.3); -webkit-backdrop-filter: blur(18px) saturate(1.3); }
.gl-tab { display: flex; align-items: center; gap: 9px; height: 40px; padding: 0 18px 0 15px; border-radius: 11px; color: var(--gl-text); font-size: 13.5px; font-weight: 500; white-space: nowrap;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s; }
.gl-tab:hover { background: rgba(255, 255, 255, 0.75); }
.gl-tab.active { background: var(--gl-navy-g); color: #fff; box-shadow: 0 6px 16px rgba(27, 54, 92, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.gl-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; }
.gl-sq { position: relative; height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  background: var(--gl-glass2); border: 1px solid var(--gl-edge); color: #243044; box-shadow: var(--gl-shadow); font-size: 14.5px; font-weight: 500;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background 0.15s; }
.gl-sq:hover, .gl-sq.on { background: rgba(255, 255, 255, 0.92); }
.gl-sq.wide { padding: 0 16px 0 14px; }
.gl-sq.user { width: 44px; padding: 0; overflow: hidden; color: #fff; border-color: rgba(255, 255, 255, 0.7); background: linear-gradient(180deg, #6caaf3, #4a8de4); box-shadow: 0 8px 18px rgba(74, 141, 228, 0.35); }
.gl-sq.user:hover, .gl-sq.user.on { filter: brightness(1.05); }
.gl-sq.user img { width: 100%; height: 100%; object-fit: cover; }
.gl-dot { position: absolute; top: 10px; right: 11px; width: 8px; height: 8px; border-radius: 50%; background: var(--gl-orange); border: 1.5px solid #fff; }
.gl .gl-right .search .icon-btn.big { width: 44px; height: 44px; border-radius: 12px; background: var(--gl-glass2); border: 1px solid var(--gl-edge); color: #243044; box-shadow: var(--gl-shadow); }
.gl .gl-right .search .icon-btn.big:hover { background: rgba(255, 255, 255, 0.92); }
.gl .search-pop { top: 54px; }
.gl.is-electron .gl-top { -webkit-app-region: drag; padding-right: 150px; }
.gl.is-electron .gl-top button, .gl.is-electron .gl-top input, .gl.is-electron .gl-top .search-pop, .gl.is-electron .gl-pop { -webkit-app-region: no-drag; }
.gl-share { display: flex; align-items: center; gap: 8px; margin: -4px 26px 10px 30px; padding: 8px 14px; border-radius: 12px; font-size: 12px; color: #294a7c;
  background: rgba(255, 255, 255, 0.6); border: 1px solid var(--gl-edge); }

.gl-menu-wrap { position: relative; }
.gl-pop { position: absolute; right: 0; top: 54px; z-index: 45; width: 286px; padding: 14px; border-radius: 18px; background: rgba(255, 255, 255, 0.94); border: 1px solid #fff;
  box-shadow: 0 24px 60px rgba(31, 45, 70, 0.22); backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
.gl-pop-head b { display: block; font-size: 15px; font-weight: 600; color: var(--gl-ink); }
.gl-pop-head span { display: block; font-size: 12px; color: var(--gl-muted); margin-top: 2px; }
.gl-pop-lbl { font-size: 11px; color: var(--gl-muted); margin: 14px 0 8px; }
.gl-pop-themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gl-pop-themes button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px 6px 7px; border-radius: 12px; border: 1px solid rgba(28, 40, 56, 0.1); font-size: 12px; color: var(--gl-text); }
.gl-pop-themes button:hover { background: rgba(28, 40, 56, 0.04); }
.gl-pop-themes button.on { border-color: var(--gl-navy); box-shadow: inset 0 0 0 1px var(--gl-navy); font-weight: 600; }
.gl-pop-themes .sw { width: 100%; height: 40px; }
.gl-pop-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px; border-radius: 10px; font-size: 13px; color: var(--gl-text); margin-top: 4px; }
.gl-pop-item:first-of-type { margin-top: 12px; }
.gl-pop-item:hover { background: rgba(28, 40, 56, 0.05); }

.gl-main { flex: 1; min-height: 0; overflow: auto; padding: 0 26px 22px 30px; position: relative; z-index: 1; }
.gl-main.view-overview { overflow: hidden; }
/* Su schermo grande la figura arriva al bordo in basso, come nel modello */
@media (min-width: 1181px) {
  .gl-main.view-overview { padding-bottom: 0; }
  .gl-main.view-overview .gl-side { padding-bottom: 22px; }
}
.gl-bottom { display: none; }

/* ---------- Panoramica ---------- */
.gl-ov { position: relative; height: 100%; display: grid; grid-template-columns: minmax(0, 1fr) clamp(560px, 49%, 720px); gap: 22px; }
.gl-stage { position: relative; min-width: 0; min-height: 0; }
.gl-stage:fullscreen { background: radial-gradient(900px 700px at 50% 30%, #ffffff, transparent 70%), url(/img/glass/bg.webp) center / cover, #e8eef6; }
.gl-stage.zoomed .gl-fig-area { cursor: grab; }
.gl-stage.dragging .gl-fig-area { cursor: grabbing; }
.gl-stage.dragging .gl-fig { transition: none; }

.gl-rail { position: absolute; left: 0; top: 22px; z-index: 6; display: flex; flex-direction: column; gap: 5px; padding: 7px 6px; border-radius: 14px;
  background: var(--gl-glass); border: 1px solid var(--gl-edge); box-shadow: var(--gl-shadow); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); }
.gl-rail-btn { position: relative; width: 42px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: #5a6680; transition: background 0.15s, color 0.15s; }
.gl-rail-btn:hover { background: rgba(255, 255, 255, 0.85); color: var(--gl-navy); }
.gl-rail-btn.active { background: var(--gl-navy-g); color: #fff; box-shadow: 0 6px 14px rgba(27, 54, 92, 0.3); }
.gl-rail-dot { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: var(--gl-orange); border: 1.5px solid #fff; }
.gl-rail-btn.active .gl-rail-dot { border-color: #27477a; }
.gl-rail-tip { position: absolute; left: calc(100% + 12px); top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 8px; background: #1c2838; color: #fff;
  font-size: 11.5px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.gl-rail-btn:hover .gl-rail-tip { opacity: 1; }

.gl-fig-area { position: absolute; left: 60px; right: 0; top: 0; bottom: 0; overflow: hidden; touch-action: none; }
.gl-fig { position: absolute; left: 50%; top: 1.5%; height: 97%; aspect-ratio: 486 / 1124; transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.2, 1); will-change: transform; }
.gl-body { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 30px 40px rgba(40, 70, 120, 0.14)); }
.gl-glow { position: absolute; opacity: 0; pointer-events: none; user-select: none; transition: opacity 0.6s ease; }
.gl-glow.on { opacity: 1; animation: gl-breathe 3.4s ease-in-out infinite; }
@keyframes gl-breathe { 0%, 100% { filter: brightness(1) saturate(1); } 50% { filter: brightness(1.14) saturate(1.2); } }
.gl-bloom { position: absolute; border-radius: 50%; pointer-events: none; mix-blend-mode: screen;
  background: radial-gradient(closest-side, rgba(255, 226, 150, 0.85), rgba(255, 160, 60, 0.5) 38%, rgba(255, 120, 40, 0.16) 66%, transparent);
  animation: gl-bloom 3.4s ease-in-out infinite; }
@keyframes gl-bloom { 0%, 100% { opacity: 0.65; transform: scale(0.94); } 50% { opacity: 1; transform: scale(1.05); } }
.gl-hot { position: absolute; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, #fff3d6 0 18%, rgba(255, 170, 70, 0.95) 32%, rgba(255, 120, 40, 0.35) 55%, transparent 72%);
  animation: gl-hot 2.6s ease-in-out infinite; }
@keyframes gl-hot { 0%, 100% { transform: scale(0.85); opacity: 0.7; } 50% { transform: scale(1.25); opacity: 1; } }
.gl-hit { position: absolute; z-index: 3; border-radius: 50%; transition: box-shadow 0.15s, background 0.15s; }
.gl-hit:hover { background: rgba(255, 255, 255, 0.1); box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.95), 0 0 0 6px rgba(47, 111, 216, 0.14); }
.gl-hit.sel { pointer-events: none; }
.gl-hit::after { content: attr(data-label); position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 5px 9px; border-radius: 8px;
  background: #1c2838; color: #fff; font-size: 11px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s; }
.gl-hit:hover::after { opacity: 1; }

.gl-zoom { position: absolute; right: 4px; bottom: 36px; z-index: 7; display: flex; flex-direction: column; gap: 10px; }
.gl-round { width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #243044; background: rgba(255, 255, 255, 0.78);
  border: 1px solid #fff; box-shadow: var(--gl-shadow); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background 0.15s, transform 0.15s; }
.gl-round:hover { background: #fff; transform: scale(1.05); }
.gl-round.sm { width: 34px; height: 34px; }

.gl-ins { position: absolute; left: 0; bottom: 22px; z-index: 7; width: min(318px, 52%); padding: 15px 15px 15px; border-radius: 20px; color: #fff;
  background: linear-gradient(160deg, rgba(80, 92, 114, 0.8), rgba(52, 62, 80, 0.84)); border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 24px 50px rgba(31, 45, 70, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.14); backdrop-filter: blur(18px) saturate(1.2); -webkit-backdrop-filter: blur(18px) saturate(1.2); }
.gl-ins-head { display: flex; align-items: center; gap: 10px; }
.gl-ins-head svg { opacity: 0.92; }
.gl-ins-head b { font-size: 38px; font-weight: 500; line-height: 1; letter-spacing: -0.03em; }
.gl-ins-head span { font-size: 17px; margin-top: 7px; }
.gl-ins-x { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.35); display: grid; place-items: center; color: #fff; transition: background 0.15s; }
.gl-ins-x:hover { background: rgba(255, 255, 255, 0.12); }
.gl-ins p { font-size: 12.5px; line-height: 1.5; color: rgba(255, 255, 255, 0.86); margin: 12px 0 13px; }
.gl-ins-btn { width: 100%; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 16px; margin-top: 8px;
  font-size: 14px; font-weight: 500; color: #eef2f7; background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.1); transition: filter 0.15s, background 0.15s; }
.gl-ins-btn:hover { background: rgba(255, 255, 255, 0.2); }
.gl-ins-btn.primary { background: #a9cdf6; color: #14243b; border-color: transparent; }
.gl-ins-btn.primary:hover { filter: brightness(1.04); background: #a9cdf6; }
.gl-ins-mini { position: absolute; left: 0; bottom: 26px; z-index: 7; display: flex; align-items: center; gap: 7px; height: 40px; padding: 0 14px 0 12px; border-radius: 12px; color: #fff;
  background: rgba(60, 72, 92, 0.8); box-shadow: 0 10px 24px rgba(31, 45, 70, 0.22); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); font-size: 13px; }
.gl-ins-mini b { font-size: 16px; font-weight: 600; }

.gl-drop { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; border-radius: 26px; background: rgba(238, 242, 248, 0.72);
  border: 2px dashed rgba(31, 59, 99, 0.35); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gl-drop-in { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--gl-navy); pointer-events: none; text-align: center; }
.gl-drop-in b { font-size: 18px; font-weight: 600; }
.gl-drop-in span { font-size: 13px; color: var(--gl-muted); }

/* Colonna destra */
.gl-side { min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; padding: 0 2px 2px;
  animation: gl-in 0.35s ease; }
.gl-side::-webkit-scrollbar { display: none; }
@keyframes gl-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.gl-head { display: flex; align-items: center; gap: 26px; padding: 12px 2px 8px; flex: none; }
.gl-head-t { display: flex; align-items: center; gap: 12px; min-width: 0; }
.gl-head-ico { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; color: #2f6fd8;
  background: radial-gradient(circle at 35% 30%, #ffffff, #cfe0fb); box-shadow: 0 4px 12px rgba(47, 111, 216, 0.22), inset 0 0 0 1px rgba(255, 255, 255, 0.9); }
.gl-head h2 { font-size: 23px; font-weight: 450; letter-spacing: -0.025em; color: #182334; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-risk { flex: 1; min-width: 190px; }
.gl-risk-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font-size: 13px; }
.gl-risk-l { color: var(--gl-ink); font-weight: 500; white-space: nowrap; }
.gl-risk-v { display: flex; align-items: baseline; gap: 5px; font-weight: 600; color: var(--gl-ink); white-space: nowrap; }
.gl-risk-v i { font-style: normal; font-size: 9px; }
.gl-risk-v.bad i { color: var(--gl-red); }
.gl-risk-v.warn i { color: var(--gl-orange); }
.gl-risk-v em { font-style: normal; font-weight: 400; color: #8a95a5; margin-left: 3px; }
.gl-risk-bar { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 9px; }
.gl-risk-bar i { height: 3px; border-radius: 2px; background: rgba(255, 255, 255, 0.95); box-shadow: 0 0 0 0.5px rgba(28, 40, 56, 0.07); }
.gl-risk-bar i.on.bad { background: var(--gl-red); }
.gl-risk-bar i.on.warn { background: var(--gl-orange); }
.gl-risk-bar i.on.none { background: #5b8fd6; }
.gl-risk-bar i.on.good { background: var(--gl-green); }

.gl-card { position: relative; background: var(--gl-glass); border: 1px solid var(--gl-edge); border-radius: 18px; box-shadow: var(--gl-shadow);
  backdrop-filter: blur(22px) saturate(1.25); -webkit-backdrop-filter: blur(22px) saturate(1.25); }
.gl-row2 { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 10px; flex: none; }
.gl-cmp { display: flex; align-items: center; gap: 16px; padding: 12px 14px 12px 12px; min-height: 112px; min-width: 0; }
.gl-mini { flex: none; width: 74px; height: 86px; border-radius: 12px; background: #fff; box-shadow: 0 2px 10px rgba(31, 59, 99, 0.08);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; }
.gl-mini-cols { display: flex; gap: 4px; }
.gl-mini .col { display: flex; flex-direction: column; gap: 2px; }
.gl-mini .col i { width: 22px; height: 5px; border-radius: 1.5px; background: #e7eaef; }
.gl-mini .col.bad i.on { background: #ef5a45; }
.gl-mini .col.warn i.on { background: var(--gl-orange); }
.gl-mini .col.good i.on { background: #37b983; }
.gl-mini .col.none i.on { background: #5b8fd6; }
.gl-mini .col.gray i.on { background: #aeb6c2; }
.gl-mini em { font-style: normal; font-size: 10.5px; color: #5c6778; font-weight: 500; }
.gl-cmp-v { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 14px minmax(0, 1fr); align-items: center; gap: 14px; min-width: 0; }
.gl-cmp-v > div { min-width: 0; }
.gl-mk { display: block; width: 4px; height: 8px; border-radius: 1px; background: #aeb6c2; margin-bottom: 8px; }
.gl-mk.bad { background: #ef5a45; }
.gl-mk.warn { background: var(--gl-orange); }
.gl-mk.good { background: #37b983; }
.gl-mk.none { background: #5b8fd6; }
.gl-cmp-v span { display: block; font-size: 12.5px; color: var(--gl-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-cmp-v b { display: block; font-size: clamp(22px, 1.85vw, 30px); font-weight: 400; letter-spacing: -0.035em; color: var(--gl-ink); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-cmp-v b.ref { font-size: 21px; }
.gl-cmp-v b small { font-size: 11.5px; color: #7d8899; margin-left: 3px; letter-spacing: 0; }
.gl-cmp-v em { display: block; font-style: normal; font-size: 11px; color: #8a95a5; margin-top: 1px; white-space: nowrap; }
.gl-cmp-sep { width: 14px; height: 64px; }
.gl-cmp-sep path { fill: none; stroke: #d3d9e2; stroke-width: 1.2; vector-effect: non-scaling-stroke; }
.gl-trend { padding: 15px 16px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; min-width: 0; }
.gl-trend.wide { grid-column: 1 / -1; }
.gl-trend p { font-size: 13px; color: #5c6778; line-height: 1.5; }
.gl-trend p b { color: var(--gl-ink); font-weight: 600; }
.gl-navy-btn { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 13px; border-radius: 8px; background: var(--gl-navy-g);
  color: #fff; font-size: 12.5px; font-weight: 500; box-shadow: 0 4px 10px rgba(27, 54, 92, 0.25); transition: filter 0.15s; }
.gl-navy-btn:hover { filter: brightness(1.12); }

.gl-key { padding: 15px 16px 16px; flex: none; }
.gl-sec-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.gl-sec-h h3 { font-size: 18px; font-weight: 450; letter-spacing: -0.02em; color: #182334; white-space: nowrap; }
.gl-key-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.gl-key-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gl-key-grid.n1 { grid-template-columns: minmax(0, 1fr); }
.gl-mc { text-align: left; display: flex; flex-direction: column; min-width: 0; padding: 13px 13px 10px; min-height: 140px; border-radius: 14px; background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.92); box-shadow: 0 1px 2px rgba(31, 59, 99, 0.04); transition: background 0.15s, box-shadow 0.15s; }
.gl-mc:hover { background: rgba(255, 255, 255, 0.86); box-shadow: 0 6px 18px rgba(31, 59, 99, 0.08); }
.gl-mc-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--gl-ink); }
.gl-mc-h > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gl-mc-h svg { flex: none; width: 26px; height: 26px; padding: 6px; border-radius: 50%; background: #fff; color: var(--gl-ink); box-shadow: 0 1px 5px rgba(31, 59, 99, 0.12); }
.gl-mc-v { display: flex; align-items: baseline; gap: 3px; margin-top: auto; padding-top: 16px; min-width: 0; }
.gl-mc-v b { font-size: 21px; font-weight: 500; letter-spacing: -0.02em; color: var(--gl-ink); white-space: nowrap; }
.gl-mc-v small { font-size: 11px; color: #7d8899; white-space: nowrap; }
.gl-mc-v em { margin-left: auto; padding-left: 6px; font-style: normal; font-size: 12.5px; color: var(--gl-ink); white-space: nowrap; }
.gl-mc-v em.bad { color: #cf3e2e; }
.gl-mc-v em.warn { color: #b86f0f; }
.gl-mc-v em.none { color: #8a95a5; font-size: 11.5px; }
.gl-bar { position: relative; display: block; height: 8px; margin-top: 10px; }
.gl-bar > span { position: absolute; inset: 0; border-radius: 4px; }
.gl-bar > i { position: absolute; top: -4px; width: 3px; height: 16px; margin-left: -1.5px; border-radius: 2px; background: var(--gl-ink); box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.95); }
.gl-bar-s { display: flex; justify-content: space-between; font-size: 10px; color: #7d8899; margin-top: 6px; }
.gl-mc.find .gl-find { margin-top: auto; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 0 3px; min-width: 0; }
.gl-find-dots { flex: none; width: 10px; height: 50px; background: radial-gradient(circle, #6e9ad8 1.3px, transparent 1.6px) center top / 10px 8px repeat-y; opacity: 0.8;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(180deg, transparent, #000 25%, #000 75%, transparent); }
.gl-find-pill { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 10px 14px; border-radius: 999px; background: #fff; text-align: center;
  box-shadow: 0 6px 16px rgba(31, 59, 99, 0.1), inset 0 0 0 1px rgba(28, 40, 56, 0.05); }
.gl-find-pill small { font-size: 11px; color: #7d8899; }
.gl-find-pill.bad small { color: #cf3e2e; }
.gl-find-pill.warn small { color: #b86f0f; }
.gl-find-pill.good small { color: #1f8f5f; }
.gl-find-pill b { font-size: 12.5px; font-weight: 600; color: var(--gl-ink); line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.gl-care { padding: 15px 16px 14px; display: flex; flex-direction: column; min-height: 230px; flex: 1; }
.gl-care .gl-sec-h { flex-wrap: wrap; }
.gl-seg { display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(28, 40, 56, 0.05); }
.gl-seg button { display: flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: 9px; font-size: 13px; color: #3a4659; white-space: nowrap; transition: background 0.15s; }
.gl-seg button:hover { background: rgba(255, 255, 255, 0.5); }
.gl-seg button.on { background: #fff; color: var(--gl-ink); font-weight: 500; box-shadow: 0 2px 8px rgba(31, 59, 99, 0.1); }
.gl-seg i { font-style: normal; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: rgba(28, 40, 56, 0.07); font-size: 11px; display: grid; place-items: center; color: #5c6778; font-weight: 500; }
.gl-care-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; margin: 0 -4px; padding: 0 4px 16px;
  scrollbar-width: none; -webkit-mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(180deg, #000 calc(100% - 22px), transparent); }
.gl-care-grid::-webkit-scrollbar { display: none; }
.gl-item { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 7px 10px 7px 7px; border-radius: 14px; background: rgba(255, 255, 255, 0.6); border: 1px solid rgba(255, 255, 255, 0.92);
  text-align: left; min-height: 80px; transition: background 0.15s, box-shadow 0.15s; }
.gl-item:hover { background: rgba(255, 255, 255, 0.88); box-shadow: 0 6px 18px rgba(31, 59, 99, 0.07); }
.gl-item-img { flex: none; width: 64px; height: 64px; border-radius: 10px; background: #fff; display: grid; place-items: center; overflow: hidden; box-shadow: inset 0 0 0 1px rgba(28, 40, 56, 0.04); }
.gl-item-img img { width: 60px; height: 60px; object-fit: contain; }
.gl-item-img.ico { color: #2f6fd8; background: linear-gradient(160deg, #ffffff, #e3ecfa); }
.gl-item-t { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.gl-item-t b { font-size: 13.5px; font-weight: 600; color: var(--gl-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-item-t span { font-size: 12px; color: #6b7788; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gl-empty { grid-column: 1 / -1; padding: 18px; text-align: center; color: var(--gl-muted); font-size: 13px; }

/* ---------- Altre pagine nel tema vetro ---------- */
.gl-page { max-width: 1440px; margin: 0 auto; }
html[data-theme='glass'] .page-head h1 { font-size: 26px; font-weight: 450; letter-spacing: -0.025em; color: #182334; }
html[data-theme='glass'] .card { background: var(--gl-glass); border: 1px solid var(--gl-edge); box-shadow: var(--gl-shadow); border-radius: 22px;
  backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); }
html[data-theme='glass'] .card-head h3 { font-size: 18px; font-weight: 500; letter-spacing: -0.02em; color: #182334; }
html[data-theme='glass'] .dot { box-shadow: none; }
html[data-theme='glass'] .round-btn { background: rgba(255, 255, 255, 0.75); border-color: #fff; color: #243044; }
html[data-theme='glass'] .round-btn:hover { background: #fff; }
html[data-theme='glass'] .btn { background: rgba(255, 255, 255, 0.72); border-color: rgba(28, 40, 56, 0.1); color: var(--gl-ink); }
html[data-theme='glass'] .btn:hover { background: #fff; }
html[data-theme='glass'] .btn.primary { background: var(--gl-navy-g); border-color: #1b365c; color: #fff; box-shadow: 0 6px 16px rgba(27, 54, 92, 0.25); }
html[data-theme='glass'] .tabs { background: var(--gl-glass); border-color: var(--gl-edge); }
html[data-theme='glass'] .tabs button { color: #3a4659; }
html[data-theme='glass'] .tabs button.active { color: #fff; background: var(--gl-navy-g); border-color: #1b365c; }
html[data-theme='glass'] .table-wrap { border-color: rgba(28, 40, 56, 0.08); background: rgba(255, 255, 255, 0.4); }
html[data-theme='glass'] th { background: rgba(255, 255, 255, 0.55); color: #6b7788; }
html[data-theme='glass'] td { border-bottom-color: rgba(28, 40, 56, 0.06); }
html[data-theme='glass'] tr.click:hover td { background: rgba(255, 255, 255, 0.6); }
html[data-theme='glass'] tr.total td { background: rgba(255, 255, 255, 0.55); }
html[data-theme='glass'] tr.planned td { background: rgba(47, 111, 216, 0.06); }
html[data-theme='glass'] .f-H, html[data-theme='glass'] .f-H b { color: #cf3e2e !important; }
html[data-theme='glass'] .f-L, html[data-theme='glass'] .f-L b { color: #b86f0f !important; }
html[data-theme='glass'] .chip, html[data-theme='glass'] .p-stat, html[data-theme='glass'] .metric, html[data-theme='glass'] .act, html[data-theme='glass'] .med,
html[data-theme='glass'] .img-item, html[data-theme='glass'] .doc-item, html[data-theme='glass'] .share { background: rgba(255, 255, 255, 0.62); border-color: rgba(255, 255, 255, 0.92); }
html[data-theme='glass'] .img-item p, html[data-theme='glass'] .d-line, html[data-theme='glass'] .t-text { color: #4a5668; }
html[data-theme='glass'] .timeline { border-left-color: rgba(28, 40, 56, 0.14); }
html[data-theme='glass'] .timeline li::before { background: #fff; border-color: #b9c3d1; }
html[data-theme='glass'] .timeline li.key::before { background: var(--gl-navy); border-color: var(--gl-navy); box-shadow: none; }
html[data-theme='glass'] .timeline li.key .t-text { color: var(--gl-ink); }
html[data-theme='glass'] .badge.good { color: #16804f; background: #e4f6ed; border-color: #c6ecd8; }
html[data-theme='glass'] .badge.warn { color: #9a5b00; background: #fff3dc; border-color: #ffe0a3; }
html[data-theme='glass'] .badge.bad { color: #c02631; background: #fdeaec; border-color: #f8c9cd; }
html[data-theme='glass'] .badge.info { color: #1f55b8; background: #e8f0fd; border-color: #cddcf8; }
html[data-theme='glass'] .note { background: rgba(255, 255, 255, 0.55); border-color: rgba(28, 40, 56, 0.08); }
html[data-theme='glass'] .note.info { background: rgba(232, 240, 253, 0.8); border-color: #d3e1f8; color: #25467e; }
html[data-theme='glass'] .note.bad { background: rgba(253, 240, 241, 0.85); border-color: #f6cfd3; color: #a3222c; }
html[data-theme='glass'] .note.good { background: rgba(238, 250, 243, 0.85); border-color: #cdeedb; color: #1c6b44; }
html[data-theme='glass'] .note.warn { background: rgba(255, 247, 232, 0.85); border-color: #fbe2b4; color: #8a5300; }
html[data-theme='glass'] .lab-item:hover { background: rgba(255, 255, 255, 0.6); }
html[data-theme='glass'] .lab-item.active { background: rgba(255, 255, 255, 0.9); border-color: rgba(31, 59, 99, 0.25); }
html[data-theme='glass'] .search-in, html[data-theme='glass'] .search-pop input { background: rgba(255, 255, 255, 0.75); border-color: rgba(28, 40, 56, 0.1); }
html[data-theme='glass'] .doc-ico { background: #e8f0fd; color: #2f6fd8; }
html[data-theme='glass'] .appt { border-bottom-color: rgba(28, 40, 56, 0.07); }
html[data-theme='glass'] .appt-date { background: rgba(255, 255, 255, 0.8); border-color: rgba(31, 59, 99, 0.2); }
html[data-theme='glass'] .appt-date span { color: #2f6fd8; }
html[data-theme='glass'] .doctor.primary { border-color: rgba(31, 59, 99, 0.3); box-shadow: var(--gl-shadow), 0 0 0 3px rgba(31, 59, 99, 0.06); }
html[data-theme='glass'] .avatar { background: linear-gradient(160deg, #6caaf3, #4a8de4); color: #fff; box-shadow: none; }
html[data-theme='glass'] .lgd.none { background: rgba(28, 40, 56, 0.08); }
html[data-theme='glass'] .tip { background: #1c2838; color: #fff; border-color: #1c2838; }
html[data-theme='glass'] .labchart .ax { fill: #7d8899; }
html[data-theme='glass'] .labchart line[stroke='rgba(255,255,255,0.05)'], html[data-theme='glass'] .labchart line[stroke='rgba(255,255,255,0.08)'] { stroke: rgba(28, 40, 56, 0.08); }
html[data-theme='glass'] .labchart line[stroke='rgba(255,255,255,0.2)'] { stroke: rgba(28, 40, 56, 0.25); }
html[data-theme='glass'] .labchart circle[fill='#05070c'] { fill: #fff; }
html[data-theme='glass'] .modal, html[data-theme='glass'] .drawer, html[data-theme='glass'] .popover, html[data-theme='glass'] .search-pop {
  background: rgba(255, 255, 255, 0.95); color: var(--fg); border-color: #fff; box-shadow: 0 24px 60px rgba(31, 45, 70, 0.2);
  backdrop-filter: blur(22px); -webkit-backdrop-filter: blur(22px); }
html[data-theme='glass'] .modal-back { background: rgba(28, 40, 56, 0.28); }
html[data-theme='glass'] .drawer-back { background: rgba(28, 40, 56, 0.16); }
html[data-theme='glass'] .form input:not([type='checkbox']), html[data-theme='glass'] .form select, html[data-theme='glass'] .form textarea {
  background: rgba(255, 255, 255, 0.85); border-color: rgba(28, 40, 56, 0.12); color: var(--fg); }
html[data-theme='glass'] .form select option, html[data-theme='glass'] .form select optgroup { background: #fff; }
html[data-theme='glass'] .link-box { background: rgba(28, 40, 56, 0.05); }
html[data-theme='glass'] .new-link { background: #eefaf3; border-color: #cdeedb; }
html[data-theme='glass'] .search-hits button:hover { background: rgba(28, 40, 56, 0.05); }
html[data-theme='glass'] .icon-btn { color: #243044; }
html[data-theme='glass'] .icon-btn:hover, html[data-theme='glass'] .icon-btn.on { background: rgba(28, 40, 56, 0.06); }
html[data-theme='glass'] .notif { border-bottom-color: rgba(28, 40, 56, 0.07); }
html[data-theme='glass'] .splash { background: radial-gradient(900px 600px at 50% 40%, #ffffff, transparent 70%), url(/img/glass/bg.webp) center / cover, #e8eef6; }
html[data-theme='glass'] .login { background: rgba(255, 255, 255, 0.7); border: 1px solid #fff; box-shadow: var(--gl-shadow); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); }
html[data-theme='glass'] .login input { background: rgba(255, 255, 255, 0.85); border-color: rgba(28, 40, 56, 0.12); color: var(--fg); }
html[data-theme='glass'] .loader { border-color: rgba(28, 40, 56, 0.1); border-top-color: var(--gl-navy); }
html[data-theme='glass'] .tp:hover { background: rgba(28, 40, 56, 0.04); }
html[data-theme='glass'] .tp.on { border-color: var(--gl-navy); box-shadow: inset 0 0 0 1px var(--gl-navy); }
html[data-theme='glass'] .tp-check { background: var(--gl-navy); }

/* ---------- Schermi più piccoli ---------- */
@media (max-width: 1320px) {
  .gl-tab { padding: 0 14px 0 12px; }
  .gl-brand { font-size: 22px; }
  .gl-head { gap: 18px; }
  .gl-head h2 { font-size: 21px; }
  .gl-cmp { gap: 12px; }
  .gl-mini { width: 62px; height: 80px; }
  .gl-mini .col i { width: 18px; }
  .gl-cmp-v { gap: 10px; }
  .gl-seg button { padding: 0 10px; }
  .gl-find-dots { display: none; }
  .gl-find-pill { padding: 9px 12px; }
  .gl-find-pill b { font-size: 12px; -webkit-line-clamp: 3; }
  .gl.is-electron .gl-tab span { display: none; }
  .gl.is-electron .gl-tab { padding: 0 13px; }
}
/* Finestre basse: barra degli organi e scheda novità più compatte, così non si sovrappongono */
@media (max-height: 840px) and (min-width: 1181px) {
  .gl-rail { gap: 3px; top: 14px; }
  .gl-rail-btn { height: 36px; }
  .gl-ins { padding: 12px 13px; }
  .gl-ins-head b { font-size: 32px; }
  .gl-ins-head span { font-size: 15px; margin-top: 5px; }
  .gl-ins p { font-size: 12px; margin: 8px 0 9px; }
  .gl-ins-btn { height: 36px; margin-top: 6px; font-size: 13px; }
}
@media (max-height: 700px) and (min-width: 1181px) {
  .gl-ins p { display: none; }
  .gl-ins-head { margin-bottom: 6px; }
}
@media (max-width: 1180px) {
  .gl-tab span { display: none; }
  .gl-tab { padding: 0 13px; }
  .gl-main.view-overview { overflow: auto; }
  .gl-ov { height: auto; grid-template-columns: minmax(0, 1fr); }
  .gl-stage { display: flex; flex-direction: column; gap: 12px; }
  .gl-fig-area { position: relative; left: auto; height: 74vh; min-height: 560px; margin-left: 60px; }
  .gl-ins, .gl-ins-mini { position: relative; left: auto; bottom: auto; width: auto; }
  .gl-ins-mini { align-self: flex-start; }
  .gl-side { overflow: visible; }
  .gl-care-grid { overflow: visible; -webkit-mask-image: none; mask-image: none; }
}
@media (max-width: 860px) {
  .gl-top { grid-template-columns: 1fr auto; padding: 12px 14px 8px; padding-top: max(12px, env(safe-area-inset-top)); }
  .gl-nav { display: none; }
  .gl-brand { font-size: 19px; gap: 8px; }
  .gl-brand svg { width: 32px; height: 32px; }
  .gl-sq.wide { display: none; }
  .gl-sq, .gl .gl-right .search .icon-btn.big { height: 40px; min-width: 40px; width: 40px; }
  .gl-main { padding: 0 12px calc(92px + env(safe-area-inset-bottom)); }
  .gl-share { margin: 0 12px 8px; }
  .gl-ov { gap: 14px; }
  .gl-stage { height: auto; min-height: 0; display: flex; flex-direction: column; gap: 10px; }
  .gl-rail { position: relative; top: 0; flex-direction: row; overflow-x: auto; scrollbar-width: none; align-self: stretch; padding: 5px; }
  .gl-rail::-webkit-scrollbar { display: none; }
  .gl-rail-btn { flex: none; }
  .gl-rail-tip { display: none; }
  .gl-fig-area { position: relative; left: 0; margin-left: 0; height: 62vh; height: 62dvh; min-height: 420px; border-radius: 22px; }
  .gl-fig { height: 97%; }
  .gl-ins, .gl-ins-mini { position: relative; left: auto; bottom: auto; width: auto; }
  .gl-ins-mini { align-self: flex-start; }
  .gl-head { flex-direction: column; align-items: stretch; gap: 12px; padding-top: 4px; }
  .gl-row2 { grid-template-columns: minmax(0, 1fr); }
  .gl-key-grid, .gl-key-grid.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .gl-key-grid > :nth-child(3) { grid-column: 1 / -1; }
  .gl-care-grid { grid-template-columns: minmax(0, 1fr); }
  .gl-care .gl-sec-h { flex-direction: column; align-items: flex-start; }
  .gl-seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
  .gl-pop { position: fixed; left: 12px; right: 12px; top: 64px; width: auto; }
  .gl-bottom { display: flex; position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 30; justify-content: space-around; padding: 6px;
    border-radius: 20px; background: rgba(255, 255, 255, 0.82); border: 1px solid #fff; box-shadow: 0 12px 30px rgba(31, 45, 70, 0.14);
    backdrop-filter: blur(20px) saturate(1.3); -webkit-backdrop-filter: blur(20px) saturate(1.3); }
  .gl-bottom button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px; border-radius: 14px; font-size: 10px; color: #4a5668; min-width: 56px; }
  .gl-bottom button.active { color: #fff; background: var(--gl-navy-g); }
}
@media (max-width: 420px) {
  .gl-cmp { flex-direction: column; align-items: stretch; }
  .gl-mini { flex-direction: row; width: auto; height: auto; padding: 8px 12px; justify-content: flex-start; gap: 12px; }
  .gl-key-grid, .gl-key-grid.n2 { grid-template-columns: minmax(0, 1fr); }
}

@media print {
  .gl-top, .gl-rail, .gl-zoom, .gl-ins, .gl-ins-mini, .gl-bottom { display: none !important; }
  .gl, .gl-main { height: auto; overflow: visible; }
}
html[data-theme='glass'] .splash h2 b { color: #0f9f90; }

/* Zone aggiunte (schiena, vene, metabolismo): bagliore disegnato, senza immagine */
.gl-cssglow { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(5px);
  background: radial-gradient(closest-side, rgba(255, 196, 120, 0.95), rgba(255, 120, 50, 0.7) 45%, rgba(240, 80, 40, 0.28) 72%, transparent);
  animation: gl-bloom 3.4s ease-in-out infinite; }
