:root{font-family:Segoe UI,system-ui,sans-serif;line-height:1.4;--bg-page: #f4f3f0;--bg-surface: #eceae6;--bg-elevated: #ffffff;--bg-input: #ffffff;--text: #1a1a1a;--text-muted: #5f6368;--border: #c4c2bc;--border-strong: #000000;--uld-fill: #b8bcc4;--uld-stroke: #8a9099;--yard-fill: #dddcd8;--yard-stroke: #a8a6a0;--workspace-fill: #e6e4df;--muted: #5f6368;color:var(--text);background:var(--bg-page)}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}.setup,.workspace{max-width:1400px;margin:0 auto;padding:1.5rem}.setup h1{margin-top:0}.setup-row{display:flex;gap:.5rem;margin-bottom:.5rem;align-items:center}label{display:flex;flex-direction:column;gap:.25rem;margin-bottom:.75rem}input,select{padding:.4rem .6rem;border:1px solid var(--border);border-radius:6px;background:var(--bg-input);color:var(--text)}button{padding:.45rem .9rem;border-radius:6px;border:1px solid var(--border);background:var(--bg-surface);color:var(--text);cursor:pointer}button.primary{background:#3b82f6;border-color:#2563eb}button.ghost{background:transparent}button.danger{background:#7f1d1d;border-color:#991b1b}button.active,.tab.active{background:#3b82f6;border-color:#2563eb}.hint{color:var(--text-muted);font-size:.9rem}.toolbar{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center;margin-bottom:1rem}.uld-tabs{display:flex;flex-wrap:wrap;gap:.35rem;margin-bottom:1rem}.tab{font-size:.9rem}.main-grid{display:grid;grid-template-columns:260px 1fr;gap:1rem}.side-panel .stats{font-size:.85rem;color:var(--text-muted)}.side-panel button{width:100%;margin-bottom:.5rem}.collo-list{list-style:none;padding:0;margin:1rem 0 0;max-height:320px;overflow:auto}.collo-list li{padding:.35rem .5rem;border-radius:4px;cursor:pointer;margin-bottom:2px;font-size:.85rem}.collo-list li.active{outline:2px solid #2563eb}.views{display:flex;flex-direction:column;gap:1rem}.canvas-wrap{background:var(--bg-elevated);border:1px solid var(--border);border-radius:8px;padding:1rem;overflow:auto}.yard-ground{fill:var(--yard-fill);stroke:var(--yard-stroke)}.staging-zone{fill:#6366f11a;stroke:#6366f1;stroke-dasharray:8 4}.uld-on-yard.focused .uld-floor{stroke:#2563eb;stroke-width:3}.yard-canvas,.detail-canvas{overflow:auto;max-height:75vh}.detail-title{margin:0 0 .5rem;font-size:1rem}.workspace-floor{fill:var(--workspace-fill);stroke:var(--yard-stroke);stroke-width:1;stroke-dasharray:4 3}.uld-floor{fill:var(--uld-fill);stroke:var(--uld-stroke);stroke-width:2}.uld-label{fill:#2d3748;font-size:10px}.collo{stroke:#111;stroke-width:1;cursor:grab;opacity:.92}.collo.selected{stroke:#2563eb;stroke-width:2}.collo.status-out{stroke:#ef4444;stroke-width:2}.collo.status-overlap{stroke:#f59e0b;stroke-width:2}.collo.status-staging{stroke:#a78bfa;stroke-dasharray:4 2}.collo-text{fill:#111;font-size:9px;pointer-events:none}.band-green{fill:#22c55e}.band-yellow{fill:#eab308}.band-orange{fill:#f97316}.band-red{fill:#ef4444}.band-blue{fill:#3b82f6;stroke:#1d4ed8}.legend{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.75rem;font-size:.75rem}.legend-item{padding:.15rem .4rem;border-radius:4px;color:#111}.laterals{display:grid;grid-template-columns:1fr 1fr;gap:1rem}.elevation h4{margin:0 0 .5rem;font-size:.9rem}.uld-wall{fill:none;stroke:#707580;stroke-width:2}.collo-elev{stroke:#111;opacity:.85}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;background:#0009;display:flex;align-items:flex-start;justify-content:center;z-index:100;padding:1.25rem;overflow-y:auto}.modal{background:var(--bg-elevated);color:var(--text);padding:1.25rem;border-radius:10px;min-width:320px;max-width:480px;width:100%;max-height:calc(100vh - 2.5rem);border:1px solid var(--border);display:flex;flex-direction:column;margin:auto}.modal.wide{max-width:560px}.modal-header{display:flex;align-items:flex-start;justify-content:space-between;gap:.75rem;flex-shrink:0;margin-bottom:.75rem}.modal-header h3{margin:0;font-size:1.05rem;line-height:1.3}.modal-close{flex-shrink:0;width:2rem;height:2rem;padding:0!important;border-radius:6px;border:1px solid var(--border)!important;background:var(--bg-surface)!important;color:var(--text-muted)!important;font-size:1.35rem;line-height:1;cursor:pointer}.modal-close:hover{color:var(--text)!important;background:var(--bg-page)!important}.modal-body{overflow-y:auto;flex:1;min-height:0;padding-right:.15rem}.modal-actions{display:flex;justify-content:flex-end;gap:.5rem;flex-shrink:0;margin-top:1rem;padding-top:.75rem;border-top:1px solid var(--border)}.dim-row{display:grid;grid-template-columns:1fr 1fr 1fr;gap:.5rem}.weight-mode{display:flex;align-items:center;gap:.5rem;margin-bottom:.75rem}.weight-mode button.active{background:#3b82f6}.preview{font-size:.9rem}.error{color:#b91c1c}.import-preview{max-height:200px;overflow:auto;font-size:.85rem}.overhang-zone{fill:#3b82f626;stroke:#3b82f6;stroke-dasharray:6 4}.consolidation-meta{display:flex;flex-wrap:wrap;gap:.75rem;align-items:flex-end;margin-bottom:.75rem;padding:.5rem 0;border-bottom:1px solid var(--border)}.uld-meta-tools{display:flex;flex-wrap:wrap;align-items:flex-end;gap:.5rem}.uld-profile-select select{min-width:7.5rem}.btn-sm{font-size:.78rem!important;padding:.25rem .55rem!important}.flights-row{display:flex;gap:.35rem;align-items:center}.inline-label.compact{margin-bottom:0;min-width:140px}.help-box{background:var(--bg-surface);border:1px solid var(--border);border-radius:8px;padding:.6rem .75rem;margin:.75rem 0;font-size:.82rem}.help-box ol{margin:.35rem 0 0;padding-left:1.1rem}.inline-label{margin-top:.5rem}.stack-targets{display:flex;flex-direction:column;gap:.25rem;margin:.5rem 0}.stack-targets button{font-size:.8rem}.hint.tiny{font-size:.75rem;margin:.25rem 0 0}kbd{background:var(--bg-surface);border:1px solid var(--border);padding:.1rem .35rem;border-radius:3px;font-size:.75rem}.view-controls{display:flex;flex-wrap:wrap;gap:1.5rem;margin-bottom:.75rem;padding:.5rem 0}.view-controls label{flex-direction:row;align-items:center;gap:.5rem;margin:0;font-size:.85rem}.view-controls input[type=range]{width:140px}.uld-overview-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:1rem;width:100%}@media (max-width: 900px){.uld-overview-grid{grid-template-columns:1fr}}.overview-cell{background:var(--bg-elevated);border-radius:8px;padding:.5rem;border:2px solid var(--border);cursor:pointer}.overview-cell.active{border-color:#3b82f6}.overview-header{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:.35rem;font-size:.85rem}.flight-tag{background:#3b82f6;color:#fff;padding:.1rem .4rem;border-radius:4px;font-size:.75rem}button.small{padding:.2rem .5rem;font-size:.75rem;margin-left:auto}.canvas-wrap.compact{overflow:auto;max-height:280px}.canvas-wrap.compact .top-canvas{display:block;margin:0 auto}.legend-item.status-staging{background:#a78bfa;color:#111}.recap-box{background:var(--bg-elevated);border:1px solid var(--border);border-radius:8px;padding:.75rem;margin:.75rem 0;font-size:.85rem}.recap-box.status-w-over{border-color:#ef4444}.recap-box.status-w-soft{border-color:#f59e0b}.recap-box.status-v-over{box-shadow:inset 0 0 0 1px #ef4444}.recap-box.status-v-warn{box-shadow:inset 0 0 0 1px #f59e0b}.recap-lines{display:flex;flex-direction:column;gap:.35rem;margin-top:.5rem}.recap-row{display:flex;justify-content:space-between;gap:.5rem}.recap-bar{height:6px;background:#d8d6d0;border-radius:3px;overflow:hidden}.recap-fill.kg{height:100%;background:#3b82f6}.recap-fill.vol{height:100%;background:#22c55e}.over-tag{color:#f59e0b;font-style:normal}.recap-residual.has-residual{font-weight:600}.recap-residual.has-residual span:last-child{color:#f59e0b}.empty-pallet-picker{margin-top:.75rem;padding:.5rem .65rem;background:var(--bg-surface);border-radius:6px;border:1px solid #93c5fd}.empty-pallet-compact{margin-top:.75rem;display:flex;flex-direction:column;gap:.25rem}.empty-pallet-compact select{width:100%;font-size:.82rem}.hawb-list-modal{max-width:520px}.hawb-export-list{list-style:none;margin:0 0 .75rem;padding:0;border:1px solid var(--border);border-radius:6px}.hawb-export-list li{display:flex;flex-direction:column;gap:.15rem;padding:.45rem .6rem;border-bottom:1px solid var(--border);font-size:.85rem}.hawb-export-list li:last-child{border-bottom:none}.hawb-export-plain{font-family:ui-monospace,monospace;word-break:break-all;margin:0 0 .5rem;padding:.45rem .5rem;background:var(--bg-surface);border-radius:4px}.hawb-export-msg{color:#15803d;margin:0 0 .35rem}.empty-pallet-picker strong{font-size:.85rem}.empty-pallet-btns{display:flex;flex-direction:column;gap:.35rem;margin-top:.4rem}.empty-pallet-btn{text-align:left;border-color:#3b82f6!important;color:#1d4ed8!important}.home-screen{max-width:720px;margin:2rem auto;padding:1.5rem}.home-screen h1{margin-top:0}.home-cards{display:flex;flex-direction:column;gap:.75rem;margin-top:1.5rem}.home-card{display:flex;flex-direction:column;align-items:flex-start;gap:.35rem;padding:1rem 1.25rem;text-align:left;border-radius:8px;border:1px solid var(--border);background:var(--bg-elevated)}.home-card.primary{border-color:#2563eb;background:#eef4ff}.home-card strong{font-size:1.05rem}.workspace-status{margin-top:.75rem}.home-recent{margin-top:2rem;max-width:640px}.home-recent h2{margin:0 0 .35rem;font-size:1rem}.home-recent-list{list-style:none;margin:.75rem 0 0;padding:0;display:flex;flex-direction:column;gap:.5rem}.home-recent-row{display:flex;align-items:stretch;gap:.4rem}.home-recent-item{flex:1;display:flex;flex-direction:column;align-items:flex-start;gap:.2rem;text-align:left;padding:.65rem .85rem;border-radius:8px;border:1px solid var(--border);background:var(--bg-elevated)}.home-recent-item:hover{border-color:#2563eb}.home-recent-delete{flex-shrink:0;padding:0 .75rem;border-radius:8px;border:1px solid #7f1d1d;background:#3b1f1f;color:#fca5a5;font-size:.75rem;font-weight:600;cursor:pointer}.home-recent-delete:hover{background:#5b2020;border-color:#f87171}.app-tabs{display:flex;flex-wrap:wrap;align-items:stretch;gap:.35rem;padding:.45rem .75rem;background:var(--bg-surface);border-bottom:1px solid var(--border)}.app-tab{display:flex;flex-direction:column;align-items:flex-start;gap:.1rem;padding:.35rem .65rem;border:1px solid var(--border);border-radius:6px;background:var(--bg-elevated);color:inherit;cursor:pointer;font-size:.78rem}.app-tab:hover{border-color:#909090}.app-tab.active,.app-tab-group.active .app-tab-consolidation{border-color:#2563eb;background:#e8f0fe}.app-tab-previsioni.active{border-color:#4ea72e;background:#edf7ed}.app-tab-home{font-weight:600}.app-tab-group{display:flex;align-items:stretch;border-radius:6px;overflow:hidden}.app-tab-group.active{outline:1px solid #2563eb;border-radius:6px}.app-tab-consolidation{border-radius:0;border-right:none;max-width:180px}.app-tab-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.app-tab-meta{font-size:.65rem;color:var(--text-muted)}.app-tab-close{padding:0 .4rem;border:1px solid var(--border);border-left:none;background:var(--bg-elevated);color:var(--text-muted);cursor:pointer;font-size:1rem;line-height:1}.app-tab-group.active .app-tab-close{border-color:#2563eb;background:#e8f0fe}.app-tab-close:hover{color:#b91c1c;background:#fde8e8}.app-tab-add{align-self:center;font-size:.78rem!important;padding:.35rem .55rem!important}.app-tabs-save{align-self:center;margin-left:auto;color:#15803d}.prev-row-assigned td{background-color:#86efac!important;border-top:1px solid #22c55e!important;border-bottom:1px solid #22c55e!important}.previsioni-grid tbody tr.prev-row-assigned td:first-child{box-shadow:inset 5px 0 #15803d}.previsioni-grid tbody tr.prev-row-assigned .prev-cell-input{background-color:#bbf7d0!important}.previsioni-grid tbody tr.prev-row-assigned .prev-actions-col{background-color:#86efac!important}.prev-row-assigned-legend{background:#86efac;color:#14532d;border:1px solid #16a34a;font-weight:700}.previsioni-grid tbody tr.prev-row-duplicate td{background-color:#fde047!important;border-top:1px solid #eab308!important;border-bottom:1px solid #eab308!important}.previsioni-grid tbody tr.prev-row-duplicate td:first-child{box-shadow:inset 5px 0 #ca8a04}.previsioni-grid tbody tr.prev-row-duplicate .prev-cell-input{background-color:#fef08a!important}.previsioni-grid tbody tr.prev-row-duplicate .prev-actions-col{background-color:#fde047!important}.prev-row-duplicate-legend{background:#fde047;color:#713f12;border:1px solid #ca8a04;font-weight:700}.prev-row-error-legend{background:#fca5a5;color:#7f1d1d;border:1px solid #dc2626;font-weight:700}.prev-consolidation-select{cursor:pointer;min-height:2rem}.hawb-shipment-panel{margin:.75rem 0;padding:.5rem .65rem;border:1px solid var(--border);border-radius:8px;background:var(--bg-surface)}.hawb-shipment-head{display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.35rem}.hawb-shipment-panel strong{font-size:.85rem}.hawb-summary-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:.35rem}.hawb-summary-row{display:grid;grid-template-columns:1fr auto;grid-template-rows:auto auto;gap:.1rem .5rem;align-items:center;font-size:.82rem;padding-bottom:.35rem;border-bottom:1px solid var(--border)}.hawb-summary-row:last-child{border-bottom:none;padding-bottom:0}.hawb-summary-ref{font-family:ui-monospace,monospace;font-weight:600;grid-column:1}.hawb-summary-meta{grid-column:1}.hawb-summary-row .hawb-shipment-remove{grid-column:2;grid-row:1 / span 2;align-self:center}.hawb-shipment-list{list-style:none;margin:.5rem 0 0;padding:0;display:flex;flex-direction:column;gap:.35rem}.hawb-shipment-row{display:flex;align-items:center;justify-content:space-between;gap:.5rem;font-size:.82rem}.hawb-shipment-remove{font-size:.72rem!important;padding:.15rem .45rem!important;color:#fca5a5!important}.danger-btn{color:#b91c1c!important}.danger-btn:hover:not(:disabled){background:#fde8e8!important}.app-header{display:flex;align-items:center;gap:1rem;margin-bottom:1rem}.app-header h1{margin:0;flex:1;font-size:1.25rem}.previsioni-screen{max-width:100%;padding:1rem 1.25rem 2rem}.previsioni-toolbar{display:flex;flex-wrap:wrap;align-items:flex-end;gap:1rem;margin-bottom:.75rem}.previsioni-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:.75rem}.previsioni-grid-wrap{margin-top:.5rem}.previsioni-legend{display:flex;flex-wrap:wrap;gap:.4rem;margin-bottom:.5rem;font-size:.72rem}.prev-legend{padding:.15rem .45rem;border-radius:4px;color:#111;font-weight:600}.prev-tier-required{background:#c00000;color:#fff}.prev-tier-conditional{background:#e97132;color:#111}.prev-tier-optional{background:#ff0;color:#111}.prev-tier-text{background:#4ea72e;color:#fff}.prev-interactive{background:#6366f1;color:#fff}.previsioni-grid-scroll{overflow:auto;max-height:calc(100vh - 280px);border:2px solid var(--border-strong);border-radius:8px;background:var(--bg-elevated)}.previsioni-grid{border-collapse:collapse;table-layout:fixed;width:max-content;min-width:100%;font-size:.82rem}.previsioni-grid th,.previsioni-grid td{border:1px solid var(--border-strong);padding:0;vertical-align:middle;overflow:hidden}.previsioni-grid td.prev-multiline-cell{vertical-align:top}.previsioni-grid th{position:sticky;top:0;z-index:2;padding:.35rem .4rem;font-weight:600;white-space:nowrap;color:#111;overflow:visible}.prev-th-label{display:inline-block;max-width:calc(100% - 8px);overflow:hidden;text-overflow:ellipsis;vertical-align:middle}.prev-th-sort{display:inline-flex;align-items:center;gap:.15rem;max-width:calc(100% - 8px);padding:0;margin:0;border:none;background:transparent;color:inherit;font:inherit;font-weight:inherit;cursor:pointer;text-align:left}.prev-th-sort:hover{text-decoration:underline}.prev-sort-icon{flex-shrink:0;font-size:.65rem;opacity:.95}.previsioni-grid th.prev-th-sorted .prev-sort-icon{opacity:1}.prev-legend.prev-sort-hint{margin-left:auto;color:var(--muted);font-size:.75rem}.prev-col-resize{position:absolute;top:0;right:0;width:6px;height:100%;cursor:col-resize;-webkit-user-select:none;user-select:none;touch-action:none}.prev-col-resize:hover,.prev-col-resize:active{background:#0000001f}.previsioni-grid th.prev-tier-required{background:#c00000;color:#fff}.previsioni-grid th.prev-tier-conditional{background:#e97132}.previsioni-grid th.prev-tier-optional{background:#ff0}.previsioni-grid th.prev-tier-text{background:#4ea72e;color:#fff}.previsioni-grid th.prev-interactive-col{box-shadow:inset 0 -3px #6366f1}.prev-cell-input{width:100%;min-width:0;box-sizing:border-box;border:none!important;border-radius:0!important;background:var(--bg-elevated)!important;color:var(--text)!important;padding:.35rem .4rem!important}.prev-cell-textarea{min-height:2.5rem;resize:vertical;line-height:1.35;white-space:pre-wrap;word-break:break-word;field-sizing:content}.prev-cell-input:focus{outline:2px solid #3b82f6;background:#fafaf8!important}.prev-hawb{font-family:ui-monospace,monospace}.prev-actions-col{width:3rem;text-align:center;background:var(--bg-surface);position:sticky;left:0;z-index:1}.prev-row-num{font-size:.7rem;color:var(--text-muted)}.prev-del{padding:0 .35rem!important;font-size:1rem;line-height:1;color:#f87171!important}.prev-row-error td{background-color:#fca5a5!important;border-top:1px solid #ef4444!important;border-bottom:1px solid #ef4444!important}.previsioni-grid tbody tr.prev-row-error td:first-child{box-shadow:inset 5px 0 #dc2626}.previsioni-grid tbody tr.prev-row-error .prev-cell-input{background-color:#fecaca!important}.previsioni-grid tbody tr.prev-row-error .prev-actions-col{background-color:#fca5a5!important}.previsioni-grid tbody tr.prev-row-error.prev-row-duplicate td,.previsioni-grid tbody tr.prev-row-error.prev-row-assigned td{background-color:#fca5a5!important;border-color:#ef4444!important}.previsioni-grid tbody tr.prev-row-error.prev-row-duplicate .prev-cell-input,.previsioni-grid tbody tr.prev-row-error.prev-row-assigned .prev-cell-input{background-color:#fecaca!important}.prev-interactive-cell{display:flex;align-items:center;gap:.25rem;padding:.15rem;min-width:8rem}.prev-excel-cell{min-width:10rem}.prev-excel-ref{flex:1;font-size:.72rem;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:6rem}.prev-excel-btn{font-size:.72rem!important;padding:.2rem .45rem!important}.prev-excel-clear{padding:0 .3rem!important;color:#f87171!important}.prev-add-row{margin-top:.5rem}.prev-validation-error{color:#f87171}.app-module-nav{display:flex;align-items:center;gap:.75rem;flex-wrap:wrap}.nav-modules{display:flex;align-items:center;gap:.35rem}.nav-modules button.active{background:#3b82f6;border-color:#2563eb;cursor:default}.nav-sep{color:#6b7280;font-size:.85rem}.nav-home{font-size:.85rem}.previsioni-drive-box{margin-bottom:.75rem;padding:.65rem .85rem;background:var(--bg-surface);border-radius:8px;border:1px solid var(--border)}.previsioni-drive-row{display:flex;flex-wrap:wrap;gap:.5rem;margin-top:.5rem}.drive-url-input{flex:1;min-width:220px}.toolbar{display:flex;flex-wrap:wrap;align-items:center;gap:.5rem;margin-bottom:.75rem}.import-preview{max-height:160px;overflow-y:auto;font-size:.8rem;margin:.5rem 0;padding-left:1.2rem}.modal.wide{max-width:520px}.import-fallbacks{display:flex;flex-direction:column;gap:.25rem;margin:.5rem 0}.import-fallbacks .inline-check{flex-direction:row;align-items:center;gap:.5rem;margin:.5rem 0 0;font-size:.85rem}.import-fallbacks .inline-check input[type=checkbox]{width:auto;margin:0}.autofiller-btn:not(:disabled){border-color:#22c55e;color:#15803d}.autofiller-msg{color:#15803d;margin:.25rem 0 .5rem}@media (max-width: 900px){.main-grid,.laterals{grid-template-columns:1fr}}.prism-zone-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem;margin:0 1.5rem 1rem;padding:.75rem 1rem;background:#edf7f1;border:1px solid #4ea72e;border-radius:8px}.prism-zone-banner-main{display:flex;flex-direction:column;gap:.25rem}.prism-zone-banner-error{flex:1 1 100%;margin:0;color:#b91c1c;font-size:.9rem}.prism-zone-banner-actions .btn-sm{padding:.35rem .75rem;border:1px solid var(--border);background:var(--bg-elevated);color:var(--text);border-radius:6px;cursor:pointer}.prev-readonly-cell{display:block;padding:.25rem .35rem;font-size:.9rem;color:var(--text)}
