:root{font-family:Inter,"Segoe UI",system-ui,sans-serif;background:#f5f7fb;color:#1b2f4b;font-size:14px}*{box-sizing:border-box}body{margin:0}button,input{font:inherit}button{cursor:pointer;border:1px solid #d6dfe9;border-radius:7px;background:white;padding:8px 12px;color:#263d59;font-weight:600;white-space:nowrap}button:hover:not(:disabled){background:#edf5fb;border-color:#abcde3}button:disabled{opacity:.5;cursor:default}.primary{background:#1874ac;color:white;border-color:#1874ac}.primary:hover:not(:disabled){background:#0f6298;color:white}.shell{display:flex;flex-direction:column;height:100dvh;min-height:640px;max-width:2100px;margin:auto}.masthead{display:flex;align-items:center;gap:25px;min-height:85px;padding:14px 23px}.brand{display:flex;align-items:center;gap:12px;white-space:nowrap}.brand-icon{display:block;width:77px;height:51px;object-fit:contain;flex-shrink:0}.brand-wordmark{display:block;width:195px;height:auto;object-fit:contain;flex-shrink:0}.project{display:flex;align-items:center;gap:9px;flex:1;max-width:560px;margin-left:8px}.project label{font-weight:650;color:#4e637b}.project input{border:1px solid #d6dfe9;border-radius:8px;padding:10px;background:white;min-width:0;flex:1}.server-pill{margin-left:auto;color:#477491;font-size:12px;font-weight:600;white-space:nowrap}.dot{display:inline-block;border-radius:50%;background:#3eaa80;width:8px;height:8px;margin-right:5px}.toolbar{display:flex;align-items:center;gap:8px;padding:1px 23px 16px;flex-wrap:wrap}.toolbar-info{margin-left:auto;color:#8090a1;font-size:12px}.workspace{display:grid;grid-template-columns:minmax(0,1.08fr) minmax(0,1fr);flex:1;min-height:0;gap:14px;margin:0 20px 11px}.panel{border:1px solid #dfe7f0;border-radius:11px;background:#fff;box-shadow:0 3px 12px #26496708;min-height:0;min-width:0}.editor{display:flex;flex-direction:column;overflow:hidden}.tabs{display:flex;flex-shrink:0;padding:9px 10px 0;gap:4px;border-bottom:1px solid #e8edf4}.tab{border:0;border-radius:7px 7px 0 0;font-size:12px;color:#637b91;background:none;padding:12px 13px}.tab.active{background:#ebf4fc;color:#176b9f}.table-area{flex:1;min-height:100px;overflow:auto;padding:14px}.data-table{width:100%;border-spacing:0;border-collapse:separate;min-width:max-content;border:1px solid #e2e9f1;border-radius:7px;overflow:hidden}.data-table th{background:#eff4f9;border-bottom:1px solid #dfe7ef;font-size:11px;color:#576d82;text-transform:uppercase;letter-spacing:.3px;padding:11px 12px;text-align:center;white-space:nowrap}.data-table td{border-bottom:1px solid #edf1f5;padding:3px 5px;text-align:center;height:38px;color:#334962}.data-table tr:last-child td{border-bottom:0}.data-table tr.selected td{background:#e5f2fa}.data-table tbody tr{cursor:pointer}.data-table tbody tr:hover:not(.selected) td{background:#f7fafc}.data-table input{border:1px solid transparent;border-radius:5px;background:transparent;text-align:center;padding:6px 2px;width:102px;min-width:42px;color:#263e58}.data-table input:focus{background:white;border-color:#1874ac;outline:2px solid #cfe5f5}.data-table td:nth-child(1){font-weight:700;color:#1674a9}.empty-table{padding:27px;color:#8090a1;text-align:center}.form-area{flex-shrink:0;border-top:1px solid #edf1f6;padding:14px;background:#fff;min-height:130px}.entry-grid{display:flex;align-items:flex-end;gap:9px;flex-wrap:wrap}.field{display:flex;flex-direction:column;gap:5px;min-width:70px;flex:1}.field label{color:#5e7388;font-size:11px;font-weight:700}.field input{min-width:0;width:100%;border:1px solid #d7e0e8;border-radius:6px;padding:8px}.action-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.secondary-action{color:#1572a5;background:#eef6fc;border-color:#dfedf8}.help{color:#8292a2;font-size:11px;margin-top:10px}.viewport{display:flex;flex-direction:column;padding:14px;min-height:0}.viewport-head h2{font-size:12px;letter-spacing:.6px;margin:0 0 12px}.preview-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap;font-size:12px;color:#49637b;margin-bottom:12px}.preview-controls label{display:inline-flex;align-items:center;gap:4px;white-space:nowrap}.preview-controls input[type=checkbox]{accent-color:#1874ac}.preview-controls #scale-input{width:57px;border:1px solid #d6dfe9;padding:6px;border-radius:5px;text-align:center}.preview-controls button{font-size:11px;padding:5px 9px;margin-left:auto}.canvas-wrap{border:1px solid #e1e7ed;position:relative;flex:1;min-height:180px;border-radius:8px;overflow:hidden}canvas{display:block;width:100%;height:100%}.viewport-foot{font-size:11px;color:#8a98a6;margin-top:10px}.stats{margin-top:8px;color:#657c91;font-size:12px}.statusbar{display:flex;gap:16px;align-items:center;justify-content:space-between;padding:9px 22px;border-top:1px solid #e0e8f1;background:#f8fafd;color:#5e7185;font-size:12px;min-height:36px}.footnote{color:#98a5b5;white-space:nowrap}.modal{position:fixed;inset:0;z-index:20;background:#11233bb3;padding:22px;display:grid;place-items:center}.modal[hidden]{display:none}.modal-card{background:white;border-radius:13px;padding:22px;width:min(1450px,96vw);max-height:95vh;overflow:auto;box-shadow:0 20px 60px #0002}.modal-header{display:flex;justify-content:space-between;gap:20px;align-items:start}.modal-header h2{font-size:16px;margin:0 0 8px}.modal-header p{font-size:12px;color:#71849a;margin:0 0 15px}.close-button{font-size:19px}.diagram-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.diagram-panel{border:1px solid #dde6ef;border-radius:9px;padding:13px;min-width:0}.diagram-panel strong{display:block;font-size:13px}.extremes{font-size:12px;color:#74869a;margin-top:5px}.diagram-panel canvas{height:360px;background:white;margin-top:12px}.cursor-readout{text-align:center;color:#4b6076;font-size:13px;min-height:22px;margin:15px 0 0}@media(max-width:980px){.shell{height:auto;min-height:100dvh}.workspace{grid-template-columns:1fr;grid-template-rows:minmax(410px,1fr) minmax(400px,1fr)}.viewport{min-height:460px}.editor{min-height:410px}.diagram-grid{grid-template-columns:1fr}.diagram-panel canvas{height:300px}.footnote{display:none}}@media(max-width:560px){.masthead{flex-wrap:wrap;gap:12px}.project{order:3;width:100%;max-width:none;margin:0}.server-pill{margin-left:auto}.toolbar{padding:2px 13px 12px}.workspace{margin:0 10px 10px}.tab{padding:9px 7px}.toolbar-info{display:none}}

/* Il nuovo marchio conserva le proporzioni anche su schermi stretti. */
@media(max-width:560px){.brand{gap:7px}.brand-icon{width:60px;height:40px}.brand-wordmark{width:150px}}

/* v1.0 — Quarta scheda: mantenere altezza e proporzioni della finestra */
.tabs{flex-wrap:wrap;row-gap:3px}.tab{font-size:12px;padding:9px 11px}.help{line-height:1.55}
