.prediction-launch{display:flex;align-items:center;justify-content:space-between;gap:24px;margin:18px 0;padding:20px 22px}.prediction-launch h3{margin:2px 0 6px}.prediction-launch p{margin:0 0 6px;max-width:850px}.prediction-overlay{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:10020;display:flex;align-items:flex-start;justify-content:center;padding:24px;overflow:auto}.prediction-dialog{width:min(1380px,100%);background:#fff;border-radius:14px;box-shadow:0 22px 70px rgba(15,23,42,.24);padding:22px;min-height:70vh}.prediction-dialog>header{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;padding-bottom:14px;border-bottom:1px solid #e2e8f0}.prediction-dialog>header h2{margin:2px 0 6px}.prediction-dialog>header p{margin:0;max-width:900px;color:#64748b}.prediction-selector{padding:18px 0;border-bottom:1px solid #e2e8f0}.prediction-selector>label{display:block}.prediction-selector label>span{display:block;font-size:12px;font-weight:700;margin-bottom:6px;color:#475569}.prediction-selector input[type="search"],.prediction-selector input[type="date"],.prediction-selector select{width:100%;min-height:40px}.prediction-search-results{display:grid;gap:6px;max-height:250px;overflow:auto;margin-top:8px}.prediction-search-item{display:flex!important;justify-content:space-between;gap:14px;text-align:left;background:#f8fafc!important;color:#0f172a!important;border:1px solid #e2e8f0!important;padding:9px 11px!important;border-radius:8px!important}.prediction-search-item:hover{background:#eef4fb!important}.prediction-search-item span{display:flex;gap:10px;align-items:baseline}.prediction-search-item small{color:#64748b}.prediction-selected{margin-top:10px;border:1px solid #bfdbfe;background:#eff6ff;border-radius:9px;padding:10px 12px;display:flex;gap:12px;align-items:baseline;flex-wrap:wrap}.prediction-selected span{font-size:11px;text-transform:uppercase;color:#64748b;font-weight:700}.prediction-selected small{color:#64748b}.prediction-options{display:grid;grid-template-columns:minmax(180px,260px) minmax(180px,260px) auto;gap:12px;align-items:end;margin-top:12px}.prediction-output{padding-top:18px}.prediction-loading{min-height:180px;display:flex;align-items:center;justify-content:center;gap:10px;color:#64748b}.prediction-loading span{width:18px;height:18px;border:2px solid #cbd5e1;border-top-color:#1d4ed8;border-radius:50%;animation:predictionSpin .8s linear infinite}@keyframes predictionSpin{to{transform:rotate(360deg)}}.prediction-result-head{display:flex;justify-content:space-between;align-items:flex-start;gap:20px}.prediction-result-head h3{margin:2px 0 5px}.prediction-result-head p{margin:0}.prediction-result-head small{color:#64748b}.prediction-confidence{min-width:190px;border:1px solid #e2e8f0;border-radius:10px;padding:10px 12px;text-align:right}.prediction-confidence span,.prediction-confidence small{display:block;color:#64748b}.prediction-confidence strong{font-size:22px}.prediction-confidence.high{background:#f0fdf4}.prediction-confidence.medium{background:#fffbeb}.prediction-confidence.low{background:#fff7ed}.prediction-model-note{margin:14px 0;padding:10px 12px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:8px;color:#475569}.prediction-kpis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:10px;margin:14px 0 20px}.prediction-kpi{border:1px solid #e2e8f0;border-radius:10px;padding:12px;background:#fff}.prediction-kpi span,.prediction-kpi small{display:block;color:#64748b}.prediction-kpi strong{display:block;font-size:20px;margin:4px 0}.prediction-section{border:1px solid #e2e8f0;border-radius:10px;padding:14px;margin:14px 0}.prediction-section h4,.prediction-section h5{margin:0 0 8px}.prediction-section p{margin:0;color:#64748b}.prediction-section-head{display:flex;justify-content:space-between;gap:16px;margin-bottom:10px}.prediction-gantt-axis{margin-left:265px;margin-right:65px;display:flex;justify-content:space-between;color:#94a3b8;font-size:11px;border-bottom:1px solid #e2e8f0;padding-bottom:4px}.prediction-gantt-group{margin-top:12px}.prediction-gantt-group>h5{font-size:12px;color:#475569;text-transform:uppercase;letter-spacing:.04em}.prediction-gantt-row{display:grid;grid-template-columns:250px minmax(240px,1fr) 55px;gap:14px;align-items:center;min-height:48px;border-top:1px solid #f1f5f9}.prediction-gantt-label strong,.prediction-gantt-label small{display:block}.prediction-gantt-label small{color:#64748b}.prediction-gantt-track{position:relative;height:18px;border-radius:999px;background:linear-gradient(to right,transparent 24.8%,#e2e8f0 25%,transparent 25.2%,transparent 49.8%,#e2e8f0 50%,transparent 50.2%,transparent 74.8%,#e2e8f0 75%,transparent 75.2%);border:1px solid #e2e8f0}.prediction-gantt-uncertainty,.prediction-gantt-core{position:absolute;top:3px;height:10px;border-radius:999px}.prediction-gantt-uncertainty{background:#bfdbfe}.prediction-gantt-core{background:#1e3a5f}.prediction-gantt-peak{position:absolute;top:3px;width:9px;height:9px;background:#0f172a;transform:translateX(-50%) rotate(45deg);border-radius:1px}.prediction-gantt-meta{text-align:right;color:#64748b}.prediction-workload{border:1px solid #e2e8f0;border-radius:10px;padding:14px;margin:14px 0}.prediction-workload h4{margin:0 0 10px}.prediction-workload-bars{height:130px;display:grid;grid-template-columns:repeat(20,1fr);gap:3px;align-items:end;border-bottom:1px solid #cbd5e1}.prediction-workload-bin{height:100%;display:flex;align-items:flex-end}.prediction-workload-bin span{display:block;width:100%;background:#334155;border-radius:3px 3px 0 0;min-height:3px}.prediction-workload-axis{display:flex;justify-content:space-between;color:#94a3b8;font-size:11px;margin-top:4px}.prediction-peers{max-height:360px;overflow:auto}.prediction-peers td small,.prediction-section td small{display:block;color:#64748b}.prediction-actual{background:#f8fafc}.prediction-warnings{border:1px solid #fed7aa;background:#fff7ed;border-radius:10px;padding:12px 14px;margin:14px 0}.prediction-warnings h4{margin:0 0 6px}.prediction-warnings ul{margin:0;padding-left:18px}.prediction-result-actions{display:flex;justify-content:space-between;align-items:center;gap:16px;padding-top:8px}.prediction-result-actions small{color:#64748b}.prediction-empty{padding:16px;color:#64748b;text-align:center}
@media(max-width:1000px){.prediction-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.prediction-gantt-row{grid-template-columns:190px minmax(200px,1fr) 45px}.prediction-gantt-axis{margin-left:205px;margin-right:55px}}@media(max-width:700px){.prediction-launch,.prediction-result-head,.prediction-dialog>header{flex-direction:column;align-items:stretch}.prediction-overlay{padding:0}.prediction-dialog{border-radius:0;min-height:100vh;padding:14px}.prediction-options{grid-template-columns:1fr}.prediction-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.prediction-gantt-axis{margin-left:0;margin-right:0}.prediction-gantt-row{grid-template-columns:1fr;gap:5px;padding:8px 0}.prediction-gantt-meta{text-align:left}.prediction-result-actions{align-items:flex-start;flex-direction:column}.prediction-search-item{flex-direction:column}.prediction-search-item span{flex-wrap:wrap}}
/* 3.63.0 — operational planning focus */
.prediction-options{grid-template-columns:minmax(220px,300px) auto}.prediction-kpis{grid-template-columns:1.35fr repeat(4,minmax(0,1fr))}.prediction-kpi.primary{border-width:2px}.prediction-kpi.primary strong{font-size:27px}.prediction-kpi.secondary{opacity:.82}.prediction-gantt .prediction-gantt-row{min-height:58px}.prediction-gantt-meta strong,.prediction-gantt-meta small{display:block}.prediction-gantt-meta strong{font-size:17px}.prediction-gantt-axis{margin-left:365px;margin-right:80px}.prediction-gantt-row{grid-template-columns:350px minmax(300px,1fr) 70px}.prediction-weekly-scroll{overflow-x:auto;padding-bottom:5px}.prediction-weekly-bars{height:155px;display:grid;grid-template-columns:repeat(var(--weeks),minmax(16px,1fr));gap:3px;align-items:end;min-width:max(100%,calc(var(--weeks) * 19px));border-bottom:1px solid #cbd5e1}.prediction-week{height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:stretch;gap:3px}.prediction-week span{display:block;min-height:2px;background:#334155;border-radius:3px 3px 0 0}.prediction-week small{text-align:center;color:#94a3b8;font-size:9px;line-height:1}.prediction-section table th,.prediction-section table td{vertical-align:top}.prediction-model-note small{line-height:1.5}
@media(max-width:1100px){.prediction-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}.prediction-gantt-row{grid-template-columns:260px minmax(240px,1fr) 60px}.prediction-gantt-axis{margin-left:275px;margin-right:70px}}
@media(max-width:700px){.prediction-options{grid-template-columns:1fr}.prediction-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.prediction-kpi.primary{grid-column:1/-1}.prediction-gantt-axis{margin-left:0;margin-right:0}.prediction-gantt-row{grid-template-columns:1fr}.prediction-gantt-meta{text-align:left;display:flex;gap:5px;align-items:baseline}.prediction-weekly-bars{height:125px}}
/* 3.65.0 — calendarized schedule using Buildy Planning profiles and holidays */
.prediction-options{grid-template-columns:minmax(180px,240px) minmax(280px,1fr) auto}.prediction-options label small{display:block;margin-top:5px;color:#64748b;line-height:1.35}.prediction-calendar-summary{display:flex;justify-content:space-between;gap:18px;align-items:flex-start;border:1px solid #dbeafe;background:#f8fbff;border-radius:9px;padding:10px 12px;margin:12px 0;color:#475569}.prediction-calendar-summary strong{color:#1e3a5f}.prediction-calendar-summary span{text-align:right}.prediction-calendar-axis{position:relative;height:31px;margin-left:365px;margin-right:80px;border-bottom:1px solid #cbd5e1;overflow:hidden}.prediction-calendar-axis span{position:absolute;bottom:0;height:26px;padding:6px 5px 0;border-left:1px solid #cbd5e1;color:#64748b;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.prediction-calendar-axis span:last-child{border-right:1px solid #cbd5e1}.prediction-calendar-legend{margin-left:365px;margin-right:80px;display:flex;align-items:center;gap:14px;padding:5px 0 3px;font-size:10px;color:#64748b}.prediction-calendar-legend span{display:inline-flex;align-items:center;gap:5px}.prediction-calendar-legend b{margin-left:auto;font-weight:600}.prediction-calendar-legend i{width:12px;height:8px;border-radius:2px;border:1px solid #d1d5db}.prediction-calendar-legend i.rest{background:#f1f5f9}.prediction-calendar-legend i.holiday{background:#fee2e2;border-color:#fecaca}.prediction-gantt-track{overflow:hidden;background:#fff}.prediction-calendar-band{position:absolute;inset-block:0;z-index:0;border-radius:0}.prediction-calendar-band.rest{background:#f1f5f9}.prediction-calendar-band.holiday{background:#fee2e2}.prediction-gantt-core{z-index:2}.prediction-gantt-peak{z-index:3}.prediction-gantt-track:after{content:"";position:absolute;inset:0;z-index:1;pointer-events:none;background:linear-gradient(to right,transparent 24.8%,rgba(203,213,225,.7) 25%,transparent 25.2%,transparent 49.8%,rgba(203,213,225,.7) 50%,transparent 50.2%,transparent 74.8%,rgba(203,213,225,.7) 75%,transparent 75.2%)}
@media(max-width:1100px){.prediction-options{grid-template-columns:repeat(2,minmax(0,1fr))}.prediction-options>button{grid-column:1/-1}.prediction-calendar-axis,.prediction-calendar-legend{margin-left:275px;margin-right:70px}.prediction-calendar-summary{flex-direction:column}.prediction-calendar-summary span{text-align:left}}
@media(max-width:700px){.prediction-options{grid-template-columns:1fr}.prediction-options>button{grid-column:auto}.prediction-calendar-axis,.prediction-calendar-legend{margin-left:0;margin-right:0}.prediction-calendar-axis{height:28px}.prediction-calendar-legend{flex-wrap:wrap}.prediction-calendar-legend b{width:100%;margin-left:0}.prediction-calendar-summary{margin-top:10px}}
/* 3.66.0 — operational AD0 active-day schedule */
.prediction-gantt-window{position:absolute;top:3px;height:10px;border-radius:999px;background:rgba(147,197,253,.28);border:1px solid rgba(96,165,250,.65);z-index:2}.prediction-gantt-window.fallback{background:#bfdbfe;border-color:#93c5fd}.prediction-gantt-active{position:absolute;top:3px;height:10px;min-width:2px;border-radius:3px;background:#1e3a5f;z-index:3}.prediction-gantt-peak{z-index:4}.prediction-gantt-label small strong{color:#334155}.prediction-calendar-legend .active-sample{background:#1e3a5f;border-color:#1e3a5f}.prediction-calendar-legend .window-sample{background:rgba(147,197,253,.28);border-color:#60a5fa}
/* 3.68.1 — EP1 restored as operational historical intervention model; EP2 remains diagnostic */
.prediction-gantt-active{top:2px;height:12px;border-radius:999px;box-shadow:0 0 0 1px rgba(15,23,42,.08)}
.prediction-gantt-meta small+small{margin-top:2px;color:#475569;font-weight:600}

/* 3.69.0 — G1 expert-guided functional phases */
.prediction-gantt-active.guided{height:12px;top:2px;border-radius:4px;box-shadow:0 0 0 1px rgba(15,23,42,.16)}
.prediction-gantt-label small+small{margin-top:1px}

/* 3.70.1 — G2 theoretical duration + presence gate v2 */
.prediction-presence-suppressed{opacity:.62}
.prediction-presence-suppressed td:first-child small strong{color:#92400e}
.prediction-presence-unknown{background:#fffbeb}.prediction-presence-unknown td:first-child small strong{color:#92400e}

/* 3.72.1 — selezione cantiere e stato contrattuale aggiornato */
.prediction-search-footer{position:sticky;bottom:0;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 4px 4px;background:linear-gradient(to bottom,rgba(255,255,255,.92),#fff 42%);border-top:1px solid #e5eaf2}
.prediction-search-footer small,.prediction-archive-note{color:#64748b}
.prediction-search-footer button{flex:0 0 auto}

/* 3.74.0 — cronoprogramma tecnico configurabile */
.prediction-tech-workbench .prediction-section-head{align-items:flex-start}
.prediction-tech-toolbar{display:flex;align-items:flex-end;gap:10px;flex-wrap:wrap;justify-content:flex-end}
.prediction-tech-toolbar label{display:flex;flex-direction:column;gap:6px;min-width:120px}
.prediction-tech-toolbar label>span{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
.prediction-tech-toolbar select{min-height:38px}
.prediction-tech-check{flex-direction:row!important;align-items:center!important;min-width:auto!important;gap:8px!important;padding:9px 10px;border:1px solid #e2e8f0;border-radius:8px;background:#fff}
.prediction-tech-check input{margin:0}
.prediction-tech-check span{font-size:13px!important;text-transform:none!important;letter-spacing:0!important;color:#334155!important}
.prediction-tech-legend{display:flex;gap:14px;flex-wrap:wrap;padding:8px 0 12px;color:#64748b;font-size:12px}
.prediction-tech-legend span{display:inline-flex;align-items:center;gap:6px}
.prediction-tech-legend i{width:18px;height:12px;border:1px solid #cbd5e1;border-radius:2px;background:#fff;display:inline-block}
.prediction-tech-legend i.window{background:#dbeafe}
.prediction-tech-legend i.active{background:#1e3a5f;border-color:#1e3a5f}
.prediction-tech-legend i.rest{background:#f1f5f9}
.prediction-tech-legend i.holiday{background:#fee2e2;border-color:#fecaca}
.prediction-tech-legend i.peak{background:linear-gradient(135deg,transparent 0 50%,#0f172a 50% 100%);border-color:#0f172a}
.prediction-tech-board{border:1px solid #dbe3ee;border-radius:10px;background:#fff}
.prediction-tech-scroll{overflow:auto;max-width:100%}
.prediction-tech-table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed;font-size:12px}
.prediction-tech-table th,.prediction-tech-table td{border-right:1px solid #dbe3ee;border-bottom:1px solid #dbe3ee;padding:4px 6px;vertical-align:middle;background:#fff}
.prediction-tech-table thead th{position:sticky;top:0;z-index:5;background:#f8fafc;color:#334155;font-weight:700;text-align:center}
.prediction-tech-table thead tr:first-child th{top:0}
.prediction-tech-table thead tr:nth-child(2) th{top:36px}
.prediction-tech-table thead tr:nth-child(3) th{top:68px}
.prediction-tech-table .sticky{position:sticky;left:0;z-index:4;background:#fff}
.prediction-tech-table thead .sticky{z-index:8;background:#f8fafc}
.prediction-tech-table .c-order{left:0;min-width:40px;max-width:40px;text-align:center}
.prediction-tech-table .c-lot{left:40px;min-width:260px;max-width:260px}
.prediction-tech-table .c-start{left:300px;min-width:88px;max-width:88px;text-align:center}
.prediction-tech-table .c-end{left:388px;min-width:88px;max-width:88px;text-align:center}
.prediction-tech-table .c-dur{left:476px;min-width:72px;max-width:72px;text-align:center}
.prediction-tech-table .c-hist{left:548px;min-width:84px;max-width:84px;text-align:center}
.prediction-tech-table .c-phase{left:632px;min-width:230px;max-width:230px}
.prediction-tech-table td.c-lot strong,.prediction-tech-table td.c-lot small,.prediction-tech-table td.c-phase small{display:block}
.prediction-tech-table td.c-lot small,.prediction-tech-table td.c-phase small,.prediction-tech-table td.c-dur small,.prediction-tech-table td.c-hist small{color:#64748b;margin-top:2px}
.prediction-tech-head-timeline{min-width:420px}
.prediction-tech-head-month{height:32px;font-size:12px;text-transform:none;background:#eef3fa!important}
.prediction-tech-head-week{height:30px;font-size:11px;color:#64748b;background:#f8fafc!important}
.prediction-tech-head-day{width:18px;min-width:18px;max-width:18px;padding:2px 0!important;font-size:10px;line-height:1.1;background:#fff}
.prediction-tech-head-day span,.prediction-tech-head-day b{display:block}
.prediction-tech-head-day b{font-size:11px;color:#0f172a}
.prediction-tech-head-day.rest{background:#f8fafc}
.prediction-tech-head-day.holiday{background:#fff1f2}
.prediction-tech-week .prediction-tech-head-day{width:28px;min-width:28px;max-width:28px}
.prediction-tech-cell{width:18px;min-width:18px;max-width:18px;height:18px;padding:0!important;background:#fff}
.prediction-tech-week .prediction-tech-cell{width:28px;min-width:28px;max-width:28px}
.prediction-tech-cell.rest{background:#f8fafc}
.prediction-tech-cell.holiday{background:#fff1f2}
.prediction-tech-cell.ref{background:#dbeafe}
.prediction-tech-cell.ref.rest{background:linear-gradient(180deg,#dbeafe 0 55%,#f8fafc 55% 100%)}
.prediction-tech-cell.ref.holiday{background:linear-gradient(180deg,#dbeafe 0 55%,#fff1f2 55% 100%)}
.prediction-tech-cell.active{background:#1e3a5f!important}
.prediction-tech-cell.peak{box-shadow:inset 0 0 0 2px #0f172a}
.prediction-tech-footnote{margin:10px 0 0;color:#64748b;font-size:12px}
.prediction-output[data-prediction-profile="executive"] .prediction-optional-block{display:none}
.prediction-output[data-prediction-profile="compact"] .prediction-workload,
.prediction-output[data-prediction-profile="compact"] .prediction-peers-section{display:none}
.prediction-output[data-prediction-profile="compact"] .prediction-tech-table{font-size:11px}
.prediction-output[data-prediction-profile="executive"] .prediction-tech-table{font-size:11px}
@media(max-width:1100px){
  .prediction-tech-toolbar{justify-content:flex-start}
  .prediction-tech-table .c-lot{min-width:220px;max-width:220px}
  .prediction-tech-table .c-start{left:260px}
  .prediction-tech-table .c-end{left:348px}
  .prediction-tech-table .c-dur{left:436px}
  .prediction-tech-table .c-hist{left:508px}
  .prediction-tech-table .c-phase{left:592px;min-width:180px;max-width:180px}
}
@media(max-width:700px){
  .prediction-tech-toolbar{flex-direction:column;align-items:stretch}
  .prediction-tech-check{width:100%}
  .prediction-tech-legend{font-size:11px}
  .prediction-tech-table .c-phase{min-width:180px;max-width:180px}
}
@media print{
  .prediction-overlay{position:static;background:#fff;padding:0;display:block}
  .prediction-dialog{box-shadow:none;border-radius:0;padding:0;width:100%;min-height:auto}
  .prediction-dialog>header,.prediction-selector,.prediction-result-actions,.prediction-tech-toolbar button,[data-prediction-close]{display:none!important}
  .prediction-output{padding-top:0}
  .prediction-tech-board{border:none}
  .prediction-tech-scroll{overflow:visible}
  .prediction-tech-table{font-size:9px}
  .prediction-tech-head-day,.prediction-tech-cell{width:12px;min-width:12px;max-width:12px;height:12px}
  .prediction-tech-week .prediction-tech-head-day,.prediction-tech-week .prediction-tech-cell{width:18px;min-width:18px;max-width:18px}
}

/* 3.75.0 — gantt operativo con note, colori univoci e stampa configurabile */
.prediction-tech-workbench .prediction-section-head{margin-bottom:8px}
.prediction-tech-toolbar{justify-content:flex-start}
.prediction-tech-print-toolbar{padding-top:6px;border-top:1px dashed #e2e8f0;margin-top:8px}
.prediction-tech-toolbar .secondary{min-height:38px}
.prediction-tech-legend i.sat{background:#eef6ff;border-color:#c9ddff}
.prediction-tech-legend i.sun{background:#fff7ed;border-color:#fed7aa}
.prediction-tech-board{overflow:hidden}
.prediction-tech-scroll{overflow:auto;max-width:100%;padding-bottom:6px}
.prediction-tech-canvas{position:relative;min-width:max-content;width:max-content}
.prediction-tech-table{font-size:12px}
.prediction-tech-table .c-order{left:0;min-width:36px;max-width:36px;width:36px}
.prediction-tech-table .c-lot{left:36px;min-width:235px;max-width:235px;width:235px}
.prediction-tech-table td.c-lot{padding-left:8px}
.prediction-tech-table td.c-lot strong{display:inline-block;vertical-align:middle;max-width:190px;line-height:1.2}
.prediction-tech-head-timeline{min-width:520px}
.prediction-tech-head-month{height:28px}
.prediction-tech-head-day{width:20px;min-width:20px;max-width:20px;height:34px;font-size:9px;padding:1px 0!important}
.prediction-tech-head-day span{font-size:9px;text-transform:uppercase;color:#64748b;line-height:1}
.prediction-tech-head-day b{font-size:11px;line-height:1.15}
.prediction-tech-head-day.sat{background:#eef6ff}
.prediction-tech-head-day.sun{background:#fff7ed}
.prediction-tech-head-day.holiday{background:#fff1f2}
.prediction-tech-cell{width:20px;min-width:20px;max-width:20px;height:22px;background:#fff}
.prediction-tech-week .prediction-tech-head-day,.prediction-tech-week .prediction-tech-cell{width:30px;min-width:30px;max-width:30px}
.prediction-tech-cell.sat{background:#eef6ff}
.prediction-tech-cell.sun{background:#fff7ed}
.prediction-tech-cell.holiday{background:#fff1f2}
.prediction-tech-cell.ref{background:rgba(219,234,254,.7)}
.prediction-tech-cell.ref.sat{background:linear-gradient(180deg,rgba(219,234,254,.9) 0 55%,#eef6ff 55% 100%)}
.prediction-tech-cell.ref.sun{background:linear-gradient(180deg,rgba(219,234,254,.9) 0 55%,#fff7ed 55% 100%)}
.prediction-tech-cell.ref.holiday{background:linear-gradient(180deg,rgba(219,234,254,.9) 0 55%,#fff1f2 55% 100%)}
.prediction-tech-cell.active{background:var(--lot-color,#1e3a5f)!important}
.prediction-tech-cell.peak{box-shadow:inset 0 0 0 2px #0f172a, inset 0 0 0 999px rgba(255,255,255,.06)}
.prediction-lot-color{display:inline-block;vertical-align:middle;width:16px;height:16px;border-radius:4px;border:1px solid #94a3b8;background:var(--lot-color,#ffffff);margin-right:8px;cursor:pointer}
.prediction-color-popover{position:absolute;z-index:20;background:#fff;border:1px solid #cbd5e1;border-radius:10px;box-shadow:0 18px 50px rgba(15,23,42,.18);padding:8px;display:grid;grid-template-columns:repeat(5,24px);gap:8px;max-width:180px}
.prediction-color-popover[hidden]{display:none}
.prediction-color-option{width:24px;height:24px;border-radius:6px;border:1px solid #cbd5e1;background:var(--lot-color,#fff);cursor:pointer}
.prediction-color-option.used{opacity:.28;cursor:not-allowed}
.prediction-color-option.none{grid-column:1/-1;width:auto;height:auto;padding:6px 8px;background:#f8fafc}
.prediction-tech-notes-layer{position:absolute;inset:0;pointer-events:none}
.prediction-note{position:absolute;border:1px solid #facc15;background:#fffbeb;border-radius:8px;box-shadow:0 8px 24px rgba(15,23,42,.14);overflow:hidden;min-width:150px;min-height:90px;resize:both;pointer-events:auto}
.prediction-note-head{display:flex;justify-content:space-between;align-items:center;gap:8px;background:#fde68a;padding:6px 8px;cursor:move;font-size:12px;font-weight:700;color:#713f12}
.prediction-note-head button{border:none;background:transparent;font-size:16px;line-height:1;color:#713f12;padding:0 2px;cursor:pointer}
.prediction-note textarea{display:block;width:100%;height:calc(100% - 32px);border:none;resize:none;background:transparent;padding:8px;font:inherit;font-size:12px;color:#334155;outline:none}
.prediction-tech-print-area{display:none}
.prediction-tech-footnote{margin-top:8px}
.prediction-print-head{display:flex;align-items:flex-start;gap:18px;margin-bottom:10px}
.prediction-print-head img{max-height:54px;max-width:180px;object-fit:contain}
.prediction-print-meta{display:grid;gap:4px;font-size:12px;color:#334155}
.prediction-print-page{page-break-after:always;margin-bottom:14px}
.prediction-print-page:last-child{page-break-after:auto}
.prediction-print-page h4{margin:0 0 8px;font-size:14px;color:#1e3a5f}
.prediction-print-board{overflow:visible}
.prediction-print-notes{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px;margin-top:10px}
.prediction-print-note{border:1px solid #facc15;background:#fffbeb;border-radius:8px;padding:8px 10px}
.prediction-print-note strong{display:block;margin-bottom:4px;color:#713f12}
.prediction-print-note p{margin:0;color:#334155}
.prediction-output[data-prediction-profile="compact"] .prediction-workload,
.prediction-output[data-prediction-profile="compact"] .prediction-peers-section{display:none}
.prediction-output[data-prediction-profile="executive"] .prediction-kpis,
.prediction-output[data-prediction-profile="executive"] .prediction-workload,
.prediction-output[data-prediction-profile="executive"] .prediction-macro-table,
.prediction-output[data-prediction-profile="executive"] .prediction-peers-section,
.prediction-output[data-prediction-profile="executive"] .prediction-actual,
.prediction-output[data-prediction-profile="executive"] .prediction-model-note{display:none}
@media(max-width:1100px){
  .prediction-tech-table .c-lot{min-width:210px;max-width:210px;width:210px}
  .prediction-tech-head-day,.prediction-tech-cell{width:18px;min-width:18px;max-width:18px}
}
@media(max-width:700px){
  .prediction-tech-toolbar{flex-direction:column;align-items:stretch}
  .prediction-tech-table .c-lot{min-width:180px;max-width:180px;width:180px}
  .prediction-tech-head-day,.prediction-tech-cell{width:16px;min-width:16px;max-width:16px}
}
@media print{
  body.planning-print-mode *{visibility:hidden!important}
  body.planning-print-mode .prediction-tech-print-area,body.planning-print-mode .prediction-tech-print-area *{visibility:visible!important}
  body.planning-print-mode .prediction-tech-print-area{display:block!important;position:relative;left:auto;top:auto}
  body.planning-print-mode .prediction-tech-board,body.planning-print-mode .prediction-tech-toolbar,body.planning-print-mode .prediction-tech-legend,body.planning-print-mode .prediction-tech-footnote,body.planning-print-mode .prediction-section-head,body.planning-print-mode .prediction-result-head,body.planning-print-mode .prediction-model-note,body.planning-print-mode .prediction-kpis,body.planning-print-mode .prediction-workload,body.planning-print-mode .prediction-macro-table,body.planning-print-mode .prediction-peers-section,body.planning-print-mode .prediction-actual,body.planning-print-mode .prediction-result-actions,body.planning-print-mode .prediction-calendar-summary{display:none!important}
  body.planning-print-mode .prediction-tech-workbench{border:none;padding:0;margin:0}
  body.planning-print-mode .prediction-tech-table{font-size:8px;min-width:100%}
  body.planning-print-mode .prediction-tech-table thead th{position:static!important}
  body.planning-print-mode .prediction-tech-table .sticky{position:static!important}
  body.planning-print-mode .prediction-tech-head-day,body.planning-print-mode .prediction-tech-cell{width:12px;min-width:12px;max-width:12px;height:12px}
  body.planning-print-mode .prediction-tech-week .prediction-tech-head-day,body.planning-print-mode .prediction-tech-week .prediction-tech-cell{width:18px;min-width:18px;max-width:18px}
  body.planning-print-mode .prediction-tech-table .c-order{width:24px;min-width:24px;max-width:24px}
  body.planning-print-mode .prediction-tech-table .c-lot{width:170px;min-width:170px;max-width:170px}
}
/* 3.76.0 — planning operativo direttamente dal cantiere */
.prediction-site-dialog{width:min(1500px,100%)}
.prediction-site-controls{display:flex;gap:12px;align-items:end;padding:14px 0;border-bottom:1px solid #e2e8f0}
.prediction-site-controls label{display:flex;flex-direction:column;gap:6px;min-width:190px}
.prediction-site-controls label span{font-size:11px;font-weight:700;color:#64748b;text-transform:uppercase;letter-spacing:.04em}
.prediction-site-controls input{min-height:40px}
.prediction-site-output{padding-top:14px}
.prediction-site-workbench{margin-top:0}
.prediction-site-workbench .prediction-tech-print-toolbar{margin-top:6px}
@media(max-width:700px){.prediction-site-controls{flex-direction:column;align-items:stretch}.prediction-site-controls label{min-width:0}}

/* 3.77.0 — palette Excel, workflow revisione e stampa Gantt dedicata */
.prediction-color-popover{position:fixed!important;z-index:12050!important;grid-template-columns:repeat(5,28px);gap:6px;padding:9px;max-width:190px;box-shadow:0 14px 38px rgba(15,23,42,.25)}
.prediction-color-option{width:28px;height:28px;border-radius:3px;border:1px solid rgba(15,23,42,.22);box-shadow:inset 0 0 0 1px rgba(255,255,255,.25)}
.prediction-color-option:hover:not(:disabled){outline:2px solid #1d4ed8;outline-offset:1px}
.prediction-color-option.none{font-size:11px;text-align:left;border-radius:5px}
.prediction-lot-color:disabled{cursor:default;opacity:1}
.prediction-note.readonly{resize:none;box-shadow:none}
.prediction-note.readonly .prediction-note-head{cursor:default}
.prediction-note.readonly textarea{cursor:default}
.prediction-site-revision-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0;padding:10px 12px;border:1px solid #dbe3ee;border-radius:10px;background:#f8fafc}
.prediction-site-revision-bar label{display:flex;align-items:center;gap:7px}
.prediction-site-revision-bar select,.prediction-site-revision-bar input{min-height:36px}
.prediction-revision-status{display:inline-flex;align-items:center;gap:6px;border-radius:999px;padding:5px 9px;font-size:12px;font-weight:700;background:#e2e8f0;color:#334155}
.prediction-revision-status.bozza{background:#e0f2fe;color:#075985}
.prediction-revision-status.in_revisione{background:#fef3c7;color:#92400e}
.prediction-revision-status.respinta{background:#fee2e2;color:#991b1b}
.prediction-revision-status.ufficiale{background:#dcfce7;color:#166534}
.prediction-revision-current{font-size:11px;font-weight:700;color:#166534}
.prediction-review-panel{margin:10px 0;padding:12px;border:1px solid #dbe3ee;border-radius:10px;background:#fff}
.prediction-review-panel h4{margin:0 0 8px}
.prediction-review-poste{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}
.prediction-review-poste label{display:inline-flex;align-items:center;gap:6px;border:1px solid #dbe3ee;border-radius:7px;padding:6px 8px;background:#f8fafc}
.prediction-review-list{display:grid;gap:6px;margin-top:8px}
.prediction-review-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:7px 9px;border:1px solid #e2e8f0;border-radius:7px}
.prediction-review-row small{color:#64748b}
.prediction-review-row.approvata{background:#f0fdf4}
.prediction-review-row.rifiutata{background:#fff1f2}
.prediction-review-row.in_attesa{background:#fffbeb}
.prediction-review-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px}
.prediction-review-actions textarea{width:min(520px,100%);min-height:70px}
.prediction-site-dialog .prediction-site-controls{display:flex;gap:10px;align-items:end;flex-wrap:wrap;padding:12px 0}
.prediction-site-dialog .prediction-site-controls label{display:flex;flex-direction:column;gap:5px}
.prediction-site-dialog .prediction-site-controls label span{font-size:11px;font-weight:700;color:#64748b}
.prediction-site-dialog .prediction-site-controls select,.prediction-site-dialog .prediction-site-controls input{min-height:38px}
.prediction-print-canvas{position:relative}
.prediction-print-notes-layer{position:absolute;inset:0;pointer-events:none}
.prediction-print-note-overlay{position:absolute;z-index:6;border:1px solid #d6b656;background:#fff8c5;border-radius:4px;padding:4px 5px;color:#4b5563}

/* 3.77.1 — giorni non lavorativi reali, eccezioni calendario e PDF diretto */
.prediction-tech-head-day.calendar-forceable{cursor:pointer;position:sticky}
.prediction-tech-head-day.calendar-forceable:hover{box-shadow:inset 0 0 0 2px #0f766e}
.prediction-tech-head-day.forced-working{background:#ecfdf5!important;color:#065f46}
.prediction-tech-head-day.forced-working i{display:block;font-style:normal;font-size:7px;line-height:1;color:#047857}
.prediction-tech-cell.forced-working:not(.active){background:#ecfdf5!important}
.prediction-tech-cell.forced-working.active{box-shadow:inset 0 -3px 0 #10b981}
.prediction-tech-cell.active{height:22px}
.prediction-tech-table tbody tr{height:31px}
.prediction-tech-table tbody td{height:31px;box-sizing:border-box}
.prediction-tech-legend i.forced{background:#ecfdf5;border-color:#10b981}

/* 3.77.4 — Gantt cantiere ridimensionabile, timeline leggibile */
.prediction-site-overlay{padding:12px;align-items:center;overflow:hidden}
.prediction-site-dialog{width:min(1520px,calc(100vw - 24px));height:min(92vh,920px);min-width:min(760px,calc(100vw - 24px));min-height:min(560px,calc(100vh - 24px));max-width:calc(100vw - 12px);max-height:calc(100vh - 12px);resize:both;overflow:hidden;display:flex;flex-direction:column}
.prediction-site-dialog>header{flex:0 0 auto}
.prediction-dialog-actions{display:flex;align-items:center;gap:8px}
.prediction-dialog-maximize{min-width:42px;height:42px;font-size:18px;line-height:1;padding-inline:10px}
.prediction-site-dialog .prediction-site-controls{flex:0 0 auto}
.prediction-site-output{flex:1 1 auto;min-height:0;overflow:auto;padding-right:2px}
.prediction-site-dialog.is-fullscreen{position:fixed;inset:4px;width:auto;height:auto;min-width:0;min-height:0;max-width:none;max-height:none;margin:0;border-radius:8px;resize:none}
.prediction-site-workbench{min-width:0}
.prediction-tech-scroll{scrollbar-gutter:stable both-edges}
.prediction-tech-table thead tr:first-child th{top:0;height:30px}
.prediction-tech-table thead tr:nth-child(2) th{top:30px;height:30px}
.prediction-tech-table thead tr:nth-child(3) th{top:60px}
.prediction-tech-head-month{height:30px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.prediction-tech-head-day{width:28px;min-width:28px;max-width:28px;height:40px;font-size:9px;padding:2px 0!important;overflow:hidden}
.prediction-tech-head-day span{display:block;width:100%;font-size:9px;letter-spacing:.01em;white-space:nowrap;text-align:center;overflow:hidden}
.prediction-tech-head-day b{display:block;font-size:11px;line-height:1.2;text-align:center}
.prediction-tech-cell{width:28px;min-width:28px;max-width:28px}
.prediction-tech-week .prediction-tech-head-day,.prediction-tech-week .prediction-tech-cell{width:34px;min-width:34px;max-width:34px}
@media(max-width:1100px){.prediction-tech-head-day,.prediction-tech-cell{width:26px;min-width:26px;max-width:26px}}
@media(max-width:700px){.prediction-site-overlay{padding:0;align-items:stretch}.prediction-site-dialog,.prediction-site-dialog.is-fullscreen{position:relative;inset:auto;width:100%;height:100dvh;min-width:0;min-height:100dvh;max-width:none;max-height:none;border-radius:0;resize:none}.prediction-dialog-maximize{display:none}.prediction-tech-head-day,.prediction-tech-cell{width:24px;min-width:24px;max-width:24px}}


/* 3.77.5 — note Gantt sempre sopra l'intestazione sticky per consentire spostamento e cancellazione */
.prediction-tech-leaders-layer{position:absolute;inset:0;z-index:9;pointer-events:none;overflow:visible}
.prediction-note-leader-line{stroke:#a16207;stroke-width:1.5;stroke-linecap:round;vector-effect:non-scaling-stroke}
.prediction-note-leader-dot{fill:#f59e0b;stroke:#713f12;stroke-width:1;vector-effect:non-scaling-stroke}
.prediction-tech-notes-layer{z-index:10}
.prediction-note{z-index:11}
.prediction-tech-workbench.is-note-placement [data-note-anchor="1"]{cursor:crosshair;box-shadow:inset 0 0 0 1px rgba(245,158,11,.45)}
.prediction-tech-workbench.is-note-placement [data-note-anchor="1"]:hover{box-shadow:inset 0 0 0 2px #f59e0b;background-image:linear-gradient(rgba(254,243,199,.6),rgba(254,243,199,.6))}
[data-planning-add-note].is-placing{background:#fef3c7!important;color:#713f12!important;border-color:#f59e0b!important}
dialog.prediction-site-overlay:not([open]){display:none}
dialog.prediction-site-overlay[open]{position:fixed;inset:0;width:100vw;height:100dvh;min-width:100vw;min-height:100dvh;max-width:100vw;max-height:100dvh;margin:0;border:0;border-radius:0;padding:12px;background:rgba(15,23,42,.45);box-shadow:none;resize:none;overflow:hidden;display:flex;align-items:center;justify-content:center;z-index:2147483000}
dialog.prediction-site-overlay::backdrop{background:transparent}
@media(max-width:700px){dialog.prediction-site-overlay[open]{padding:0}}

/* 3.77.6 — editing manuale del Gantt e note solidali alle celle */
.prediction-tech-toolbar [data-planning-manual].is-active{background:#fef3c7!important;color:#713f12!important;border-color:#f59e0b!important}
.prediction-tech-manual-hint{margin:6px 0 0;padding:8px 10px;border:1px solid #fde68a;border-radius:7px;background:#fffbeb;color:#713f12;font-size:11px;line-height:1.35}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell{cursor:cell}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.active[data-step-key]{cursor:grab;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18)}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.active[data-step-key]:active{cursor:grabbing}
.prediction-tech-cell.manual-drag-source{opacity:.48!important}
.prediction-tech-cell.manual-drop-target{outline:2px solid #f59e0b;outline-offset:-2px;position:relative;z-index:2}
.prediction-tech-workbench.is-manual-edit .prediction-tech-head-day.calendar-forceable{box-shadow:inset 0 -2px 0 rgba(245,158,11,.45)}


/* 3.77.8 — editor Gantt manuale deterministico */
.prediction-manual-tools{display:flex;align-items:end;gap:8px;flex-wrap:wrap;margin:8px 0;padding:9px 10px;border:1px solid #bfdbfe;border-radius:8px;background:#f8fbff}
.prediction-manual-tools[hidden]{display:none!important}
.prediction-manual-selected{display:grid;gap:2px;min-width:260px;flex:1 1 330px;color:#1e3a5f}
.prediction-manual-selected small{font-size:10px;color:#64748b}
.prediction-manual-tools label{display:grid;gap:3px}.prediction-manual-tools label span{font-size:10px;font-weight:700;color:#64748b;text-transform:uppercase}
.prediction-manual-tools input[type="date"]{min-height:34px}
.prediction-tech-workbench.is-manual-edit .prediction-note{pointer-events:none}
.prediction-tech-workbench.is-manual-edit .prediction-note textarea{pointer-events:none}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell{cursor:cell;touch-action:none}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.active{cursor:pointer}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.manual-step-selected{box-shadow:inset 0 0 0 2px #f59e0b!important;cursor:grab}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.manual-step-selected:active{cursor:grabbing}
.prediction-tech-cell.manual-drag-preview{box-shadow:inset 0 0 0 2px #16a34a,inset 0 0 0 999px rgba(34,197,94,.13)!important}
.prediction-tech-cell.manual-drag-invalid{box-shadow:inset 0 0 0 2px #dc2626,inset 0 0 0 999px rgba(239,68,68,.12)!important}
.prediction-tech-cell.manual-step-conflict{background-image:repeating-linear-gradient(135deg,rgba(220,38,38,.38) 0 3px,transparent 3px 6px)!important;box-shadow:inset 0 0 0 2px #dc2626!important}

/* 3.77.8 — ingresso editor non distruttivo: il Gantt resta identico fino alla prima modifica */
.prediction-tech-workbench.is-manual-edit [data-planning-scale]:disabled{opacity:1;color:inherit;background:#f8fafc;cursor:not-allowed}

/* 3.77.10 — editor Gantt a strumenti espliciti, spostamento singolo giorno e push a catena */
.prediction-manual-tools{align-items:center;position:relative;transition:border-color .15s ease,box-shadow .15s ease}
.prediction-manual-modebar{display:flex;gap:5px;flex-wrap:wrap;padding:4px;border-radius:8px;background:#eaf2fb;border:1px solid #c7d8ee}
.prediction-manual-tool{border:1px solid transparent;background:transparent;color:#334155;border-radius:6px;padding:7px 10px;font-size:11px;font-weight:800;cursor:pointer;transition:background .12s ease,border-color .12s ease,transform .06s ease,box-shadow .12s ease}
.prediction-manual-tool:hover{background:#fff;border-color:#93c5fd}
.prediction-manual-tool:active{transform:translateY(1px)}
.prediction-manual-tool.is-active{background:#1d4ed8;color:#fff;border-color:#1d4ed8;box-shadow:0 2px 7px rgba(29,78,216,.22)}
.prediction-manual-step-controls{display:flex;align-items:end;gap:6px;flex-wrap:wrap;padding-left:8px;border-left:1px solid #cbd5e1}
.prediction-manual-step-controls[hidden]{display:none!important}
.prediction-manual-status{display:block;min-height:15px;margin-top:3px;font-size:10px;font-weight:700;color:#475569}
.prediction-manual-status[data-type="ok"]{color:#15803d}.prediction-manual-status[data-type="warn"]{color:#b45309}.prediction-manual-status[data-type="error"]{color:#b91c1c}
.prediction-manual-status.pulse{animation:predictionManualPulse .28s ease-out}
@keyframes predictionManualPulse{0%{transform:translateY(-1px);opacity:.35}100%{transform:none;opacity:1}}
.prediction-tech-workbench.is-manual-edit{box-shadow:inset 0 0 0 2px rgba(29,78,216,.16)}
.prediction-tech-workbench.is-manual-edit .prediction-manual-tools{border-color:#93c5fd;box-shadow:0 2px 8px rgba(30,64,175,.08)}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.manual-day-selected{box-shadow:inset 0 0 0 3px #f59e0b,0 0 0 1px #92400e!important;position:relative;z-index:12}
.prediction-tech-workbench.is-manual-edit .prediction-tech-cell.manual-day-selected:after{content:"";position:absolute;inset:4px;border:1px solid rgba(255,255,255,.85);pointer-events:none}
.prediction-tech-cell.manual-push-preview{box-shadow:inset 0 0 0 2px #d97706,inset 0 0 0 999px rgba(245,158,11,.16)!important}
.prediction-tech-cell.manual-drag-source{opacity:.55!important;box-shadow:inset 0 0 0 2px #2563eb!important}
.prediction-tech-workbench.is-manual-updating .prediction-manual-tools:after{content:"…";position:absolute;right:8px;top:7px;font-size:18px;font-weight:900;color:#1d4ed8;animation:predictionManualDots .7s ease-in-out infinite alternate}
@keyframes predictionManualDots{from{opacity:.25}to{opacity:1}}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="add-day"] .prediction-tech-cell:not(.active){cursor:copy}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="remove-day"] .prediction-tech-cell.active{cursor:not-allowed}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="move-step"] .prediction-tech-cell.active{cursor:pointer}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="add-day"] .prediction-tech-cell:not(.active):hover{box-shadow:inset 0 0 0 2px #16a34a,inset 0 0 0 999px rgba(34,197,94,.10)!important}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="remove-day"] .prediction-tech-cell.active{cursor:crosshair}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="remove-day"] .prediction-tech-cell.active:hover{box-shadow:inset 0 0 0 2px #dc2626,inset 0 0 0 999px rgba(239,68,68,.12)!important}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="move-day"] .prediction-tech-cell.active:hover{box-shadow:inset 0 0 0 2px rgba(245,158,11,.75)!important}

/* 3.77.10 — aggiunta diretta di giorni liberi e selezione multipla per nuovi blocchi */
.prediction-manual-block-controls{display:flex;align-items:center;gap:6px;flex-wrap:wrap;padding-left:8px;border-left:1px solid #cbd5e1}
.prediction-manual-block-controls[hidden]{display:none!important}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="add-block"] .prediction-tech-cell:not(.active){cursor:crosshair}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="add-block"] .prediction-tech-cell:not(.active):hover{box-shadow:inset 0 0 0 2px #0ea5e9,inset 0 0 0 999px rgba(14,165,233,.09)!important}
.prediction-tech-cell.manual-block-preview{box-shadow:inset 0 0 0 2px #38bdf8,inset 0 0 0 999px rgba(56,189,248,.15)!important;position:relative;z-index:12}
.prediction-tech-cell.manual-block-selected{box-shadow:inset 0 0 0 3px #16a34a,inset 0 0 0 999px rgba(34,197,94,.18)!important;position:relative;z-index:13}
.prediction-tech-cell.manual-block-selected:after{content:"✓";position:absolute;inset:0;display:grid;place-items:center;font-size:11px;font-weight:900;color:#166534;pointer-events:none}
.prediction-tech-cell.manual-add-flash{animation:predictionManualAddFlash .28s ease-out}
@keyframes predictionManualAddFlash{0%{box-shadow:inset 0 0 0 4px #16a34a,inset 0 0 0 999px rgba(34,197,94,.32)}100%{box-shadow:none}}

/* 3.77.11 — feedback immediato, calendario cantiere, testi lotto e workflow bozze */
.prediction-manual-pointer-feedback{position:fixed;z-index:2147483646;width:16px;height:16px;border:2px solid #2563eb;color:#2563eb;border-radius:50%;pointer-events:none;transform:translate(-50%,-50%);box-shadow:0 0 0 0 rgba(37,99,235,.38);animation:predictionPointerAck .68s ease-out forwards}
.prediction-manual-pointer-feedback.add{border-color:#16a34a;color:#16a34a;box-shadow:0 0 0 0 rgba(22,163,74,.4)}
.prediction-manual-pointer-feedback.remove{border-color:#dc2626;color:#dc2626;box-shadow:0 0 0 0 rgba(220,38,38,.4)}
.prediction-manual-pointer-feedback.select{border-color:#0ea5e9;color:#0ea5e9;box-shadow:0 0 0 0 rgba(14,165,233,.4)}
.prediction-manual-pointer-feedback.move{border-color:#d97706;color:#d97706;box-shadow:0 0 0 0 rgba(217,119,6,.4)}
@keyframes predictionPointerAck{0%{opacity:1;transform:translate(-50%,-50%) scale(.7);box-shadow:0 0 0 0 currentColor}55%{opacity:.9;transform:translate(-50%,-50%) scale(1);box-shadow:0 0 0 10px transparent}100%{opacity:0;transform:translate(-50%,-50%) scale(1.35)}}
.prediction-tech-cell.manual-click-ack{animation:predictionCellAck .5s ease-out}
@keyframes predictionCellAck{0%{outline:3px solid #2563eb;outline-offset:-3px;filter:brightness(1.22)}100%{outline:0 solid transparent;filter:none}}
.prediction-lot-label-edit{display:none;margin-left:5px;padding:1px 4px;border:0;background:transparent;color:#2563eb;font-size:12px;line-height:1;vertical-align:middle;cursor:pointer;border-radius:4px}
.prediction-tech-workbench.is-manual-edit .prediction-lot-label-edit{display:inline-block}
.prediction-lot-label-edit:hover{background:#dbeafe}
.prediction-manual-calendar-tools{display:flex;align-items:center;gap:10px;flex-wrap:wrap;flex:1 1 100%;padding-top:8px;border-top:1px solid #dbeafe}
.prediction-manual-extend,.prediction-manual-holiday-add{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.prediction-manual-extend>strong,.prediction-manual-holiday-add>strong{font-size:10px;text-transform:uppercase;color:#475569;letter-spacing:.03em}
.prediction-manual-holiday-add input[type="text"]{min-width:160px;min-height:34px}
.prediction-site-holiday-list{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-height:28px}
.prediction-site-holiday-chip{display:inline-flex;align-items:center;gap:3px;padding:4px 6px;border:1px solid #fecaca;border-radius:999px;background:#fff1f2;color:#991b1b;font-size:10px}
.prediction-site-holiday-chip button{border:0;background:transparent;color:#991b1b;font-weight:900;padding:0 2px;cursor:pointer}
.prediction-tech-head-day.site-custom-holiday{background:#fff1f2!important;color:#991b1b}
.prediction-tech-head-day.site-custom-holiday i{display:block;font-style:normal;font-size:7px;line-height:1;color:#be123c}
.prediction-dialog-language{display:flex;align-items:center;gap:5px;font-size:10px;font-weight:700;color:#64748b}
.prediction-dialog-language select{min-height:36px;padding:4px 24px 4px 8px}
.prediction-site-top-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.prediction-review-blocked{background:#fffbeb;border-color:#fde68a;color:#92400e}
.prediction-review-blocked p{margin:0;font-size:12px}

/* 3.77.12 — indicatore lavori rumorosi, attivatore lotto e giorno custom */
.prediction-lot-noise-toggle{display:inline-grid;place-items:center;width:22px;height:18px;margin-right:6px;padding:0;border:1px solid #cbd5e1;border-radius:4px;background:#fff;color:#64748b;vertical-align:middle;cursor:pointer;transition:background .12s ease,border-color .12s ease,color .12s ease,box-shadow .12s ease}
.prediction-lot-noise-toggle:hover:not(:disabled){border-color:#d97706;background:#fffbeb;color:#92400e}
.prediction-lot-noise-toggle.is-active{border-color:#d97706;background:#fef3c7;color:#92400e;box-shadow:inset 0 0 0 1px rgba(217,119,6,.18)}
.prediction-lot-noise-toggle:disabled{cursor:default;opacity:.72}
.prediction-lot-noise-toggle.is-active:disabled{opacity:1}
.prediction-noise-mini{display:inline-block;width:14px;height:8px;background:linear-gradient(135deg,transparent 0 18%,currentColor 19% 27%,transparent 28% 42%,currentColor 43% 51%,transparent 52% 66%,currentColor 67% 75%,transparent 76%);background-size:14px 8px;background-repeat:no-repeat;color:currentColor;flex:0 0 auto}
.prediction-manual-tool-noise{display:inline-flex;align-items:center;gap:5px}
.prediction-manual-tool-noise .prediction-noise-mini{width:13px}
.prediction-manual-tool-noise.is-active{background:#b45309;color:#fff;border-color:#b45309;box-shadow:0 2px 7px rgba(180,83,9,.22)}
.prediction-tech-noise-row{height:26px!important}
.prediction-tech-noise-row td{height:26px!important;background:#fff}
.prediction-tech-noise-row .c-order,.prediction-tech-noise-row .c-lot{background:#fffdf7!important}
.prediction-tech-noise-label{display:table-cell!important;color:#92400e!important;font-size:10px!important;letter-spacing:.025em;white-space:nowrap}
.prediction-tech-noise-label .prediction-noise-mini{margin-right:7px;vertical-align:middle;color:#b45309}
.prediction-tech-noise-cell{position:relative;width:28px;min-width:28px;max-width:28px;padding:0!important;border-right:1px solid #d7e0ec;background:#fff;overflow:hidden}
.prediction-tech-noise-cell.sat{background:#eef6ff}.prediction-tech-noise-cell.sun{background:#fff7ed}.prediction-tech-noise-cell.holiday{background:#fff1f2}.prediction-tech-noise-cell.forced-working{background:#ecfdf5!important}
.prediction-tech-noise-cell svg{position:absolute;inset:4px 0;width:100%;height:calc(100% - 8px);overflow:visible;pointer-events:none}
.prediction-tech-noise-cell polyline{fill:none;stroke:#b45309;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;vector-effect:non-scaling-stroke}
.prediction-tech-noise-cell.is-noisy{background-image:linear-gradient(rgba(254,243,199,.22),rgba(254,243,199,.22))}
.prediction-tech-cell.noise-custom-mark{position:relative}
.prediction-tech-cell.noise-custom-mark:before{content:"";position:absolute;left:2px;right:2px;bottom:2px;height:3px;z-index:14;pointer-events:none;background:linear-gradient(135deg,transparent 0 18%,#fbbf24 19% 29%,transparent 30% 43%,#fbbf24 44% 54%,transparent 55% 68%,#fbbf24 69% 79%,transparent 80%);background-size:14px 4px;background-repeat:repeat-x}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="noise-day"] .prediction-tech-cell.active{cursor:pointer}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="noise-day"] .prediction-tech-cell.active:hover{box-shadow:inset 0 0 0 2px #d97706,inset 0 0 0 999px rgba(245,158,11,.10)!important}
.prediction-tech-workbench.is-manual-edit[data-manual-tool="noise-day"] .prediction-tech-cell:not(.active){cursor:not-allowed;opacity:.82}
.prediction-manual-pointer-feedback.noise{border-color:#d97706;color:#d97706;box-shadow:0 0 0 0 rgba(217,119,6,.4)}
.prediction-tech-week .prediction-tech-noise-cell{width:34px;min-width:34px;max-width:34px}
@media(max-width:1100px){.prediction-tech-noise-cell{width:26px;min-width:26px;max-width:26px}}
@media(max-width:700px){.prediction-tech-noise-cell{width:24px;min-width:24px;max-width:24px}.prediction-lot-noise-toggle{margin-right:3px}}

/* 3.77.16 — colonna lotti Gantt: testi sempre confinati fuori dalla timeline */
.prediction-site-workbench .prediction-tech-table .c-lot{left:36px;min-width:320px;max-width:320px;width:320px;overflow:hidden}
.prediction-site-workbench .prediction-tech-table td.c-lot{white-space:nowrap}
.prediction-site-workbench .prediction-tech-table td.c-lot strong{display:inline-block;vertical-align:middle;max-width:245px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:1.2}
.prediction-site-workbench.is-manual-edit .prediction-tech-table td.c-lot strong{max-width:220px}
.prediction-site-workbench .prediction-tech-noise-label strong{max-width:270px!important}
@media(max-width:1100px){.prediction-site-workbench .prediction-tech-table .c-lot{min-width:300px;max-width:300px;width:300px}.prediction-site-workbench .prediction-tech-table td.c-lot strong{max-width:225px}.prediction-site-workbench.is-manual-edit .prediction-tech-table td.c-lot strong{max-width:200px}}
@media(max-width:700px){.prediction-site-workbench .prediction-tech-table .c-lot{min-width:280px;max-width:280px;width:280px}.prediction-site-workbench .prediction-tech-table td.c-lot strong{max-width:205px}.prediction-site-workbench.is-manual-edit .prediction-tech-table td.c-lot strong{max-width:180px}}

/* 3.77.16 — comandi globali palette Gantt */
.prediction-color-popover{display:block;max-width:248px!important;width:248px;padding:9px!important}
.prediction-color-grid{display:grid;grid-template-columns:repeat(5,28px);gap:6px}
.prediction-color-grid .prediction-color-option.none{grid-column:1/-1;width:100%;height:auto;min-height:30px}
.prediction-color-actions{display:grid;gap:6px;margin-top:9px;padding-top:9px;border-top:1px solid #e2e8f0}
.prediction-color-actions button{width:100%;min-height:31px;padding:5px 8px;font-size:11px;text-align:left}

/* 3.77.20 — confronto live cronoprogramma teorico / reale da ore Planning */
.prediction-actual-view-control{min-width:148px}
.prediction-actual-status{display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin:8px 0 10px;padding:9px 11px;border:1px solid #b7d9d3;border-radius:9px;background:#f3fbf9;color:#164e48;font-size:11px;transition:opacity .16s ease,background .16s ease}
.prediction-actual-status.has-warning{border-color:#f0cf8c;background:#fffbeb;color:#854d0e}
.prediction-actual-status.is-empty{border-style:dashed;background:#f8fafc;color:#64748b}
.prediction-actual-status.is-refreshing{opacity:.65}
.prediction-actual-status-main{display:grid;gap:2px;min-width:220px}
.prediction-actual-status-main strong{font-size:12px;color:#0f3f3a}
.prediction-actual-status.has-warning .prediction-actual-status-main strong{color:#78350f}
.prediction-actual-status-main span,.prediction-actual-status-secondary span{white-space:nowrap}
.prediction-actual-status-secondary{display:flex;gap:10px;flex-wrap:wrap;align-items:center;color:#475569}
.prediction-actual-status [data-planning-actual-refresh]{margin-left:auto;min-height:32px;padding:5px 9px}
.prediction-tech-legend i.actual-confirmed{background:#0f766e;border-color:#0f766e}
.prediction-tech-legend i.actual-provisional{background:repeating-linear-gradient(135deg,#f59e0b 0 3px,#fff7ed 3px 6px);border-color:#d97706}
.prediction-tech-cell.actual-worked{position:relative}
.prediction-actual-cell-strip{position:absolute;z-index:11;left:0;right:0;bottom:0;height:36%;pointer-events:none;background:#0f766e;box-shadow:inset 0 1px 0 rgba(255,255,255,.45)}
.prediction-actual-cell-strip.has-provisional:not(.has-confirmed){background:repeating-linear-gradient(135deg,#f59e0b 0 4px,#fef3c7 4px 7px)}
.prediction-actual-cell-strip.has-confirmed.has-provisional{background:linear-gradient(90deg,#0f766e 0 50%,#f59e0b 50% 100%)}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-actual-cell-strip{inset:0;height:auto;box-shadow:none}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-worked.actual-confirmed:not(.actual-provisional) .prediction-actual-cell-strip{background:#0f766e}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-worked.actual-provisional:not(.actual-confirmed) .prediction-actual-cell-strip{background:repeating-linear-gradient(135deg,#f59e0b 0 4px,#fef3c7 4px 7px)}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell:not(.actual-worked){background:#fff}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.sat:not(.actual-worked){background:#eef6ff}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.sun:not(.actual-worked){background:#fff7ed}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.holiday:not(.actual-worked){background:#fff1f2}
.prediction-tech-workbench.is-manual-edit .prediction-actual-cell-strip{z-index:8;opacity:.72}
.prediction-lot-actual-hours{display:inline-block;vertical-align:middle;margin-left:6px;padding:2px 5px;border-radius:999px;background:#e6f5f2;color:#0f766e;font-size:8.5px;font-weight:800;white-space:nowrap}
.prediction-tech-workbench[data-actual-view="theory"] .prediction-lot-actual-hours,.prediction-tech-workbench[data-actual-view="theory"] .prediction-legend-actual{display:none}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-noise-row{display:none}
@media(max-width:900px){.prediction-actual-status{align-items:flex-start}.prediction-actual-status [data-planning-actual-refresh]{margin-left:0}.prediction-lot-actual-hours{display:none}.prediction-actual-view-control{min-width:120px}}

/* 3.77.20 — allineamento teorico/reale solo visuale nel confronto */
.prediction-actual-align-control{min-width:175px}
.prediction-actual-align-date{min-width:155px}
.prediction-actual-align-date[hidden]{display:none!important}
.prediction-actual-align-status{display:block;flex-basis:100%;padding-top:5px;border-top:1px dashed rgba(15,118,110,.25);color:#315f5a;line-height:1.35}
.prediction-actual-align-status.has-warning{color:#92400e}
.prediction-tech-toolbar .prediction-actual-align-control select:disabled{opacity:.58}
@media(max-width:1100px){.prediction-actual-align-control{min-width:145px}.prediction-actual-align-date{min-width:140px}}

/* 3.77.20 — confronto teorico/reale: stacking isolato e teorico sempre leggibile */
.prediction-tech-cell{position:relative;z-index:0;isolation:isolate;overflow:hidden}
.prediction-actual-cell-strip{z-index:1;height:30%;bottom:0}
.prediction-tech-view-compare .prediction-tech-cell.active .prediction-actual-cell-strip{box-shadow:inset 0 1px 0 rgba(255,255,255,.85)}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-actual-cell-strip{z-index:1}
.prediction-tech-table .sticky.c-lot,.prediction-tech-table .sticky.c-order{z-index:12}
.prediction-tech-table thead .sticky.c-lot,.prediction-tech-table thead .sticky.c-order{z-index:14}

.prediction-tech-table tbody .sticky.c-lot,.prediction-tech-table tbody .sticky.c-order{background:#fff;overflow:hidden;isolation:isolate}
.prediction-tech-table tbody .sticky.c-lot>*{position:relative;z-index:1}
.prediction-tech-view-compare .prediction-tech-cell.active{background:var(--lot-color,#1e3a5f)!important}

/* 3.78.7 — scelta esplicita data iniziale e feedback durante cambio vista Gantt */
.prediction-start-choice-backdrop{position:fixed;inset:0;z-index:2147483600;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(15,23,42,.38);backdrop-filter:blur(1px)}
.prediction-start-choice{width:min(560px,calc(100vw - 32px));max-height:calc(100vh - 40px);overflow:auto;background:#fff;border-radius:14px;box-shadow:0 24px 80px rgba(15,23,42,.34);padding:18px}
.prediction-start-choice-head h3{margin:2px 0 6px;color:#1e3a5f}.prediction-start-choice-head p{margin:0;color:#64748b;line-height:1.45}
.prediction-start-choice-body{display:grid;gap:10px;margin-top:16px}.prediction-start-choice-check{display:flex;align-items:center;gap:9px;padding:12px;border:1px solid #dbe3ee;border-radius:9px;background:#f8fafc;color:#475569}
.prediction-start-choice-spinner,.prediction-view-busy>span{width:17px;height:17px;border:2px solid #cbd5e1;border-top-color:#1d4ed8;border-radius:50%;animation:predictionSpin .75s linear infinite;flex:0 0 auto}
.prediction-start-choice-real,.prediction-start-choice-custom{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;min-height:48px;padding:10px 12px;text-align:left;border-radius:9px}.prediction-start-choice-real strong{font-size:13px}.prediction-start-choice-custom{background:#f8fafc!important;color:#1e3a5f!important;border:1px solid #cbd5e1!important}
.prediction-start-choice-no-real{margin:0;padding:10px 12px;border:1px dashed #cbd5e1;border-radius:9px;color:#64748b;background:#f8fafc}
.prediction-start-choice-date{display:grid;grid-template-columns:minmax(180px,1fr) auto;gap:10px;align-items:end;padding:12px;border:1px solid #bfdbfe;border-radius:9px;background:#eff6ff}.prediction-start-choice-date[hidden]{display:none}.prediction-start-choice-date label{display:grid;gap:5px}.prediction-start-choice-date label span{font-size:11px;font-weight:700;color:#475569}.prediction-start-choice-date input{min-height:40px}.prediction-start-choice-date small{grid-column:1/-1;min-height:16px;color:#b91c1c;font-weight:700}
.prediction-start-choice-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:14px;padding-top:12px;border-top:1px solid #e2e8f0}
.prediction-tech-workbench{position:relative}.prediction-view-busy{position:absolute;z-index:80;top:116px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:9px;padding:9px 13px;border:1px solid #93c5fd;border-radius:999px;background:rgba(255,255,255,.97);box-shadow:0 8px 24px rgba(15,23,42,.18);color:#1e3a5f;pointer-events:none}.prediction-view-busy[hidden]{display:none}.prediction-tech-workbench.is-view-updating{cursor:progress}.prediction-tech-workbench.is-view-updating [data-planning-board]{opacity:.72;transition:opacity .08s ease}.prediction-tech-workbench.is-view-updating [data-planning-actual-view]{cursor:progress}
@media(max-width:700px){.prediction-start-choice-date{grid-template-columns:1fr}.prediction-start-choice-date small{grid-column:1}.prediction-view-busy{top:150px}}
.adaptive-learning-card{margin-top:16px}.adaptive-learning-head{display:flex;justify-content:space-between;gap:18px;align-items:flex-start}.adaptive-learning-head>strong{white-space:nowrap}.adaptive-learning-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:12px 0}.adaptive-learning-grid>div{display:flex;flex-direction:column;gap:3px}.adaptive-learning-grid small{opacity:.72}.adaptive-learning-candidate{margin-top:12px;padding-top:12px;border-top:1px solid var(--border-color,#d8dde5);display:flex;gap:12px;align-items:center;flex-wrap:wrap}.adaptive-learning-candidate span{flex:1;min-width:240px}.adaptive-learning-candidate .actions,.adaptive-learning-card>.actions{display:flex;gap:8px;flex-wrap:wrap}@media(max-width:760px){.adaptive-learning-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.adaptive-learning-head{flex-direction:column}}

/* BUILDY 3.96.1 — festività cantiere per periodo */
.prediction-manual-holiday-add label{display:grid;gap:2px;min-width:132px}
.prediction-manual-holiday-add label>span{font-size:9px;font-weight:800;text-transform:uppercase;color:#64748b;letter-spacing:.03em}
.prediction-manual-holiday-add input[type="date"]{min-height:34px}
.prediction-manual-holiday-add .prediction-site-holiday-name{min-width:180px;flex:1 1 180px}
.prediction-manual-holiday-add .prediction-site-holiday-name input{width:100%}
/* 3.97 - lavori esterni / subappalti dichiarati */
.prediction-external-work-button{white-space:nowrap}
.prediction-tech-legend i.actual-external{background:repeating-linear-gradient(135deg,#6d28d9 0 4px,#ddd6fe 4px 7px);border:1px solid #7c3aed}
.prediction-external-cell-strip{position:absolute;z-index:10;left:0;right:0;top:0;height:30%;pointer-events:none;background:repeating-linear-gradient(135deg,#6d28d9 0 4px,#ddd6fe 4px 7px);box-shadow:inset 0 -1px 0 rgba(255,255,255,.55)}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-external:not(.actual-worked) .prediction-external-cell-strip{inset:0;height:auto;box-shadow:none}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-worked:not(.actual-external) .prediction-actual-cell-strip{inset:0;height:auto}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-worked.actual-external .prediction-external-cell-strip{top:0;bottom:auto;height:50%}
.prediction-tech-workbench[data-actual-view="actual"] .prediction-tech-cell.actual-worked.actual-external .prediction-actual-cell-strip{top:auto;bottom:0;height:50%}
.prediction-tech-workbench.is-manual-edit .prediction-external-cell-strip{z-index:8;opacity:.72}
.prediction-lot-external-work{display:inline-block;vertical-align:middle;margin-left:6px;padding:2px 5px;border-radius:999px;background:#ede9fe;color:#6d28d9;font-size:8.5px;font-weight:800;white-space:nowrap}
.prediction-tech-workbench[data-actual-view="theory"] .prediction-lot-external-work{display:none}
.prediction-external-work-dialog{width:min(1180px,96vw);max-height:92vh;border:0;border-radius:14px;padding:0;box-shadow:0 24px 80px rgba(15,23,42,.3)}
.prediction-external-work-dialog::backdrop{background:rgba(15,23,42,.42)}
.prediction-external-work-shell{padding:18px;background:#fff;max-height:92vh;overflow:auto}
.prediction-external-work-head{display:flex;gap:16px;justify-content:space-between;align-items:flex-start;margin-bottom:14px}
.prediction-external-work-head h3{margin:2px 0 5px;color:#0f2f57}.prediction-external-work-head p{margin:0;max-width:820px;color:#64748b;font-size:12px}.prediction-external-work-head>[data-ew-close]{font-size:20px;min-width:40px}
.prediction-external-work-form{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px;padding:12px;border:1px solid #dbe5f1;border-radius:10px;background:#f8fbff;margin-bottom:14px}
.prediction-external-work-form label{display:grid;gap:4px;font-size:10px;font-weight:800;color:#5f7592;text-transform:uppercase}.prediction-external-work-form select,.prediction-external-work-form input,.prediction-external-work-form textarea{width:100%;min-height:36px;text-transform:none;font-weight:500;color:#172b4d;background:#fff}
.prediction-external-work-form .prediction-external-note{grid-column:span 2}.prediction-external-form-actions{grid-column:1/-1;display:flex;gap:8px;align-items:center}.prediction-external-form-actions [data-ew-message]{color:#b42318;font-size:11px;font-weight:700}
.prediction-external-work-list table small{display:block;color:#64748b;margin-top:3px}.prediction-external-work-list td:last-child{white-space:nowrap}.prediction-external-work-list td:last-child button+button{margin-left:5px}
.prediction-external-status{display:inline-block;padding:3px 7px;border-radius:999px;font-size:10px;font-weight:800;background:#f1f5f9;color:#475569}.prediction-external-status.is-confermato{background:#e0f2fe;color:#075985}.prediction-external-status.is-in_corso{background:#fef3c7;color:#92400e}.prediction-external-status.is-completato{background:#dcfce7;color:#166534}
@media(max-width:900px){.prediction-external-work-form{grid-template-columns:1fr 1fr}.prediction-external-work-form .prediction-external-note{grid-column:1/-1}.prediction-lot-external-work{display:none}}
@media(max-width:620px){.prediction-external-work-form{grid-template-columns:1fr}}
/* 3.98 - workflow operativo lavori esterni */
.prediction-external-planned-strip{position:absolute;z-index:7;left:1px;right:1px;top:1px;height:24%;pointer-events:none;border:1px dashed #7c3aed;background:rgba(221,214,254,.45);box-sizing:border-box}
.prediction-external-planned-strip.is-late{border-color:#dc2626;background:rgba(254,202,202,.45)}
.prediction-tech-cell.external-planned-late{box-shadow:inset 0 0 0 1px rgba(220,38,38,.2)}
.prediction-external-work-form .prediction-external-recipients{grid-column:span 2}.prediction-external-work-form .prediction-external-recipients select{min-height:116px}
.prediction-external-order-help{display:block;margin-top:-2px;font-size:9px;color:#64748b;font-weight:500;text-transform:none}
.prediction-external-actions{min-width:280px;white-space:normal!important}.prediction-external-actions>button{margin:2px!important}
.prediction-external-history{margin-top:7px;white-space:normal}.prediction-external-history summary{cursor:pointer;color:#365d8d;font-size:10px;font-weight:800}
.prediction-external-event{display:grid;gap:2px;margin-top:5px;padding:5px 7px;border-left:2px solid #cbd5e1;background:#f8fafc;font-size:9px}.prediction-external-event.is-reverted{opacity:.55;text-decoration:line-through}.prediction-external-event button{font-size:9px;padding:0;margin-right:7px!important}
.prediction-external-status.is-sospeso{background:#f1f5f9;color:#475569}.prediction-external-status.is-annullato{background:#e5e7eb;color:#6b7280;text-decoration:line-through}.prediction-external-status.is-in_ritardo{background:#fee2e2;color:#b91c1c}
@media(max-width:900px){.prediction-external-work-form .prediction-external-recipients{grid-column:1/-1}}

/* 3.99.1 — lavori esterni flessibili: periodi multipli + destinatari a chip */
.prediction-external-periods-field{grid-column:1/-1;border:1px solid #dbe5f1;border-radius:9px;padding:10px;background:#fff;display:grid;gap:8px}
.prediction-external-field-title{font-size:10px;font-weight:800;color:#5f7592;text-transform:uppercase}
.prediction-external-period-row{display:grid;grid-template-columns:minmax(160px,1fr) minmax(160px,1fr) auto;gap:8px;align-items:end}
.prediction-external-period-row label{display:grid;gap:4px}
.prediction-external-period-row button{min-height:36px}
.prediction-external-recipients{grid-column:span 2;display:grid;gap:6px;align-content:start}
.prediction-recipient-picker{position:relative;display:grid;gap:7px}
.prediction-recipient-menu{position:absolute;z-index:15;top:40px;left:0;min-width:280px;max-width:min(420px,80vw);max-height:240px;overflow:auto;background:#fff;border:1px solid #cbd8e8;border-radius:9px;box-shadow:0 12px 32px rgba(15,23,42,.18);padding:8px}
.prediction-recipient-menu label{display:flex!important;grid-template-columns:none!important;align-items:center;gap:8px;padding:7px 8px;border-radius:6px;font-size:12px!important;font-weight:600!important;color:#243b5a!important;text-transform:none!important;cursor:pointer}
.prediction-recipient-menu label:hover{background:#f3f7fc}.prediction-recipient-menu input{width:auto!important;min-height:0!important}
.prediction-recipient-chips{display:flex;gap:6px;flex-wrap:wrap;min-height:24px}
.prediction-recipient-chip{border:1px solid #c9daf0;background:#edf5ff;color:#173d70;border-radius:999px;padding:4px 8px;font-size:11px;font-weight:700}
.prediction-external-projected{color:#9a6700!important;margin-top:4px!important}
@media(max-width:700px){.prediction-external-period-row{grid-template-columns:1fr}.prediction-external-recipients{grid-column:1/-1}.prediction-recipient-menu{position:static;max-width:none}}
.prediction-external-order-relation{grid-column:1/-1;display:flex;align-items:center;gap:10px;padding:9px 10px;border:1px solid #cbd5e1;border-radius:8px;background:#f8fafc;color:#475569;font-size:11px;font-weight:700}
.prediction-external-order-relation.is-warning{border-color:#f59e0b;background:#fffbeb;color:#92400e}
.prediction-external-order-relation select{margin-left:auto;max-width:340px;min-height:34px}
@media(max-width:700px){.prediction-external-order-relation{align-items:stretch;flex-direction:column}.prediction-external-order-relation select{margin-left:0;max-width:none}}

/* 4.01.0 — editor famiglie, lotti manuali e trasformazione durata */
.prediction-manual-family-tools{display:flex;align-items:end;gap:8px;flex-wrap:wrap;width:100%;padding-bottom:8px;border-bottom:1px solid #dbeafe}.prediction-manual-family-tools label{min-width:230px}.prediction-lot-remove{border:0;background:transparent;color:#b91c1c;font-weight:900;cursor:pointer;margin-left:3px}.planning-transform-dialog{width:min(760px,94vw);border:0;border-radius:14px;padding:0;box-shadow:0 24px 70px rgba(15,23,42,.3)}.planning-transform-dialog::backdrop{background:rgba(15,23,42,.4)}.planning-transform-dialog form{padding:18px;display:grid;gap:14px}.planning-transform-dialog header,.planning-transform-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}.planning-transform-dialog header h3{margin:0}.planning-transform-dialog label{display:grid;gap:5px}.planning-transform-modes{display:grid;gap:8px;padding:10px;border:1px solid #e2e8f0;border-radius:9px}.planning-transform-modes label{display:flex;align-items:center;gap:8px}.planning-transform-per-lot{display:grid;gap:7px;max-height:300px;overflow:auto}.planning-transform-per-lot label{grid-template-columns:minmax(180px,1fr) 180px;align-items:center}.planning-transform-dialog footer{justify-content:flex-end}

/* 4.01.3 — dilatazione e riduzione sono operazioni distinte e non ambigue */
.planning-transform-actions{display:inline-flex;align-items:center;gap:6px;padding:3px;border:1px solid #dbe4ee;border-radius:10px;background:#f8fafc}
.planning-transform-actions .planning-transform-expand,.planning-transform-actions .planning-transform-reduce{min-width:92px;font-weight:800}
.planning-transform-actions .planning-transform-expand{border-color:#9bc7ad;background:#f1faf4;color:#17643a}
.planning-transform-actions .planning-transform-reduce{border-color:#e2b5b5;background:#fff6f6;color:#9b2c2c}
.planning-transform-dialog{width:min(780px,94vw)}
.planning-transform-dialog header>div{display:grid;gap:2px}
.planning-transform-dialog header small{text-transform:uppercase;letter-spacing:.08em;font-size:10px;font-weight:900;color:#64748b}
.planning-transform-dialog.is-expand header{border-bottom:3px solid #9bc7ad;padding-bottom:10px}
.planning-transform-dialog.is-reduce header{border-bottom:3px solid #e2b5b5;padding-bottom:10px}
.planning-transform-summary{display:grid;grid-template-columns:auto 1fr auto;align-items:center;gap:10px;padding:11px 12px;border:1px solid #dce5ef;border-radius:10px;background:#f8fafc}
.planning-transform-summary>span{font-size:11px;font-weight:800;text-transform:uppercase;letter-spacing:.04em;color:#64748b}
.planning-transform-summary>strong{font-size:14px;color:#1e293b}
.planning-transform-summary>small{justify-self:end;color:#64748b}
.planning-transform-end{max-width:310px}
.planning-transform-end>span{font-size:12px;font-weight:800;color:#334155}
.planning-transform-modes{margin:0;padding:12px;border:1px solid #dce5ef;border-radius:11px;background:#fff;display:grid;gap:8px}
.planning-transform-modes legend{padding:0 6px;font-size:13px;font-weight:850;color:#243b5a}
.planning-transform-modes label{display:flex;align-items:flex-start;gap:9px;padding:10px;border:1px solid #e2e8f0;border-radius:9px;background:#fafcff;cursor:pointer}
.planning-transform-modes input[type="radio"]{width:auto;min-height:0;margin-top:3px}
.planning-transform-modes label>span{display:grid;gap:3px}
.planning-transform-modes label small{font-weight:500;color:#64748b;line-height:1.35}
.planning-transform-per-lot{border:1px solid #dbe4ee;border-radius:10px;background:#f8fafc;padding:10px}
.planning-transform-per-lot[hidden]{display:none!important}
.planning-transform-per-lot label{padding:5px 0;border-bottom:1px solid #e5eaf0}
.planning-transform-per-lot label:last-child{border-bottom:0}
.planning-transform-per-lot select:disabled{opacity:.5;cursor:not-allowed}
.planning-transform-submit-expand{font-weight:850}
.planning-transform-submit-reduce{font-weight:850}
@media(max-width:700px){.planning-transform-summary{grid-template-columns:1fr}.planning-transform-summary>small{justify-self:start}.planning-transform-actions{width:100%}.planning-transform-actions button{flex:1}.planning-transform-per-lot label{grid-template-columns:1fr}}
