.product-forecast {margin-top:20px;padding:18px;border:1px solid #ddd8cf;border-radius:12px;background:#faf9f6}
.product-forecast h3{margin:0 0 8px;font-size:1.05rem}
.product-forecast__hint{font-size:.82rem;line-height:1.5;color:#716e68;margin:8px 0 12px}
.product-forecast__grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.product-forecast__grid input{width:100%;box-sizing:border-box}
.product-forecast__results{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:14px}
.product-forecast__results>div{display:flex;flex-direction:column;gap:4px;background:#fff;padding:12px;border:1px solid #e7e3db;border-radius:9px}
.product-forecast__results span{font-size:.8rem;color:#726e67}
.product-forecast__results strong{font-size:1.1rem;overflow-wrap:anywhere}
.product-forecast__results .product-forecast__total{grid-column:1/-1;background:#f0efe9}
.product-forecast__total strong[data-sign="negative"]{color:#a43131}
.product-forecast__total strong[data-sign="positive"]{color:#206d45}
@media(max-width:620px){.product-forecast__grid{grid-template-columns:1fr}.product-forecast__results{grid-template-columns:1fr}}


/* Finestra Nuovo prodotto: altezza limitata e contenuto interno scorrevole. */
#product-dialog {
  box-sizing: border-box;
  height: min(90dvh, 900px);
  max-height: 90dvh;
  overflow: hidden;
  overscroll-behavior: contain;
}
#product-dialog .dialog__form {
  display: block;
  height: 100%;
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#product-dialog .dialog__head {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--surface, #fff);
}
#product-dialog .dialog__body {
  overflow: visible;
}
#product-dialog .dialog__foot {
  position: sticky;
  bottom: 0;
  z-index: 3;
}
@media (max-width: 640px) {
  #product-dialog {
    height: 92dvh;
    max-height: 92dvh;
  }
}
