:root {
  --opto-navy: #082f49;
  --opto-deep: #041f30;
  --opto-blue: #0369a1;
  --opto-sky: #0ea5e9;
  --opto-aqua: #22d3ee;
  --opto-ink: #102a3a;
  --opto-muted: #607789;
  --opto-line: #dbe7ee;
  --opto-canvas: #eef6fa;
  --opto-radius: 20px;
  --opto-shadow: 0 18px 50px rgba(8, 47, 73, .12);
}

.opto-reorder-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 7px 12px;
  border: 1px solid rgba(20, 151, 84, .38);
  border-radius: 10px;
  background: linear-gradient(100deg, #f4fff8, #e3f8eb);
  box-shadow: 0 7px 16px rgba(20, 151, 84, .14);
  color: #087a3e !important;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease;
}

.opto-reorder-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px rgba(20, 151, 84, .24);
  color: #055f30 !important;
}

/* ================================================================
   Navigazione globale OptoService+
   Un solo stile per menu pubblico e menu area clienti.
   ================================================================ */
@media screen {
  body header.position-absolute {
    background: linear-gradient(100deg, rgba(3,40,62,.98), rgba(5,83,119,.97));
    border-bottom: 1px solid rgba(113,210,245,.28);
    box-shadow: 0 10px 32px rgba(2,38,58,.22);
    backdrop-filter: blur(12px);
  }

  body header nav,
  body header nav.fixed,
  body header .fixed nav {
    min-height: 76px;
    padding: 0 clamp(22px,4vw,64px);
    background: transparent;
    border: 0;
  }

  body header nav.fixed,
  body header .fixed nav {
    background: linear-gradient(100deg, rgba(3,40,62,.98), rgba(5,83,119,.97));
    box-shadow: 0 10px 32px rgba(2,38,58,.22);
  }

  body header .logo img {
    top: 10px;
    max-width: 150px;
    max-height: 54px;
    object-fit: contain;
  }

  body header .logo-white,
  body header nav.fixed .logo-white,
  body header .fixed nav .logo-white { display: block; }

  body header .logo-dark,
  body header nav.fixed .logo-dark,
  body header .fixed nav .logo-dark { display: none; }

  body header .top-nav > ul > li > a,
  body header nav.fixed .top-nav > ul > li > a,
  body header .fixed nav .top-nav > ul > li > a {
    padding: 1.7rem 1.05rem;
    color: rgba(255,255,255,.84);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .015em;
    opacity: 1;
    transition: color .2s, background .2s;
  }

  body header .top-nav > ul > li > a:hover {
    color: #fff;
    background: rgba(255,255,255,.07);
  }

  body header .top-nav ul ul {
    overflow: hidden;
    background: #073b59;
    border: 1px solid rgba(114,212,247,.18);
    border-radius: 0 0 12px 12px;
    box-shadow: 0 16px 34px rgba(1,31,48,.3);
  }

  body header .top-nav li ul li a,
  body header nav.fixed .top-nav li ul li a {
    background: #073b59;
    color: rgba(255,255,255,.84);
    opacity: 1;
  }

  body header .top-nav li ul li a:hover { background: #0a567b; color: #fff; }
}

@media screen and (max-width:768px) {
  body header.position-absolute {
    position: relative;
    background: linear-gradient(100deg,#03283e,#055377);
  }

  body header nav,
  body header nav.fixed {
    min-height: 62px;
    height: auto;
    padding: 10px 12px;
  }

  body header .logo img { top: 0; max-width: 145px; }
  body header .logo-white,
  body header nav.fixed .logo-white { display: block; }
  body header .logo-dark,
  body header nav.fixed .logo-dark { display: none; }
  body header .nav-text::after,
  body header .fixed .nav-text::after { color: #fff; }
  body header .top-nav { background: #04344f; }
  body header .top-nav > ul > li > a,
  body header nav.fixed .top-nav > ul > li > a {
    padding: 13px 18px;
    color: #fff !important;
  }
}

/* Calcolatore spessori indipendente */
.opto-spessori-page { background: linear-gradient(180deg,#eaf6fb,#f8fbfd); }
.opto-spessori-page main { padding-top: 76px; }
.opto-spessori-page main article > header { margin: 16px auto 12px; padding: 18px !important; max-width: 1080px; border-radius: 20px; background: linear-gradient(100deg,#063c5b,#0788ba) !important; }
.opto-spessori-page main article h1 { margin: 0; color: #fff; font: 800 26px "Open Sans",Arial,sans-serif; }
.opto-spessori-page .spessori-input-card { width: min(1080px,calc(100% - 24px)); margin: 0 auto 12px; overflow: hidden; border: 1px solid #c9e2ee; border-radius: 18px; background: #f8fbfd !important; box-shadow: 0 12px 34px rgba(4,67,101,.1); }
.opto-spessori-page .spessori-input-card > tbody > tr > td { padding: 12px 16px; border-bottom: 1px solid #d9e9f1; }
.opto-spessori-page .spessori-input-card > tbody > tr:first-child td { padding: 14px; background: #eef7fb; font-weight: 800; }
.opto-spessori-page .spessori-hidden-option,
.opto-spessori-page .spessori-engine-fields { display: none !important; }
.opto-spessori-page .spessori-index-row label { display: inline-block; margin: 0 12px 0 0; color: #073e5d; font-size: 13px; font-weight: 800; }
.opto-spessori-page .spessori-index-row select { width: 150px; height: 40px; padding: 0 12px; color: #0b3550; background: #fff; border: 1px solid #bcd9e7; border-radius: 10px; font-weight: 800; }
.opto-spessori-page .spessori-input-card .line { display: flex; align-items: end; justify-content: center; gap: 10px; }
.opto-spessori-page .spessori-input-card .line > div { float: none; width: auto; min-width: 90px; }
.opto-spessori-page .spessori-input-card h1 { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 32px; margin: 0; color: #fff; background: #087fad; border-radius: 9px; font-size: 13px; }
.opto-spessori-page .spessori-input-card h1.spessori-eye-label { width: auto; min-width: 138px; padding: 0 14px; letter-spacing: .1px; }
.opto-spessori-page .spessori-input-card label,
.opto-spessori-page .spessori-input-card span { color: #315a71; font-size: 11px !important; font-weight: 800; }
.opto-spessori-page .spessori-input-card input[type=text],
.opto-spessori-page .spessori-input-card select { width: 88px !important; height: 39px !important; box-sizing: border-box; margin: 5px 0 0 !important; padding: 0 8px; text-align: center; color: #0b3550; background: #fff; border: 1px solid #bdd9e7; border-radius: 9px; font-weight: 800; }
.opto-spessori-page .spessori-input-card select[id*=cmbdesign] { width: 165px !important; }
.opto-spessori-page .spessori-input-card select[id*=cmbSerie] { width: 165px !important; }
.opto-spessori-page #Table15,
.opto-spessori-page #Table4,
.opto-spessori-page #Table5,
.opto-spessori-page .forma-profiles-row { width: min(1080px,calc(100% - 24px)) !important; margin-left: auto !important; margin-right: auto !important; }
.opto-spessori-page #Table4 .forma-map-wrap { width: min(100%,400px); margin: auto; }
.opto-spessori-page #Table4 .forma-map-wrap img { float: none !important; width: 100% !important; height: auto !important; aspect-ratio: 1; }
.opto-spessori-page .forma-map-overlay { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.opto-spessori-page .forma-print-map { display: none; }
@media(max-width:760px){.opto-spessori-page main{padding-top:0}.opto-spessori-page .spessori-input-card .line{flex-wrap:wrap}.opto-spessori-page .spessori-input-card .line>div{min-width:calc(50% - 10px)}.opto-spessori-page #Table4>tbody>tr{display:block}.opto-spessori-page #Table4 td{display:block;width:100%!important}}

.opto-spessori-page .forma-map-types > span {
  position: relative;
  display: inline-flex;
}
.opto-spessori-page .forma-map-types input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.opto-spessori-page .forma-map-types label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #c2dce8;
  border-radius: 999px;
  background: #f8fcfe;
  color: #315a71;
  font-weight: 700 !important;
  cursor: pointer;
  transition: .18s ease;
}
.opto-spessori-page .forma-map-types input[type="radio"]:checked + label {
  border-color: #078aba;
  color: #fff;
  background: linear-gradient(110deg,#075d87,#08a0d3);
  box-shadow: 0 5px 14px rgba(7,138,186,.22);
}
.opto-spessori-page .forma-map-options {
  margin-top: 12px;
  padding-top: 10px;
}

/* Report tecnico Forma: impaginazione definitiva A4 verticale. */
@media print {
  @page { size: A4 portrait; margin: 8mm; }

  html,
  body.opto-forma-page {
    width: auto !important;
    min-width: 0 !important;
  }

  .opto-forma-page #form1 {
    width: 100% !important;
    zoom: 1 !important;
  }

  .opto-forma-page .forma-print-brand {
    display: block !important;
    width: 155px !important;
    height: 50px !important;
    margin: 0 0 5px !important;
  }

  .opto-forma-page .forma-print-brand img {
    display: block !important;
    width: 155px !important;
    height: 50px !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: contain;
    object-position: left center;
  }

  .opto-forma-page .forma-print-report-head {
    min-height: 54px !important;
    margin: -52px 0 9px 175px !important;
    padding: 0 0 6px !important;
  }

  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-main-card > tbody,
  .opto-forma-page .forma-main-card > tbody > tr {
    display: block !important;
    width: 100% !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px 9px !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    padding: 7px 9px !important;
    border: 1px solid #cbddeb !important;
    border-radius: 8px !important;
    background: #f8fbfe !important;
  }

  .opto-forma-page .forma-data-dx { grid-column: 1; grid-row: 1; }
  .opto-forma-page .forma-data-sx { grid-column: 2; grid-row: 1; }
  .opto-forma-page .forma-image-dx { grid-column: 1; grid-row: 2; }
  .opto-forma-page .forma-image-sx { grid-column: 2; grid-row: 2; }

  .opto-forma-page .forma-fields {
    display: none !important;
  }

  .opto-forma-page .forma-print-section-title {
    margin: 0 0 6px !important;
    padding: 4px 7px !important;
    border-left: 3px solid #168dcc;
    background: #eaf5fc;
    color: #073b5c !important;
    font-size: 9px !important;
    letter-spacing: .25px;
  }

  .opto-forma-page .forma-print-rx {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 3px 13px !important;
    margin: 0 !important;
    font-size: 7.5px !important;
  }

  .opto-forma-page .forma-print-rx span {
    padding-bottom: 2px;
    border-bottom: 1px dotted #d7e2ea;
    font-size: 7.5px !important;
  }

  .opto-forma-page .forma-print-rx b {
    color: #0f172a;
  }

  .opto-forma-page .forma-map-wrap {
    width: 245px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
  }

  .opto-forma-page .forma-map-wrap img,
  .opto-forma-page .forma-map-wrap canvas {
    width: 245px !important;
    height: 245px !important;
    max-width: 100% !important;
  }

  .opto-forma-page .forma-profiles-row {
    gap: 9px !important;
    margin-top: 8px !important;
    padding: 7px !important;
    border: 1px solid #cbddeb !important;
    border-radius: 8px !important;
  }

  .opto-forma-page .forma-inline-profile {
    padding: 0 !important;
    border: 0 !important;
  }

  .opto-forma-page .forma-profile-canvas {
    height: 105px !important;
  }

  .opto-forma-page .forma-print-summary {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    padding: 5px 7px !important;
    border-radius: 5px;
    background: #f1f7fb;
    font-size: 7.5px !important;
  }

  .opto-forma-page .forma-print-summary span:last-child {
    grid-column: auto !important;
  }

  .opto-forma-page .forma-print-footer {
    margin-top: 7px !important;
  }
}

@media screen and (max-width: 900px) {
  .opto-forma-page .forma-profiles-row {
    grid-template-columns: 1fr;
  }

  .opto-forma-page .forma-exit-actions {
    flex-wrap: wrap;
  }
}

/* Deve restare in fondo: annulla il layout mobile nell'anteprima di stampa. */
@media print {
  @page { size: A4 landscape; margin: 7mm; }

  html, body.opto-forma-page {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .opto-forma-page #form1 {
    width: 100% !important;
    max-width: none !important;
    zoom: .78;
  }

  .opto-forma-page .forma-print-brand {
    display: block !important;
    height: 35px;
    margin: 0 0 4px;
    text-align: left;
  }

  .opto-forma-page .forma-print-brand img {
    max-width: 145px;
    max-height: 35px;
  }

  .opto-forma-page .forma-actions-card,
  .opto-forma-page #spinnerContainer_00 {
    display: none !important;
  }

  .opto-forma-page .forma-title-card,
  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-values-card {
    display: table !important;
    width: 100% !important;
    break-inside: avoid !important;
    box-shadow: none !important;
  }

  .opto-forma-page .forma-main-card > tbody,
  .opto-forma-page .forma-values-card > tbody {
    display: table-row-group !important;
    min-width: 0 !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr,
  .opto-forma-page .forma-values-card > tbody > tr {
    display: table-row !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > td,
  .opto-forma-page .forma-values-card > tbody > tr > td {
    display: table-cell !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > .forma-data-panel {
    width: 21% !important;
    padding: 5px !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > .forma-image-panel {
    width: 29% !important;
    padding: 5px !important;
  }

  .opto-forma-page .forma-map-wrap,
  .opto-forma-page .forma-inline-profile {
    width: 205px !important;
  }

  .opto-forma-page .forma-inline-profile {
    margin-top: 3px;
    padding: 3px;
  }

  .opto-forma-page .forma-profile-canvas {
    height: 45px !important;
  }

  .opto-forma-page .forma-slider-row {
    display: none !important;
  }

  .opto-forma-page .forma-data-panel input[type="text"] {
    height: 23px !important;
  }

  .opto-forma-page .forma-title-card th {
    padding: 7px !important;
    font-size: 1rem !important;
  }

  .opto-forma-page .forma-values-card {
    margin-top: 5px !important;
    overflow: visible !important;
  }

  .opto-forma-page .forma-values-card td {
    padding: 4px 2px !important;
  }
}

/* Calcolo forma e spessori ------------------------------------------------ */
.opto-forma-page {
  min-height: 100vh;
  margin: 0 !important;
  padding: clamp(.65rem,2vw,1.4rem) !important;
  background: linear-gradient(145deg,#eef8fc 0%,#f8fbfd 48%,#e8f5fb 100%) !important;
  color: var(--opto-ink);
  text-align: center;
}

.opto-forma-page #form1 {
  display: block;
  width: min(1480px,100%);
  margin: 0 auto;
}

.opto-forma-page table {
  width: 100% !important;
  max-width: none !important;
  border-collapse: separate !important;
  border-spacing: 0;
  background: #f8fbfd;
  box-shadow: none;
}

.opto-forma-page th,
.opto-forma-page td {
  box-sizing: border-box;
  border-bottom-color: #d9e8f1;
}

.opto-forma-page .forma-title-card {
  overflow: hidden;
  margin: 0 auto .8rem !important;
  border-radius: 18px;
  box-shadow: 0 12px 28px rgba(3,78,119,.16);
}

.opto-forma-page .forma-title-card th {
  padding: 1rem 1.25rem;
  border: 0;
  background: linear-gradient(120deg,var(--opto-navy),var(--opto-blue)) !important;
  color: #fff;
  font: 800 clamp(1.08rem,2.5vw,1.42rem)/1.3 "Open Sans",Arial,sans-serif;
  letter-spacing: .01em;
}

.opto-forma-page .forma-main-card {
  table-layout: fixed;
  overflow: hidden;
  border: 1px solid #cfe2ed;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(3,78,119,.09);
}

.opto-forma-page .forma-main-card > tbody > tr > td {
  padding: clamp(.65rem,1.4vw,1.15rem);
  vertical-align: top;
  background: rgba(248,251,253,.94);
}

.opto-forma-page .forma-data-panel {
  width: 21% !important;
  text-align: center !important;
}

.opto-forma-page .forma-data-panel .forma-fields {
  display: grid;
  grid-template-columns: minmax(92px,1fr) 72px;
  align-items: center;
  gap: .28rem .42rem;
  width: min(100%,190px);
}

.opto-forma-page .forma-data-dx .forma-fields {
  margin-right: auto;
  margin-left: 0;
}

.opto-forma-page .forma-data-sx .forma-fields {
  margin-right: 0;
  margin-left: auto;
}

.opto-forma-page .forma-image-panel {
  width: 29% !important;
  text-align: center !important;
}

.opto-forma-page .forma-data-dx,
.opto-forma-page .forma-image-dx {
  border-right: 1px solid #d5e5ee;
}

.opto-forma-page .forma-data-panel label,
.opto-forma-page .forma-data-panel span {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  color: #173f57;
  font: 700 .66rem/1.15 "Open Sans",Arial,sans-serif !important;
  text-align: right;
  vertical-align: middle;
}

.opto-forma-page .forma-data-panel br {
  display: none !important;
}

.opto-forma-page .forma-data-panel input[type="text"] {
  display: block !important;
  width: 72px !important;
  max-width: 72px;
  min-width: 0;
  min-height: 0 !important;
  height: 28px !important;
  margin: 0 !important;
  padding: .16rem .32rem !important;
  border: 1px solid #bfd8e7;
  border-radius: 10px;
  background: #fff;
  color: var(--opto-ink);
  font: 700 .76rem/1 "Open Sans",Arial,sans-serif !important;
  vertical-align: middle;
  outline: none;
}

.opto-forma-page .forma-data-panel input[type="text"]:focus {
  border-color: var(--opto-blue);
  box-shadow: 0 0 0 3px rgba(14,165,233,.14);
}

.opto-forma-page .forma-eye-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 150px;
  margin: 0 auto .65rem;
  padding: .38rem .9rem;
  border: 1px solid #bfe0f2;
  border-radius: 999px;
  background: #fff;
  color: var(--opto-navy);
  box-shadow: 0 4px 12px rgba(3,105,161,.08);
  font: 700 .9rem/1.2 "Open Sans",Arial,sans-serif;
}

.opto-forma-page .forma-map-wrap {
  position: relative;
  width: min(100%,330px);
  margin: 0 auto;
  aspect-ratio: 1;
}

.opto-forma-page .forma-map-wrap > img:not(#spinner_00) {
  display: block;
  float: none !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid #d3e5ef;
  border-radius: 14px;
  background: #fff;
  object-fit: contain;
}

.opto-forma-page .forma-map-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 14px;
}

.opto-forma-page .forma-print-map {
  display: none;
}

.opto-forma-page .forma-inline-profile {
  width: min(100%,330px);
  margin: .5rem auto 0;
  padding: .38rem .4rem;
  border: 1px solid #d5e5ee;
  border-radius: 10px;
  background: #fff;
}

.opto-forma-page .forma-profiles-row {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .75rem;
  width: 100%;
  margin-top: .65rem;
  padding: .65rem;
  border: 1px solid #cfe2ed;
  border-radius: 16px;
  background: #f8fbfd;
  box-shadow: 0 8px 22px rgba(3,78,119,.07);
}

.opto-forma-page .forma-profiles-row[hidden] {
  display: none !important;
}

.opto-forma-page .forma-profiles-row .forma-inline-profile {
  width: 100%;
  max-width: none;
  margin: 0;
}

.opto-forma-page .forma-profiles-row .forma-profile-canvas {
  height: 78px;
}

.opto-forma-page .forma-inline-profile .forma-profile-canvas {
  height: 54px;
}

.opto-forma-page .forma-slider-row {
  display: block;
  margin-top: .2rem;
}

.opto-forma-page .forma-slider-row label {
  display: block;
  margin: 0 0 .05rem;
  color: #29495c;
  font-size: .7rem;
  font-weight: 700;
  white-space: nowrap;
}

.opto-forma-page .forma-slider-row input[type="range"] {
  display: block;
  width: 100%;
  max-width: none;
  margin: 0;
  accent-color: var(--opto-blue);
}

.opto-forma-page .forma-print-brand {
  display: none;
}

.opto-forma-page .forma-actions-card,
.opto-forma-page .forma-values-card {
  margin-top: .8rem !important;
  overflow: hidden;
  border: 1px solid #cfe2ed;
  border-radius: 16px;
  box-shadow: 0 8px 22px rgba(3,78,119,.07);
}

.opto-forma-page .forma-analysis-tools {
  margin-top: .8rem;
  padding: .85rem;
  border: 1px solid #cfe2ed;
  border-radius: 16px;
  background: #f8fbfd;
  box-shadow: 0 8px 22px rgba(3,78,119,.07);
}

.opto-forma-page .forma-analysis-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .7rem;
  color: var(--opto-navy);
  font-size: 1rem;
}

.opto-forma-page .forma-print-button {
  min-width: 125px;
  margin-left: .45rem;
  background: linear-gradient(120deg,#047857,#10b981) !important;
}

.opto-forma-page .forma-print-button:disabled {
  cursor: not-allowed;
  opacity: .45;
  box-shadow: none;
}

.opto-forma-page .forma-profile-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: .75rem;
}

.opto-forma-page .forma-profile-card {
  padding: .7rem;
  border: 1px solid #d5e5ee;
  border-radius: 13px;
  background: #fff;
}

.opto-forma-page .forma-profile-card h3 {
  margin: 0 0 .45rem;
  color: var(--opto-navy);
  font-size: .88rem;
}

.opto-forma-page .forma-profile-canvas {
  display: block;
  width: 100%;
  height: 84px;
  border: 1px solid #d7e5ed;
  border-radius: 8px;
}

.opto-forma-page .forma-profile-card label,
.opto-forma-page .forma-edge-value {
  color: #29495c;
  font-size: .76rem;
  font-weight: 700;
}

.opto-forma-page .forma-profile-card input[type="range"] {
  width: 100%;
  accent-color: var(--opto-blue);
}

.opto-forma-page .forma-actions-card td {
  padding: .85rem;
  vertical-align: middle;
}

.opto-forma-page .my-button {
  min-width: 130px;
  min-height: 44px;
  padding: .68rem 1.15rem !important;
  border: 0 !important;
  border-radius: 12px !important;
  background: linear-gradient(120deg,#057db5,var(--opto-blue)) !important;
  box-shadow: 0 7px 17px rgba(3,105,161,.2);
  color: #fff !important;
  font: 800 .9rem/1.2 "Open Sans",Arial,sans-serif !important;
}

.opto-forma-page .my-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(120deg,#046b9b,#0797d5) !important;
}

.opto-forma-page .forma-actions-card input[type="radio"] {
  accent-color: var(--opto-blue);
}

.opto-forma-page .forma-actions-card label {
  margin-right: .75rem;
  color: #173f57;
  font-weight: 700;
}

.opto-forma-page .forma-map-options {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: .72rem auto 0;
  padding-top: .62rem;
  border-top: 1px solid #c9dde8;
}

.opto-forma-page .forma-map-options > span {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.opto-forma-page .forma-map-types {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

.opto-forma-page .forma-map-types label,
.opto-forma-page .forma-map-options label {
  margin: 0 !important;
  color: #173f57;
  font: 400 .78rem/1.2 "Open Sans",Arial,sans-serif !important;
}

.opto-forma-page .forma-map-options input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-right: .3rem;
  accent-color: var(--opto-blue);
}

.opto-forma-page .forma-map-options input:disabled + label {
  color: #8da2af;
  opacity: .72;
}

.opto-forma-page .forma-exit-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  white-space: nowrap;
}

.opto-forma-page .forma-exit-actions .forma-print-button {
  margin-left: 0;
}

.opto-forma-page .forma-values-card {
  table-layout: fixed;
}

.opto-forma-page .forma-values-card td {
  padding: .65rem .3rem;
  vertical-align: middle;
}

.opto-forma-page .forma-values-card input[type="text"] {
  width: min(100%,72px) !important;
  height: 38px;
  border: 1px solid #bfd8e7;
  border-radius: 9px;
  background: #fff;
  color: var(--opto-ink);
  font-weight: 700;
}

@media (max-width: 900px) {
  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-main-card > tbody,
  .opto-forma-page .forma-main-card > tbody > tr {
    display: block;
  }

  .opto-forma-page .forma-main-card > tbody > tr > td {
    display: block;
    width: 100% !important;
    border-right: 0;
  }

  .opto-forma-page .forma-image-dx,
  .opto-forma-page .forma-data-dx,
  .opto-forma-page .forma-image-sx {
    border-bottom: 1px solid #d5e5ee;
  }

  .opto-forma-page .forma-data-dx { order: 1; }
  .opto-forma-page .forma-image-dx { order: 2; }
  .opto-forma-page .forma-image-sx { order: 3; }
  .opto-forma-page .forma-data-sx { order: 4; }

  .opto-forma-page .forma-main-card > tbody > tr {
    display: flex;
    flex-direction: column;
  }

  .opto-forma-page .forma-actions-card td {
    display: block;
    width: 100%;
    padding: .55rem .75rem;
  }

  .opto-forma-page .forma-map-options {
    display: flex;
    margin: .55rem 0 0;
    padding: .55rem 0 0;
    border-top: 1px solid #c9dde8;
    border-left: 0;
  }

  .opto-forma-page .forma-values-card {
    display: block;
    overflow-x: auto;
  }

  .opto-forma-page .forma-values-card tbody {
    min-width: 720px;
  }

  .opto-forma-page .forma-profile-grid {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page { size: A4 landscape; margin: 9mm; }

  .opto-forma-page {
    padding: 0 !important;
    background: #fff !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .opto-forma-page #form1 {
    width: 100%;
  }

  .opto-forma-page .forma-print-brand {
    display: block;
    height: 42px;
    margin-bottom: 5px;
    text-align: left;
  }

  .opto-forma-page .forma-print-brand img {
    max-width: 155px;
    max-height: 42px;
  }

  .opto-forma-page .forma-actions-card,
  .opto-forma-page #spinnerContainer_00 {
    display: none !important;
  }

  .opto-forma-page .forma-title-card,
  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-values-card,
  .opto-forma-page .forma-analysis-tools {
    break-inside: avoid;
    box-shadow: none !important;
  }

  .opto-forma-page .forma-map-wrap {
    width: 225px;
  }

  .opto-forma-page .forma-inline-profile {
    width: 225px;
  }

  .opto-forma-page .forma-profile-canvas {
    height: 62px;
  }
}

body.opto-app {
  min-width: 0;
  margin: 0 !important;
  color: var(--opto-ink);
  background: radial-gradient(circle at 12% 4%, rgba(34,211,238,.16), transparent 28rem),
              linear-gradient(180deg, #f8fcfe 0, var(--opto-canvas) 45rem);
  font-family: "Open Sans", Arial, sans-serif !important;
  text-align: left !important;
}

.opto-app *, .opto-app *::before, .opto-app *::after { box-sizing: border-box; }
.opto-app main { min-height: calc(100vh - 12rem); padding-bottom: clamp(3rem, 7vw, 6rem); }
.opto-page-shell { width: min(1440px, calc(100% - 2rem)); margin: 0 auto; }

.opto-page-hero {
  position: relative;
  isolation: isolate;
  min-height: 260px;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 6.5rem 1rem 4.75rem;
  color: #fff;
  text-align: center;
  background: linear-gradient(125deg, rgba(4,31,48,.96), rgba(3,105,161,.88)),
              url("../img/parallax-05.jpg") center/cover;
}

.opto-page-hero::before, .opto-page-hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 999px;
}

.opto-page-hero::before {
  width: 26rem; height: 26rem; top: -17rem; right: -6rem;
  border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 0 0 4rem rgba(255,255,255,.035);
}

.opto-page-hero::after {
  width: 13rem; height: 13rem; left: 8%; bottom: -10rem;
  background: rgba(34,211,238,.22);
}

.opto-page-hero h1 {
  max-width: 900px;
  margin: 0;
  color: #fff;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.opto-page-hero h1::before {
  content: "OPTO SERVICE +";
  display: block;
  width: max-content;
  margin: 0 auto 1rem;
  padding: .45rem .85rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  color: var(--opto-aqua);
  background: rgba(255,255,255,.08);
  font: 800 .72rem/1 "Open Sans", Arial, sans-serif;
  letter-spacing: .18em;
}

.opto-workspace { position: relative; z-index: 2; margin-top: -2.5rem; }

.opto-search-card {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  gap: 1.5rem 2rem;
  align-items: end;
  margin: 0 auto 1.5rem;
  padding: clamp(1.25rem,3vw,2rem);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 28px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--opto-shadow);
  backdrop-filter: blur(16px);
}

.opto-search-fields {
  display: grid;
  grid-template-columns: repeat(2,minmax(190px,1fr));
  gap: 1rem;
}

.opto-field { min-width: 0; }
.opto-field label, .opto-field > span:first-child {
  display: block;
  margin: 0 0 .5rem;
  color: var(--opto-navy);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.opto-app input[type="text"], .opto-app input[type="search"],
.opto-app select, .opto-app textarea {
  width: 100% !important;
  min-height: 48px;
  margin: 0;
  padding: .75rem .95rem;
  border: 1px solid #c9dce6;
  border-radius: 12px;
  outline: none;
  color: var(--opto-ink);
  background: #f9fcfd;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.opto-app input[type="text"]:focus, .opto-app input[type="search"]:focus,
.opto-app select:focus, .opto-app textarea:focus {
  border-color: var(--opto-sky);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(14,165,233,.14);
}

.opto-filter-row {
  grid-column: 1/-1;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.25rem;
  align-items: center;
}

.opto-filter-row span {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  color: var(--opto-muted);
  font-size: .9rem;
  font-weight: 700;
}

.opto-filter-row input[type="radio"] {
  width: 1.1rem; height: 1.1rem;
  accent-color: var(--opto-blue);
}

.opto-actions { display: flex; gap: .75rem; justify-content: flex-end; }

.opto-app .my-button, .opto-app input[type="submit"].my-button {
  width: auto !important;
  min-width: 132px;
  min-height: 48px;
  margin: 0 !important;
  padding: .75rem 1.2rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(135deg,var(--opto-blue),var(--opto-sky));
  box-shadow: 0 8px 18px rgba(3,105,161,.2);
  font: 800 .9rem/1 "Open Sans", Arial, sans-serif;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.opto-app .my-button:first-child {
  border-color: var(--opto-line);
  color: var(--opto-navy);
  background: #fff;
  box-shadow: none;
}

.opto-app .my-button:hover, .opto-app .my-button:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(3,105,161,.25);
}

.opto-table-card {
  overflow: hidden;
  border: 1px solid rgba(219,231,238,.95);
  border-radius: var(--opto-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(8,47,73,.08);
}

.opto-table-scroll {
  width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: #9dc5d9 #edf5f8;
  scrollbar-width: thin;
}

.opto-app table.opto-data-table {
  width: 100% !important;
  min-width: 1050px;
  margin: 0 !important;
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff !important;
  box-shadow: none !important;
}

.opto-data-table thead th {
  position: sticky;
  z-index: 3;
  top: 0;
  padding: 1rem .8rem !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(255,255,255,.18) !important;
  color: #fff !important;
  background: var(--opto-navy) !important;
  font: 800 .72rem/1.3 "Open Sans",Arial,sans-serif !important;
  letter-spacing: .045em;
  text-align: left !important;
  text-transform: uppercase;
  white-space: nowrap;
}

.opto-data-table tbody tr { transition: background 140ms ease, box-shadow 140ms ease; }
.opto-data-table tbody tr:nth-child(even) { background: #f7fbfd; }
.opto-data-table tbody tr:hover { background: #eaf7fc; box-shadow: inset 4px 0 0 var(--opto-sky); }

.opto-data-table tbody td {
  height: auto !important;
  padding: .9rem .8rem !important;
  border: 0 !important;
  border-bottom: 1px solid var(--opto-line) !important;
  color: #29495c;
  font: 600 .78rem/1.55 "Open Sans",Arial,sans-serif !important;
  text-align: left !important;
  vertical-align: middle;
}

.opto-data-table tbody td:nth-child(4) {
  color: var(--opto-blue);
  font-size: .86rem !important;
  font-weight: 800 !important;
}

.opto-data-table a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .45rem .75rem;
  border-radius: 10px;
  color: var(--opto-blue);
  background: #e7f5fb;
  font-weight: 800;
  text-decoration: none;
}

.opto-data-table a:hover, .opto-data-table a:focus-visible {
  color: #fff;
  background: var(--opto-blue);
}

.opto-table-hint {
  display: none;
  margin: 0;
  padding: .75rem 1rem;
  color: var(--opto-muted);
  border-bottom: 1px solid var(--opto-line);
  background: #f7fbfd;
  font-size: .78rem;
  font-weight: 700;
}

.opto-app #popup, .opto-app #popup1, .opto-app #popup2 {
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(4,31,48,.64);
  backdrop-filter: blur(6px);
}

.opto-app #popup-content, .opto-app #popup-content1, .opto-app #popup-content2 {
  position: static;
  width: min(440px,100%);
  padding: 2rem;
  border-radius: var(--opto-radius);
  background: #fff;
  box-shadow: var(--opto-shadow);
  transform: none;
}

.opto-app #popup[style*="block"], .opto-app #popup1[style*="block"],
.opto-app #popup2[style*="block"] { display: flex !important; }

@media (max-width: 900px) {
  .opto-page-shell { width: min(100% - 1.25rem,1440px); }
  .opto-page-hero { min-height: 230px; padding-top: 5.5rem; }
  .opto-search-card { grid-template-columns: 1fr; }
  .opto-actions { justify-content: stretch; }
  .opto-actions .my-button { flex: 1 1 0; }
  .opto-table-hint { display: block; }
}

@media (max-width: 600px) {
  .opto-page-hero { min-height: 205px; padding: 4.5rem 1rem 3.75rem; }
  .opto-page-hero h1 { font-size: clamp(1.75rem,10vw,2.45rem); }
  .opto-workspace { margin-top: -1.75rem; }
  .opto-search-card { gap: 1.1rem; padding: 1rem; border-radius: 20px; }
  .opto-search-fields { grid-template-columns: 1fr; }
  .opto-actions { flex-direction: column-reverse; }
  .opto-actions .my-button { width: 100% !important; }
  .opto-table-card { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .opto-app *, .opto-app *::before, .opto-app *::after {
    transition-duration: .01ms !important;
  }
}

/* Ordine Busta: layout a fasi riutilizzabile per i form complessi */
.opto-order-page .opto-order-shell {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 2rem)) !important;
  max-width: none !important;
  margin: -2.5rem auto 0;
  padding: 0 0 clamp(3rem, 7vw, 6rem);
}

.opto-order-page .accordion {
  display: grid;
  gap: 1.25rem;
}

.opto-order-page .accordion-section {
  overflow: hidden;
  margin: 0 !important;
  border: 1px solid rgba(219,231,238,.95);
  border-radius: 22px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 12px 34px rgba(8,47,73,.09);
}

.opto-order-page .accordion-title {
  position: relative;
  margin: 0 !important;
  padding: 1.05rem 3.5rem 1.05rem 1.35rem !important;
  border: 0 !important;
  color: var(--opto-navy) !important;
  background: linear-gradient(90deg,#f4f9fc,#fff) !important;
  font: 800 clamp(1rem,2vw,1.2rem)/1.35 "Open Sans",Arial,sans-serif !important;
  letter-spacing: -.01em;
  text-align: left;
}

.opto-order-page .accordion-title::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.25rem;
  width: .65rem;
  height: .65rem;
  border-right: 2px solid var(--opto-blue);
  border-bottom: 2px solid var(--opto-blue);
  transform: translateY(-65%) rotate(45deg);
}

.opto-order-page .active-accordion-section {
  border-color: rgba(14,165,233,.34);
  box-shadow: 0 18px 46px rgba(3,105,161,.13);
}

.opto-order-page .active-accordion-section > .accordion-title {
  color: #fff !important;
  background: linear-gradient(120deg,var(--opto-navy),var(--opto-blue)) !important;
}

.opto-order-page .active-accordion-section > .accordion-title::after {
  border-color: var(--opto-aqua);
  transform: translateY(-30%) rotate(225deg);
}

.opto-order-page .accordion-content {
  padding: clamp(1rem,2.5vw,2rem) !important;
  border: 0 !important;
  background: #fff;
}

.opto-order-page .accordion-content > table,
.opto-order-page .accordion-content table[id] {
  width: 100% !important;
  max-width: 100%;
  margin: 0 0 1rem !important;
  border: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 16px;
  background: #f8fbfd !important;
  box-shadow: inset 0 0 0 1px var(--opto-line) !important;
}

.opto-order-page .accordion-content table td {
  height: auto !important;
  padding: .75rem !important;
  border-color: var(--opto-line) !important;
  color: #29495c;
  font-family: "Open Sans",Arial,sans-serif !important;
  vertical-align: middle;
}

.opto-order-page .accordion-content .line {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  margin: -.35rem !important;
}

.opto-order-page .accordion-content .line > [class*="s-"] {
  min-width: 0;
  padding: .5rem !important;
}

.opto-order-page .accordion-content label,
.opto-order-page .accordion-content span[id^="Label"] {
  color: var(--opto-navy);
  font: 800 .76rem/1.35 "Open Sans",Arial,sans-serif !important;
  letter-spacing: .02em;
}

.opto-order-page input[type="text"],
.opto-order-page input[type="number"],
.opto-order-page select,
.opto-order-page textarea {
  width: 100% !important;
  max-width: 100%;
  min-width: 0;
  min-height: 44px !important;
  height: auto !important;
  margin: .35rem 0 0 !important;
  padding: .65rem .75rem !important;
  border: 1px solid #c9dce6 !important;
  border-radius: 11px !important;
  color: var(--opto-ink);
  background: #fff !important;
  font: 700 .88rem/1.2 "Open Sans",Arial,sans-serif !important;
  text-align: inherit;
}

.opto-order-page input[type="text"]:focus,
.opto-order-page input[type="number"]:focus,
.opto-order-page select:focus,
.opto-order-page textarea:focus {
  border-color: var(--opto-sky) !important;
  outline: 0;
  box-shadow: 0 0 0 4px rgba(14,165,233,.14);
}

.opto-order-page input[readonly],
.opto-order-page textarea[readonly] {
  color: #577183;
  background: #edf4f7 !important;
}

.opto-order-page input[type="radio"],
.opto-order-page input[type="checkbox"] {
  width: 1.05rem;
  height: 1.05rem;
  margin: .4rem .35rem .4rem .75rem !important;
  accent-color: var(--opto-blue);
}

.opto-order-page .accordion-content input[type="submit"],
.opto-order-page .accordion-content input[type="button"],
.opto-order-page .accordion-content button {
  width: auto !important;
  min-width: 130px;
  min-height: 46px;
  margin: .4rem !important;
  padding: .7rem 1rem !important;
  border: 1px solid transparent !important;
  border-radius: 13px !important;
  color: #fff !important;
  background: linear-gradient(135deg,var(--opto-blue),var(--opto-sky)) !important;
  box-shadow: 0 8px 18px rgba(3,105,161,.18);
  font: 800 .85rem/1 "Open Sans",Arial,sans-serif !important;
  cursor: pointer;
  transition: transform 160ms ease,box-shadow 160ms ease,filter 160ms ease;
}

.opto-order-page .accordion-content input[type="submit"]:hover,
.opto-order-page .accordion-content input[type="button"]:hover,
.opto-order-page .accordion-content button:hover {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow: 0 12px 22px rgba(3,105,161,.25);
}

.opto-order-page canvas {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1rem auto !important;
  border: 1px solid var(--opto-line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(8,47,73,.08);
}

.opto-order-page #spinner-container {
  z-index: 2000;
  padding: 1.5rem;
  border-radius: 18px;
  background: rgba(255,255,255,.96);
  box-shadow: var(--opto-shadow);
}

.opto-order-page #spinner { width: min(160px,45vw); }

.opto-order-page [id^="lbl"][style*="color:blue"] {
  color: var(--opto-blue) !important;
}

.opto-order-page #Table33 .line {
  justify-content: center;
}

.opto-order-page #Table33 .line > [class*="s-"] {
  flex: 0 1 18%;
  width: 18% !important;
  max-width: 190px;
  text-align: center;
}

/* Intestazioni occhio e costi: stessa griglia a due colonne. */
.opto-order-page #Table235 {
  width: 100% !important;
  margin: .75rem 0 1rem !important;
  border: 1px solid #c9e2f0;
  border-radius: 15px;
  background: linear-gradient(120deg,#f8fcff,#eaf6fc);
  box-shadow: 0 5px 16px rgba(3,105,161,.07);
}

.opto-order-page #Table235 td {
  padding: .8rem 1rem;
}

.opto-order-page #lbldes {
  display: block;
  width: 100% !important;
  height: auto !important;
  color: var(--opto-navy) !important;
  font: 800 clamp(1.05rem,2.2vw,1.22rem)/1.35 "Open Sans",Arial,sans-serif !important;
  letter-spacing: .01em;
  text-align: center;
}

.opto-order-page #Table233,
.opto-order-page #Table66,
.opto-order-page #Table333 {
  width: 100% !important;
  table-layout: fixed !important;
  box-sizing: border-box;
  border-spacing: 0;
}

.opto-order-page #Table66 > tbody > tr > td,
.opto-order-page #Table66 > tr > td {
  width: 50% !important;
  box-sizing: border-box;
}

.opto-order-page #Table233 {
  overflow: hidden;
  border: 1px solid #d7e7f1;
  border-radius: 16px;
  background: #f8fbfd;
}

.opto-order-page #Table233 tr:first-child td {
  width: 50% !important;
  padding: .72rem 1rem;
  background: linear-gradient(180deg,#f8fcff,#edf7fc);
}

.opto-order-page #Table233 tr:first-child td:first-child {
  border-right: 1px solid #d7e7f1;
}

.opto-order-page #Table233 tr:first-child label,
.opto-order-page #Table233 tr:first-child span {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
  padding: .38rem .9rem;
  border: 1px solid #bfe0f2;
  border-radius: 999px;
  background: #fff;
  color: var(--opto-navy) !important;
  box-shadow: 0 4px 12px rgba(3,105,161,.08);
  font: 700 .94rem/1.2 "Open Sans",Arial,sans-serif !important;
}

.opto-order-page #Table333 {
  margin-top: .65rem !important;
  border: 1px solid #d7e7f1;
  border-radius: 14px;
  background: #f8fbfd;
}

.opto-order-page #Table333 td {
  width: 50% !important;
  padding: .72rem 1rem;
  vertical-align: middle;
}

.opto-order-page #Table333 td:first-child {
  border-right: 1px solid #d7e7f1;
}

.opto-order-page #Table333 .line,
.opto-order-page #Table333 .line > [class*="s-"] {
  justify-content: center;
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  text-align: center;
}

.opto-order-page #lblprezzolentedx,
.opto-order-page #lblprezzolentesx {
  display: block;
  width: 100%;
  color: var(--opto-navy);
  font-size: .9rem !important;
  line-height: 1.35;
  text-align: center;
}

.opto-order-page #Table34 {
  overflow: hidden;
  background: #fff !important;
}

.opto-order-page #Table34 tr:not(:has(.line)) {
  display: none;
}

.opto-order-page #Table34 td {
  padding: 0 !important;
}

.opto-order-page #Table34 .line {
  display: grid;
  grid-template-columns: minmax(110px,.8fr) minmax(240px,1.8fr) minmax(90px,.65fr) minmax(100px,.75fr);
  gap: .75rem;
  align-items: center;
  margin: 0 !important;
  padding: 1.15rem 1.25rem;
  border-bottom: 1px solid var(--opto-line);
  background: #f8fbfd;
}

.opto-order-page #Table34 .line > [class*="s-"] {
  display: flex;
  flex-direction: column;
  width: auto !important;
  min-width: 0;
  padding: 0 !important;
  text-align: center;
}

