/* gestionalemagazzino.it — il disegno PROPRIO del magazzino (2026-10-20): scena d'apertura «il registro, il prodotto e il
   DDT», schermate dei moduli, colli sul bancale, cassa dell'invito finale e sezioni della home. Caricato SOLO da questo
   pacchetto (n6_asset_pacchetto), dopo n6.css. Classi tutte «mg-». Il movimento lo danno mg.js (classe «acceso» sulle
   schermate a video) e bx-vivo del tema. Accento: il verde petrolio (#0f766e) col cartone (#c8a26b) dei colli. */

/* ============================================================ pezzi comuni */
.mg-badge-rosso { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: #dc2626; color: #fff; font: 800 12px Inter, sans-serif; }
.t-in { --mc: #15803d; --mf: #dcfce7; }
.t-out { --mc: #b91c1c; --mf: #fee2e2; }
.t-move { --mc: #1d4ed8; --mf: #dbeafe; }

/* ============================================================ la scena d'apertura */
.bx-scena--mg { height: 560px; }
.bx-scena--mg > * { position: absolute; }
/* il registro dei movimenti a sinistra */
.mg-registro { left: 0; top: 70px; width: 292px; padding: 16px 14px; border-radius: 22px; background: #fff; box-shadow: 0 30px 60px rgba(0, 40, 40, .4); }
.mg-registro-testa { display: flex; justify-content: space-between; align-items: center; padding: 0 4px 10px; }
.mg-registro-testa b { font: 800 16px var(--titoli); color: var(--titolo); }
.mg-registro-testa span { display: grid; place-items: center; min-width: 26px; height: 26px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font: 800 12px Inter, sans-serif; }
.mg-mov { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 9px 8px; border-radius: 12px; border-left: 4px solid var(--mc); background: linear-gradient(90deg, var(--mf), #fff 60%); }
.mg-mov + .mg-mov { margin-top: 5px; }
.mg-mov-q { font: 800 13px var(--mono); color: var(--mc); white-space: nowrap; }
.mg-mov-c { min-width: 0; }
.mg-mov-c b { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 700 13px Inter, sans-serif; color: var(--titolo); }
.mg-mov-c small { display: block; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font: 500 11px Inter, sans-serif; color: var(--debole); }
.mg-mov time { font: 600 11px var(--mono); color: var(--debole); }
/* il cartellino del prodotto al centro */
.mg-cartellino { left: 318px; top: 16px; width: 384px; padding: 20px; border-radius: 24px; background: #fff; box-shadow: 0 36px 72px rgba(0, 40, 40, .45); }
.mg-cartellino::before { content: ""; position: absolute; left: 50%; top: -10px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 6px #e2e8f0; }
.mg-cart-testa { display: flex; gap: 12px; align-items: center; padding-bottom: 14px; border-bottom: 1px dashed #cbd5e1; }
.mg-cart-ico { display: grid; place-items: center; flex: none; width: 50px; height: 50px; border-radius: 15px; background: #ccfbf1; color: #0f766e; font-size: 21px; }
.mg-cart-testa b { display: block; font: 800 17px var(--titoli); color: var(--titolo); }
.mg-cart-testa small { font: 600 12px var(--mono); color: var(--debole); }
.mg-cart-tot { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 10px; }
.mg-cart-tot small { font: 700 12.5px Inter, sans-serif; color: var(--debole); text-transform: uppercase; letter-spacing: .06em; }
.mg-cart-tot b { font: 900 44px/1 var(--titoli); color: #0f766e; }
.mg-cart-tot em { font: 700 16px Inter, sans-serif; font-style: normal; color: var(--debole); }
.mg-cart-dep { display: grid; gap: 9px; }
.mg-cart-dep div { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font: 600 13px Inter, sans-serif; color: var(--titolo); }
.mg-cart-dep i { height: 12px; border-radius: 6px; background: #f1f5f9; position: relative; overflow: hidden; }
.mg-cart-dep i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: var(--p); border-radius: 6px; background: linear-gradient(90deg, #14b8a6, #0f766e); }
.mg-cart-dep b { font: 800 14px var(--mono); text-align: right; }
.mg-cart-piede { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 12px; border-top: 1px dashed #cbd5e1; font: 600 12px Inter, sans-serif; color: var(--debole); }
.mg-cart-piede i { margin-right: 4px; }
.mg-cart-piede span:first-child i { color: #15803d; }
.mg-cart-piede span:last-child i { color: #b91c1c; }
.mg-cart-piede b { color: var(--titolo); }
/* il DDT a destra */
.mg-ddt { left: 730px; top: 96px; width: 222px; padding: 16px; border-radius: 6px 6px 18px 18px; background: #fffdf7; box-shadow: 0 30px 60px rgba(0, 40, 40, .42); border-top: 6px solid #0f766e; }
.mg-ddt-testa small { display: block; font: 700 11px Inter, sans-serif; letter-spacing: .12em; color: var(--debole); }
.mg-ddt-testa b { font: 900 30px var(--mono); color: var(--titolo); }
.mg-ddt-testa span { display: block; font: 600 12.5px Inter, sans-serif; color: var(--tenue); }
.mg-ddt-righe { margin-top: 12px; border-top: 1px solid #e2e8f0; }
.mg-ddt-righe div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dotted #cbd5e1; font: 500 12.5px Inter, sans-serif; color: var(--titolo); }
.mg-ddt-righe b { font: 700 12.5px var(--mono); }
.mg-timbro { display: inline-block; margin-top: 14px; padding: 6px 10px; border: 3px solid #15803d; border-radius: 8px; color: #15803d; font: 900 11.5px Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; rotate: -6deg; }
.mg-volante { display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; border-radius: 18px; background: #fff; box-shadow: 0 22px 44px rgba(0, 40, 40, .32); z-index: 2; }
.mg-volante > i { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; color: #fff; font-size: 16px; background: linear-gradient(160deg, #f59e0b, #b45309); }
.mg-volante b { display: block; font: 800 14.5px var(--titoli); color: var(--titolo); }
.mg-volante small { font: 500 12px Inter, sans-serif; color: var(--debole); }
.mg-volante--1 { left: 676px; top: 420px; rotate: 2deg; }
.mg-volante--2 { left: 360px; top: 470px; rotate: -2deg; }
.mg-volante--2 > i { background: linear-gradient(160deg, #a78bfa, #6d28d9); }

@keyframes mg-sale { from { opacity: 0; translate: 0 60px; } }
@keyframes mg-da-sx { from { opacity: 0; translate: -70px 0; } }
@keyframes mg-da-dx { from { opacity: 0; translate: 70px 0; rotate: 6deg; } }
@keyframes mg-entra { from { opacity: 0; translate: -14px 0; } }
@keyframes mg-ondeggia { from { translate: 0 0; } to { translate: 0 -10px; } }
@keyframes mg-timbra { 0% { opacity: 0; scale: 1.8; } 60% { opacity: 1; scale: .95; } 100% { opacity: 1; scale: 1; } }
@keyframes mg-riempi { from { width: 0; } }
.bx-attesa .mg-registro, .bx-attesa .mg-cartellino, .bx-attesa .mg-ddt, .bx-attesa .mg-volante { opacity: 0; }
.bx-vivo .mg-cartellino { animation: mg-sale .8s .1s var(--ease) both; }
.bx-vivo .mg-registro { animation: mg-da-sx .85s .35s var(--ease) both; }
.bx-vivo .mg-ddt { animation: mg-da-dx .8s .5s var(--ease) both; }
.bx-vivo .mg-mov { animation: mg-entra .45s calc(.8s + var(--i) * .16s) both; }
.bx-vivo .mg-cart-dep i::after { animation: mg-riempi 1s 1s var(--ease) both; }
.bx-vivo .mg-timbro { animation: mg-timbra .6s 1.9s both; }
.bx-vivo .mg-volante--1 { animation: mg-sale .7s 2.4s var(--ease) both, mg-ondeggia 5s 3.1s ease-in-out infinite alternate; }
.bx-vivo .mg-volante--2 { animation: mg-sale .7s 2.8s var(--ease) both, mg-ondeggia 6s 3.5s ease-in-out infinite alternate; }
.mg-mov.nuovo { animation: mg-entra .5s both !important; box-shadow: 0 0 0 2px var(--mc); }

/* ============================================================ le schermate (accese da mg.js) */
/* la scheda prodotto */
.mg-scheda { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
.mg-scheda-foto { display: grid; place-items: center; height: 96px; border-radius: 16px; background: linear-gradient(160deg, #fee2e2, #fecaca); color: #b91c1c; font-size: 38px; }
.mg-scheda-dati b { display: block; font: 800 16px var(--titoli); color: var(--titolo); }
.mg-tipo { display: inline-block; margin: 4px 0 10px; padding: 3px 9px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font: 700 11.5px Inter, sans-serif; }
.mg-codici { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mg-codici span { padding: 7px 9px; border-radius: 9px; background: #f8fafc; font: 600 12.5px var(--mono); color: var(--titolo); opacity: 0; translate: 0 6px; transition: all .35s var(--ease); transition-delay: calc(.2s + var(--k) * .12s); }
.mg-codici small { display: block; font: 600 10.5px Inter, sans-serif; color: var(--debole); }
.acceso .mg-codici span { opacity: 1; translate: 0 0; }
.mg-prezzi { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mg-prezzi div { padding: 10px; border-radius: 12px; border: 1px solid var(--linea); }
.mg-prezzi small { display: block; font-size: 11px; color: var(--debole); }
.mg-prezzi b { font: 800 17px var(--titoli); color: var(--titolo); }
/* i magazzini */
.mg-dep { display: grid; gap: 10px; }
.mg-dep-testa { display: flex; justify-content: space-between; align-items: baseline; font: 700 14px Inter, sans-serif; color: var(--titolo); }
.mg-dep-testa span { font-weight: 600; color: var(--debole); }
.mg-dep-testa span b { font: 800 18px var(--mono); color: #0f766e; }
.mg-dep-riga { display: grid; grid-template-columns: 38px 150px minmax(0, 1fr) 44px; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--linea); }
.mg-dep-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.mg-dep-nome b { display: block; font: 700 13.5px Inter, sans-serif; color: var(--titolo); }
.mg-dep-nome small { font: 600 11px Inter, sans-serif; color: var(--c); }
.mg-dep-barra { height: 12px; border-radius: 6px; background: #f1f5f9; overflow: hidden; }
.mg-dep-barra i { display: block; height: 100%; width: 0; border-radius: 6px; background: var(--c); transition: width .8s var(--ease); transition-delay: calc(.2s + var(--k) * .15s); }
.acceso .mg-dep-barra i { width: var(--p); }
.mg-dep-q { font: 800 15px var(--mono); text-align: right; color: var(--titolo); }
.mg-dep-sposta { padding: 10px 12px; border-radius: 12px; background: #dbeafe; color: #1e40af; font: 700 12.5px Inter, sans-serif; opacity: 0; transition: opacity .4s 1.2s; }
.mg-dep-sposta i { margin-right: 6px; }
.acceso .mg-dep-sposta { opacity: 1; }
/* il registro */
.mg-reg { display: grid; gap: 6px; }
.mg-reg-filtri { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.mg-reg-filtri span { padding: 6px 10px; border-radius: 999px; background: #f1f5f9; font: 600 12px Inter, sans-serif; color: var(--tenue); }
.mg-reg-filtri span.att { background: #0f766e; color: #fff; }
.mg-reg-riga { display: grid; grid-template-columns: 96px minmax(0, 1fr) 70px; gap: 2px 10px; align-items: center; padding: 9px 12px; border-radius: 11px; border-left: 4px solid var(--mc); background: #fff; box-shadow: 0 0 0 1px var(--linea); opacity: 0; translate: 0 8px; transition: all .4s var(--ease); transition-delay: calc(.15s + var(--i) * .15s); }
.mg-reg-riga em { font: 800 11px Inter, sans-serif; font-style: normal; text-transform: uppercase; color: var(--mc); }
.mg-reg-riga b { font: 700 13px Inter, sans-serif; color: var(--titolo); }
.mg-reg-riga .q { font: 800 13px var(--mono); color: var(--mc); text-align: right; }
.mg-reg-riga small { grid-column: 2 / -1; font: 500 11.5px Inter, sans-serif; color: var(--debole); }
.acceso .mg-reg-riga { opacity: 1; translate: 0 0; }
/* la rettifica */
.mg-rett { display: grid; gap: 8px; }
.mg-rett-riga { display: grid; grid-template-columns: 86px minmax(0, 1fr) 60px; gap: 2px 10px; align-items: center; padding: 11px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--linea); }
.mg-rett-riga em { font: 800 11px Inter, sans-serif; font-style: normal; text-transform: uppercase; }
.mg-rett-riga b { font: 700 13px Inter, sans-serif; color: var(--titolo); }
.mg-rett-riga .q { font: 800 13px var(--mono); text-align: right; }
.mg-rett-riga small { grid-column: 2 / -1; font: 500 11.5px Inter, sans-serif; color: var(--debole); }
.mg-rett-riga.orig em, .mg-rett-riga.orig .q { color: #b91c1c; }
.mg-rett-riga.orig b { text-decoration: line-through; text-decoration-color: #fca5a5; }
.mg-rett-riga.contro { background: #f0fdf4; opacity: 0; translate: 0 -10px; transition: all .5s var(--ease) .7s; }
.mg-rett-riga.contro em, .mg-rett-riga.contro .q { color: #15803d; }
.acceso .mg-rett-riga.contro { opacity: 1; translate: 0 0; }
.mg-rett-legame { justify-self: center; padding: 3px 10px; border-radius: 999px; background: #f1f5f9; font: 700 11px Inter, sans-serif; color: var(--debole); opacity: 0; transition: opacity .3s .5s; }
.acceso .mg-rett-legame { opacity: 1; }
.mg-rett-sconfino { display: flex; gap: 12px; align-items: center; margin-top: 6px; padding: 11px 12px; border-radius: 12px; background: #fef2f2; border: 1px dashed #fca5a5; opacity: 0; transition: opacity .4s 1.5s; }
.mg-rett-sconfino b { display: block; font: 800 13px Inter, sans-serif; color: #991b1b; }
.mg-rett-sconfino small { font: 500 12px Inter, sans-serif; color: #7f1d1d; }
.acceso .mg-rett-sconfino { opacity: 1; }
/* il flusso dei documenti */
.mg-flusso { display: grid; gap: 14px; }
.mg-flusso-fila { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.mg-doc { display: grid; justify-items: center; gap: 4px; flex: 1; padding: 14px 6px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--linea); text-align: center; opacity: .35; transition: opacity .35s, box-shadow .35s; transition-delay: calc(.2s + var(--k) * .4s); }
.mg-doc i { font-size: 20px; color: var(--c); }
.mg-doc b { font: 800 13px Inter, sans-serif; color: var(--titolo); }
.mg-doc small { font: 600 11px var(--mono); color: var(--debole); }
.acceso .mg-doc { opacity: 1; box-shadow: 0 0 0 2px var(--c); }
.mg-freccia { color: #94a3b8; opacity: 0; transition: opacity .3s; transition-delay: calc(.4s + var(--k) * .4s); }
.acceso .mg-freccia { opacity: 1; }
.mg-flusso-nota { display: grid; gap: 6px; }
.mg-flusso-nota span { padding: 9px 12px; border-radius: 11px; background: #f8fafc; font: 600 12.5px Inter, sans-serif; color: var(--tenue); }
.mg-flusso-nota span:first-child { background: #ccfbf1; color: #115e59; }
.mg-flusso-nota i { margin-right: 6px; }
/* il DDT che scarica */
.mg-ddtm { display: grid; grid-template-columns: minmax(0, 1fr) 30px minmax(0, 1fr); gap: 10px; align-items: center; }
.mg-ddtm-doc, .mg-ddtm-giac { padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--linea); }
.mg-ddtm-testa b { display: block; font: 900 18px var(--mono); color: var(--titolo); }
.mg-ddtm-testa small { font: 500 11.5px Inter, sans-serif; color: var(--debole); }
.mg-ddtm-r, .mg-ddtm-giac div { display: flex; justify-content: space-between; gap: 6px; padding: 6px 0; border-bottom: 1px dotted #cbd5e1; font: 500 12.5px Inter, sans-serif; color: var(--titolo); }
.mg-ddtm-r b { font: 700 12.5px var(--mono); }
.mg-ddtm-salva { display: inline-block; margin-top: 10px; padding: 7px 12px; border-radius: 9px; background: #0f766e; color: #fff; font: 700 12px Inter, sans-serif; }
.mg-ddtm-fr { color: #0f766e; font-size: 22px; text-align: center; opacity: 0; transition: opacity .3s .8s; }
.acceso .mg-ddtm-fr { opacity: 1; }
.mg-ddtm-giac > b { display: block; margin-bottom: 4px; font: 800 13px Inter, sans-serif; color: var(--titolo); }
.mg-ddtm-giac s { margin-left: auto; color: #94a3b8; font: 600 12px var(--mono); }
.mg-ddtm-giac div b { font: 800 12.5px var(--mono); color: #0f766e; opacity: 0; transition: opacity .3s; transition-delay: calc(1.1s + var(--k) * .25s); }
.acceso .mg-ddtm-giac div b { opacity: 1; }
/* il sottoscorta */
.mg-sotto { display: grid; gap: 10px; }
.mg-sotto-riga { display: grid; grid-template-columns: 130px minmax(0, 1fr) 110px; gap: 10px; align-items: center; font: 700 13px Inter, sans-serif; color: var(--titolo); }
.mg-sotto-barra { position: relative; height: 14px; border-radius: 7px; background: #f1f5f9; }
.mg-sotto-barra i { position: absolute; inset: 0 auto 0 0; width: 0; border-radius: 7px; background: linear-gradient(90deg, #f59e0b, #dc2626); transition: width .8s var(--ease); transition-delay: calc(.2s + var(--k) * .15s); }
.acceso .mg-sotto-barra i { width: var(--g); }
.mg-sotto-barra u { position: absolute; left: var(--s); top: -4px; bottom: -4px; width: 2px; background: #334155; }
.mg-sotto-n { font: 800 13px var(--mono); color: #b91c1c; text-align: right; }
.mg-sotto-n small { font: 600 11px Inter, sans-serif; color: var(--debole); }
.mg-sotto-piede { display: flex; gap: 8px; align-items: center; margin-top: 4px; font: 600 12.5px Inter, sans-serif; color: var(--tenue); }
/* la proposta d'ordine */
.mg-riord { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mg-riord-forn { display: grid; gap: 6px; padding: 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--linea); }
.mg-riord-testa { display: flex; gap: 8px; align-items: center; font: 800 13.5px Inter, sans-serif; color: var(--titolo); }
.mg-riord-testa i { color: #b45309; }
.mg-riord-r { display: flex; justify-content: space-between; align-items: center; gap: 6px; font: 500 12.5px Inter, sans-serif; color: var(--titolo); }
.mg-input { min-width: 64px; padding: 4px 8px; border-radius: 7px; border: 1px solid #cbd5e1; font: 700 12px var(--mono); text-align: right; }
.mg-riord-gen { justify-self: start; margin-top: 4px; padding: 7px 12px; border-radius: 9px; background: #b45309; color: #fff; font: 700 12px Inter, sans-serif; transition: background .3s; transition-delay: calc(1s + var(--k) * .4s); }
.acceso .mg-riord-gen { background: #15803d; }
.mg-riord-ok { grid-column: 1 / -1; padding: 9px 12px; border-radius: 10px; background: #ecfdf5; color: #047857; font: 700 12.5px Inter, sans-serif; opacity: 0; transition: opacity .4s 2s; }
.acceso .mg-riord-ok { opacity: 1; }
/* il valore */
.mg-val { display: grid; gap: 12px; }
.mg-val-crit { display: flex; gap: 6px; }
.mg-val-crit span { padding: 6px 11px; border-radius: 999px; background: #f1f5f9; font: 600 12px Inter, sans-serif; color: var(--tenue); }
.mg-val-crit span.att { background: #b45309; color: #fff; }
.mg-val-tot small { display: block; font: 700 12px Inter, sans-serif; color: var(--debole); text-transform: uppercase; letter-spacing: .06em; }
.mg-val-tot b { font: 900 38px var(--titoli); color: var(--titolo); }
.mg-val-cat { display: grid; gap: 8px; }
.mg-val-cat div { display: grid; grid-template-columns: 130px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font: 600 12.5px Inter, sans-serif; color: var(--titolo); }
.mg-val-cat i { height: 10px; border-radius: 5px; background: #f1f5f9; position: relative; overflow: hidden; }
.mg-val-cat i::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 0; background: #b45309; border-radius: 5px; transition: width .8s var(--ease); transition-delay: calc(.3s + var(--k) * .15s); }
.acceso .mg-val-cat i::after { width: var(--p); }
.mg-val-cat b { font: 800 12.5px var(--mono); text-align: right; }
.mg-val-nota { padding: 9px 12px; border-radius: 10px; background: #fffbeb; color: #92400e; font: 600 12px Inter, sans-serif; }
.mg-val-nota i { margin-right: 5px; }
/* l'inventario */
.mg-inv { display: grid; gap: 4px; padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--linea); }
.mg-inv-testa { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font: 800 14px Inter, sans-serif; color: var(--titolo); }
.mg-inv-stato { padding: 3px 9px; border-radius: 999px; background: #fef3c7; color: #92400e; font: 700 11px Inter, sans-serif; }
.mg-inv-int, .mg-inv-r { display: grid; grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, .8fr)); gap: 8px; align-items: center; }
.mg-inv-int { padding: 4px 8px; font: 700 10.5px Inter, sans-serif; text-transform: uppercase; letter-spacing: .05em; color: var(--debole); }
.mg-inv-r { padding: 8px; border-radius: 9px; background: #f8fafc; font: 500 12.5px Inter, sans-serif; color: var(--titolo); }
.mg-inv-r b { font: 800 12.5px var(--mono); opacity: 0; transition: opacity .3s; transition-delay: calc(.3s + var(--k) * .3s); }
.mg-inv-r em { font: 800 12.5px var(--mono); font-style: normal; opacity: 0; transition: opacity .3s; transition-delay: calc(.5s + var(--k) * .3s); }
.mg-inv-r em.piu { color: #15803d; } .mg-inv-r em.meno { color: #b91c1c; } .mg-inv-r em.zero { color: #94a3b8; }
.acceso .mg-inv-r b, .acceso .mg-inv-r em { opacity: 1; }
.mg-inv-chiudi { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.mg-inv-chiudi span { padding: 7px 12px; border-radius: 9px; background: #7c2d12; color: #fff; font: 700 12px Inter, sans-serif; }
.mg-inv-chiudi small { font: 600 11.5px Inter, sans-serif; color: var(--debole); }
/* i lotti */
.mg-lotti { display: grid; gap: 8px; }
.mg-lotto { position: relative; display: grid; grid-template-columns: 70px minmax(0, 1fr) 60px; gap: 10px; align-items: center; padding: 11px 12px; border-radius: 12px; background: #fff; box-shadow: 0 0 0 1px var(--linea); font: 700 13px var(--mono); color: var(--titolo); }
.mg-nastro { justify-self: start; padding: 4px 10px; border-radius: 4px; background: #ede9fe; color: #5b21b6; font: 700 11.5px Inter, sans-serif; }
.mg-lotto.vicino .mg-nastro { background: #fef3c7; color: #92400e; }
.mg-lotto-q { text-align: right; }
.mg-lotto em { position: absolute; right: 10px; top: -9px; padding: 2px 8px; border-radius: 999px; background: #0f766e; color: #fff; font: 700 10.5px Inter, sans-serif; font-style: normal; opacity: 0; transition: opacity .3s .6s; }
.acceso .mg-lotto em { opacity: 1; }
.mg-lotto.vicino { transition: box-shadow .4s .6s; }
.acceso .mg-lotto.vicino { box-shadow: 0 0 0 2px #0f766e; }
.mg-lotti-uscita { padding: 10px 12px; border-radius: 11px; background: #f0fdfa; color: #115e59; font: 600 12.5px Inter, sans-serif; opacity: 0; transition: opacity .4s 1.3s; }
.mg-lotti-uscita i { margin-right: 5px; }
.acceso .mg-lotti-uscita { opacity: 1; }
/* la tracciabilita' */
.mg-traccia { display: grid; justify-items: center; gap: 0; }
.mg-tr-nodo { display: grid; justify-items: center; gap: 2px; min-width: 170px; padding: 11px 14px; border-radius: 14px; background: #fff; box-shadow: 0 0 0 1px var(--linea); text-align: center; }
.mg-tr-nodo i { font-size: 17px; }
.mg-tr-nodo b { font: 800 13px Inter, sans-serif; color: var(--titolo); }
.mg-tr-nodo small { font: 600 11px var(--mono); color: var(--debole); }
.mg-tr-nodo.forn i { color: #b45309; }
.mg-tr-nodo.lotto { background: #ede9fe; box-shadow: 0 0 0 2px #7c3aed; }
.mg-tr-nodo.lotto i { color: #6d28d9; }
.mg-tr-filo { width: 2px; height: 22px; background: #cbd5e1; }
.mg-tr-rami { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; width: 100%; margin-top: 22px; }
.mg-tr-rami::before { content: ""; position: absolute; left: 16%; right: 16%; top: -12px; height: 2px; background: #cbd5e1; }
.mg-tr-rami::after { content: ""; position: absolute; left: 50%; top: -22px; width: 2px; height: 10px; background: #cbd5e1; }
.mg-tr-nodo.cli { min-width: 0; opacity: 0; translate: 0 10px; transition: all .4s var(--ease); transition-delay: calc(.5s + var(--k) * .25s); }
.mg-tr-nodo.cli i { color: #0f766e; }
.acceso .mg-tr-nodo.cli { opacity: 1; translate: 0 0; }

/* ============================================================ i numeri: i colli sul bancale */
.mg-numeri { padding: 80px 0; background: #f6f1e7; }
.mg-numeri-dentro { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 56px; align-items: center; }
.mg-numeri h2 { margin: 14px 0 12px; font-size: clamp(30px, 3.4vw, 44px); line-height: 1.1; color: var(--titolo); }
.mg-numeri h2 span { color: #0f766e; }
.mg-numeri-testo p { margin: 0; font-size: 18px; line-height: 1.6; color: var(--tenue); }
.mg-bancale { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 34px; }
.mg-collo { position: relative; display: grid; gap: 4px; padding: 26px 18px 18px; border-radius: 6px; background: linear-gradient(160deg, #d9b47c, #c39457); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .08), 0 10px 18px -10px rgba(80, 50, 10, .6); color: #3f2a0d; }
.mg-collo-nastro { position: absolute; left: 50%; top: 0; bottom: 0; width: 28px; margin-left: -14px; background: rgba(255, 245, 220, .35); }
.mg-collo > i { position: relative; font-size: 18px; color: #6b4513; }
.mg-collo b { position: relative; font: 900 30px/1.05 var(--titoli); color: #2b1a05; }
.mg-collo small { position: relative; font-size: 14px; color: #4a3210; }
.mg-pallet { position: absolute; left: -10px; right: -10px; bottom: 0; height: 26px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding: 0 14px; border-top: 8px solid #8a6a43; }
.mg-pallet i { background: #8a6a43; border-radius: 0 0 3px 3px; }
@keyframes mg-impila { 0% { opacity: 0; translate: 0 -40px; } 70% { translate: 0 4px; } 100% { opacity: 1; translate: 0 0; } }
.mg-bancale.rv.in .mg-collo { animation: mg-impila .6s var(--ease) calc(.15s + (3 - var(--i)) * .18s) both; }

/* ============================================================ l'invito finale: la cassa con l'etichetta dell'inventario */
.mg-cassa { position: relative; width: 250px; height: 180px; margin: 30px auto; border-radius: 8px; background: linear-gradient(160deg, #d9b47c, #b98a4c); box-shadow: 0 24px 44px rgba(0, 40, 40, .35); rotate: -4deg; }
.mg-cassa-nastro { position: absolute; left: 0; right: 0; top: 50%; height: 26px; margin-top: -13px; background: rgba(255, 245, 220, .4); }
.mg-cassa-etich { position: absolute; left: 22px; top: 26px; width: 150px; padding: 10px 12px; border-radius: 6px; background: #fff; box-shadow: 0 6px 12px rgba(0, 0, 0, .15); }
.mg-cassa-etich small { display: block; font: 700 10px Inter, sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--debole); }
.mg-cassa-etich b { display: block; font: 800 14px var(--titoli); color: var(--titolo); }
.mg-cassa-etich span { font: 600 11.5px Inter, sans-serif; color: #0f766e; }
.mg-cassa-ok { position: absolute; right: 18px; bottom: -14px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: #15803d; border: 4px solid #fff; color: #fff; font-size: 17px; }
@keyframes mg-respira { 50% { rotate: -1deg; translate: 0 -6px; } }
.n6-cta .mg-cassa { animation: mg-respira 4s ease-in-out infinite; }

/* ============================================================ le sezioni della home del magazzino */
.mg-nastro-trasp { list-style: none; position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0 0 0; }
.mg-nastro-trasp::before { content: ""; position: absolute; left: 4%; right: 4%; top: 34px; height: 12px; border-radius: 6px; background: repeating-linear-gradient(90deg, #475569 0 18px, #64748b 18px 36px); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .25); }
.mg-nastro-trasp li { position: relative; }
.mg-nastro-trasp a { display: grid; justify-items: center; gap: 8px; padding: 0 8px; text-align: center; text-decoration: none; color: inherit; }
.mg-nastro-collo { position: relative; display: grid; place-items: center; width: 68px; height: 60px; margin-bottom: 6px; border-radius: 6px; background: linear-gradient(160deg, #d9b47c, #c39457); color: #4a3210; font-size: 24px; box-shadow: 0 10px 18px -8px rgba(80, 50, 10, .6); transition: translate .2s; }
.mg-nastro-collo::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 14px; margin-left: -7px; background: rgba(255, 245, 220, .35); }
.mg-nastro-collo i { position: relative; }
.mg-nastro-trasp a:hover .mg-nastro-collo { translate: 0 -4px; }
.mg-nastro-trasp h3 { margin: 4px 0 0; font: 800 19px var(--titoli); color: var(--titolo); }
.mg-nastro-trasp p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--tenue); }
.mg-due { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 50px; align-items: center; }
.mg-ripiani { display: grid; gap: 22px; }
.mg-ripiano { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 18px; align-items: end; padding-bottom: 14px; border-bottom: 10px solid #94a3b8; box-shadow: 0 6px 0 -2px #cbd5e1; }
.mg-ripiano h3 { margin: 0 0 6px; padding: 8px 12px; border-left: 5px solid var(--g); font: 800 15px var(--titoli); color: var(--titolo); background: #fff; border-radius: 0 10px 10px 0; }
.mg-ripiano-scatole { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.mg-ripiano-scatole a { display: grid; gap: 4px; align-content: start; padding: 14px; border-radius: 10px 10px 4px 4px; background: #fff; box-shadow: 0 0 0 1px var(--linea), 0 10px 18px -14px rgba(0, 40, 40, .5); border-top: 4px solid var(--c); text-decoration: none; color: inherit; transition: translate .2s; }
.mg-ripiano-scatole a:hover { translate: 0 -4px; }
.mg-ripiano-scatole i { font-size: 18px; color: var(--c); }
.mg-ripiano-scatole b { font: 800 15px Inter, sans-serif; color: var(--titolo); }
.mg-ripiano-scatole small { font-size: 13.5px; line-height: 1.4; color: var(--debole); }
.mg-settori { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 30px; border-top: 1px solid var(--linea); }
.mg-settore { display: grid; grid-template-columns: 50px minmax(0, 1fr) 24px; gap: 16px; align-items: center; padding: 18px 6px; border-bottom: 1px solid var(--linea); text-decoration: none; color: inherit; transition: background .2s, padding .2s; }
.mg-settore:hover { background: #f0fdfa; padding-left: 14px; }
.mg-settore-ico { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 10px; color: #fff; font-size: 19px; background: var(--c); }
.mg-settore b { display: block; font: 800 18px var(--titoli); color: var(--titolo); }
.mg-settore small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 14.5px; color: var(--tenue); }
.mg-settore > .fa-arrow-right { color: #0f766e; }
.mg-richiesta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.mg-richiesta a { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 16px; background: #fff; border: 2px dashed #99f6e4; text-decoration: none; color: inherit; transition: border-color .2s; }
.mg-richiesta a:hover { border-color: #0f766e; }
.mg-richiesta i { display: grid; place-items: center; flex: none; width: 42px; height: 42px; border-radius: 12px; background: #ccfbf1; color: #0f766e; font-size: 17px; }
.mg-richiesta b { display: block; font: 800 16px var(--titoli); color: var(--titolo); }
.mg-richiesta small { font-size: 14px; line-height: 1.45; color: var(--tenue); }

@media (max-width: 900px) {
	.mg-nastro-trasp, .mg-due, .mg-numeri-dentro, .mg-settori, .mg-richiesta, .mg-ripiano { grid-template-columns: minmax(0, 1fr); gap: 22px; }
	.mg-nastro-trasp::before { display: none; }
	.mg-nastro-trasp a { grid-template-columns: 76px minmax(0, 1fr); justify-items: start; text-align: left; padding: 0; }
	.mg-nastro-collo { grid-row: span 2; }
	.mg-nastro-trasp h3 { margin: 0; }
	.mg-ripiano { gap: 10px; }
	.mg-collo b { font-size: 23px; }
	.mg-scheda, .mg-riord, .mg-ddtm { grid-template-columns: minmax(0, 1fr); }
	.mg-ddtm-fr { rotate: 90deg; }
	.mg-dep-riga { grid-template-columns: 38px minmax(0, 1fr) 44px; }
	.mg-dep-barra { grid-column: 1 / -1; }
	.mg-sotto-riga, .mg-val-cat div { grid-template-columns: 1fr 1fr; }
	.mg-sotto-barra, .mg-val-cat i { grid-column: 1 / -1; grid-row: 2; }
	.mg-flusso-fila { flex-wrap: wrap; }
	.mg-flusso-fila .mg-freccia { display: none; }
	.mg-doc { flex-basis: 45%; }
	.mg-tr-rami { grid-template-columns: minmax(0, 1fr); }
	.mg-tr-rami::before, .mg-tr-rami::after { display: none; }
}
@media (prefers-reduced-motion: reduce) {
	.bx-scena--mg *, [data-mock] *, .mg-bancale *, .mg-cassa, .mg-cassa * { animation: none !important; transition: none !important; }
}
