/* SALVIATO LAB — UX v3: visual input companions. Screen only. */
@media screen {
 body.salviato-ui .ux-choice-cards,
 body.salviato-ui .ux-quick-finish {
   grid-column:1 / -1;
   min-width:0;
   margin:-1px 0 12px;
 }
 body.salviato-ui .ux-choice-rail {
   display:flex;
   gap:10px;
   padding:3px 2px 11px;
   overflow-x:auto;
   overscroll-behavior-x:contain;
   scroll-snap-type:x proximity;
   scrollbar-width:thin;
 }
 body.salviato-ui .ux-visual-option {
   flex:0 0 170px;
   min-width:0;
   max-width:220px;
   min-height:154px;
   display:flex;
   flex-direction:column;
   align-items:center;
   justify-content:center;
   gap:9px;
   border:1.5px solid #cedfda;
   border-radius:14px;
   background:#fff;
   color:#15483f;
   padding:11px;
   text-align:center;
   cursor:pointer;
   scroll-snap-align:start;
   transition:border-color .15s ease,background-color .15s ease,box-shadow .15s ease;
   font:inherit;
 }
 body.salviato-ui .ux-visual-option:hover:not(:disabled) {
   border-color:#197e6e;
   background:#f3faf7;
 }
 body.salviato-ui .ux-visual-option.is-selected {
   border-color:#00735d;
   background:#e5f4ed;
   box-shadow:inset 0 0 0 1px #00735d;
 }
 body.salviato-ui .ux-visual-option:disabled {
   opacity:.5;
   cursor:not-allowed;
 }
 body.salviato-ui .ux-type-illustration {
   display:grid;
   place-items:center;
   width:79px;
   height:87px;
   color:#285d56;
   background:#f0f6f3;
   border-radius:10px;
 }
 body.salviato-ui .ux-type-illustration svg { width:72px;height:78px; }
 body.salviato-ui .ux-type-illustration.ux-type-mirror svg {transform:scaleX(-1)}
 body.salviato-ui .ux-type-illustration.ux-type-door {background:#edf3f0}
 body.salviato-ui .ux-choice-words {
   display:grid;
   gap:3px;
   max-width:100%;
   overflow-wrap:anywhere;
 }
 body.salviato-ui .ux-choice-words strong {font-size:12px;line-height:1.35}
 body.salviato-ui .ux-choice-words small {font-size:11px;color:#59716b}
 body.salviato-ui .ux-choice-caption {
   display:block;
   margin:2px 0 5px;
   color:#5b6e6b;
   font-size:11px;
   line-height:1.4;
 }
 body.salviato-ui .ux-color-hint {
   grid-column:1 / -1;
   display:flex;
   align-items:center;
   gap:10px;
   padding:10px 12px;
   margin:0 0 9px;
   border:1px solid #cbdcd6;
   background:#f7faf8;
   border-radius:11px;
 }
 body.salviato-ui .ux-color-hint[hidden] {display:none}
 body.salviato-ui .ux-color-hint .ux-color-swatch {
   width:39px;height:39px;flex:none;
   border-radius:8px;border:1px solid #9caea8;
   box-shadow:inset 0 1px 3px rgba(0,0,0,.04);
   background-image:none;
   background-size:15px 15px;
 }
 body.salviato-ui .ux-color-hint.is-unverified .ux-color-swatch {
   background-image:linear-gradient(45deg,#e4e9e7 25%,#f9faf9 25%,#f9faf9 50%,#e4e9e7 50%,#e4e9e7 75%,#f9faf9 75%);
 }
 body.salviato-ui .ux-color-hint .ux-color-description {display:grid;gap:3px;min-width:0}
 body.salviato-ui .ux-color-hint .ux-color-description strong {font-size:12px}
 body.salviato-ui .ux-color-hint .ux-color-description small {font-size:11px;line-height:1.4;color:#5c746e}
 body.salviato-ui .ux-color-hint.is-unverified {border-style:dashed}
 body.salviato-ui .ux-quick-colors {display:flex;flex-wrap:wrap;gap:8px}
 body.salviato-ui .ux-color-option {
   min-height:43px;
   display:flex;gap:7px;align-items:center;
   border:1.5px solid #cfdfd8;
   background:#fff;color:#1d4942;
   border-radius:10px;
   font:inherit;font-size:11px;font-weight:650;
   padding:7px 9px;cursor:pointer;
 }
 body.salviato-ui .ux-color-option.is-selected {border-color:#00735d;background:#e5f4ed;box-shadow:inset 0 0 0 1px #00735d}
 body.salviato-ui .ux-color-option:hover {border-color:#197e6e}
 body.salviato-ui .ux-color-option:disabled {opacity:.5;cursor:not-allowed}
 body.salviato-ui .ux-mini-swatch {width:24px;height:24px;border-radius:7px;border:1px solid rgba(0,0,0,.18);flex:none}
 body.salviato-ui .ux-visual-option:focus-visible,
 body.salviato-ui .ux-color-option:focus-visible {
   outline:3px solid #209e8b;
   outline-offset:2px;
 }
 body.salviato-ui .ux-v3-note {
   margin:9px 0 14px;
   border-left:3px solid #087e6b;
   background:#f2f8f5;
   padding:10px 12px;
   font-size:12px;
   color:#365a52;
   line-height:1.5;
 }
 @media (max-width:600px){
   body.salviato-ui .ux-visual-option {flex-basis:145px;min-height:145px;padding:9px}
   body.salviato-ui .ux-type-illustration {width:70px;height:76px}
   body.salviato-ui .ux-type-illustration svg {width:64px;height:68px}
   body.salviato-ui .ux-quick-colors {flex-wrap:nowrap;overflow-x:auto;padding-bottom:8px}
   body.salviato-ui .ux-color-option {flex:none}
 }
 @media (prefers-reduced-motion:reduce) {
   body.salviato-ui .ux-visual-option {transition:none}
 }
}

@media screen {
 body.salviato-ui .configurator-stage-actions {
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:12px;
   border-bottom:1px solid #d0e1dc;
   background:#f6faf8;
   padding:10px 22px;
   flex:0 0 auto;
 }
 body.salviato-ui .configurator-stage-actions .configurator-nav-action {
   font:inherit;
   font-size:12px;
   font-weight:750;
   color:#064e44;
   background:#fff;
   border:1px solid #b7d7ca;
   border-radius:10px;
   min-height:40px;
   padding:9px 13px;
   cursor:pointer;
 }
 body.salviato-ui .configurator-stage-actions .configurator-nav-action:hover:not(:disabled) {background:#e6f5ef;border-color:#428b78}
 body.salviato-ui .configurator-stage-actions .configurator-nav-action:disabled {opacity:.4;cursor:not-allowed}
 body.salviato-ui .configurator-stage-actions .configurator-nav-action:focus-visible {outline:3px solid #32aa98;outline-offset:2px}
 body.salviato-ui .configurator-stage-progress {font-size:12px;color:#31594f;font-weight:700;white-space:nowrap}
 @media(max-width:600px){
  body.salviato-ui .configurator-stage-actions{padding:8px 12px;gap:5px}
  body.salviato-ui .configurator-stage-actions .configurator-nav-action{font-size:11px;padding:8px 9px;min-height:42px}
  body.salviato-ui .configurator-stage-progress{font-size:10px}
 }
}

@media screen {
 body.salviato-ui dialog.ux-shutter-workspace[open] {
   display:flex;
   flex-direction:column;
   padding:0;
   overflow:clip;
   width:min(1280px,calc(100vw - 32px));
   height:min(940px,calc(100dvh - 32px));
   max-width:none;
   max-height:none;
   border:1px solid #c7dad3;
   border-radius:16px;
   background:#f3f7f5;
   color:#16463d;
   box-shadow:0 28px 100px rgba(0,43,37,.22);
 }
 body.salviato-ui dialog.ux-shutter-workspace::backdrop {background:rgba(9,38,33,.62)}
 body.salviato-ui .ux-shutter-workspace-head {
   display:flex;
   align-items:center;
   justify-content:space-between;
   gap:18px;
   flex:none;
   padding:14px 20px;
   background:linear-gradient(115deg,#004747,#0b675b);
   color:#fff;
 }
 body.salviato-ui .ux-shutter-workspace-head div {display:grid;gap:3px;min-width:0}
 body.salviato-ui .ux-shutter-workspace-head small {font-size:10px;letter-spacing:.06em;color:#bbddd1}
 body.salviato-ui .ux-shutter-workspace-head strong {font-size:19px;line-height:1.25;overflow-wrap:anywhere}
 body.salviato-ui .ux-shutter-workspace-head span {color:#d7ece3;font-size:12px}
 body.salviato-ui .ux-shutter-workspace-head button {
   color:#fff;border-color:#a1d6c9;background:rgba(255,255,255,.13);
   min-height:44px;flex:none;
 }
 body.salviato-ui .ux-shutter-workspace .position-card.is-open {
   flex:1;
   min-height:0;
   max-width:none;
   /* The compact list uses overflow:visible!important for its action menus.
      Inside the modal this card must be the actual scroll container. */
   margin:0!important;
   overflow-y:auto!important;
   overflow-x:hidden!important;
   border:0!important;
   border-radius:0!important;
   background:#fff;
   box-shadow:none;
   scrollbar-gutter:stable;
 }
 body.salviato-ui .ux-shutter-workspace .position-head {
   position:sticky;
   top:0;
   z-index:2;
   background:#e8f4ef;
   border-bottom:1px solid #c6ded4;
 }
 body.salviato-ui .ux-shutter-workspace .position-form {
   padding:18px;
 }
 body.salviato-ui .ux-shutter-workspace .inserted-actions {display:none}
 body.salviato-ui .ux-shutter-sections {
   display:flex;gap:8px;padding:8px 14px;overflow-x:auto;flex:none;
   background:#e8f4ef;border-bottom:1px solid #c6ded4;
 }
 body.salviato-ui .ux-shutter-sections button {
   flex:none;font:inherit;font-size:12px;min-height:44px;border:1px solid #abcabe;
   border-radius:8px;padding:8px 12px;color:#16463d;background:white;cursor:pointer;
 }
 body.salviato-ui .ux-shutter-workspace [data-field],
 body.salviato-ui .ux-shutter-workspace .shutter-configured-preview {scroll-margin-top:16px}
 body.salviato-ui .shutter-configured-preview {
   grid-column:1 / -1;margin:0;padding:16px;border:1px solid #cbdcd6;
   border-radius:12px;background:#f7faf8;text-align:center;min-width:0;
 }
 body.salviato-ui .shutter-configured-preview figcaption {font-weight:750}
 body.salviato-ui .shutter-configured-preview .editor-shutter-svg {width:100%;height:230px;display:block}
 body.salviato-ui .editor-shutter-svg .shutter-body {stroke:#365a52;stroke-width:.7}
 body.salviato-ui .editor-shutter-svg .shutter-joints {stroke:#365a52;stroke-width:.5}
 body.salviato-ui .shutter-configured-preview p {margin:8px 0}
 body.salviato-ui .shutter-configured-preview small {font-size:12px;color:#365a52}
 body.salviato-ui .ux-shutter-workspace .advanced-options-toggle {scroll-margin-top:16px}
 /* The original CAD has five installation controls plus explanatory text.
    A single flex row squeezed the inputs to spinner-width on tablet. */
 body.salviato-ui .technical-drawing-dialog .td-installation {
   display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,180px),1fr));
   align-items:start;gap:14px;
 }
 body.salviato-ui .technical-drawing-dialog .td-installation label {min-width:0}
 body.salviato-ui .technical-drawing-dialog .td-installation :is(input,select) {
   box-sizing:border-box;width:100%;min-width:0;min-height:44px;
   font:inherit;padding:10px;border:1px solid #acc7c2;border-radius:7px;background:white;color:#173d38;
 }
 body.salviato-ui .technical-drawing-dialog .td-installation p {grid-column:1/-1;max-width:none;margin:0}
 body.salviato-ui .technical-drawing-dialog .td-head {position:sticky;top:0;z-index:2;background:white}
 body.salviato-ui .ux-shutter-workspace .ux-v3-note {grid-column:1 / -1}
 @media(max-width:750px){
  body.salviato-ui dialog.ux-shutter-workspace[open]{
   width:100vw;height:100dvh;margin:0;border:0;border-radius:0;
  }
  body.salviato-ui .ux-shutter-workspace-head{padding:11px 13px;gap:8px}
  body.salviato-ui .ux-shutter-workspace-head strong{font-size:16px}
  body.salviato-ui .ux-shutter-workspace-head span{display:none}
  body.salviato-ui .ux-shutter-workspace-head button{font-size:12px;padding:9px}
  body.salviato-ui .ux-shutter-workspace .position-form{padding:11px}
 }
}

/* Scuri: one continuous editor, in the same DOM and keyboard order. */
@media screen {
 body.salviato-ui .position-form.shutter-linear-form {display:block;padding:16px;}
 body.salviato-ui .shutter-section {margin:0 0 24px;min-width:0;}
 body.salviato-ui .shutter-section:last-child {margin-bottom:0;}
 body.salviato-ui .shutter-section h3 {
  display:flex;align-items:center;gap:10px;margin:0 0 16px;padding:12px 0;
  border-bottom:1px solid #c9dcd5;font-size:17px;line-height:1.3;color:#16463d;
 }
 body.salviato-ui .shutter-section h3>span {font-size:12px;padding:6px 8px;border-radius:7px;background:#e5f2ec;}
 body.salviato-ui .shutter-section h3:focus-visible {outline:3px solid #209e8b;outline-offset:2px;}
 body.salviato-ui .shutter-section-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 18px;align-items:start;}
 body.salviato-ui .shutter-section-grid>.field {grid-column:auto;min-width:0;}
 body.salviato-ui .shutter-section-grid>:is(.span-4,.subsection,.attachments-panel,.technical-strip,.warning-box,.ok-box,.technical-drawing-button,.shutter-position-price),
 body.salviato-ui .shutter-section-grid>.field:has([data-field="system"]) {grid-column:1/-1;}
 body.salviato-ui .shutter-section-grid .subsection {margin:6px 0 0;}
 body.salviato-ui .shutter-section-grid :is(input,select,textarea) {max-width:100%;min-width:0;}
 body.salviato-ui .ux-choice-shutter {margin:0;}
 body.salviato-ui .ux-choice-shutter .ux-choice-rail {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));overflow:visible;padding:2px;gap:12px;}
 body.salviato-ui .ux-choice-shutter .ux-visual-option {width:100%;max-width:none;min-height:0;padding:12px;justify-content:flex-start;}
 body.salviato-ui .ux-choice-shutter .ux-choice-words strong {font-size:14px;}
 body.salviato-ui .ux-choice-shutter .ux-choice-words small {font-size:12px;line-height:1.4;}
 body.salviato-ui .ux-shutter-thumbnail {display:block;width:100%;height:150px;object-fit:contain;background:#fff;border-radius:6px;}
 body.salviato-ui .ux-selected-label {visibility:hidden;font-size:12px;font-weight:750;}
 body.salviato-ui .is-selected .ux-selected-label {visibility:visible;}
 body.salviato-ui .shutter-position-price {display:grid;gap:6px;border-top:1px solid #c9dcd5;padding:16px 0;}
 body.salviato-ui .shutter-position-price strong {font-size:24px;}
 body.salviato-ui .shutter-position-price small {font-size:13px;}
 body.salviato-ui .ux-shutter-workspace-head {min-height:64px;padding:10px 18px;box-sizing:border-box;}
 body.salviato-ui .ux-shutter-workspace-head strong {font-size:17px;}
 body.salviato-ui .ux-shutter-workspace-head .ux-shutter-save-actions {display:flex;flex-wrap:wrap;justify-content:flex-end;gap:8px;}
 body.salviato-ui dialog.ux-shutter-workspace .ux-shutter-workspace-head [data-shutter-save] {background:#fff;color:#004747;border-color:#fff;}
 body.salviato-ui dialog.ux-shutter-workspace .ux-shutter-workspace-head [data-shutter-close] {background:transparent;color:#fff;border-color:#a1d6c9;box-shadow:none;}
 body.salviato-ui .ux-shutter-save-bottom {grid-column:1 / -1;padding:8px 0 16px;}
 body.salviato-ui .ux-shutter-save-bottom button {min-height:44px;width:100%;white-space:normal;}
 body.salviato-ui .ux-shutter-save-error {margin:6px 0 0;color:#fff;font-size:13px;max-width:48ch;}
 @media(max-width:600px) {
  body.salviato-ui .ux-shutter-workspace-head {flex-wrap:wrap;}
  body.salviato-ui .ux-shutter-workspace-head .ux-shutter-save-actions {width:100%;}
  body.salviato-ui .ux-shutter-workspace-head [data-shutter-save] {flex:1;white-space:normal;}
 }
 body.salviato-ui .ux-shutter-workspace .inserted-head {display:none;}
 @media(max-width:1000px){
  body.salviato-ui .ux-choice-shutter .ux-choice-rail {grid-template-columns:repeat(2,minmax(0,1fr));}
 }
 @media(max-width:600px){
  body.salviato-ui .position-form.shutter-linear-form {padding:12px;}
  body.salviato-ui .shutter-section-grid,
  body.salviato-ui .ux-choice-shutter .ux-choice-rail {grid-template-columns:minmax(0,1fr);}
  body.salviato-ui .shutter-section h3 {font-size:16px;}
  body.salviato-ui .shutter-section-grid>.field {grid-column:1;}
  body.salviato-ui .ux-shutter-workspace-head {padding:8px 12px;gap:8px;}
  body.salviato-ui .ux-quick-colors {flex-wrap:wrap;overflow:visible;}
 }
}

/* Local PDF intake; original supplier reviews retain their commercial controls. */
@media screen {
 .pdf-drop {display:flex;flex-direction:column;align-items:center;gap:10px;padding:22px 16px;border:2px dashed #709b86;border-radius:12px;background:#f2f8f4;color:#183d30;text-align:center;}
 .pdf-drop>span {font-size:13px;line-height:1.5;}
 .pdf-file-button {position:relative;overflow:hidden;cursor:pointer;}
 .pdf-file-button input {position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer;}
 .pdf-file-button:focus-within {outline:3px solid #24744e;outline-offset:3px;}
 .pdf-intake {width:min(640px,calc(100vw - 24px));}
 .pdf-intake [data-supplier-choice]:not([hidden]) {display:grid;gap:14px;}
 .pdf-intake select {width:100%;min-height:44px;}
 .pdf-intake [data-intake-error] {color:#9a2424;}
 .pdf-supplier-bar {display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:12px;margin-bottom:16px;background:#edf5ef;border:1px solid #bdd3c5;border-radius:10px;}
 .pdf-supplier-bar span {overflow-wrap:anywhere;flex:1 1 160px;}
 .pdf-smart-preview .installation-dialog-body {min-width:0;}
 .pdf-smart-preview .table-wrap {max-width:100%;overflow:auto;}
 .pdf-smart-preview .import-review-row {flex-wrap:wrap;}
 .pdf-smart-preview .import-review-row>div {min-width:0;overflow-wrap:anywhere;}
 @media(max-width:600px) {
  .pdf-smart-preview {width:calc(100vw - 16px);max-width:calc(100vw - 16px)!important;margin:8px;max-height:calc(100dvh - 16px);}
  .pdf-smart-preview .installation-dialog-head {flex-wrap:wrap;gap:8px;}
  .pdf-smart-preview .installation-dialog-head h2 {font-size:19px;}
  .pdf-smart-preview .installation-dialog-body {padding:14px;}
  .pdf-supplier-bar {align-items:stretch;flex-direction:column;}
  .pdf-supplier-bar span {flex:auto;}
  .pdf-smart-preview .eko-review-table {width:100%;min-width:0!important;}
  .pdf-smart-preview .eko-review-table thead {display:none;}
  .pdf-smart-preview .eko-review-table tbody {display:block;}
  .pdf-smart-preview .eko-review-table tr {display:grid;grid-template-columns:1fr 1fr;border:1px solid #d9e7de;border-radius:8px;margin-bottom:12px;}
  .pdf-smart-preview .eko-review-table td {display:block;min-width:0;white-space:normal;border:0;padding:10px;overflow-wrap:anywhere;}
  .pdf-smart-preview .eko-review-table td:first-child {grid-column:1 / -1;}
  .pdf-smart-preview .eko-review-table td:not(:first-child)::before {content:attr(data-pdf-label);display:block;font-weight:700;color:#426457;margin-bottom:5px;}

 }
}