.opto-order-page #Table34 .line br {
  display: none;
}

.opto-order-page #Table34 .line span[id^="Label"] {
  display: block;
  min-height: 1.25rem;
  margin: 0 0 .35rem !important;
  color: var(--opto-navy);
  font-size: .78rem !important;
  font-weight: 800 !important;
}

.opto-order-page #Table34 .line span[id^="lbl"] {
  display: block;
  width: 100% !important;
  min-height: 1.4rem;
  margin: 0 !important;
  color: #29495c;
  font-size: .88rem !important;
  line-height: 1.4;
}

.opto-order-page #Table134.opto-total-card {
  margin: 1rem 0 !important;
  overflow: hidden;
  border: 1px solid #cfe4f1 !important;
  border-radius: 14px !important;
  background: linear-gradient(120deg,#f7fbfe,#eaf6fc) !important;
  box-shadow: 0 6px 18px rgba(3,105,161,.08) !important;
}

.opto-order-page #Table134 .line {
  justify-content: center;
  margin: 0 !important;
  padding: .8rem 1rem;
}

.opto-order-page #Table134 .opto-total-value {
  display: block;
  width: 100% !important;
  margin: 0 !important;
  color: var(--opto-navy);
  font: 700 clamp(.86rem,2vw,1rem)/1.35 "Open Sans",Arial,sans-serif !important;
  text-align: center;
}

