
:root{font-family:Arial,Helvetica,sans-serif;font-size:11px;color:#000;background:#e0e0e0;color-scheme:light}*{box-sizing:border-box}body{margin:0}main{padding:3px;max-width:1400px;margin:auto}.notice{font-size:11px;padding:4px 8px;background:#edf4f8;margin-bottom:4px}.search-box{background:#e0e0e0;padding:4px 8px;margin-bottom:4px;border:1px solid #aaa}.search-box summary{cursor:pointer;color:navy}.search-grid{display:grid;grid-template-columns:1fr 1fr 2fr;gap:10px;padding:8px}.search-grid label{display:block}.search-grid input,.search-grid select{width:100%;height:24px}.muted{font-size:10px;color:#555}[hidden]{display:none!important}.error{color:#a00}#detail{overflow:auto}#order{position:relative;min-width:1000px;height:642px;background:#e0e0e0}.window-title{height:25px;background:linear-gradient(#a5bfd4,#d2dce6);padding:5px;font-size:12px}.window-title span{float:right;font-size:10px}.order-head{height:155px;position:relative}.brand{position:absolute;left:5px;top:10px;width:290px}.brand img{width:290px;height:58px;border:1px solid #888;background:#fff}.brand p{display:none}.languages{position:absolute;left:300px;top:8px;display:grid;gap:5px}.languages button{width:27px;height:23px;padding:0}.header-box{position:absolute;left:335px;right:7px;top:10px;height:116px;border:2px solid navy;border-radius:17px}.fields label{display:flex;align-items:center;gap:4px;color:navy;font-size:10px}input,select,textarea,button{font:inherit;color:#000}input[readonly]{background:white;border:1px solid #888;height:19px;min-width:0;padding:1px 4px}#header-fields label{position:absolute;width:200px;left:5px;top:7px;justify-content:space-between}#header-fields input{width:134px;background:#ffdfbf}#header-fields label:nth-child(2){top:42px}#header-fields label:nth-child(3){top:74px;width:145px}#header-fields label:nth-child(3) input{width:77px}#header-fields label:nth-child(4){top:74px;left:183px;width:104px}#header-fields label:nth-child(4) input{width:73px;background:#fff}#header-fields label:nth-child(5){left:366px;top:35px;width:64px;display:block;text-align:center}#header-fields label:nth-child(5) input{width:64px;background:#fff;margin-top:5px}#header-fields label:nth-child(6){display:none}.typology{position:absolute;left:213px;top:0;width:145px;height:58px;padding:0 12px;border:1px solid #888}.typology label{display:flex;flex-direction:row-reverse;justify-content:space-between;margin:4px 0;font-size:10px}.typology input{margin:0}.packaging{position:absolute;left:441px;right:8px;top:9px}.label-total{border:1px solid #888;text-align:center;height:19px;color:navy;font-size:10px}.packaging label{display:flex;justify-content:space-between;gap:6px;margin-top:3px;color:navy;font-size:10px}.packaging input{width:72%}.packaging label:last-child input{background:#ffdfbf}.navigation{position:absolute;left:6px;top:80px;width:80px;height:65px}.navigation button{position:absolute;width:27px;height:20px;padding:0}.navigation button:first-child{left:27px}.navigation button:nth-child(2){top:23px;left:0}.navigation button:nth-child(3){top:23px;left:54px}.navigation button:nth-child(4){top:46px;left:27px}button:disabled{color:#777}.lines-section{position:absolute;top:180px;left:0;right:0;height:191px;border:1px solid #888;background:white}.order-strip{height:24px;display:flex;gap:12px;align-items:center;padding:3px 30px;background:#e0e0e0;color:navy;border-bottom:1px solid #888}.order-strip h2{font-size:11px;margin:0}.order-strip .muted{display:none}.table-wrap{overflow:auto}.lines-section>.table-wrap{height:165px}.lines{width:100%;min-width:990px;border-spacing:3px 2px;table-layout:fixed}.lines th{background:#e0e0e0;border:1px solid #999;color:navy;font-size:10px;height:32px;padding:1px;white-space:normal}.lines td{height:20px;border:1px solid #999;padding:1px 2px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;background:#fff}.lines th:nth-child(1){width:27px}.lines th:nth-child(2){width:59px}.lines th:nth-child(3){width:30px}.lines th:nth-child(4){width:133px}.lines th:nth-child(5){width:60px}.lines th:nth-child(6){width:84px}.lines th:nth-child(7){width:64px}.lines th:nth-child(8){width:84px}.lines button{width:100%;border:0;background:white;padding:0;font-size:10px;cursor:pointer}.lines tr.selected td{background:#eaf3ff}.lines tr.selected button{background:#d5e8ff}.lower-layout{position:absolute;top:375px;left:6px;right:6px;height:266px;display:grid;grid-template-columns:237px 340px minmax(305px,1fr);gap:5px}.shirt-section{border:1px solid #888;padding:4px;position:relative}.shirt-section fieldset{margin:0;height:32px;padding:2px 8px;border:1px solid #888}.line-options{display:flex;justify-content:space-between}.line-options label{font-size:11px;white-space:nowrap}.line-options input{margin:0 2px 0 0;vertical-align:middle}.shirt-section select{width:100%;height:18px;margin:4px 0 2px}.shirt-picture{height:200px;background:white;border:1px solid #888;text-align:center}.shirt-picture img{width:100%;height:100%;object-fit:contain}.measure-section{border:1px solid #888;border-left:0;margin-left:-6px;padding:5px 4px;position:relative}.measure-choice{width:244px;height:76px;margin:0 0 3px;border:1px solid #888;padding:3px 34px 3px 8px}.measure-choice label{display:flex;justify-content:flex-end;align-items:center;gap:15px;font-style:italic;font-size:10px;line-height:19px}.measure-choice input{margin:0}.measure-heading,.measurements thead,.measure-help{display:none}.measurements{border-collapse:separate;border-spacing:4px 3px;width:100%;table-layout:fixed}.measurements td{height:17px;font-size:11px;padding:0;text-align:center}.measurements td:first-child{width:151px;background:#e0e0e0;border:1px solid #888}.measurements td:nth-child(2){width:44px;border:1px solid #888;background:white}.measurements td:nth-child(3){width:78px;background:transparent;font-size:10px}.measurements td:nth-child(4){width:44px;background:white;border:1px solid #888}.line-notes-section{max-width:305px;position:relative;padding-left:3px}.notes-box{height:198px;border:0;background:white}.notes-box details>summary{list-style:none;background:white;height:16px;color:#000;padding-left:6px}.notes-box textarea{display:block;width:100%;height:182px;border:1px solid #888;border-top:0;resize:none;padding:5px;font-size:12px}.notes-box details details{display:none}.command-buttons{display:grid;grid-template-columns:repeat(4,58px);gap:4px;margin-top:7px}.command-buttons button{height:28px;font-size:9px;padding:2px;background:#eee;border:1px outset white}.supplemental,#line-totals,.sizes-section,.details-section{display:none}footer{font-size:10px;color:#555;padding:5px}.empty{padding:50px;text-align:center}.empty img{width:290px}.notice.demo{background:#fff4d5}input:disabled{opacity:1}legend{font-size:10px}button:focus-visible,summary:focus-visible,select:focus-visible{outline:2px solid #1673b9}

#header-fields label:nth-child(4){left:185px;width:103px;gap:3px}#header-fields label:nth-child(4) input{flex:none;width:74px;padding:1px;font-size:10px}.delivery{position:absolute;left:292px;top:74px;display:flex;align-items:center;font-size:9px;color:navy;gap:4px}.delivery input{width:64px;font-size:10px;padding:1px}.lines th:nth-child(9){width:116px}.lines th:nth-child(10){width:118px}.lines th:nth-child(n+11){width:40px}.lines{min-width:1145px}.lines .flag{text-align:center;font-size:16px}.measurements td.unused{border:0;background:transparent}.shirt-picture{position:relative}.shirt-mark{position:absolute;font:11px Arial;color:black;z-index:2}.mark-a{left:32%;top:10%}.mark-b{left:32%;top:32%}.mark-c{left:35%;top:53%}.mark-d{left:36%;top:75%}.mark-e{left:51%;top:91%}.mark-f{left:93%;top:54%}.mark-g{left:53%;top:5%}.guide{position:absolute;border-top:1px dotted #008aff;left:24%;width:53%;top:16%}.guide-b{top:36%;border-color:#ef8835}.guide-c{top:57%;border-color:green}.guide-d{top:79%;border-color:#9749e3}.guide-e{top:96%;border-color:#9749e3}.guide-f{left:78%;width:15%;top:54%}.guide-g{left:51%;top:12%;width:0;height:82%;border-top:0;border-left:1px dotted #ef8835}

#header-fields select{height:19px;min-width:0;width:134px;background:#ffdfbf;border:1px solid #888;padding:0;font-size:11px;color:#000}#header-fields label:nth-child(3) select{width:77px}#header-fields label:nth-child(2) select{background:#ffdfbf}#count{margin-left:auto;font-size:10px;color:#555}
#exit-screen{max-width:550px;margin:12vh auto;padding:32px;text-align:center;background:#fff;border:1px solid #999;font-size:15px}#exit-screen img{max-width:100%;width:290px}#exit-screen h1{font-size:24px}#exit-screen button{padding:10px 18px;margin-top:12px;cursor:pointer}

.measurements input.test-edit{width:100%;height:17px;border:0;background:#fff8e9;padding:0;text-align:center;font-size:11px;appearance:textfield}.measurements input::-webkit-inner-spin-button{appearance:none}.lines input.test-edit{margin:0;vertical-align:middle}.test-edit:focus-visible{outline:2px solid #1472ba}
#discard-dialog{padding:24px;max-width:430px;border:1px solid #888;font:14px Arial}#discard-dialog::backdrop{background:#0005}#discard-dialog button{padding:8px 12px;margin-right:8px;cursor:pointer}#discard-dialog h2{font-size:20px}

/* Testata: celle distinte per evitare sovrapposizioni di testi e date. */
.header-box{display:grid;grid-template-columns:200px 145px 66px minmax(0,1fr);grid-template-rows:65px 22px;gap:7px 8px;padding:6px 8px}
#header-fields{display:contents}
#header-fields label:nth-child(n){position:static;left:auto;top:auto;width:auto;height:auto;display:grid;grid-template-columns:62px minmax(0,1fr);gap:4px;justify-content:start;align-items:center;text-align:left;line-height:12px}
#header-fields label:nth-child(1){grid-column:1;grid-row:1;align-self:start}
#header-fields label:nth-child(2){grid-column:1;grid-row:1;align-self:end}
#header-fields label:nth-child(3){grid-column:1;grid-row:2;grid-template-columns:62px 77px}
#header-fields label:nth-child(4){grid-column:2;grid-row:2;grid-template-columns:55px 77px}
#header-fields label:nth-child(5){grid-column:3;grid-row:1;align-self:center;grid-template-columns:1fr;text-align:center;gap:4px}
#header-fields label:nth-child(n) input,#header-fields label:nth-child(n) select{width:100%;min-width:0;height:19px;margin:0;font-size:11px}
#header-fields label:nth-child(4) input{padding:1px 3px}
.header-box .typology{position:static;grid-column:2;grid-row:1;width:145px;height:59px;margin:0;padding:0 12px}
.header-box .packaging{position:static;grid-column:4;grid-row:1;min-width:0;align-self:start}
.packaging label{display:grid;grid-template-columns:49px minmax(0,1fr);gap:5px;align-items:center}
.packaging input{width:100%;min-width:0}
.header-box .delivery{position:static;grid-column:3/5;grid-row:2;display:grid;grid-template-columns:82px 77px;gap:5px;align-items:center;font-size:10px;line-height:12px}
.delivery input{width:77px;min-width:0;height:19px;padding:1px 3px;font-size:11px}

#company,#customer{background:#ffdfbf!important;border:1px solid #888;padding:1px 3px}#company:focus,#customer:focus{outline:1px solid #2474b5;background:#ffffd0!important}.lines-section>.table-wrap{scrollbar-width:none}.lines-section>.table-wrap::-webkit-scrollbar{display:none}.navigation button:not(:disabled){cursor:pointer;color:#005b39;background:#f8fff9;border:1px outset #fff}

.vb-combo{position:relative;display:flex;height:19px;min-width:0}.vb-combo input{flex:1;width:calc(100% - 16px)!important;padding-right:2px!important}.vb-combo-toggle{width:16px;flex:none;padding:0;border:1px outset #ddd;background:#e7e7e7;color:#000;font:10px Arial;cursor:pointer}
.vb-combo-menu{position:absolute;top:100%;left:0;right:0;z-index:1000;max-height:154px;overflow-y:auto;background:#fff;border:1px solid #666;box-shadow:2px 3px 5px #0003;color:#000;font:11px Arial;text-align:left}
.vb-combo-menu>[role=option]{height:20px;line-height:20px;padding:0 4px;cursor:default;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.vb-combo-menu>[role=option]:hover,.vb-combo-menu>[aria-selected=true]{background:#1769b3;color:white}.vb-combo-menu p{padding:3px;margin:0;font-size:10px}
#delivery-calendar{width:272px;border:1px solid #888;padding:12px;font:12px Arial}#delivery-calendar::backdrop{background:#0002}.calendar-header{display:flex;align-items:center;justify-content:space-between}.calendar-header h2{font-size:15px;margin:8px}.calendar-header button{width:26px;height:25px}.calendar-header button,#calendar-grid button{cursor:pointer}#calendar-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:3px;margin:9px 0}#calendar-grid span{text-align:center;padding:3px}#calendar-grid button{height:27px;background:#fff;border:1px solid #bbb}#calendar-grid button:hover{background:#dfedff}#delivery-date{cursor:pointer}
.lines{min-width:0;width:100%}.lines [data-page]{display:none}.lines [data-page="0"],.lines[data-detail-page="1"] [data-page="1"],.lines[data-detail-page="2"] [data-page="2"]{display:table-cell}
.lines th:nth-child(n){width:auto}.lines th:nth-child(1){width:25px}.lines[data-detail-page="1"] th:nth-child(2){width:60px}.lines[data-detail-page="1"] th:nth-child(3){width:30px}.lines[data-detail-page="1"] th:nth-child(4){width:120px}.lines[data-detail-page="1"] th:nth-child(5){width:55px}.lines[data-detail-page="1"] th:nth-child(6){width:85px}.lines[data-detail-page="1"] th:nth-child(7){width:50px}.lines[data-detail-page="1"] th:nth-child(8){width:65px}.lines[data-detail-page="1"] th:nth-child(9),.lines[data-detail-page="1"] th:nth-child(10){width:90px}.lines[data-detail-page="1"] th:nth-child(n+11){width:35px}.lines[data-detail-page="2"] th[data-detail-key="note"]{width:180px}
.lines td{font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#detail-page-status{font-size:10px;color:navy;white-space:nowrap}.order-strip{gap:10px}.lines-section>.table-wrap{overflow:hidden}

/* Calendario ancorato al campo, senza coprire o spostare il form. */
#delivery-calendar{position:fixed;margin:0;inset:auto;z-index:2000;box-shadow:2px 4px 10px #0004;background:white}#delivery-calendar::backdrop{background:transparent}
.navigation{left:8px;top:76px;width:112px;height:75px}
.navigation button{width:34px;height:25px;font-size:20px;font-weight:bold;line-height:20px;border:2px outset white;border-radius:2px}
.navigation button:first-child{left:38px;top:0}.navigation button:nth-child(2){left:0;top:26px}.navigation button:nth-child(3){left:76px;top:26px}.navigation button:nth-child(4){left:38px;top:52px}
.navigation button:not(:disabled){color:#fff;background:#087344;border-color:#73ba92;box-shadow:0 1px 2px #0003}.navigation button:disabled{color:#aaa;background:#ddd;border-color:#ddd;box-shadow:none}
.lines[data-detail-page="2"] th[data-detail-key="posta"]{width:55px}.lines td[data-detail-key] input[type=checkbox]{width:14px;height:14px;accent-color:#0d66ab;vertical-align:middle;cursor:pointer}.lines td[data-detail-key]{text-align:center}.lines td[data-detail-key="note"]{text-align:left}
/* Nessun riquadro di scorrimento annidato nel form. La pagina esterna resta scorrevole. */
#detail{overflow:visible}.measure-section>.table-wrap{overflow:visible}.measurements{border-spacing:3px 2px}.shirt-picture{height:190px}.lines-section>.table-wrap{overflow:hidden;scrollbar-width:none}textarea{scrollbar-width:none}textarea::-webkit-scrollbar{display:none}
#order{height:700px}.lower-layout{height:320px;grid-template-columns:270px 340px minmax(305px,1fr)}.shirt-picture{height:235px}.shirt-mark{font-size:12px;font-weight:bold}

.lines .vb-combo{height:18px}.lines .material-input{font:10px Arial;background:#fff5e6;border:0;padding:1px;min-width:0}.lines .vb-combo-toggle{font-size:9px;width:14px}.material-combo-menu{position:fixed;right:auto;z-index:2500;text-align:left;max-height:180px}

/* Disegno usa tutta l’altezza libera; valori SX adiacenti alla misura principale. */
.shirt-section{display:flex;flex-direction:column}.shirt-section fieldset{flex:0 0 32px}.shirt-section select{flex:0 0 18px}.shirt-picture{flex:1;min-height:0;height:auto}.shirt-picture img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain}
.measurements{width:272px;table-layout:fixed}.measurements td:first-child{width:151px}.measurements td:nth-child(2){width:44px}.measurements td:nth-child(3){width:18px;text-align:center}.measurements td:nth-child(4){width:44px}

.lower-layout{grid-template-columns:270px 282px minmax(305px,1fr)}.measure-choice{width:264px;padding-right:12px}.measure-choice label{gap:8px}.measurements td:first-child{font-size:10px}.production-sizes{margin-top:7px;border:1px solid #888;padding:5px}.production-sizes h3{font-size:11px;margin:0 0 4px}.size-inputs{display:grid;grid-template-columns:repeat(9,minmax(40px,1fr));gap:3px}.size-inputs label{display:flex;flex-direction:column;text-align:center}.size-inputs input{width:100%;height:21px;text-align:center}

/* Testata: tre etichette allineate e spazi regolari. */
#header-fields label:nth-child(1){align-self:start;margin-top:2px}
#header-fields label:nth-child(2){align-self:start;margin-top:37px}
#header-fields label:nth-child(3){align-self:start;margin-top:0}
#header-fields label:nth-child(-n+3){grid-template-columns:62px minmax(0,1fr)}
/* Produzione: taglie nella stessa riga del dettaglio, come il form originale. */
.production-mode .lines-section{height:300px}
.production-mode .lines-section>.table-wrap{height:274px}
.production-mode .lower-layout{top:485px}
#order.production-mode{height:810px}
.production-mode .lines tbody tr{position:relative;height:115px}
.production-mode .lines tbody td{vertical-align:bottom;padding-bottom:5px}
.production-mode .lines tbody td:first-child{overflow:visible}
.production-row-sizes{position:absolute;left:0;right:0;top:4px;height:66px;display:grid;grid-template-columns:100px repeat(18,minmax(0,1fr)) 55px;gap:2px;background:#e0e0e0;border-bottom:1px solid #999;padding:3px;z-index:1;color:navy}
.production-row-sizes label{display:flex;flex-direction:column;text-align:center;gap:3px;font:10px Arial;min-width:0}
.production-row-sizes label>span{height:25px;line-height:12px}
.production-row-sizes small{font:9px Arial}
.production-row-sizes input,.production-row-sizes output{display:block;width:100%;height:20px;padding:1px;border:1px solid #888;background:white;color:black;text-align:center;font:10px Arial;appearance:textfield}
.production-row-sizes input::-webkit-inner-spin-button{appearance:none}
.size-caption{align-self:center;white-space:normal;text-align:center}
.production-row-sizes .size-total{padding-top:12px;gap:9px}
.lines[data-detail-page="2"] .production-row-sizes{display:none}

/* Disposizione PRDApplica: intestazioni e controlli, poi taglie EU/USA/pollici. */
.production-mode .lines thead{display:none}
.production-mode .lines tbody tr{height:173px;border-bottom:6px solid #aecde6}
.production-mode .lines tbody td{vertical-align:top;padding-top:38px;padding-bottom:108px;height:173px;border-bottom:5px solid #aecde6}
.production-mode .lines-section{height:380px}.production-mode .lines-section>.table-wrap{height:354px}
.production-row-head{position:absolute;left:3px;right:3px;top:3px;height:32px;display:grid;grid-template-columns:27fr 59fr 30fr 133fr 60fr 84fr 64fr 84fr 116fr 118fr 40fr 40fr 40fr 40fr;gap:3px;color:navy;background:#e0e0e0;z-index:2}
.production-row-head span{font:bold 10px Arial;display:flex;align-items:center;justify-content:center;border:1px solid #999;text-align:center;min-width:0}
.production-row-head [data-page="2"]{display:none}
.lines[data-detail-page="2"] .production-row-head{grid-template-columns:27fr repeat(7,50fr) 150fr repeat(4,60fr) 55fr}
.lines[data-detail-page="2"] .production-row-head [data-page="1"]{display:none}
.lines[data-detail-page="2"] .production-row-head [data-page="2"]{display:flex}
.production-row-sizes{top:68px;left:3px;right:3px;height:96px;padding:18px 3px 3px;grid-template-columns:repeat(18,minmax(0,1fr)) 105px;background:#e8e8e8;border:1px solid #aaa}
.production-row-sizes .size-caption{position:absolute;left:0;right:110px;top:2px;font:bold 10px Arial;text-align:center}
.production-row-sizes label>span{height:42px;line-height:13px;color:#b00000;font-weight:bold;border:1px solid #999;background:#e0e0e0}
.production-row-sizes small{color:navy;font-weight:normal}
.production-row-sizes .size-total{padding-top:0;gap:3px;color:#fff;font-style:italic;background:#194d99;padding:4px;height:70px;justify-content:space-between}
.production-row-sizes .size-total output{font-weight:bold;font-style:normal}
.production-mode .lower-layout{top:565px;height:100px;display:block}
.production-mode .shirt-section,.production-mode .measure-section{display:none}
.production-mode .line-notes-section{max-width:none;display:grid;grid-template-columns:minmax(300px,1fr) 250px;gap:10px;padding:0}
.production-mode .notes-box{height:100px}.production-mode .notes-box textarea{height:84px}
.production-mode .command-buttons{margin-top:10px;align-content:start}
#order.production-mode{height:675px}

.lines[data-detail-page="2"] .production-row-sizes{display:grid}

.production-mode .lines thead{display:table-header-group;visibility:hidden;height:0}
.production-mode .lines thead th{height:0;min-height:0;padding:0;border:0;font-size:0;line-height:0}
.production-row-head span{white-space:normal;overflow:hidden;line-height:11px}

.production-mode .lines tbody td{border-bottom:0}
.production-mode .lines tbody tr::after{content:'';position:absolute;left:0;right:0;bottom:0;height:7px;background:#aecde6;border-top:1px solid #608ab5;z-index:5;pointer-events:none}
.currency-select{width:100%;min-width:0;height:19px;padding:0;background:#fff5e6;border:1px solid #888;font:11px Arial}

.production-row-head{display:block;left:0;right:0}
.production-row-head span{position:absolute;top:0;height:32px}
.production-mode .notes-box{border:1px solid #555;background:#fff;height:100px;overflow:hidden}
.production-mode #order-notes{height:100%}
.production-mode .notes-box textarea{border:0;height:82px;width:100%;margin:0}
.production-mode .notes-box summary{height:16px}

.panel-captions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border-top:1px solid #888;margin-top:2px;width:100%;font-size:9px;font-weight:normal}
.panel-captions span{padding:1px 0;border-right:1px solid #999;white-space:nowrap;overflow:hidden}.panel-captions span:last-child{border-right:0}
.panel-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));width:100%;height:18px}.panel-options label{display:flex;justify-content:center;align-items:center;border-right:1px solid #999;min-width:0}.panel-options label:last-child{border:0}.panel-options input{width:12px;height:12px;margin:0!important;accent-color:#1472ba}
.production-row-head span:has(.panel-captions){display:flex;flex-direction:column}
.production-row-head .panel-captions span{position:static;height:auto;display:block;border:0;border-right:1px solid #999;font:9px Arial}

.measurements td.measure-caption{border:0;background:transparent;display:flex;gap:3px;height:17px}
.measure-letter{display:inline-flex;flex:0 0 19px;align-items:center;justify-content:center;border:1px solid #888;background:#e0e0e0;font:11px Arial}
.measure-label{display:inline-flex;flex:1;min-width:0;align-items:center;justify-content:center;border:1px solid #888;background:#e0e0e0;font:10px Arial;white-space:nowrap}
.measurements .measure-sign td{border:0;background:transparent;height:14px;font:10px Arial;color:#c00;white-space:nowrap}

.lines .delivery-row-button{height:18px;width:100%;padding:0;border:0;background:white;font:10px Arial;cursor:pointer;white-space:nowrap}
.lines .delivery-row-button:focus-visible{outline:2px solid #1472ba}

.calendar-period{display:flex;gap:4px}.calendar-period select{height:26px;font:12px Arial}.calendar-period select:first-child{width:112px}.calendar-period select:last-child{width:68px}

#web-login{width:360px;margin:8vh auto;padding:24px;border:1px solid #888;background:#eee;font:14px Arial}#web-login img{width:290px}#web-login h1{font-size:20px}#web-login label{display:block;margin:14px 0}#web-login input{display:block;width:100%;height:30px;font:16px Arial}#web-login button{padding:7px 20px}#web-login [role=alert]{color:#a00}
#row-tools{position:absolute;right:5px;top:150px;display:flex;gap:5px}#row-tools button{height:24px;padding:3px 10px}#web-account{font:10px Arial}
#customer-editor{width:min(850px,95vw);max-height:92vh;overflow:auto;font:12px Arial}#customer-editor>select{width:100%;height:28px}.customer-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding:15px 0}.customer-fields label{display:flex;flex-direction:column;gap:4px}.customer-fields input,.customer-fields select{height:25px;min-width:0}.customer-fields input[type=checkbox]{align-self:start}#customer-editor button{padding:6px 12px;margin-right:8px}

.extra-row-input{width:100%;min-width:0;height:18px;border:0;background:#fff5e6;font:10px Arial;padding:0}.extra-row-input[type=number]{appearance:textfield}#scatola{height:19px;width:100%;min-width:0;background:#ffdfbf;border:1px solid #888;font:11px Arial}

#row-tools{top:128px;right:8px}#row-tools button{height:23px}

/* Anagrafica: dati a sinistra ed elenco clienti a destra, come AnaCliente.frm. */
#customer-editor{width:min(1160px,98vw);max-width:98vw;max-height:96vh;box-sizing:border-box;padding:10px;background:#e0e0e0;border:1px solid #777;color:#111}
#customer-editor>h2{margin:0 0 8px;font: bold 15px Arial;border-bottom:1px solid #888;padding-bottom:6px}
#customer-editor .customer-layout{display:grid;grid-template-columns:390px minmax(0,1fr);gap:12px}
#customer-editor h3{font: bold 13px Arial;margin:0 0 8px;background:#d0d5df;padding:6px;border-bottom:1px solid #999}
#customer-editor .customer-fields{display:flex;flex-direction:column;gap:4px;padding:0}
#customer-editor .customer-fields label{display:grid;grid-template-columns:155px minmax(0,1fr);align-items:center;gap:6px;min-height:23px}
#customer-editor .customer-fields input,#customer-editor .customer-fields select{height:23px;box-sizing:border-box;width:100%;border:1px solid #888;border-radius:0;background:white;font:12px Arial;padding:2px 4px}
#customer-editor .customer-fields input[type=checkbox]{width:16px;height:16px;justify-self:start;align-self:center}
#customer-editor .customer-fields label[data-field=note_fisse]{display:flex;align-items:stretch;gap:4px;margin:6px 0}
#customer-editor textarea{resize:vertical;width:100%;box-sizing:border-box;min-height:60px;border:1px solid #888;font:12px Arial}
#customer-editor .customer-list{display:flex;flex-direction:column;min-width:0;min-height:0}
#customer-editor .customer-list>input{box-sizing:border-box;width:100%;height:26px;margin-bottom:6px}
#customer-editor .customer-table-wrap{overflow:auto;border:1px solid #888;background:white;max-height:560px;flex:1}
#customer-editor table{border-collapse:collapse;width:max-content;min-width:100%;font:12px Arial}
#customer-editor th{position:sticky;top:0;background:#dedede;text-align:left;border:1px solid #aaa;padding:5px;white-space:nowrap}
#customer-editor td{border:1px solid #ddd;padding:5px;max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#customer-editor tbody tr{cursor:pointer}#customer-editor tbody tr[aria-selected=true]{background:#006ac3;color:white}#customer-editor tbody tr:hover{outline:1px solid #367ac4}
#customer-editor .customer-actions{display:flex;gap:6px}#customer-editor .customer-actions button{margin:0;flex:1;min-height:30px}
@media(max-width:700px){#customer-editor .customer-layout{grid-template-columns:1fr}#customer-editor .customer-table-wrap{max-height:220px}#customer-editor .customer-fields label{grid-template-columns:145px minmax(0,1fr)}}

main[hidden],#exit-screen[hidden]{display:none!important}

/* Finestra compatta con le proporzioni del form VB6. */
#customer-editor{width:min(900px,96vw);max-height:94vh;padding:8px;font-size:11px}
#customer-editor .customer-layout{grid-template-columns:340px minmax(0,1fr);gap:9px}
#customer-editor>h2{font-size:13px;margin-bottom:5px;padding-bottom:4px}
#customer-editor h3{font-size:12px;margin-bottom:5px;padding:4px}
#customer-editor .customer-fields{gap:2px}
#customer-editor .customer-fields label{grid-template-columns:140px minmax(0,1fr);min-height:20px;gap:4px}
#customer-editor .customer-fields input,#customer-editor .customer-fields select{height:20px;font-size:11px}
#customer-editor .customer-fields input[type=checkbox]{height:14px;width:14px}
#customer-editor .customer-fields label[data-field=note_fisse]{margin:3px 0;gap:2px}
#customer-editor textarea{min-height:48px;font-size:11px}
#customer-editor .customer-table-wrap{max-height:470px}
#customer-editor .customer-list>input{height:23px;margin-bottom:4px;font-size:11px}
#customer-editor table{font-size:11px}#customer-editor th,#customer-editor td{padding:3px 4px}
#customer-editor .customer-actions button{min-height:26px;padding:3px 7px}
#customer-editor form>[role=status]{margin:5px 0}
@media(max-width:700px){#customer-editor .customer-layout{grid-template-columns:1fr}#customer-editor .customer-table-wrap{max-height:200px}}

/* Permessi VB6 applicati prima di mostrare la schermata ordini. */
body[data-user-role="Utente"] .notes-box,body[data-user-role="Utente"] .command-buttons button:nth-child(5){display:none!important}
#customer-editor .customer-actions{gap:4px}#customer-editor .customer-actions button{padding:3px 5px}

.email-access{box-sizing:border-box;width:min(410px,94vw);margin:6vh auto;padding:24px;border:1px solid #888;background:#eee;font:14px Arial}.email-access img{width:100%;max-width:290px}.email-access h1{font-size:20px}.email-access label{display:block;margin:14px 0}.email-access label[hidden],.email-access button[hidden]{display:none!important}.email-access input{box-sizing:border-box;display:block;width:100%;height:30px;font:16px Arial}.email-access button{padding:7px 14px;margin-right:5px}.email-access [role=status]{line-height:1.4}

/* Pulsanti riga VB6: + sulla prima riga, meno sulle successive. */
.lines th:first-child{width:48px;min-width:48px}.row-select-controls{display:flex;align-items:center;gap:2px;min-width:43px}.lines .row-select-controls button{width:21px;min-width:21px;height:18px;line-height:16px;padding:0;font:11px Arial;border:1px solid #999;background:white}.lines .row-select-controls .row-action{width:18px;min-width:18px;background:#ffc4c4;border-color:#a66;font-weight:bold;font-size:14px;cursor:pointer}.row-action:disabled{opacity:.5;cursor:default}

.email-access .remember-device{display:flex;align-items:center;gap:7px}.email-access .remember-device input{width:16px;height:16px;margin:0}.email-access small{display:block;line-height:1.4;margin:0 0 12px;color:#444}

.row-select-controls{position:relative;z-index:6;pointer-events:auto}.lines td:first-child{overflow:visible}.lines .row-action{pointer-events:auto;touch-action:manipulation}#row-feedback{position:absolute;left:4px;right:4px;top:100%;z-index:12;white-space:normal;background:#fff6cf;color:#333;padding:3px 6px;border:1px solid #c6a55b;line-height:14px;pointer-events:none}#row-feedback:empty{display:none}#row-feedback.row-feedback-error{background:#fff0f0;color:#a00;border-color:#b66}#order-number{min-width:0}#header-fields label:nth-child(3) .vb-combo{width:100%}#header-fields label:nth-child(3) .vb-combo input{width:100%}

.order-strip{position:relative}

/* Combo ordine piatta; comandi + e − affiancati sul primo dettaglio di ogni pagina. */
#header-fields label:nth-child(3) .vb-combo{border:1px solid #888;box-shadow:none;border-radius:0;background:#ffdfbf}
#header-fields label:nth-child(3) .vb-combo input{border:0;box-shadow:none;outline-offset:-2px;appearance:none;border-radius:0;background:#ffdfbf;height:17px}
#header-fields label:nth-child(3) .vb-combo-toggle{border:0;border-left:1px solid #999;box-shadow:none;appearance:none;border-radius:0;background:#ffdfbf;height:17px}
.lines th:first-child{width:72px;min-width:72px}.row-select-controls{min-width:66px;gap:2px}.lines tbody tr[hidden]{display:none!important}

/* Freccia ordine piatta, con lo stesso grigio della combo Ditta. */
#header-fields label:nth-child(3) .vb-combo-toggle{background:#e7e7e7;color:#000;border:0;border-left:1px solid #999;box-shadow:none}
.row-select-controls{display:grid;grid-template-columns:18px 18px 24px;gap:2px;align-items:center}
.row-select-controls .row-action[data-operation=add]{grid-column:1;grid-row:1}
.row-select-controls .row-action[data-operation=remove]{grid-column:2;grid-row:1}
.lines .row-select-controls .row-number{grid-column:3;grid-row:1;width:24px;min-width:24px;text-align:center;font-variant-numeric:tabular-nums}

.languages button{display:grid;place-items:center}.languages svg{display:block;width:23px;height:16px;border:1px solid #888}
#order:not(.production-mode) .lower-layout{height:296px}#order:not(.production-mode) .shirt-picture{height:218px}#order:not(.production-mode) .notes-box{height:182px}#order:not(.production-mode) .notes-box textarea{height:166px}

#web-login .login-secondary{display:block;margin-top:12px;border:0;background:transparent;color:#075a9c;text-decoration:underline;font-size:12px;padding:0;cursor:pointer}
#account-recovery{width:min(460px,94vw);font:13px Arial;background:#eee;border:1px solid #888}#account-recovery label{display:block;margin:12px 0}#account-recovery input{display:block;width:100%;box-sizing:border-box;height:28px}#account-recovery button{padding:6px 10px;margin:4px 4px 4px 0}#account-recovery [role=status]{line-height:1.4}

/* Campi confezionamento compatti, senza estensione su tutta la testata. */
.header-box .packaging{width:300px;max-width:100%;justify-self:start}

/* Riquadro testata aderente ai campi, senza espansione fino al bordo pagina. */
.header-box{right:auto;width:min(765px,calc(100% - 342px))}

/* Note fisse: bordo unico attorno a titolo e testo. */
.notes-box{border:1px solid #888;background:#fff}
.notes-box>details{height:100%}
.notes-box textarea{border:0;height:calc(100% - 16px);box-sizing:border-box}
#row-tools{display:none}
.row-select-controls{grid-template-columns:18px 18px 24px}

#loading-status{position:fixed;top:12px;left:50%;transform:translateX(-50%);z-index:10000;display:flex;align-items:center;gap:12px;max-width:calc(100vw - 48px);box-sizing:border-box;padding:13px 20px;background:#fff8d9;color:#172b4d;border:1px solid #ac9139;border-radius:5px;box-shadow:0 3px 14px #0003;font:14px Arial,sans-serif;pointer-events:none}
#loading-status[hidden]{display:none}
#loading-status:before{content:'';flex:none;width:18px;height:18px;border:3px solid #c6d3e3;border-top-color:#075ba5;border-radius:50%;animation:ordini-loading .8s linear infinite}
@keyframes ordini-loading{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){#loading-status:before{animation:none}}

/* Layout nel flusso: la tabella determina la posizione di misure e note. */
#order,#order.production-mode{height:auto;min-height:0;padding-bottom:8px}
#order .lines-section{position:relative;inset:auto;height:auto;margin:0 0 10px}
#order .lines-section>.table-wrap{height:auto;overflow:visible}
#order .lower-layout{position:relative;inset:auto;margin:0 6px;height:auto;min-height:360px;display:grid;grid-template-columns:minmax(270px,24%) minmax(330px,30%) minmax(300px,1fr);gap:12px;align-items:stretch}
#order:not(.production-mode) .shirt-section{min-height:360px;padding:7px}
#order:not(.production-mode) .shirt-picture{height:auto;min-height:270px;flex:1}
#order:not(.production-mode) .measure-section{margin:0;border:1px solid #888;padding:8px}
#order:not(.production-mode) .measure-choice{width:100%;height:84px;padding:5px 12px}
#order:not(.production-mode) .measure-choice label{font-size:12px;line-height:22px}
#order:not(.production-mode) .measurements{width:100%;border-spacing:4px}
#order:not(.production-mode) .measurements td{height:23px;font-size:12px}
#order:not(.production-mode) .measurements td:first-child{width:auto;font-size:12px}
#order:not(.production-mode) .measurements td:nth-child(2),#order:not(.production-mode) .measurements td:nth-child(4){width:54px}
#order:not(.production-mode) .measurements input.test-edit{height:23px;font-size:13px}
#order .line-notes-section{max-width:none;min-width:0;padding:0;display:flex;flex-direction:column;gap:10px}
#order .notes-box{height:auto;min-height:270px;flex:1;overflow:hidden;border:1px solid #888;display:flex;flex-direction:column}
#order .notes-box>#order-notes{height:auto;min-height:0;flex:1;display:flex;flex-direction:column}
#order .notes-box summary{height:auto;min-height:25px;padding:5px 8px;font-size:12px;font-weight:bold;flex:none;border-bottom:1px solid #ccc}
#order .notes-box #fixed-notes{height:auto;min-height:235px;flex:1;resize:vertical;overflow:auto;scrollbar-width:auto;font:13px/1.45 Arial;padding:8px;border:0;white-space:pre-wrap;overflow-wrap:anywhere}
#order .command-buttons{margin:0;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;flex:none}
#order .command-buttons button{height:32px;font-size:11px}
#order.production-mode .lower-layout{min-height:150px;display:block}
#order.production-mode .line-notes-section{display:grid;grid-template-columns:minmax(0,1fr) 300px;gap:14px;align-items:start}
#order.production-mode .notes-box{min-height:150px}
#order.production-mode .notes-box #fixed-notes{min-height:120px}
#order.production-mode .command-buttons{margin:0;align-content:start}
#order .notice{margin:0;padding:7px 8px}
#web-login{box-sizing:border-box;width:min(410px,94vw);padding:28px;background:#f6f7f9;border:1px solid #aab6c2;border-radius:8px;box-shadow:0 4px 18px #0002}
#web-login input{box-sizing:border-box}
/* La pagina rimane nascosta fino al completamento dell'inizializzazione. */
body:has(main[hidden]) #loading-status{top:30vh;padding:24px 30px;min-height:88px;background:#fff;border-color:#aab6c2;font-size:16px;max-width:min(540px,94vw);pointer-events:auto}
body:has(main[hidden]) #loading-status:before{width:26px;height:26px}

/* Richiesta utente: form ingranditi del 20%, scorrimento pagina disponibile. */
main{zoom:1.2}
#customer-editor{zoom:1.2;width:min(900px,80vw);max-width:80vw;max-height:78vh}
#last-operation{margin:3px 8px 8px;color:#334e68;font:11px Arial}

/* Descrizioni misure leggibili, mantenendo il form Su misura approvato. */
#order:not(.production-mode) .measure-label{font-size:14px;line-height:1.2}
#order:not(.production-mode) .measurements td.measure-caption{height:23px}
/* Produzione: ingrandimento distinto e intestazioni contenute nella griglia. */
main:has(#order.production-mode){zoom:1.1}
.production-mode .production-row-head{overflow:hidden}

#customer,#customer-menu [role=option]{text-transform:uppercase}

/* Testata unica nelle due viste; solo il corpo Produzione mantiene il +10%. */
main:has(#order.production-mode){zoom:1.2}
#order.production-mode .lines-section,#order.production-mode .lower-layout{zoom:.9166666667}
#six-lines{display:none!important}
.header-box{left:335px;right:7px;width:auto;height:126px;padding:8px 12px;grid-template-columns:minmax(200px,1.7fr) 132px 66px minmax(180px,1.1fr);grid-template-rows:65px 28px;gap:8px 12px}
.header-box .typology,.header-box .packaging{width:100%;max-width:100%}
#header-fields label:nth-child(3){grid-template-columns:62px minmax(0,1fr)}
#header-fields label:nth-child(4){grid-template-columns:44px minmax(0,1fr)}
#header-fields label:nth-child(4) input{width:100%}
.header-box .delivery{grid-template-columns:82px 100px}
.header-box .delivery input{width:100px}

/* Campi ricerca ridotti di un terzo, senza ridimensionare il testo. */
#header-fields label:nth-child(-n+3)>.vb-combo{width:66.666667%;justify-self:start}
#company-menu>[role=option],#customer-menu>[role=option],#order-number-menu>[role=option]{height:var(--combo-row-height,24px);line-height:var(--combo-row-height,24px)}
/* Uomo/Donna sulla stessa riga del selettore; consegna distanziata. */
.header-box{grid-template-columns:minmax(200px,1.7fr) 132px 150px minmax(150px,1.1fr)}
#header-fields label:nth-child(5){grid-template-columns:76px minmax(62px,1fr);gap:6px;text-align:left;white-space:nowrap;align-items:center}
.header-box .delivery{padding-left:20px}
#order:not(.production-mode) .measurements .measure-sign td{font-size:14px;line-height:20px;height:22px;font-weight:bold}

#web-login .password-field{position:relative;display:flex;width:100%;align-items:center}
#web-login .password-field input{padding-right:44px;margin:0}
#web-login .password-toggle{position:absolute;right:1px;top:1px;bottom:1px;width:38px;padding:3px;background:#e7e7e7;border:0;border-left:1px solid #aaa;cursor:pointer;display:grid;place-items:center}
#web-login .password-toggle svg{fill:none;stroke:currentColor;stroke-width:1.7}
#web-login .password-toggle[aria-pressed=true]{background:#d5e8ff}
/* Tre campi a distanza verticale costante; stessa distanza fra i gruppi. */
.header-box{column-gap:16px;row-gap:7px}
#header-fields label:nth-child(1){margin-top:0}
#header-fields label:nth-child(2){margin-top:36px}
#header-fields label:nth-child(3){margin-top:0}
/* Freccia grigia uniforme per le combo native Scatola e Linea. */
#scatola,.shirt-section>select{appearance:none;-webkit-appearance:none;border:1px solid #888;border-radius:0;background-color:#ffdfbf;padding:0 21px 0 3px;font:11px Arial;background-image:linear-gradient(45deg,transparent 50%,#111 50%),linear-gradient(135deg,#111 50%,transparent 50%),linear-gradient(to right,#999 1px,#e7e7e7 1px);background-position:calc(100% - 8px) 7px,calc(100% - 5px) 7px,right top;background-size:3px 4px,3px 4px,16px 100%;background-repeat:no-repeat}

/* Testata: distanza uniforme tra i quattro gruppi, senza spazio vuoto dopo le combo. */
.header-box{grid-template-columns:minmax(240px,303px) 132px 150px minmax(220px,273px);justify-content:space-between;column-gap:16px}
#header-fields label:nth-child(-n+3)>.vb-combo{width:100%}
.header-box .delivery{padding-left:0}

/* Etichette tipologia abbassate; stati riga coerenti con il gestionale VB6. */
.header-box .typology label{position:relative;top:4px}
.lines .row-select-controls .row-action{background:#ff8080}
.lines .row-select-controls .row-action:disabled{background:#ddd;border-color:#aaa;color:#777;opacity:1;cursor:default}
.lines .row-select-controls .row-action.processed-row{background:#80ff80;border-color:#6a6;color:#555;opacity:1}

/* La testata e il corpo condividono la stessa larghezza anche sui telefoni. */
main{min-width:1400px}#detail{overflow:visible}.header-box{min-width:0}
#order.production-mode .lines tbody td{border-bottom:0;background:#e0e0e0}
#order.production-mode .lines{border-spacing:2px 0}
#order.production-mode .lines tbody tr{border-bottom:0}

.order-message{max-width:min(540px,94vw);min-width:300px;padding:20px;border:1px solid #667b91;border-radius:5px;font:14px Arial}.order-message h2{margin:0 0 12px;font-size:17px}.order-message p{white-space:pre-wrap;line-height:1.5}.order-message button{display:block;margin-left:auto;min-width:85px;padding:7px 16px}.order-message::backdrop{background:#0005}
.lines tbody tr.selected>td{background:#dcecff!important;box-shadow:inset 0 2px #276bb0,inset 0 -2px #276bb0}.lines tr.selected .row-number{background:#195a9e;color:white;border-color:#164b83}

.production-row-sizes input{font-weight:700!important}
#customer-editor .customer-fields label[data-field=note_fisse]{display:flex;flex-direction:column;grid-column:1/-1;gap:6px;margin:12px 0}
#customer-editor .customer-fields label[data-field=note_fisse] textarea{width:100%;min-height:150px;resize:vertical;font:13px/1.45 Arial;padding:9px}
.order-message,#discard-dialog{border:1px solid #d9e2ec;border-radius:16px;padding:26px;box-shadow:0 22px 70px #102a4350;max-width:min(560px,94vw);font:14px/1.55 Arial;background:#fff;color:#243447}
.order-message h2,#discard-dialog h2{font-size:19px;margin:0 0 14px;color:#163e67;border-bottom:1px solid #e5edf4;padding-bottom:12px}
.order-message p,#discard-dialog p{margin:0 0 22px;white-space:pre-wrap}
.order-message button,#discard-dialog button{border:0;border-radius:8px;background:#195a9e;color:white;padding:9px 20px;min-width:90px;cursor:pointer;font-weight:600}
.order-message button+button,#discard-dialog button+button{margin-left:8px;background:#edf2f7;color:#243447}
.order-message::backdrop,#discard-dialog::backdrop{background:#102a4366;backdrop-filter:blur(2px)}

#customer-editor .customer-fields label[data-field=note_fisse] textarea{font-size:11px}

/* Si adatta alla larghezza CSS disponibile, che tiene conto di zoom e scala video. */
main,main:has(#order.production-mode){zoom:var(--order-ui-scale,1.2);min-width:1400px;max-width:1400px}

/* Le intestazioni replicate nelle righe sostituiscono completamente il thead. */
#order.production-mode .lines thead{display:none}
#source:empty{display:none}

/* I campi seguono il layout e non si ridimensionano manualmente. */
textarea{resize:none!important}

/* Stesso indicatore a freccia per combo personalizzate e selettori nativi. */
#header-fields .vb-combo-toggle,#header-fields label:nth-child(3) .vb-combo-toggle{appearance:none;background:transparent;border:0;box-shadow:none;font-size:0;width:18px;position:relative}
#header-fields .vb-combo-toggle::after{content:'';position:absolute;left:6px;top:7px;border-left:3px solid transparent;border-right:3px solid transparent;border-top:4px solid #333}
#header-fields .vb-combo{background:#ffdfbf;border:1px solid #888}
#header-fields .vb-combo input{border:0!important;height:17px!important}
.expanded-row-note{position:fixed;z-index:2700;min-height:120px;padding:12px;border:1px solid #326a98;border-radius:8px;background:#fffdf4;box-shadow:0 5px 20px #0004;font:14px/1.5 Arial;white-space:pre-wrap;overflow:auto}
:root{--combo-arrow:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M3 4h6L6 8z'/%3E%3C/svg%3E")}
.shirt-section>select,.header-box select{appearance:none;background-image:var(--combo-arrow);background-repeat:no-repeat;background-position:right 3px center;padding-right:18px!important}
#header-fields .vb-combo-toggle,#header-fields label:nth-child(3) .vb-combo-toggle{background-image:var(--combo-arrow);background-repeat:no-repeat;background-position:center}
#header-fields .vb-combo-toggle::after{display:none}

/* Ripristina le frecce native, compresa la combo Linea originale. */
.shirt-section>select,.header-box select{appearance:auto!important;background-image:none!important;padding-right:0!important}
#header-fields .vb-combo-toggle,#header-fields label:nth-child(3) .vb-combo-toggle{background:#e7e7e7!important;width:18px;overflow:hidden}
#header-fields .vb-combo-toggle .native-combo-arrow{appearance:auto!important;pointer-events:none;width:18px!important;min-width:18px!important;height:17px!important;margin:0;padding:0!important;border:0!important;background:#e7e7e7!important;color:#000;position:absolute;inset:0}

/* Frecce leggibili per articolo, colore, collo, cucitura e polsi. */
.lines .vb-combo-toggle{position:relative;width:22px;min-width:22px;height:18px;flex:0 0 22px;padding:0;border:1px solid #7b8da1;border-radius:2px;background:linear-gradient(#f8fbff,#d5e2ef);color:#173e65;font-size:0;cursor:pointer}
.lines .vb-combo-toggle::after{content:'';position:absolute;left:6px;top:6px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:6px solid #173e65;pointer-events:none}
.lines .vb-combo-toggle:hover{background:#c4daee;border-color:#326a98}
.lines .vb-combo-toggle:focus-visible{outline:2px solid #1472ba;outline-offset:1px}
.lines .vb-combo input{width:calc(100% - 22px)!important}

/* Immagine e riferimenti condividono il sistema di coordinate del gestionale. */
.shirt-picture .shirt-diagram{display:block;width:100%;height:100%;position:absolute;inset:0}
#order .notes-box summary{font-weight:400}

/* Solo la larghezza del figurino si riduce; altezza e riferimenti restano solidali. */
.shirt-picture .shirt-diagram{width:85%;height:100%;left:7.5%;right:auto}
.access-languages{display:flex;justify-content:flex-end;gap:6px;margin:0 0 12px}
.access-languages button{width:auto!important;padding:6px 10px!important;margin:0!important;font:12px Arial!important;border:1px solid #9babb9;border-radius:5px;background:#edf3f8;color:#173e65;cursor:pointer}
.access-languages button[aria-pressed="true"]{background:#245e91;color:white}

/* Isolated preview: a third horizontal details page; original outer width is unchanged. */
.lines[data-detail-page="1"] [data-page="1"]{display:table-cell}
.lines[data-detail-page="1"] .production-row-head [data-page="1"]{display:flex}
.lines[data-detail-page="1"] .production-row-head [data-page="2"]{display:none}
.lines[data-detail-page="1"] .production-row-head [data-page="3"]{display:none}
.lines[data-detail-page="2"] [data-page="2"]{display:table-cell}
.lines[data-detail-page="2"] .production-row-head [data-page="1"]{display:none}
.lines[data-detail-page="2"] .production-row-head [data-page="2"]{display:flex}
.lines[data-detail-page="2"] .production-row-head [data-page="3"]{display:none}
.lines[data-detail-page="3"] [data-page="3"]{display:table-cell}
.lines[data-detail-page="3"] .production-row-head [data-page="1"]{display:none}
.lines[data-detail-page="3"] .production-row-head [data-page="2"]{display:none}
.lines[data-detail-page="3"] .production-row-head [data-page="3"]{display:flex}
.lines th:nth-child(11),.lines th:nth-child(12),.lines th:nth-child(13){width:90px!important}.button-combo{width:100%;min-width:0;height:20px;background:#fff5e6;border:1px solid #999;font:11px Arial;color:#111;appearance:auto;padding:0 2px}.lines[data-detail-page="3"] .production-row-sizes{display:grid}.lines[data-detail-page="3"] th[data-detail-key="note"]{width:280px}.preview-banner{position:fixed;bottom:0;left:0;right:0;background:#173d60;color:white;text-align:center;font:12px Arial;padding:5px;z-index:10000}
.lines .button-combo{appearance:none!important;-webkit-appearance:none!important;border:1px solid #888!important;border-radius:0;background-color:#fff5e6!important;background-image:linear-gradient(45deg,transparent 50%,#173d60 50%),linear-gradient(135deg,#173d60 50%,transparent 50%),linear-gradient(to right,#999 1px,#dcecff 1px)!important;background-position:calc(100% - 10px) 7px,calc(100% - 6px) 7px,right top!important;background-size:4px 5px,4px 5px,20px 100%!important;background-repeat:no-repeat!important;padding:0 23px 0 3px!important;height:20px!important;color:#111!important;font:11px Arial!important}

.lines th.button-count-heading{width:48px!important}.lines .button-count{width:100%;min-width:0;height:20px;background:#fff5e6;border:1px solid #888;font:11px Arial;padding:1px 3px}

.lines th.button-count-heading{width:72px!important;white-space:normal}

#horizontal-page-status{white-space:nowrap;font:bold 10px Arial;color:#173d60;background:#eaf3fb;border:1px solid #a0b7ca;border-radius:3px;padding:2px 5px}

/* More space for first-view combos; overall table width remains 100%. */
.lines[data-detail-page="1"] th:nth-child(1){width:4%!important}
.lines[data-detail-page="1"] th:nth-child(2){width:5%!important}
.lines[data-detail-page="1"] th:nth-child(3){width:2.5%!important}
.lines[data-detail-page="1"] th:nth-child(4){width:15%!important}
.lines[data-detail-page="1"] th:nth-child(5){width:6.5%!important}
.lines[data-detail-page="1"] th:nth-child(6){width:11.5%!important}
.lines[data-detail-page="1"] th:nth-child(7){width:6%!important}
.lines[data-detail-page="1"] th:nth-child(8){width:7%!important}
.lines[data-detail-page="1"] th:nth-child(9),.lines[data-detail-page="1"] th:nth-child(10){width:5.5%!important}
.lines[data-detail-page="1"] th:nth-child(11){width:9.5%!important}
.lines[data-detail-page="1"] th:nth-child(12),.lines[data-detail-page="1"] th:nth-child(13){width:9%!important}
.lines[data-detail-page="1"] th:nth-child(14){width:4%!important}
.lines[data-detail-page="3"] th[data-detail-key="valuta"],.lines[data-detail-page="3"] td[data-detail-key="valuta"]{width:44px!important}
.lines .currency-select{width:40px;max-width:100%;min-width:0;padding:0 1px}

.measure-side-dx{display:inline-flex;flex:0 0 17px;align-items:center;justify-content:center;font:11px Arial;color:#111}.preview-shoulder-slope .measure-letter{border:0;background:transparent}.preview-shoulder-input{width:100%;min-width:0;height:23px;border:0;background:#fff8e9;padding:0;text-align:center;font:13px Arial}.preview-shoulder-input:focus-visible{outline:2px solid #1472ba}

/* Uniform measurement captions reserve the same Dx column on every row. */
.preview-shoulder-slope .measure-letter{border:1px solid #888;background:#e0e0e0}
#order:not(.production-mode) .lower-layout{grid-template-columns:minmax(270px,24%) minmax(350px,33%) minmax(300px,1fr)}
.shirt-diagram path{vector-effect:non-scaling-stroke;stroke-width:1}
/* Compact row tools fit the first column without changing the overall grid width. */
.lines .row-select-controls{display:grid;width:100%;min-width:0;grid-template-columns:14px 14px minmax(18px,1fr);gap:1px}
.lines .row-select-controls .row-action{width:14px;min-width:14px;height:18px;font-size:12px;line-height:16px}
.lines .row-select-controls .row-number{width:100%;min-width:0;font-size:10px;padding:0;overflow:hidden;text-overflow:clip}
.lines .button-combo.button-readonly{display:block;max-width:100%;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font:10px Arial!important;padding:0 3px!important;background-image:none!important;cursor:zoom-in}
.lines .button-combo.button-readonly:disabled{cursor:default}
/* The row selector keeps the same physical width on every horizontal view. */
.lines[data-detail-page]>thead>tr>th:first-child{width:64px!important;min-width:64px!important;max-width:64px!important}
.lines[data-detail-page]>tbody>tr[data-index]>td:first-child{width:64px!important;min-width:64px!important;max-width:64px!important}
.closed-order select:disabled,.closed-order .vb-combo input:disabled,.closed-order .vb-combo input[readonly],.closed-order .material-input:disabled{pointer-events:none}
.closed-order .vb-combo:has(input:disabled),.closed-order .vb-combo:has(input[readonly]){cursor:zoom-in}
/* Stable row height across horizontal views: 20px controls + cell padding/borders. */
#order:not(.production-mode) .lines>tbody>tr[data-index]{height:24px}
#order:not(.production-mode) .lines>tbody>tr[data-index]>td{height:24px;box-sizing:border-box;vertical-align:middle;padding-top:1px;padding-bottom:1px}
/* Order state colors are driven solely by Ordini.Ord_New in both order types. */
.lines .row-select-controls .row-action.order-editable{background:#80ff80;border-color:#6a6;color:#204820;opacity:1}
.lines .row-select-controls .row-action.order-launched{background:#ff8080;border-color:#a66;color:#6a1717;opacity:1}

/* Anagrafica compatta: campi e note ridotti, pulsanti sempre accessibili. */
#customer-editor{padding:6px;max-height:calc(83.333dvh - 20px)}
#customer-editor>h2{font-size:13px;margin:0 0 3px;padding-bottom:3px}
#customer-editor h3{font-size:12px;margin-bottom:3px;padding:3px 4px}
#customer-editor .customer-layout{gap:7px}
#customer-editor .customer-fields{gap:1px;max-height:calc(83.333dvh - 140px);overflow-y:auto;padding-right:3px}
#customer-editor .customer-fields label{min-height:18px;gap:3px}
#customer-editor .customer-fields input,#customer-editor .customer-fields select{height:18px;padding:1px 4px;font-size:11px}
#customer-editor .customer-fields input[type=checkbox]{width:13px;height:13px}
#customer-editor .customer-fields label[data-field=note_fisse]{margin:4px 0;gap:3px}
#customer-editor .customer-fields label[data-field=note_fisse] textarea{height:88px;min-height:88px;max-height:88px;padding:5px;resize:none;font:11px/1.25 Arial}
#customer-editor .customer-list>input{height:20px;margin-bottom:3px}
#customer-editor .customer-table-wrap{max-height:min(330px,calc(83.333dvh - 155px))}
#customer-editor th,#customer-editor td{padding:2px 4px}
#customer-editor form>[role=status]{margin:3px 0}
#customer-editor .customer-actions button{min-height:24px;padding:2px 5px}
#customer-editor .customer-fields>label{flex-shrink:0}

/* Un centimetro in piu di altezza, rispettando lo spazio del monitor. */
#customer-editor .customer-fields label[data-field=note_fisse] textarea{height:calc(88px + 1cm / 1.2);min-height:calc(88px + 1cm / 1.2);max-height:calc(88px + 1cm / 1.2)}


.measurements select.measurement-size{width:100%;min-width:0;height:23px;font-size:13px;box-sizing:border-box;padding:1px 2px;appearance:auto;background-image:none;background-color:white}

