/* ===== barra laterale a pillola con lente (solo desktop; sotto i 760 px resta il menu a scomparsa di sempre) =====
   Riusa il menu a sinistra gia' esistente nella sua modalita' «fisso»: ogni area diventa un'icona, le sue pagine escono in un riquadro accanto alla barra.
   Le voci in alto (apri/chiudi etichette, Home) e la lente sono inserite da vetro-barra.js. */
@media(min-width:761px){
 html.menu-fisso body .menu-laterale{top:calc(var(--testata-h,64px) + 16px)!important;bottom:auto!important;left:16px!important;width:68px!important;max-width:68px!important;height:auto!important;
  padding:117px 10px 10px!important;border-radius:34px!important;overflow:visible!important;max-height:none!important;display:block;
  background:var(--vt-gloss)!important;backdrop-filter:var(--vt-blur);-webkit-backdrop-filter:var(--vt-blur);border:1px solid var(--vt-line)!important;box-shadow:var(--vt-ombra)!important;
  transition:width 240ms var(--ease-out),border-radius 240ms var(--ease-out)}
 html.menu-fisso.vt-etichette body .menu-laterale{width:236px!important;max-width:236px!important;border-radius:30px!important}
 html.menu-fisso body .contenuto,html.menu-fisso body .barra-pagina,html.menu-fisso body .versione{margin-left:104px;transition:margin-left 240ms var(--ease-out)}
 html.menu-fisso.vt-etichette body .contenuto,html.menu-fisso.vt-etichette body .barra-pagina,html.menu-fisso.vt-etichette body .versione{margin-left:272px}
 html.menu-fisso body .menu-lat-testa,html.menu-fisso body .menu-lat-vuoto{display:none!important}
 /* in alto restano fissi tasto e Home (non scorrono); scorre solo l'elenco delle aree */
 html.menu-fisso body .menu-lat-corpo{padding:0;flex:none;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;max-height:calc(100vh - var(--testata-h,64px) - 32px - 127px);
  scrollbar-width:thin;scrollbar-color:#ffffff30 transparent}
 .vt-scorre .vt-rail-lente{transition:none!important}

 /* lente e voci in alto */
 .vt-rail-lente{position:absolute;left:10px;right:10px;top:0;height:46px;border-radius:23px;pointer-events:none;z-index:0;background:linear-gradient(135deg,#4cc0f0,#0369a1);
  box-shadow:0 10px 24px -6px #0369a1cc,inset 0 1px 0 #ffffff90,inset 0 -8px 14px #0000001f;transform:translateY(var(--y,0px));transition:transform 280ms var(--ease-io),opacity 160ms}
 .vt-rail-lente.fantasma{background:var(--vt-gloss-h);box-shadow:inset 0 0 0 1px var(--vt-line);opacity:0}
 .vt-rail-top{position:absolute;left:10px;right:10px;top:10px;z-index:1}
 .vt-rail-top .vt-sep{height:1px;margin:7px 10px 0;background:var(--vt-line)}

 /* voci: stessa forma per tasto, Home e aree */
 html.menu-fisso body .vt-rail-top .vt-voce,html.menu-fisso body .menu-laterale .menu-area>summary{position:relative;z-index:1;display:flex;align-items:center;gap:14px;width:100%;box-sizing:border-box;height:46px;min-height:46px;margin:0 0 4px;padding:0 12px;
  border:0!important;border-radius:23px;background:transparent!important;box-shadow:none!important;backdrop-filter:none;list-style:none;cursor:pointer;overflow:hidden;white-space:nowrap;
  font:500 14.5px/1 Outfit,sans-serif;color:transparent!important;transition:color 160ms,transform 160ms var(--ease-out);text-decoration:none}
 html.menu-fisso.vt-etichette body .vt-rail-top .vt-voce,html.menu-fisso.vt-etichette body .menu-laterale .menu-area>summary{color:#c4d6e6!important;transition-delay:70ms}
 html[data-theme="light"].menu-fisso.vt-etichette body .vt-rail-top .vt-voce,html[data-theme="light"].menu-fisso.vt-etichette body .menu-laterale .menu-area>summary{color:#33506a!important}
 html.menu-fisso body .menu-laterale .menu-area>summary{justify-content:flex-start;text-align:left}
 html.menu-fisso body .menu-laterale .menu-area>summary::after{margin-left:auto;opacity:0;transition:transform 260ms var(--ease-out),opacity 160ms}
 html.menu-fisso.vt-etichette body .menu-laterale .menu-area>summary::after{opacity:.6}
 html.menu-fisso body .vt-rail-top .vt-voce:active,html.menu-fisso body .menu-laterale .menu-area>summary:active{transform:scale(.97)}

 /* icone: maschere colorate come il testo */
 .vt-ic{flex:0 0 22px;width:22px;height:22px;background:#a9bccd;-webkit-mask:var(--ic) center/contain no-repeat;mask:var(--ic) center/contain no-repeat;transition:background 150ms}
 html.menu-fisso body .menu-laterale .menu-area>summary::before{content:"";flex:0 0 22px;width:22px;height:22px;background:#a9bccd;-webkit-mask:var(--ic,var(--ic-def)) center/contain no-repeat;mask:var(--ic,var(--ic-def)) center/contain no-repeat;transition:background 150ms}
 html[data-theme="light"] .vt-ic,html[data-theme="light"].menu-fisso body .menu-laterale .menu-area>summary::before{background:#44607b}
 html.menu-fisso body .vt-voce.vt-attiva,html.menu-fisso body .menu-area>summary.vt-attiva,html.menu-fisso.vt-etichette body .menu-area>summary.vt-attiva,html.menu-fisso.vt-etichette body .vt-rail-top .vt-voce.vt-attiva{color:#fff!important}
 html.menu-fisso body .vt-voce.vt-attiva .vt-ic,html.menu-fisso body .menu-area>summary.vt-attiva::before{background:#fff!important}

 /* riquadro dell'area: esce accanto alla barra */
 html.menu-fisso body .menu-laterale .menu-area{position:static;display:block}
 /* le pagine dell'area stanno SOTTO l'area, dentro la barra (solo con i nomi visibili: un clic su un'area espande da sola la barra) */
 html.menu-fisso body .menu-laterale .menu-area>.menu-voci{position:static;width:auto;max-height:none;overflow:visible;margin:0 0 8px 22px;padding:2px 0 4px 10px;border:0!important;border-left:1px solid var(--vt-line)!important;
  border-radius:0;background:transparent!important;box-shadow:none!important;backdrop-filter:none;-webkit-backdrop-filter:none;animation:none}
 html.menu-fisso:not(.vt-etichette) body .menu-laterale .menu-area>.menu-voci{display:none}
 html.menu-fisso body .menu-laterale .menu-voci .menu-gruppo{margin:2px 0;border:0!important;background:transparent!important;border-radius:0}
 html.menu-fisso body .menu-laterale .menu-voci .menu-gruppo>summary.menu-titolo{background:transparent!important;padding:8px 6px 4px;font-size:11.5px;font-weight:600;letter-spacing:.3px;color:#7f97ab!important;cursor:pointer}
 html[data-theme="light"].menu-fisso body .menu-laterale .menu-voci .menu-gruppo>summary.menu-titolo{color:#5d7890!important}
 html.menu-fisso body .menu-laterale .menu-voci a{display:block;margin:1px 0;padding:8px 12px;min-height:34px;border-radius:14px;font-size:13.5px;line-height:1.25;color:#c4d6e6;white-space:normal;transition:background 150ms,color 150ms,transform 160ms var(--ease-out)}
 html[data-theme="light"].menu-fisso body .menu-laterale .menu-voci a{color:#33506a}
 html.menu-fisso body .menu-laterale .menu-voci a:active{transform:scale(.98)}
 html.menu-fisso body .menu-laterale .menu-voci a.active{background:linear-gradient(135deg,#4cc0f0,#0369a1)!important;color:#fff!important;font-weight:600;box-shadow:0 8px 18px -8px #0369a1cc,inset 0 1px 0 #ffffff80}
 @media (hover:hover){html.menu-fisso body .menu-laterale .menu-voci a:not(.active):hover{background:var(--vt-gloss-h);color:#fff}
  html[data-theme="light"].menu-fisso body .menu-laterale .menu-voci a:not(.active):hover{color:#0369a1}}
 /* apertura e chiusura: l'altezza scorre, le voci entrano una dopo l'altra */
 :root{interpolate-size:allow-keywords}
 html.menu-fisso body .menu-laterale details::details-content{block-size:0;overflow:clip;opacity:0;transition:block-size 300ms var(--ease-out),opacity 220ms,content-visibility 300ms allow-discrete}
 html.menu-fisso body .menu-laterale details[open]::details-content{block-size:auto;opacity:1}
 html.menu-fisso body .menu-laterale details[open] .menu-voci a{animation:vt-voce 340ms var(--ease-out) both;animation-delay:calc(var(--n,0)*26ms + 40ms)}
}
@keyframes vt-voce{from{opacity:0;transform:translateX(-12px)}to{opacity:1;transform:none}}

/* etichetta istantanea sulle icone (solo barra chiusa) */
.vt-tip-rail{position:fixed;z-index:96;padding:6px 11px;border-radius:12px;font-size:13px;color:var(--t1,#eef5fb);background:var(--vt-gloss-h);backdrop-filter:var(--vt-blur);border:1px solid var(--vt-line);box-shadow:var(--vt-ombra);pointer-events:none;
 opacity:0;transform:translateX(-4px) scale(.97);transform-origin:left center;transition:opacity 125ms var(--ease-out),transform 125ms var(--ease-out)}
html[data-theme="light"] .vt-tip-rail{background:#ffffffee;color:#0c1f33}
.vt-tip-rail.su{opacity:1;transform:none}.vt-tip-rail.istante{transition-duration:0ms}

/* icone per area (le sceglie vetro-barra.js dal nome dell'area) */
.menu-area>summary{--ic-def:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1.5'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1.5'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1.5'/%3E%3C/svg%3E")}
[data-vt-ic="casa"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 11l9-8 9 8'/%3E%3Cpath d='M5 10v10h14V10'/%3E%3C/svg%3E")}
[data-vt-ic="menu"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='16' rx='3'/%3E%3Cpath d='M9 4v16'/%3E%3C/svg%3E")}
[data-vt-ic="persona"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21v-1a6 6 0 0 1 6-6h4a6 6 0 0 1 6 6v1'/%3E%3C/svg%3E")}
[data-vt-ic="persone"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2'/%3E%3Ccircle cx='9' cy='7' r='4'/%3E%3Cpath d='M23 21v-2a4 4 0 0 0-3-3.9M16 3.1a4 4 0 0 1 0 7.8'/%3E%3C/svg%3E")}
[data-vt-ic="camion"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6h13v11H1z'/%3E%3Cpath d='M14 10h4l4 4v3h-8z'/%3E%3Ccircle cx='6' cy='18' r='2'/%3E%3Ccircle cx='18' cy='18' r='2'/%3E%3C/svg%3E")}
[data-vt-ic="magazzino"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 8l-9-5-9 5v9l9 5 9-5z'/%3E%3Cpath d='M3.3 7.5L12 12l8.7-4.5M12 22V12'/%3E%3C/svg%3E")}
[data-vt-ic="produzione"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 21V9l6 4V9l6 4V5h8v16z'/%3E%3Cpath d='M7 17h2M13 17h2M18 17h1'/%3E%3C/svg%3E")}
[data-vt-ic="euro"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3Cpath d='M6 9v.01M18 15v.01'/%3E%3C/svg%3E")}
[data-vt-ic="scudo"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 3v6c0 5-3.5 8-8 9-4.5-1-8-4-8-9V6z'/%3E%3Cpath d='M9 12l2 2 4-4'/%3E%3C/svg%3E")}
[data-vt-ic="regolazioni"]{--ic:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 21v-7M4 10V3M12 21v-9M12 8V3M20 21v-5M20 12V3M1 14h6M9 8h6M17 16h6'/%3E%3C/svg%3E")}
@media(max-width:760px){.vt-rail-top,.vt-rail-lente,.vt-tip-rail{display:none}}
@media(prefers-reduced-motion:reduce){.vt-rail-lente,.menu-laterale,.contenuto{transition:none!important}.menu-area>.menu-voci{animation:none!important}}

/* ===== ritocchi dopo la prova di Marco (2026-11-24, sera) ===== */
/* la freccia delle aree non si deve schiacciare quando il nome e lungo (es. Articoli e magazzino) */
html.menu-fisso body .menu-laterale .menu-area>summary::after{flex:none;width:7px;height:7px;min-width:7px}
html.menu-fisso body .menu-laterale .menu-area>summary{font-size:14px}
/* di un area aperta resta sempre visibile il titolo in cima all elenco (anche scorrendo le sue pagine) */
html.menu-fisso body .menu-laterale .menu-area[open]>summary:not(#z){position:sticky;top:0;z-index:3;background:var(--vt-pop)!important}
html.menu-fisso body .menu-laterale .menu-area[open]>summary.vt-attiva:not(#z){background:linear-gradient(135deg,#0b86c9,#0369a1)!important}
/* anello di focus: solo da tastiera, dentro il bordo della voce (con il mouse non deve comparire) */
html.menu-fisso body .menu-laterale summary:focus:not(:focus-visible),html.menu-fisso body .vt-rail-top .vt-voce:focus:not(:focus-visible){outline:none}
html.menu-fisso body .menu-laterale summary:focus-visible,html.menu-fisso body .vt-rail-top .vt-voce:focus-visible{outline:2px solid #4cc0f0;outline-offset:-2px}
/* gruppi di un area: titolo cliccabile, con una zona di hover arrotondata (i gruppi si aprono uno alla volta con un clic) */
html.menu-fisso body .menu-laterale .menu-voci .menu-gruppo>summary.menu-titolo:not(#z){font-size:13px;font-weight:500;padding:8px 10px;margin:2px 0;border-radius:12px;cursor:pointer;transition:background 150ms}
@media (hover:hover) and (pointer:fine){html.menu-fisso body .menu-laterale .menu-voci .menu-gruppo>summary.menu-titolo:not(#z):hover{background:var(--vt-gloss-h)!important}}

/* area aperta e attiva: testo e icona bianchi sul blu anche nel tema chiaro (una regola piu specifica li rendeva scuri) */
html[data-theme] body .menu-laterale .menu-area>summary.vt-attiva:not(#z){color:#fff!important}
html[data-theme] body .menu-laterale .menu-area>summary.vt-attiva:not(#z)::before{background:#fff!important}
/* in fondo all elenco delle aree le voci sfumano invece di essere tagliate di netto */
html.menu-fisso body .menu-lat-corpo{-webkit-mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent 100%);mask-image:linear-gradient(to bottom,#000 calc(100% - 22px),transparent 100%)}
/* la sfumatura crea un livello proprio: l elenco deve stare SOPRA la lente (altrimenti la lente copre testo e icone) */
html.menu-fisso body .menu-lat-corpo{position:relative;z-index:2}

/* l elenco delle aree scorre con la rotella ma senza barra visibile: la barra occupava 10 px e faceva sporgere la lente e il pulsante attivo */
html.menu-fisso body .menu-lat-corpo::-webkit-scrollbar{width:0;height:0}

/* con la barra laterale il tasto Home in alto e doppio (c e gia la casetta): si nasconde, restano Preferiti, Guida e Novita */
@media(min-width:761px){html.menu-fisso body .menu-barra a.menu-home[href="/"]{display:none}}

/* con la barra allargata i nomi sono gia visibili: l etichetta dell icona non deve mai comparire (restava sopra il menu aperto) */
html.vt-etichette .vt-tip-rail{display:none!important}

/* contenuto centrato nello schermo (prima restava a sinistra per il margine fisso della barra) */
html.menu-fisso body .contenuto,html.menu-fisso body .barra-pagina{margin-left:max(104px,calc((100% - 1500px)/2))}
html.menu-fisso.vt-etichette body .contenuto,html.menu-fisso.vt-etichette body .barra-pagina{margin-left:max(272px,calc((100% - 1500px)/2))}
@media(max-width:760px){html.menu-fisso body .contenuto,html.menu-fisso body .barra-pagina{margin-left:0}}
/* riga «Righe: N» in fondo alla tabella: stessa fascia, carattere e colore dell intestazione */
html body .tabella-scroll:not(#z)::after{padding:10px 22px!important;font-size:13px!important;font-weight:600!important;line-height:1.3;letter-spacing:0;color:#33506a!important}
html[data-theme="dark"] body .tabella-scroll:not(#z)::after{color:#c4d6e6!important}

/* «Registra uscita» (e altri pulsanti rossi): testo leggibile in vetro */
html body .stop:not(#z){background:linear-gradient(135deg,#e0556a,#b3283d)!important;color:#fff!important;border:1px solid #ffffff40!important;font-weight:600}
html body .stop:not(#z):disabled{opacity:.6;color:#fff!important}

/* finestre aperte DENTRO una tabella o una scheda (es. «Movimento…» su una scadenza): la sfocatura di un contenitore renderebbe la finestra «fissa» relativa a lui, riducendola a una riga */
html body .tabella-scroll:has(.ts-editor):not(#z),html body .scheda:has(.ts-editor .ts-editor):not(#z),html body .scheda:has(.tabella-scroll .ts-editor):not(#z),html body :is(table,thead,tbody,tr,td,th):has(.ts-editor):not(#z){backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transform:none!important;filter:none!important;contain:none!important}