.opto-order-page #Table1341 .line {
  justify-content: center;
  align-items: center;
  gap: .5rem;
  margin: 0 !important;
  padding: .75rem;
}

.opto-order-intro {
  display: grid;
  grid-template-columns: minmax(170px,.7fr) repeat(2,minmax(220px,1fr));
  gap: 1rem;
  align-items: end;
  padding: .35rem;
}

.opto-order-field {
  min-width: 0;
  padding: .85rem;
  border: 1px solid var(--opto-line);
  border-radius: 15px;
  background: #fff;
}

.opto-order-kind {
  background: linear-gradient(145deg,#eaf7fc,#fff);
}

.opto-order-field label,
.opto-order-page .opto-field-label {
  display: block;
  margin: 0 0 .5rem !important;
  color: var(--opto-navy);
  font: 800 .82rem/1.3 "Open Sans",Arial,sans-serif !important;
  letter-spacing: .045em;
  text-align: left;
  text-transform: uppercase;
}

.opto-progressive-row {
  gap: .25rem 0;
  align-items: stretch !important;
  padding: .6rem;
  border: 1px solid rgba(14,165,233,.18);
  border-radius: 16px;
  background: linear-gradient(145deg,#f4fbfe,#fff);
}

.opto-order-page .opto-progressive-row > [class*="s-"] {
  display: flex;
  flex: 1 1 11%;
  flex-direction: column;
  justify-content: flex-end;
  width: auto !important;
  min-width: 92px;
}

.opto-order-page .opto-progressive-row > .opto-progressive-primary {
  flex: 2 1 190px;
  min-width: 180px;
}

.opto-progressive-row label,
.opto-progressive-row .opto-field-label,
.opto-progressive-row span[id^="Label"] {
  min-height: 0;
  margin: 0 0 .2rem !important;
  color: var(--opto-navy) !important;
  font-size: .88rem !important;
  line-height: 1.35 !important;
  text-align: left;
}

.opto-progressive-row br {
  display: none;
}

.opto-order-page .opto-progressive-row input[type="text"],
.opto-order-page .opto-progressive-row select {
  min-height: 50px !important;
  margin-top: .15rem !important;
  font-size: 1rem !important;
  text-align: center;
}

@media (max-width: 900px) {
  .opto-order-page .opto-order-shell {
    width: min(100% - 1.25rem,1180px) !important;
    margin-top: -1.75rem;
  }

  .opto-order-page .accordion-content {
    overflow-x: auto;
  }

  .opto-order-page .accordion-content > table {
    min-width: 680px;
  }

  .opto-order-page .accordion-content .line > [class*="l-1"],
  .opto-order-page .accordion-content .line > [class*="l-2"] {
    flex: 1 1 25%;
    width: 25% !important;
  }

  .opto-order-page .accordion-content .line > [class*="l-3"] {
    flex: 1 1 50%;
    width: 50% !important;
  }

  .opto-order-intro {
    grid-template-columns: 1fr 1fr;
  }

  .opto-order-kind {
    grid-column: 1/-1;
  }
}

@media (max-width: 600px) {
  .opto-order-page .accordion-section { border-radius: 17px; }
  .opto-order-page .accordion-title { padding: .9rem 3rem .9rem 1rem !important; }
  .opto-order-page .accordion-content { padding: .8rem !important; }

  .opto-order-page .accordion-content > table {
    min-width: 0;
    display: block;
    overflow-x: auto;
  }

  .opto-order-page .accordion-content .line > [class*="s-"] {
    flex: 1 1 50%;
    width: 50% !important;
  }

  .opto-order-page .accordion-content input[type="submit"],
  .opto-order-page .accordion-content input[type="button"],
  .opto-order-page .accordion-content button {
    width: calc(100% - .8rem) !important;
  }

  .opto-order-intro {
    grid-template-columns: 1fr;
  }

  .opto-order-kind {
    grid-column: auto;
  }

  .opto-order-page .opto-progressive-row > [class*="s-"],
  .opto-order-page .opto-progressive-row > .opto-progressive-primary {
    flex: 1 1 calc(50% - 1rem);
    width: calc(50% - 1rem) !important;
    min-width: 135px;
  }

  .opto-order-page #Table33 .line > [class*="s-"] {
    flex: 1 1 50%;
    width: 50% !important;
    max-width: none;
  }

  .opto-order-page #Table34 .line {
    grid-template-columns: 1fr 1fr;
    padding: 1rem;
  }

  .opto-order-page #Table34 .line > [class*="s-"] {
    width: 100% !important;
  }

  .opto-order-page #Table1341 .line {
    display: flex;
    flex-direction: column;
  }
}

