*{box-sizing:border-box}body{margin:0;font-family:Inter,system-ui;background:#f4f6f9;color:#172033}header{display:flex;justify-content:space-between;align-items:center;padding:22px 34px;background:#111b2a;color:white}header>div:first-child{display:flex;gap:18px;align-items:center}.brand{font-weight:800;font-size:26px;border:2px solid #fff;border-radius:10px;padding:8px 10px}h1{margin:0;font-size:24px}header p{margin:4px 0 0;color:#aeb9c8}.top{display:flex;gap:12px;align-items:center}.top button,.primary{border:0;border-radius:9px;padding:10px 14px;background:#1769e0;color:#fff;font-weight:700;cursor:pointer}.top button{background:#2a374b}main{max-width:1500px;margin:auto;padding:28px}.summary{display:flex;gap:14px;margin-bottom:24px}.summary div{background:#fff;border-radius:14px;padding:16px 22px;box-shadow:0 1px 4px #0001;min-width:140px}.summary strong{display:block;font-size:28px}.summary span{font-size:13px;color:#6d7786}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.toolbar-actions{display:flex;gap:10px}.toolbar-actions>button{border:1px solid #d5dbe4;border-radius:9px;padding:10px 14px;background:#fff;color:#334155;font-weight:700;cursor:pointer}.toolbar-actions>.primary{background:#1769e0;color:#fff;border-color:#1769e0}.board{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.person{background:#fff;border-radius:16px;padding:18px;box-shadow:0 1px 5px #0001}.person-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.person h3{margin:0}.count{font-size:12px;color:#6d7786}.task{display:grid;grid-template-columns:minmax(0,1fr) 108px 90px 210px;gap:10px;align-items:center;padding:12px 0;border-top:1px solid #edf0f4}.task:first-of-type{border-top:0}.title{font-weight:700}.sub{font-size:12px;color:#6d7786;margin-top:4px}.pill{font-size:11px;font-weight:700;border-radius:999px;padding:5px 8px;background:#eef3f8;text-align:center}.high{background:#fde7e7;color:#a12626}.medium{background:#fff0d8;color:#8a5a00}.low{background:#e7f4ed;color:#23613e}.task select{width:100%;padding:7px;border:1px solid #dce2ea;border-radius:8px;background:#fff}.status-actions{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:7px;align-items:center}.edit-btn{border:1px solid #d5dbe4;border-radius:8px;padding:8px 10px;background:#fff;color:#3d4a5e;font-weight:700;cursor:pointer;white-space:nowrap}.edit-btn:hover{background:#f4f6f9}.review{background:#fffdf5}.done .title{text-decoration:line-through;color:#8a93a1}.empty{padding:18px 0;color:#929aa6;font-size:13px}dialog{border:0;border-radius:16px;padding:0;width:min(600px,92vw);box-shadow:0 20px 60px #0003}dialog::backdrop{background:#0f172a66}.wide{width:min(900px,94vw)}form,.history-wrap{padding:22px;display:grid;gap:14px}.dialog-head{display:flex;justify-content:space-between;align-items:center}.dialog-head h3{margin:0}.x{border:0;background:transparent;font-size:24px;cursor:pointer}.dialog-note{margin:0;color:#5d6775;font-size:13px}label{display:grid;gap:6px;font-size:13px;font-weight:600}input,select,textarea{font:inherit;padding:10px;border:1px solid #d9dfe7;border-radius:9px}.grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.actions{display:flex;justify-content:flex-end;gap:10px}.actions.split{display:grid;grid-template-columns:auto 1fr auto auto}.actions button{padding:10px 14px;border-radius:9px;border:1px solid #d5dbe4;background:#fff;cursor:pointer}.actions .primary{background:#1769e0;color:#fff;border-color:#1769e0;font-weight:700}.actions .primary:hover{background:#145cc5;border-color:#145cc5}.actions .primary:disabled{opacity:.6;cursor:wait}.danger{background:#fff1f1!important;color:#a12626!important;border-color:#f0caca!important}.hidden{display:none!important}.history-filter{display:grid;grid-template-columns:minmax(260px,420px);gap:12px}.history-list{max-height:60vh;overflow:auto;border-top:1px solid #e6eaf0}.history-item{display:grid;grid-template-columns:1fr auto;gap:15px;align-items:center;padding:14px 2px;border-bottom:1px solid #e6eaf0}.toast{position:fixed;right:24px;bottom:24px;background:#172033;color:#fff;padding:12px 16px;border-radius:10px;opacity:0;transform:translateY(10px);transition:.2s;pointer-events:none}.toast.show{opacity:1;transform:none}.age{font-size:11px;color:#758397;margin-top:5px}.done .age{color:#4f7b60}@media(max-width:950px){.board{grid-template-columns:1fr}.task{grid-template-columns:1fr 95px 85px minmax(210px,1fr)}.task .due{display:none}}@media(max-width:650px){header{padding:16px 18px}header p{display:none}main{padding:16px}.summary{overflow:auto}.toolbar{align-items:flex-start;gap:12px}.toolbar-actions{flex-direction:column}.task{grid-template-columns:1fr}.task .priority,.task .due{display:none}.grid{grid-template-columns:1fr}.actions.split{grid-template-columns:1fr 1fr}.actions.split span{display:none}.history-item{grid-template-columns:1fr}.status-actions{grid-template-columns:1fr auto}}

/* Produzione 3D - pagina dedicata */
.view-tabs{display:flex;gap:8px;padding:10px 34px;background:#fff;border-bottom:1px solid #e2e7ee}.view-tabs button{border:0;background:transparent;padding:9px 14px;border-radius:9px;font-weight:700;color:#66758a;cursor:pointer}.view-tabs button.active{background:#e8f1ff;color:#1769e0}.hidden-page{display:none!important}.production-toolbar{align-items:flex-end}.production-toolbar .sub{font-size:12px;color:#6d7786;margin-top:3px}.production-searches{display:flex;gap:8px}.production-searches input{min-width:190px}.production-grid{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(360px,.7fr);gap:18px}.production-card{min-width:0}.table-wrap{overflow:auto}.production-table{width:100%;border-collapse:collapse;font-size:12px}.production-table th{text-align:left;color:#6d7786;padding:9px 7px;border-bottom:1px solid #e6eaf0;font-size:10px;text-transform:uppercase}.production-table td{padding:11px 7px;border-bottom:1px solid #edf0f4}.qty-res{font-size:16px;font-weight:800;color:#c52e2e}.order-archive{display:grid;gap:8px}.order-card{border:1px solid #e2e7ee;border-radius:11px;background:#fbfcfe;overflow:hidden}.order-card summary{list-style:none;cursor:pointer;padding:11px;display:flex;justify-content:space-between;gap:12px;align-items:center}.order-card summary::-webkit-details-marker{display:none}.order-card summary div{display:grid;gap:2px}.order-card summary div span{font-size:11px;color:#6d7786}.order-line{display:flex;justify-content:space-between;gap:12px;padding:8px 11px;border-top:1px solid #edf0f4;font-size:11px}.order-line span:last-child{white-space:nowrap;color:#6d7786}@media(max-width:950px){.production-grid{grid-template-columns:1fr}.production-searches{width:100%;flex-direction:column}.production-searches input{width:100%}.view-tabs{padding:8px 18px}}@media(max-width:650px){.production-toolbar{align-items:stretch;flex-direction:column}.order-line{flex-direction:column;gap:4px}}
.qty-inprod{font-size:16px;font-weight:800;color:#8a5a00}.order-actions{display:flex;gap:8px;padding:0 11px 10px}.order-actions a{font-size:11px;font-weight:700;color:#1769e0;text-decoration:none}.month-group{border:1px solid #e2e7ee;border-radius:12px;background:#fff;overflow:hidden}.month-group>summary{display:flex;justify-content:space-between;gap:12px;padding:12px 13px;cursor:pointer;list-style:none;background:#f7f9fc}.month-group>summary::-webkit-details-marker{display:none}.month-group>summary span{font-size:11px;color:#6d7786}.month-orders{display:grid;gap:8px;padding:9px}.order-archive{gap:10px}.production-table td:nth-child(4),.production-table td:nth-child(5),.production-table td:nth-child(6){text-align:center}.production-table th:nth-child(4),.production-table th:nth-child(5),.production-table th:nth-child(6){text-align:center}

/* Scadenze condivise: avvisi e ordinamento per data */
.deadline-alert{margin:0 0 16px;padding:14px 16px;background:#fff8e8;border:1px solid #efc879;border-left:4px solid #d38b1c;border-radius:12px;color:#67460d;display:grid;gap:5px;font-size:12px}
.deadline-alert strong{font-size:14px}.deadline-alert summary{cursor:pointer;font-weight:700;margin:6px 0}.deadline-alert details>div{padding:4px 0;border-top:1px solid #f1dfbd}
.due-order{font-size:10px;color:#64748b;margin-top:4px;white-space:nowrap}.due-missing{font-weight:700;color:#a86408;white-space:nowrap}

/* Layout Team coerente con Control Center */
body{background:#eef3f8;color:#12223a}.team-shell{display:grid;grid-template-columns:210px minmax(0,1fr);min-height:100vh}.team-sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#182434,#101a27);color:#d8e2ef;padding:24px 14px;display:flex;flex-direction:column}.team-brand{padding:0 12px 24px}.team-brand-mark{font-size:36px;font-weight:800;letter-spacing:-2px;color:#fff}.team-brand-sub{font-size:8px;letter-spacing:.8px;color:#a7b5c6}.team-nav{display:flex;flex-direction:column;gap:6px}.team-nav-item{appearance:none;border:0;background:transparent;color:#c8d3df;text-align:left;padding:12px 14px;border-radius:11px;display:flex;gap:12px;align-items:center;cursor:pointer;font-weight:600}.team-nav-item:hover,.team-nav-item.active{background:#223249;color:white}.team-sidebar-bottom{margin-top:auto;padding:10px 12px;color:#9badc0;font-size:12px}.team-status-dot{width:7px;height:7px;background:#54d18d;border-radius:50%;display:inline-block;margin-right:6px}.team-version{margin-top:8px}.team-content{min-width:0}.team-content>header{min-height:118px;background:linear-gradient(110deg,#f7fbff,#eaf3fb 50%,#d8e7f2);color:#12223a;padding:22px 28px;border-bottom:1px solid #dbe5ef}.team-content>header p{color:#3e5875}.team-content>header .brand{background:#277df6;color:white;border:0}.team-content>header h1{font-size:32px}.team-content>header #sync{color:#476078}.team-content>main{max-width:none;padding:20px}.team-content .person,.team-content .summary>div{border:1px solid #e4ebf3;box-shadow:0 8px 28px rgba(32,52,78,.07)}
@media(max-width:760px){.team-shell{grid-template-columns:1fr}.team-sidebar{position:static;height:auto;flex-direction:row;align-items:center;padding:8px;gap:12px}.team-brand{padding:0 8px}.team-brand-mark{font-size:25px}.team-brand-sub,.team-sidebar-bottom{display:none}.team-nav{flex-direction:row}.team-nav-item{padding:10px}.team-content>header{min-height:90px;padding:16px}.team-content>main{padding:14px}}

.sort-control{display:flex;align-items:center;gap:8px;white-space:nowrap;font-size:13px;color:#475569}.sort-control select{max-width:230px;background:#fff;padding:9px 10px}@media(max-width:650px){.sort-control{flex-wrap:wrap;white-space:normal}.sort-control select{max-width:100%}}

/* Produzione 3D Generale, shared backend with Control Center */
#otherProductionPage .table-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}
#otherProductionPage .section-title{margin:0 0 5px;font-size:20px}
#otherProductionPage .other-prod-toolbar{display:flex;gap:10px;align-items:center;margin:14px 0}
#otherProductionPage .other-prod-toolbar input{flex:1;min-width:180px}
#otherProductionPage .card{background:#fff;border-radius:14px;padding:14px;box-shadow:0 1px 5px #0001}
#otherProductionPage .production-table-wrap{overflow-x:auto}
#otherProductionPage .production-table{min-width:1060px}
#otherProductionPage .other-inline-num{width:82px;padding:7px}
#otherProductionPage .other-inline-material{min-width:155px;max-width:230px;padding:7px}
#otherProductionPage .task-edit-btn{border:1px solid #d5dbe4;background:white;border-radius:8px;padding:8px;cursor:pointer}
#otherProductionPage .deadline-alert{background:#fff7e7;border:1px solid #f1c76c;padding:12px;border-radius:8px;margin:10px 0;color:#79510d}
#otherProductionDialog{width:min(720px,94vw);padding:0}
#otherProductionDialog .dialog-form{max-height:88vh;overflow-y:auto}
#otherProductionDialog .grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
#otherProductionDialog .other-prod-actions{display:flex;justify-content:flex-end;gap:10px}
#otherProductionDialog .secondary{background:white;border:1px solid #cbd5e1;padding:10px 14px;border-radius:8px}
#otherProductionDialog .icon-btn{border:0;background:transparent;font-size:23px;cursor:pointer}
@media(max-width:650px){#otherProductionDialog .grid2{grid-template-columns:1fr}#otherProductionPage .table-toolbar{align-items:flex-start;flex-direction:column}}
