
:root{--brand:#2c2c2c;--accent:#8c2f39;--soft:#f5f5f6;--line:#e7e7ea;--text:#1f2328;--muted:#6b7280;--white:#fff}
body{background:var(--soft);color:var(--text)}
.app-navbar{background:#1f2328}
.navbar-brand{font-weight:800;letter-spacing:.04em}
.card{border:1px solid var(--line);border-radius:18px;box-shadow:0 10px 28px rgba(16,24,40,.05)}
.table td,.table th{vertical-align:middle}
.section-row{background:#f4f4f5;font-weight:800;text-transform:uppercase;color:#111827}
.form-control,.form-select,.btn{border-radius:12px}
.btn-primary{background:var(--accent);border-color:var(--accent)}
.btn-outline-primary{color:var(--accent);border-color:var(--accent)}
.btn-outline-primary:hover{background:var(--accent);border-color:var(--accent)}
.product-thumb{width:64px;height:64px;object-fit:cover;border-radius:12px;border:1px solid #ddd}
.gallery-img{height:160px;object-fit:cover;border-radius:14px}
.print-only{display:none}

/* Header */
.app-navbar .navbar-brand,.app-navbar .nav-link{color:#fff!important}
.app-navbar .nav-link{font-weight:700;border-radius:10px;padding:.45rem .75rem;margin:.1rem .12rem}
.app-navbar .nav-link:hover,.app-navbar .nav-link:focus{background:rgba(255,255,255,.1)}
.app-navbar .btn-light{background:#fff!important;color:#111827!important;border-color:#fff!important;font-weight:700}
.app-navbar .form-control{background:#fff;color:#111827}

/* Document sheet */
.scheda-preview{background:#fff;overflow:hidden}
.sheet-doc-header{display:flex;justify-content:space-between;align-items:flex-start;gap:1rem;border-bottom:1px solid var(--line);padding-bottom:.9rem;margin-bottom:1rem}
.sheet-doc-brand{font-size:1.6rem;font-weight:900;letter-spacing:.18em;color:#111827}
.sheet-doc-head-right{text-align:right}
.sheet-kicker{font-size:.75rem;letter-spacing:.14em;text-transform:uppercase;color:var(--accent);font-weight:800}
.sheet-lang-note{font-size:.88rem;color:var(--muted)}
.sheet-title-area{margin-bottom:1.25rem}
.sheet-title-clean{font-size:2rem;line-height:1.12;font-weight:800;color:#111827;margin:0}
.sheet-subtitle-line{color:var(--muted);font-size:.95rem}
.sheet-intro-grid{display:grid;grid-template-columns:minmax(300px, 42%) 1fr;gap:1.25rem;align-items:start}
.sheet-photo-panel,.sheet-summary-panel{min-width:0}
.sheet-main-image.clean{width:100%;height:360px;object-fit:contain;border:1px solid var(--line);border-radius:16px;background:#fcfcfc}
.sheet-image-placeholder.clean{display:flex;align-items:center;justify-content:center;height:360px;border:2px dashed #d1d5db;border-radius:16px;background:#fafafa;color:#9ca3af;font-weight:700;text-align:center;padding:1rem}
.sheet-thumbs{display:grid;grid-template-columns:repeat(auto-fit,minmax(74px,1fr));gap:.6rem}
.sheet-thumb{width:100%;height:74px;object-fit:cover;border-radius:12px;border:1px solid var(--line);background:#fff}
.sheet-panel-box{border:1px solid var(--line);border-radius:16px;background:#fff;padding:1rem}
.sheet-block-title.clean{font-size:.78rem;letter-spacing:.12em;text-transform:uppercase;color:#6b7280;font-weight:800;margin-bottom:.8rem}
.sheet-summary-table th{width:38%;font-size:.9rem;color:#374151;font-weight:700;background:#fafafa;border-bottom:1px solid #eef0f3;padding:.6rem .75rem}
.sheet-summary-table td{font-size:.94rem;color:#111827;padding:.6rem .75rem;border-bottom:1px solid #eef0f3}
.sheet-summary-table tr:last-child th,.sheet-summary-table tr:last-child td{border-bottom:0}
.sheet-description-text.clean{padding:.9rem 1rem;border:1px solid var(--line);border-radius:14px;background:#fafafa;line-height:1.65;min-height:150px}
.sheet-description-text.clean.is-empty{display:flex;align-items:center;justify-content:center;color:#9ca3af;font-style:italic}
.sheet-sections-stack{display:flex;flex-direction:column;gap:1rem}
.sheet-section-table-wrap{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff;page-break-inside:avoid;break-inside:avoid}
.sheet-section-title-clean{padding:.9rem 1rem;border-bottom:1px solid var(--line);font-size:.92rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#111827;background:#fafafa}
.sheet-spec-table-clean th{width:38%;font-weight:700;color:#374151;background:#fff}
.sheet-spec-table-clean td{color:#111827;background:#fff}
.sheet-spec-table-clean th,.sheet-spec-table-clean td{padding:.7rem .9rem;border-bottom:1px solid #eef0f3}
.sheet-spec-table-clean tr:last-child th,.sheet-spec-table-clean tr:last-child td{border-bottom:0}

@media (max-width:991.98px){
  .sheet-doc-header{flex-direction:column}
  .sheet-doc-head-right{text-align:left}
  .sheet-title-clean{font-size:1.6rem}
  .sheet-intro-grid{grid-template-columns:1fr}
  .sheet-main-image.clean,.sheet-image-placeholder.clean{height:300px}
}

@page{size:auto;margin:12mm}
@media print{
  .navbar,.no-print,.btn,.card-footer form,.card-footer button{display:none!important}
  .print-only{display:block}
  html,body{background:#fff!important;color:#111;font-size:12px}
  .container-fluid{padding:0!important;max-width:none!important}
  main.container-fluid{margin:0!important}
  .card{box-shadow:none!important;border:0!important;border-radius:0!important}
  .scheda-preview,.scheda-preview .card-body{padding:0!important;background:#fff}
  .sheet-doc-header,.sheet-title-area,.sheet-intro-grid{page-break-inside:avoid;break-inside:avoid}
  .sheet-doc-header{padding-bottom:.45rem;margin-bottom:.65rem}
  .sheet-doc-brand{font-size:20px}
  .sheet-title-clean{font-size:20px}
  .sheet-subtitle-line{font-size:11px}
  .sheet-intro-grid{grid-template-columns:38% 1fr;gap:.8rem;margin-bottom:.8rem!important}
  .sheet-main-image.clean,.sheet-image-placeholder.clean{height:210px;border-radius:8px}
  .sheet-thumbs{gap:.35rem}
  .sheet-thumb{height:48px;border-radius:6px}
  .sheet-panel-box{padding:.6rem;border-radius:8px}
  .sheet-block-title.clean{font-size:.68rem;margin-bottom:.4rem}
  .sheet-summary-table th,.sheet-summary-table td,.sheet-spec-table-clean th,.sheet-spec-table-clean td{padding:.38rem .5rem;font-size:11px}
  .sheet-description-text.clean{padding:.55rem .65rem;min-height:auto;border-radius:8px;background:#fff}
  .sheet-sections-stack{gap:.5rem}
  .sheet-section-table-wrap{border:1px solid #d9d9df;border-radius:8px;break-inside:avoid-page;page-break-inside:avoid}
  .sheet-section-title-clean{padding:.45rem .6rem;font-size:.72rem}
}


/* Migliorie allineamento colonne e sezioni */
.sheet-section-title-clean{font-size:1rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase;color:#fff;background:var(--accent);padding:.85rem 1rem;border-bottom:0}
.sheet-spec-table-clean{table-layout:fixed;width:100%;margin:0}
.sheet-spec-table-clean th{width:48%;font-weight:700;color:#111827;background:#fafafa;text-align:left;vertical-align:top}
.sheet-spec-table-clean td{width:52%;color:#111827;background:#fff;text-align:left;vertical-align:top}
.sheet-spec-table-clean th,.sheet-spec-table-clean td{padding:.72rem .9rem;border-bottom:1px solid #eef0f3}
.sheet-section-table-wrap{border:1px solid var(--line);border-radius:16px;overflow:hidden;background:#fff;page-break-inside:avoid;break-inside:avoid;box-shadow:0 2px 8px rgba(16,24,40,.03)}
.sheet-summary-table{table-layout:fixed;width:100%}
.sheet-summary-table th{width:42%;text-align:left;vertical-align:top}
.sheet-summary-table td{text-align:left;vertical-align:top}
@media print{
  .sheet-section-title-clean{background:#e5e7eb!important;color:#111!important;border-bottom:1px solid #d1d5db!important}
  .sheet-spec-table-clean th{width:46%}
  .sheet-spec-table-clean td{width:54%}
}


/* Gestione ordine sezioni */
.order-sections-table th{font-size:.82rem;text-transform:uppercase;letter-spacing:.06em;color:#6b7280}
.section-name-preview{display:inline-block;padding:.45rem .7rem;border-radius:.65rem;background:var(--accent);color:#fff;font-weight:800;text-transform:uppercase;letter-spacing:.04em}


/* Correzione definitiva tabella scheda: una sola tabella, colonne sempre allineate */
.sheet-sections-stack,.sheet-section-table-wrap,.sheet-section-title-clean,.sheet-spec-table-clean{display:revert}
.sheet-spec-master-wrap{
  border:1px solid #d9dde5;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,24,40,.03);
}
.sheet-spec-master{
  width:100%;
  table-layout:fixed;
  border-collapse:collapse;
  margin:0;
}
.sheet-spec-master col:first-child{width:48%!important}
.sheet-spec-master col:last-child{width:52%!important}
.sheet-section-title-row td{
  background:#8c2f39!important;
  color:#fff!important;
  font-weight:900!important;
  text-transform:uppercase;
  letter-spacing:.08em;
  font-size:1rem;
  padding:.9rem 1rem!important;
  border:0!important;
}
.sheet-spec-data-row th,
.sheet-spec-data-row td{
  padding:.72rem .9rem!important;
  border-bottom:1px solid #e7eaf0!important;
  vertical-align:top!important;
  text-align:left!important;
}
.sheet-spec-data-row th{
  width:48%!important;
  background:#fafafa!important;
  color:#111827!important;
  font-weight:800!important;
}
.sheet-spec-data-row td{
  width:52%!important;
  background:#fff!important;
  color:#111827!important;
  font-weight:400!important;
}
.sheet-section-title-row + .sheet-spec-data-row th,
.sheet-section-title-row + .sheet-spec-data-row td{
  border-top:0!important;
}
@media print{
  .sheet-spec-master-wrap{border:1px solid #cfd4dc!important;border-radius:6px!important;box-shadow:none!important;break-inside:auto;page-break-inside:auto}
  .sheet-section-title-row{break-after:avoid;page-break-after:avoid}
  .sheet-section-title-row td{background:#e5e7eb!important;color:#111!important;font-size:.78rem!important;padding:.42rem .55rem!important;border-top:1px solid #cfd4dc!important;border-bottom:1px solid #cfd4dc!important}
  .sheet-spec-data-row{break-inside:avoid;page-break-inside:avoid}
  .sheet-spec-data-row th,.sheet-spec-data-row td{padding:.36rem .5rem!important;font-size:11px!important}
}


/* Logo testuale e footer */
.app-brand{display:flex;flex-direction:column;align-items:flex-start;line-height:1.05;padding-top:.45rem;padding-bottom:.45rem}
.brand-logo-text{display:block;font-size:1.35rem;font-weight:900;letter-spacing:.18em;color:#fff}
.brand-app-title{display:block;font-size:.78rem;font-weight:700;letter-spacing:.02em;color:rgba(255,255,255,.9);margin-top:.18rem}
.app-footer{border-top:1px solid var(--line);background:#fff;margin-top:2rem}
@media print{.app-footer{display:none!important}}


/* Logo immagine personalizzato */
.app-brand{display:flex;flex-direction:column;align-items:flex-start;gap:.3rem;line-height:1.05;padding-top:.25rem;padding-bottom:.25rem}
.brand-logo-image{display:block;width:auto;height:54px;max-width:160px;object-fit:contain;border-radius:8px;background:transparent}
.brand-app-title{display:block;font-size:.78rem;font-weight:700;letter-spacing:.02em;color:rgba(255,255,255,.9);margin-top:0}
.sheet-doc-brand{display:flex;align-items:center}
.sheet-doc-logo{display:block;height:86px;max-width:220px;width:auto;object-fit:contain}
@media (max-width:991.98px){
  .brand-logo-image{height:44px;max-width:130px}
  .sheet-doc-logo{height:72px;max-width:180px}
}
@media print{
  .sheet-doc-logo{height:62px;max-width:170px}
  .brand-logo-image{height:36px;max-width:110px}
}


/* Logo Lofra ufficiale */
.brand-logo-image{height:42px;max-width:220px;width:auto;object-fit:contain;border-radius:0;background:transparent}
.app-brand{gap:.22rem}
.sheet-doc-header{background:#4f6a70;border:0;border-radius:14px;padding:1rem 1.2rem;margin-bottom:1.15rem;align-items:center}
.sheet-doc-logo{height:54px;max-width:260px;width:auto;object-fit:contain}
.sheet-doc-head-right .sheet-kicker{color:#fff}
.sheet-doc-head-right .sheet-lang-note{color:rgba(255,255,255,.82)}
@media (max-width:991.98px){
  .brand-logo-image{height:34px;max-width:170px}
  .sheet-doc-logo{height:44px;max-width:210px}
}
@media print{
  .sheet-doc-header{background:#4f6a70!important;color:#fff!important;border-radius:8px!important;padding:.65rem .85rem!important}
  .sheet-doc-logo{height:38px;max-width:190px}
  .brand-logo-image{height:30px;max-width:150px}
}


/* Aggiornamento: titoli sezione grigi e miniature sotto immagine principale */
.sheet-section-title-row td{
  background:#e5e7eb!important;
  color:#111827!important;
  border-top:1px solid #d1d5db!important;
  border-bottom:1px solid #d1d5db!important;
}
.sheet-thumbs-wrap{border:1px solid var(--line);border-radius:12px;background:#fff;padding:.65rem}
.sheet-thumbs-title{font-size:.72rem;font-weight:800;text-transform:uppercase;letter-spacing:.08em;color:#6b7280;margin-bottom:.5rem}
.sheet-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:.55rem}
.sheet-thumb{width:100%;height:72px;object-fit:cover;border-radius:10px;border:1px solid var(--line);background:#fff}
@media print{
  .sheet-section-title-row td{background:#e5e7eb!important;color:#111827!important}
  .sheet-thumbs-wrap{padding:.35rem;border-radius:6px}
  .sheet-thumbs-title{font-size:.62rem;margin-bottom:.25rem}
  .sheet-thumbs{grid-template-columns:repeat(auto-fill,minmax(44px,1fr));gap:.3rem}
  .sheet-thumb{height:44px;border-radius:5px}
}


/* Gestione immagini: peso, miniature cliccabili e principale */
.image-admin-card{border:1px solid var(--line);border-radius:14px;padding:.75rem;background:#fff;height:100%}
.image-admin-card.is-main{border-color:#6b7280;box-shadow:0 0 0 2px rgba(107,114,128,.18)}
.sheet-thumb-button{display:block;width:100%;padding:0;border:0;background:transparent;border-radius:10px;cursor:pointer}
.sheet-thumb-button .sheet-thumb{transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
.sheet-thumb-button:hover .sheet-thumb,.sheet-thumb-button.active .sheet-thumb{transform:translateY(-1px);border-color:#6b7280;box-shadow:0 4px 12px rgba(16,24,40,.16)}
.sheet-thumbs-help{font-size:.72rem;color:#6b7280;margin-top:.45rem}
@media print{.sheet-thumbs-help,.sheet-thumb-button{display:none!important}.print-only.sheet-thumb{display:block!important}}


/* Gallery scheda: solo miniature, click = immagine principale */
.sheet-thumbs-wrap{border:0!important;background:transparent!important;padding:0!important}
.sheet-thumbs-title,.sheet-thumbs-help{display:none!important}
.sheet-thumbs{display:grid;grid-template-columns:repeat(auto-fill,minmax(78px,1fr));gap:.55rem}
.sheet-thumb-form{margin:0;padding:0}
.sheet-thumb-button{display:block;width:100%;padding:0;border:0;background:transparent;border-radius:10px;cursor:pointer}
.sheet-thumb-button .sheet-thumb{width:100%;height:78px;object-fit:cover;border-radius:10px;border:1px solid var(--line);background:#fff;transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
.sheet-thumb-button:hover .sheet-thumb{transform:translateY(-1px);border-color:#6b7280;box-shadow:0 4px 12px rgba(16,24,40,.16)}
@media print{.sheet-thumb-form{display:none!important}.print-only.sheet-thumb{display:block!important;height:44px;border-radius:5px}}

/* Lingue RTL: arabo / ebraico */
html[dir="rtl"] .sheet-doc-head-right{text-align:left}
html[dir="rtl"] .sheet-spec-master th,
html[dir="rtl"] .sheet-spec-master td,
html[dir="rtl"] .sheet-summary-table th,
html[dir="rtl"] .sheet-summary-table td{text-align:right}
html[dir="rtl"] .navbar-nav{padding-right:0}


/* Peso categoria */
.section-name-preview.gray{background:#6b7280;color:#fff}
.category-weight-table thead th{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;background:#f8fafc}
.category-weight-table tbody tr:hover{background:#fafafa}
.category-weight-table input[type=number]{max-width:90px}

/* Configurazione piano cucina */
.hob-admin-card{border:1px solid var(--line);border-radius:14px;padding:.75rem;background:#fff;height:100%}
.hob-admin-img{width:100%;height:120px;object-fit:contain;border:1px solid var(--line);border-radius:10px;background:#fafafa}
.hob-slot-preview{height:88px;border:1px dashed #d1d5db;border-radius:10px;background:#fafafa;display:flex;align-items:center;justify-content:center;padding:.35rem}
.hob-slot-preview img{max-width:100%;max-height:78px;object-fit:contain}
.hob-layout{display:grid;grid-template-columns:repeat(var(--hob-count,5),minmax(0,1fr));gap:0;align-items:stretch;border:1px solid #d8dde5;border-radius:16px;padding:.45rem .5rem;background:linear-gradient(180deg,#f8fafc,#f1f5f9);overflow:hidden}
.hob-layout-2{--hob-count:2}.hob-layout-3{--hob-count:3}.hob-layout-4{--hob-count:4}.hob-layout-5{--hob-count:5}.hob-layout-6{--hob-count:6}.hob-layout-7{--hob-count:7}
.hob-layout-item{background:transparent;border:0;min-height:96px;display:flex;align-items:center;justify-content:center;padding:0;overflow:hidden;position:relative}
.hob-layout-item + .hob-layout-item{margin-left:-10px}
.hob-layout-item img{width:calc(100% + 20px);max-width:none;max-height:100px;object-fit:contain;display:block;filter:drop-shadow(0 1px 1px rgba(15,23,42,.08))}
.hob-layout-composed{box-shadow:inset 0 1px 0 rgba(255,255,255,.8), 0 2px 8px rgba(15,23,42,.04)}
@media (max-width:991.98px){.hob-layout{grid-template-columns:repeat(var(--hob-count,5),minmax(62px,1fr));padding:.35rem}.hob-layout-item{min-height:76px}.hob-layout-item + .hob-layout-item{margin-left:-6px}.hob-layout-item img{width:calc(100% + 12px);max-height:78px}}
@media print{.hob-layout{gap:0;padding:.25rem .3rem;border-radius:7px}.hob-layout-item{min-height:56px}.hob-layout-item + .hob-layout-item{margin-left:-4px}.hob-layout-item img{width:calc(100% + 8px);max-height:56px}.hob-slot-preview{display:none!important}}


/* Override più forte: elementi piano uniti come strip continua */
.hob-layout.hob-layout-composed{
  display:flex!important;
  justify-content:center;
  align-items:center;
  gap:0!important;
  width:fit-content;
  max-width:100%;
  margin:0 auto;
  padding:.45rem .8rem!important;
  overflow:visible!important;
}
.hob-layout.hob-layout-composed .hob-layout-item{
  flex:0 0 auto;
  width:118px;
  min-height:110px;
  margin:0!important;
  overflow:visible!important;
}
.hob-layout.hob-layout-composed .hob-layout-item + .hob-layout-item{margin-left:-34px!important}
.hob-layout.hob-layout-composed .hob-layout-item img{
  width:150px!important;
  max-width:none!important;
  max-height:110px!important;
  object-fit:contain;
}
.hob-layout.hob-layout-composed.hob-layout-3 .hob-layout-item{width:128px}
.hob-layout.hob-layout-composed.hob-layout-4 .hob-layout-item{width:120px}
.hob-layout.hob-layout-composed.hob-layout-5 .hob-layout-item{width:108px}
.hob-layout.hob-layout-composed.hob-layout-6 .hob-layout-item{width:96px}
.hob-layout.hob-layout-composed.hob-layout-7 .hob-layout-item{width:86px}
.hob-layout.hob-layout-composed.hob-layout-3 .hob-layout-item + .hob-layout-item{margin-left:-38px!important}
.hob-layout.hob-layout-composed.hob-layout-4 .hob-layout-item + .hob-layout-item{margin-left:-34px!important}
.hob-layout.hob-layout-composed.hob-layout-5 .hob-layout-item + .hob-layout-item{margin-left:-28px!important}
.hob-layout.hob-layout-composed.hob-layout-6 .hob-layout-item + .hob-layout-item{margin-left:-24px!important}
.hob-layout.hob-layout-composed.hob-layout-7 .hob-layout-item + .hob-layout-item{margin-left:-20px!important}
@media (max-width:991.98px){
  .hob-layout.hob-layout-composed{padding:.35rem .45rem!important}
  .hob-layout.hob-layout-composed .hob-layout-item{width:82px;min-height:80px}
  .hob-layout.hob-layout-composed .hob-layout-item img{width:104px!important;max-height:82px!important}
  .hob-layout.hob-layout-composed .hob-layout-item + .hob-layout-item{margin-left:-18px!important}
  .hob-layout.hob-layout-composed.hob-layout-3 .hob-layout-item{width:94px}
  .hob-layout.hob-layout-composed.hob-layout-7 .hob-layout-item{width:68px}
}
@media print{
  .hob-layout.hob-layout-composed{padding:.18rem .25rem!important}
  .hob-layout.hob-layout-composed .hob-layout-item{width:64px;min-height:58px}
  .hob-layout.hob-layout-composed .hob-layout-item img{width:78px!important;max-height:58px!important}
  .hob-layout.hob-layout-composed .hob-layout-item + .hob-layout-item{margin-left:-12px!important}
}


/* Piano cucina realmente unito: niente celle, niente colonne, solo immagini consecutive */
.hob-one-piece{
  display:flex;
  flex-direction:row;
  align-items:stretch;
  justify-content:flex-start;
  gap:0!important;
  width:max-content;
  max-width:100%;
  margin:0 auto;
  padding:.35rem .45rem;
  border:1px solid #d8dde5;
  border-radius:14px;
  background:#f8fafc;
  overflow-x:auto;
  overflow-y:hidden;
  line-height:0;
  font-size:0;
  white-space:nowrap;
}
.hob-one-piece .hob-piece-img{
  display:block!important;
  flex:0 0 auto!important;
  height:112px!important;
  width:auto!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:contain!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  vertical-align:top!important;
}
.hob-one-piece .hob-piece-img + .hob-piece-img{margin-left:0!important}
@media (max-width:991.98px){
  .hob-one-piece .hob-piece-img{height:88px!important}
}
@media print{
  .hob-one-piece{padding:.18rem .25rem;border-radius:7px;overflow:hidden}
  .hob-one-piece .hob-piece-img{height:58px!important}
}

/* Configurazione forno */
.config-visual-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem;align-items:stretch}
.config-visual-box{height:100%}
.oven-slot-preview{height:88px;border:1px dashed #d1d5db;border-radius:10px;background:#fafafa;display:flex;align-items:center;justify-content:center;padding:.35rem}
.oven-slot-preview img{max-width:100%;max-height:78px;object-fit:contain}
.oven-icons-grid{display:flex;flex-wrap:wrap;gap:.55rem;align-items:center;justify-content:flex-start;border:1px solid var(--line);border-radius:14px;background:#fafafa;padding:.65rem;min-height:96px}
.oven-icon-img{width:58px;height:58px;object-fit:contain;border:1px solid #e5e7eb;border-radius:10px;background:#fff;padding:.25rem}
@media (max-width:991.98px){.config-visual-grid{grid-template-columns:1fr}.oven-icon-img{width:54px;height:54px}}
@media print{.config-visual-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.5rem}.oven-icons-grid{gap:.25rem;padding:.35rem;min-height:50px;border-radius:7px}.oven-icon-img{width:34px;height:34px;border-radius:5px;padding:.12rem}.oven-slot-preview{display:none!important}}

/* Modalità consultazione minimal */
.public-mode{background:#f7f8fa}
.public-navbar .navbar-nav .nav-link{font-size:.95rem}
.public-container{max-width:1500px}
.public-hero{display:flex;justify-content:space-between;align-items:flex-end;gap:1rem;padding:1.25rem 1.35rem;background:#fff;border:1px solid var(--line);border-radius:18px;box-shadow:0 8px 22px rgba(16,24,40,.04)}
.public-filter-card{border-radius:18px}
.public-product-card{display:block;height:100%;background:#fff;border:1px solid var(--line);border-radius:18px;overflow:hidden;text-decoration:none;color:inherit;box-shadow:0 8px 22px rgba(16,24,40,.04);transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease}
.public-product-card:hover{transform:translateY(-2px);box-shadow:0 12px 28px rgba(16,24,40,.08);border-color:#cfd4dc;color:inherit}
.public-product-img-wrap{height:190px;background:#fbfbfc;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:center;padding:1rem}
.public-product-img-wrap img{max-width:100%;max-height:165px;object-fit:contain}
.public-product-placeholder{display:flex;align-items:center;justify-content:center;width:100%;height:100%;border:1px dashed #d1d5db;border-radius:12px;color:#9ca3af;font-weight:700}
.public-product-body{padding:1rem}
.public-product-category{font-size:.75rem;letter-spacing:.1em;text-transform:uppercase;color:#6b7280;font-weight:800;margin-bottom:.35rem}
.public-product-body h2{font-size:1.05rem;line-height:1.25;font-weight:800;margin:0 0 .45rem;color:#111827}
.public-product-code{font-size:.9rem;color:#6b7280}
.public-sheet{max-width:1400px;margin-left:auto;margin-right:auto}
.public-sheet .sheet-thumb-button{border:0;background:transparent;padding:0;cursor:pointer}
.public-footer{border-top:1px solid var(--line);background:#fff;margin-top:2rem}
@media print{.public-navbar,.public-footer,.public-mode .no-print{display:none!important}.public-sheet{max-width:none!important}}


/* Correzione miniature: immagine sempre dentro il riquadro */
.product-thumb{
  display:block;
  width:64px;
  height:64px;
  object-fit:contain!important;
  object-position:center center;
  border-radius:12px;
  border:1px solid #d1d5db;
  background:#fff;
  padding:4px;
  box-sizing:border-box;
}
.gallery-img{
  width:100%;
  height:160px;
  object-fit:contain!important;
  object-position:center center;
  border-radius:14px;
  background:#fff;
  border:1px solid #e5e7eb;
  padding:6px;
  box-sizing:border-box;
}
.public-product-img-wrap{
  height:190px;
  background:#fbfbfc;
  border-bottom:1px solid var(--line);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:.9rem;
  overflow:hidden;
}
.public-product-img-wrap img{
  display:block;
  max-width:100%;
  max-height:100%;
  width:auto;
  height:auto;
  object-fit:contain!important;
  object-position:center center;
}
.sheet-thumb,
.sheet-thumb-button .sheet-thumb{
  object-fit:contain!important;
  object-position:center center;
  background:#fff;
  padding:3px;
  box-sizing:border-box;
}


/* Navbar più compatta e organizzata */
.app-navbar .navbar-collapse{gap:1rem}
.app-nav-groups{gap:.1rem .15rem}
.app-navbar .compact-nav-link{
  font-size:.93rem;
  font-weight:700;
  border-radius:9px;
  padding:.35rem .58rem;
  margin:.06rem;
  white-space:nowrap;
}
.app-navbar .nav-item.dropdown .compact-nav-link{display:flex;align-items:center;gap:.25rem}
.app-nav-tools{row-gap:.5rem}
.app-nav-search .form-control{width:170px;min-width:140px}
.app-dropdown-menu{border-radius:12px;border:1px solid #d6dbe3;box-shadow:0 10px 30px rgba(16,24,40,.12);padding:.35rem}
.app-dropdown-menu .dropdown-item{border-radius:8px;padding:.5rem .75rem;font-size:.94rem}
.app-dropdown-menu .dropdown-item.active,
.app-dropdown-menu .dropdown-item:active{background:#eef2f7;color:#111827}
@media (min-width:1200px){
  .app-navbar .container-fluid{column-gap:1rem}
  .app-nav-search .form-control{width:150px}
}
@media (max-width:1199.98px){
  .app-nav-search .form-control{width:130px}
}
@media (max-width:991.98px){
  .app-navbar .navbar-collapse{padding-top:.75rem}
  .app-nav-groups{align-items:stretch!important}
  .app-navbar .compact-nav-link{padding:.5rem .65rem}
  .app-nav-tools{margin-top:.6rem}
  .app-nav-search{width:100%}
  .app-nav-search .form-control{width:100%;min-width:0}
}


/* Configurazione piano: supporto 2 elementi */
.hob-layout.hob-layout-composed.hob-layout-2 .hob-layout-item{width:138px}
.hob-layout.hob-layout-composed.hob-layout-2 .hob-layout-item + .hob-layout-item{margin-left:-42px!important}
@media (max-width:991.98px){.hob-layout.hob-layout-composed.hob-layout-2 .hob-layout-item{width:102px}.hob-layout.hob-layout-composed.hob-layout-2 .hob-layout-item + .hob-layout-item{margin-left:-24px!important}}


/* Documenti prodotto */
.doc-standard-folder{border:1px solid var(--line);border-radius:12px;background:#fafafa;padding:.75rem .9rem;font-weight:700;color:#374151}
.product-docs-box{break-inside:avoid;page-break-inside:avoid}
.product-docs-list{display:flex;flex-direction:column;gap:.75rem}
.product-docs-folder{border:1px solid #e5e7eb;border-radius:12px;overflow:hidden;background:#fff}
.product-docs-folder-title{background:#f3f4f6;color:#111827;font-weight:900;text-transform:uppercase;letter-spacing:.06em;font-size:.78rem;padding:.65rem .8rem;border-bottom:1px solid #e5e7eb}
.product-docs-files{display:flex;flex-direction:column}
.product-doc-link{display:grid;grid-template-columns:auto 1fr auto;gap:.6rem;align-items:center;padding:.6rem .75rem;border-bottom:1px solid #f0f1f3;text-decoration:none;color:#111827}
.product-doc-link:last-child{border-bottom:0}
.product-doc-link:hover{background:#fafafa;color:#111827}
.doc-ext{font-size:.68rem;font-weight:900;letter-spacing:.05em;color:#fff;background:#6b7280;border-radius:8px;padding:.25rem .42rem;min-width:42px;text-align:center}
.doc-name{font-weight:700;word-break:break-word}
.doc-size{font-size:.78rem;color:#6b7280;white-space:nowrap}
@media print{.product-doc-link{padding:.35rem .5rem;font-size:10.5px}.doc-ext{background:#e5e7eb!important;color:#111!important}.doc-size{font-size:10px}.product-docs-folder-title{padding:.35rem .5rem;font-size:.68rem}}


/* Documenti prodotto a fine scheda - full width */
.product-docs-full{
  width:100%;
  border:1px solid var(--line);
  border-radius:18px;
  background:#fff;
  padding:1.05rem;
  break-inside:avoid;
  page-break-inside:avoid;
}
.product-docs-full-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-end;
  gap:1rem;
  margin-bottom:.95rem;
  padding-bottom:.75rem;
  border-bottom:1px solid var(--line);
}
.product-docs-subtitle{font-size:.88rem;color:#6b7280}
.product-docs-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:.9rem;
  align-items:start;
}
.product-docs-card{
  height:100%;
  border:1px solid #e2e6ee;
  border-radius:14px;
  overflow:hidden;
  background:#fff;
  box-shadow:0 2px 8px rgba(16,24,40,.035);
}
.product-docs-card .product-docs-folder-title{
  background:#f3f4f6;
  color:#111827;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.07em;
  font-size:.76rem;
  padding:.7rem .85rem;
  border-bottom:1px solid #e2e6ee;
}
.product-docs-card .product-doc-link{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  gap:.55rem;
  align-items:center;
  padding:.62rem .75rem;
  border-bottom:1px solid #eef0f3;
  text-decoration:none;
  color:#111827;
}
.product-docs-card .product-doc-link:last-child{border-bottom:0}
.product-docs-card .product-doc-link:hover{background:#fafafa;color:#111827}
.product-docs-card .doc-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:700}
@media (max-width:767.98px){
  .product-docs-grid{grid-template-columns:1fr}
  .product-docs-full{padding:.85rem}
  .product-docs-card .doc-name{white-space:normal}
}
@media print{
  .product-docs-full{border:1px solid #d1d5db!important;border-radius:8px!important;padding:.55rem!important;break-inside:auto;page-break-inside:auto}
  .product-docs-full-head{margin-bottom:.45rem;padding-bottom:.35rem}
  .product-docs-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.45rem}
  .product-docs-card{break-inside:avoid;page-break-inside:avoid;border-radius:6px!important;box-shadow:none!important}
  .product-docs-card .product-docs-folder-title{padding:.35rem .45rem!important;font-size:.68rem!important}
  .product-docs-card .product-doc-link{padding:.32rem .42rem!important;font-size:10.5px!important}
  .product-docs-subtitle{display:none!important}
}


/* Login e utenti */
.login-page{min-height:100vh;background:linear-gradient(135deg,#1f2328,#3a3f47);display:flex;align-items:center;justify-content:center;padding:2rem}
.login-wrap{width:100%;max-width:430px}
.login-card{border-radius:22px;box-shadow:0 18px 55px rgba(0,0,0,.25)}
.login-logo{max-width:220px;width:75%;height:auto;background:#1f2328;border-radius:12px;padding:.75rem}
.auth-user-label{white-space:nowrap}


/* Log modifiche */
.log-table th{font-size:.78rem;text-transform:uppercase;letter-spacing:.06em;color:#6b7280;background:#f8fafc}
.log-details{max-width:560px;max-height:260px;overflow:auto;background:#111827;color:#e5e7eb;border-radius:10px;padding:.75rem;font-size:.78rem;white-space:pre-wrap}