.opto-forma-page .forma-print-report-head,
.opto-forma-page .forma-print-section-title,
.opto-forma-page .forma-print-summary,
.opto-forma-page .forma-print-rx,
.opto-forma-page .forma-print-footer {
  display: none;
}

/* Override finale: una sola pagina A4 anche se il viewport di stampa è stretto. */
@media print {
  @page { size: A4 landscape; margin: 7mm; }

  html, body.opto-forma-page {
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .opto-forma-page #form1 {
    width: 100% !important;
    max-width: none !important;
    zoom: .78;
  }

  .opto-forma-page .forma-print-brand {
    display: block !important;
    height: 35px;
    margin: 0 0 4px;
    text-align: left;
  }

  .opto-forma-page .forma-print-brand img {
    max-width: 145px;
    max-height: 35px;
  }

  .opto-forma-page .forma-print-report-head {
    display: block;
    min-height: 54px;
    margin: -35px 0 10px 170px;
    padding-bottom: 6px;
    border-bottom: 2px solid #2563eb;
    color: #475569;
    text-align: right;
    font: 500 8px/1.25 "Open Sans",Arial,sans-serif;
  }

  .opto-forma-page .forma-print-report-head strong {
    display: block;
    margin-top: 2px;
    color: #0f172a;
    font-size: 17px;
  }

  .opto-forma-page .forma-print-report-head p {
    margin: 3px 0 1px;
  }

  .opto-forma-page .forma-print-report-head b {
    color: #2563eb;
    font-size: 9px;
  }

  .opto-forma-page .forma-title-card {
    display: none !important;
  }

  .opto-forma-page .forma-actions-card,
  .opto-forma-page #spinnerContainer_00 {
    display: none !important;
  }

  .opto-forma-page .forma-title-card,
  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-values-card {
    display: table !important;
    width: 100% !important;
    break-inside: avoid !important;
    box-shadow: none !important;
  }

  .opto-forma-page .forma-main-card > tbody,
  .opto-forma-page .forma-values-card > tbody {
    display: table-row-group !important;
    min-width: 0 !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr,
  .opto-forma-page .forma-values-card > tbody > tr {
    display: table-row !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > td,
  .opto-forma-page .forma-values-card > tbody > tr > td {
    display: table-cell !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > .forma-data-panel {
    width: 21% !important;
    padding: 5px !important;
  }

  .opto-forma-page .forma-main-card > tbody > tr > .forma-image-panel {
    width: 29% !important;
    padding: 5px !important;
  }

  .opto-forma-page .forma-print-section-title {
    display: block;
    margin: 0 0 4px;
    color: #0f172a;
    font: 800 8px/1.2 "Open Sans",Arial,sans-serif;
    text-align: left;
  }

  .opto-forma-page .forma-print-rx {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 5px;
    margin-bottom: 5px;
    color: #475569;
    font-size: 7px;
    text-align: left;
  }

  .opto-forma-page .forma-print-rx span {
    display: flex !important;
    justify-content: space-between;
    width: auto !important;
    margin: 0 !important;
    font: 500 7px/1.2 "Open Sans",Arial,sans-serif !important;
  }

  .opto-forma-page .forma-profiles-row {
    display: grid !important;
    grid-template-columns: repeat(2,minmax(0,1fr)) !important;
    gap: 10px;
    width: 100% !important;
    margin-top: 8px;
    padding: 7px;
    break-inside: avoid !important;
    box-shadow: none !important;
  }

  .opto-forma-page .forma-map-wrap,
  .opto-forma-page .forma-inline-profile {
    width: 205px !important;
  }

  .opto-forma-page .forma-profiles-row .forma-inline-profile {
    width: 100% !important;
    max-width: none !important;
  }

  .opto-forma-page .forma-inline-profile {
    margin-top: 3px;
    padding: 3px;
  }

  .opto-forma-page .forma-profile-canvas {
    width: 100% !important;
    height: 88px !important;
  }

  .opto-forma-page .forma-slider-row {
    display: none !important;
  }

  .opto-forma-page .forma-data-panel input[type="text"] {
    height: 23px !important;
  }

  .opto-forma-page .forma-title-card th {
    padding: 7px !important;
    font-size: 1rem !important;
  }

  .opto-forma-page .forma-values-card {
    display: none !important;
  }

  .opto-forma-page .forma-values-card td {
    padding: 4px 2px !important;
  }

  .opto-forma-page .forma-print-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 10px;
    margin-top: 5px;
    color: #2563eb;
    font: 600 7px/1.25 "Open Sans",Arial,sans-serif;
    text-align: left;
  }

  .opto-forma-page .forma-print-summary span:last-child {
    grid-column: 1 / -1;
    color: #dc2626;
  }

  .opto-forma-page .forma-print-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 5px;
    border-top: 1px solid #cbd5e1;
    color: #475569;
    font-size: 7px;
  }
}

/* Report tecnico Forma: override finale A4 verticale. */
@media print {
  @page { size: A4 portrait; margin: 8mm; }
  .opto-forma-page #form1 { width: 100% !important; max-width: none !important; zoom: 1 !important; }
  .opto-forma-page .forma-print-brand { display: block !important; width: 155px !important; height: 50px !important; margin: 0 0 5px !important; }
  .opto-forma-page .forma-print-brand img { display: block !important; width: 155px !important; height: 50px !important; max-width: none !important; max-height: none !important; object-fit: contain; object-position: left center; }
  .opto-forma-page .forma-print-report-head { min-height: 54px !important; margin: -52px 0 9px 175px !important; padding: 0 0 6px !important; }
  .opto-forma-page .forma-main-card,
  .opto-forma-page .forma-main-card > tbody { display: block !important; width: 100% !important; }
  .opto-forma-page .forma-main-card > tbody > tr { display: grid !important; width: 100% !important; grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 7px 9px !important; }
  .opto-forma-page .forma-main-card > tbody > tr > td { display: block !important; width: auto !important; min-width: 0 !important; height: auto !important; padding: 7px 9px !important; border: 1px solid #cbddeb !important; border-radius: 8px !important; background: #f8fbfe !important; }
  .opto-forma-page .forma-data-dx { grid-column: 1; grid-row: 1; }
  .opto-forma-page .forma-data-sx { grid-column: 2; grid-row: 1; }
  .opto-forma-page .forma-image-dx { grid-column: 1; grid-row: 2; }
  .opto-forma-page .forma-image-sx { grid-column: 2; grid-row: 2; }
  .opto-forma-page .forma-fields { display: none !important; }
  .opto-forma-page .forma-print-section-title { margin: 0 0 6px !important; padding: 4px 7px !important; border-left: 3px solid #168dcc; background: #eaf5fc; color: #073b5c !important; font-size: 9px !important; letter-spacing: .25px; }
  .opto-forma-page .forma-print-rx { grid-template-columns: repeat(2,minmax(0,1fr)) !important; gap: 3px 13px !important; margin: 0 !important; font-size: 7.5px !important; }
  .opto-forma-page .forma-print-rx span { padding-bottom: 2px; border-bottom: 1px dotted #d7e2ea; font-size: 7.5px !important; }
  .opto-forma-page .forma-print-rx b { color: #0f172a; }
  .opto-forma-page .forma-map-wrap { width: 245px !important; max-width: 100% !important; margin: 0 auto !important; }
  .opto-forma-page .forma-map-wrap img,
  .opto-forma-page .forma-map-wrap canvas { width: 245px !important; height: 245px !important; max-width: 100% !important; }
  .opto-forma-page .forma-profiles-row { gap: 9px !important; margin-top: 8px !important; padding: 7px !important; border: 1px solid #cbddeb !important; border-radius: 8px !important; }
  .opto-forma-page .forma-inline-profile { padding: 0 !important; border: 0 !important; }
  .opto-forma-page .forma-profile-canvas { height: 105px !important; }
  .opto-forma-page .forma-print-summary { grid-template-columns: 1fr !important; gap: 2px !important; padding: 5px 7px !important; border-radius: 5px; background: #f1f7fb; font-size: 7.5px !important; }
  .opto-forma-page .forma-print-summary span:last-child { grid-column: auto !important; }
  .opto-forma-page .forma-print-footer { margin-top: 7px !important; }

  /* Annulla le larghezze della vista desktop: in stampa ogni riquadro occupa
     davvero metà pagina, senza comprimere testi e mappe sul lato sinistro. */
  .opto-forma-page .forma-main-card > tbody > tr > .forma-data-panel,
  .opto-forma-page .forma-main-card > tbody > tr > .forma-image-panel {
    width: auto !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }

  .opto-forma-page .forma-data-panel {
    min-height: 135px !important;
  }

  .opto-forma-page .forma-image-panel {
    min-height: 280px !important;
    text-align: center !important;
  }

  .opto-forma-page .forma-map-wrap img {
    float: none !important;
  }

  .opto-forma-page .forma-map-wrap > img:not(#spinner_00),
  .opto-forma-page .forma-map-overlay {
    display: none !important;
  }

  .opto-forma-page .forma-print-map {
    display: block !important;
    position: static !important;
    width: 245px !important;
    height: 245px !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    border-radius: 12px;
  }

  .opto-forma-page .forma-print-rx {
    grid-template-columns: repeat(6,minmax(0,1fr)) !important;
    gap: 5px 7px !important;
  }

  .opto-forma-page .forma-print-rx span {
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 1px;
    padding: 2px 0 3px !important;
    white-space: nowrap;
    text-align: center;
  }

  .opto-forma-page .forma-print-rx b {
    font-size: 8px;
  }

  .opto-forma-page .forma-edge-value {
    display: none !important;
  }

  .opto-forma-page .forma-print-summary {
    font-size: 9px !important;
    line-height: 1.4 !important;
    text-align: center !important;
  }

  .opto-forma-page .forma-print-summary span {
    font-weight: 700;
  }

  .opto-forma-page .forma-print-summary span:last-child {
    font-size: 9.5px;
    font-weight: 800;
  }
}

/* Spessori usa lo stesso report tecnico di Forma, ma il form storico ha ID form2. */
@media print {
  .opto-spessori-page #form2 {
    width: 100% !important;
    max-width: none !important;
    zoom: 1 !important;
  }

  .opto-spessori-page main,
  .opto-spessori-page .spessori-input-card,
  .opto-spessori-page .forma-actions-card,
  .opto-spessori-page #Table15,
  .opto-spessori-page .opto-site-header,
  .opto-spessori-page > header,
  .opto-spessori-page > footer {
    display: none !important;
  }

  .opto-spessori-page .forma-print-brand,
  .opto-spessori-page .forma-print-report-head,
  .opto-spessori-page .forma-print-section-title,
  .opto-spessori-page .forma-print-rx,
  .opto-spessori-page .forma-print-summary {
    display: block !important;
  }

  .opto-spessori-page .forma-print-rx {
    display: grid !important;
  }

  .opto-spessori-page .forma-profiles-row {
    display: grid !important;
  }

  .opto-spessori-page .forma-print-summary span {
    display: block !important;
    width: 100% !important;
    margin: 0 0 3px !important;
    text-align: center !important;
    white-space: normal !important;
  }

  .opto-spessori-page .forma-print-summary span:last-child {
    margin-bottom: 0 !important;
  }

  .opto-spessori-page nav,
  .opto-spessori-page header:not(.forma-print-report-head),
  .opto-spessori-page [class*="iubenda"],
  .opto-spessori-page [id*="iubenda"],
  .opto-spessori-page .iubenda-tp-btn,
  .opto-spessori-page iframe[src*="iubenda"] {
    display: none !important;
    visibility: hidden !important;
  }
}
