/* Forza la modal sopra a tutto */
.modal { 
  z-index: 20000 !important; 
}
.modal-backdrop { 
  z-index: 19990 !important; 
}

/* Evita che la barra #sopra stia sopra alla modal */
#sopra { 
  z-index: 1 !important; 
}

/* La tua topbar sticky non deve superare la modal */
.inv-topbar { 
  z-index: 1030 !important; 
}



.datepicker {margin-top: 32px;}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    height: 60px;
    background-color: #f5f5f5;
}

body{
  font-size: 15px;
}

.table{
  font-size: .98rem;
}

.form-group{
  margin-bottom: 1rem;
}

/* Native date inputs are short values; keep them compact instead of full-column width. */
.form-group > input.form-control[type="date"],
td input.form-control[type="date"],
td > input[type="date"].form-control{
  display: inline-block;
  width: min(100%, 12rem);
  min-width: 10.5rem;
}

input.form-control[type="date"]::-webkit-calendar-picker-indicator{
  cursor: pointer;
}

.doc-shell{
  width:min(1180px, calc(100vw - 40px));
  margin:1rem auto 3rem;
}

.doc-backlink{
  margin:0 0 1rem;
}

.doc-backlink .btn{
  border-radius:999px;
  padding:.45rem .9rem;
}

.doc-card{
  background:#fff;
  border:1px solid #d8e0ea;
  border-radius:18px;
  box-shadow:0 18px 40px rgba(15, 23, 42, .08);
  padding:1rem 1.25rem;
  margin-bottom:1rem;
}

.doc-meta-table{
  margin-bottom:0;
}

.doc-meta-table > :not(caption) > * > *{
  border-bottom:0;
  padding:.55rem .65rem;
  vertical-align:middle;
}

.doc-meta-table td:first-child{
  width:180px;
  color:#475569;
  font-weight:600;
}

.doc-meta-table input[type="text"],
.doc-meta-table input[type="date"],
.doc-meta-table textarea,
.doc-meta-table select{
  max-width:420px;
}

.doc-card--table{
  padding:0;
  overflow:hidden;
}

.doc-card--table .table-responsive{
  padding:0;
}

.doc-detail-table{
  margin-bottom:0;
}

.doc-detail-table thead tr:first-child th{
  background:linear-gradient(135deg, #24486c, #16314d);
  color:#fff;
  border:0;
  font-size:1rem;
  letter-spacing:.02em;
  padding:.9rem 1rem;
}

.doc-detail-table thead tr:nth-child(2) th{
  background:#edf2f7;
  color:#1f2937;
  border-color:#d6dee8;
  font-weight:700;
}

.doc-detail-table tbody td{
  vertical-align:middle;
}

.doc-card--footer{
  text-align:center;
}

.doc-card--footer .btn,
.doc-card--footer input[type="button"],
.doc-card--footer input[type="submit"]{
  border-radius:999px;
  padding:.5rem 1rem;
}

.doc-card .btn{
  border-radius:999px;
}

.doc-list-table{
  margin-bottom:0;
}

.doc-list-table thead tr:first-child th{
  background:linear-gradient(135deg, #24486c, #16314d);
  color:#fff;
  border:0;
  font-size:1rem;
  letter-spacing:.02em;
  padding:.9rem 1rem;
}

.doc-list-table thead tr:nth-child(2) th{
  background:#edf2f7;
  color:#1f2937;
  border-color:#d6dee8;
  font-weight:700;
  vertical-align:middle;
}

.doc-list-table tbody td{
  vertical-align:middle;
}

.doc-list-table a{
  text-decoration:none;
}

.doc-sort-link{
  display:inline-flex;
  align-items:center;
  gap:.35rem;
  color:#334155;
  font-weight:700;
}

.doc-sort-link:hover,
.doc-sort-link:focus{
  color:#2563eb;
}

.doc-sort-link.is-active{
  color:#2563eb;
}

.doc-sort-link .bi{
  font-size:.8rem;
}

.doc-row-link{
  color:#2563eb;
  font-weight:700;
}

.doc-row-link:hover,
.doc-row-link:focus{
  color:#1d4ed8;
  text-decoration:underline;
}

.btn-block{
  display:block;
  width:100%;
}

.btn-default{
  color:#1f2937;
  background-color:#f8fafc;
  border-color:#cbd5e1;
}

.access-page{
  min-height:100vh;
  margin:0;
  background:
    radial-gradient(circle at top left, rgba(59,130,246,.14), transparent 28%),
    radial-gradient(circle at bottom right, rgba(15,23,42,.10), transparent 30%),
    linear-gradient(180deg, #eef4fb 0%, #f8fbff 45%, #edf2f8 100%);
  color:#0f172a;
}

.access-shell{
  min-height:100vh;
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:20px 20px 32px;
}

.access-card{
  width:min(460px, 100%);
  background:#fff;
  border:1px solid #d8e0ea;
  border-radius:24px;
  box-shadow:0 20px 48px rgba(15,23,42,.12);
  padding:28px 28px 22px;
  text-align:center;
}

.access-logo{
  display:block;
  width:auto;
  max-width:min(260px, 74%);
  height:auto;
  max-height:118px;
  object-fit:contain;
  margin:0 auto 18px;
}

.access-title{
  margin:0;
  font-size:34px;
  line-height:1.05;
  font-weight:800;
  color:#16314d;
  letter-spacing:-.03em;
}

.access-subtitle{
  margin:10px 0 0;
  color:#64748b;
  font-size:15px;
  line-height:1.5;
}

.access-error{
  margin:20px 0 0;
  padding:12px 14px;
  border-radius:14px;
  background:#fff1f2;
  border:1px solid #fecdd3;
  color:#be123c;
  font-weight:700;
  font-size:14px;
}

.access-form{
  margin-top:24px;
  text-align:left;
}

.access-field{
  margin-bottom:16px;
}

.access-label{
  display:block;
  margin-bottom:7px;
  color:#334155;
  font-size:14px;
  font-weight:700;
}

.access-input{
  width:100%;
  height:52px;
  border:1px solid #cbd5e1;
  border-radius:16px;
  padding:0 16px;
  font-size:16px;
  color:#0f172a;
  background:#f8fafc;
  outline:none;
  transition:border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.access-input:focus{
  border-color:#60a5fa;
  background:#fff;
  box-shadow:0 0 0 4px rgba(59,130,246,.16);
}

.access-submit{
  width:100%;
  height:52px;
  border:0;
  border-radius:999px;
  background:linear-gradient(135deg, #2563eb, #1d4ed8);
  color:#fff;
  font-size:15px;
  font-weight:800;
  letter-spacing:.02em;
  text-transform:uppercase;
  box-shadow:0 14px 28px rgba(37,99,235,.22);
  transition:transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.access-submit:hover,
.access-submit:focus{
  filter:brightness(1.03);
  transform:translateY(-1px);
  box-shadow:0 18px 34px rgba(37,99,235,.24);
}

.access-footer{
  margin-top:22px;
  color:#64748b;
  font-size:12px;
  line-height:1.5;
  text-align:center;
}

.btn-default:hover,
.btn-default:focus{
  color:#0f172a;
  background-color:#e2e8f0;
  border-color:#94a3b8;
}

.btn-xs{
  padding:.2rem .45rem;
  font-size:.75rem;
  line-height:1.3;
  border-radius:.3rem;
}

.pull-right{ float:right !important; }
.pull-left{ float:left !important; }
.center-block{ display:block; margin-left:auto; margin-right:auto; }
.text-left{ text-align:left !important; }
.text-right{ text-align:right !important; }
.text-center{ text-align:center !important; }

.img-responsive{
  display:block;
  max-width:100%;
  height:auto;
}

.well{
  min-height:20px;
  padding:1rem;
  margin-bottom:1rem;
  background-color:#f8fafc;
  border:1px solid #dbe2ea;
  border-radius:.5rem;
}

.table-condensed > :not(caption) > * > *{
  padding:.4rem;
}

.input-group-addon{
  display:flex;
  align-items:center;
  padding:.375rem .75rem;
  color:#495057;
  text-align:center;
  white-space:nowrap;
  background-color:#e9ecef;
  border:1px solid #ced4da;
}

.input-group > .form-control + .input-group-addon,
.input-group > .form-select + .input-group-addon{
  border-left:0;
  border-top-right-radius:.375rem;
  border-bottom-right-radius:.375rem;
}

.input-group-addon .glyphicon{
  margin:0;
}

.has-danger .form-control,
.has-danger .form-select{
  border-color:#dc3545;
}

.has-danger .control-label,
.has-danger .form-control-feedback,
.has-danger .help-block{
  color:#dc3545;
}

.control-label{
  font-weight:600;
}

.label{
  display:inline-block;
  padding:.35em .65em;
  font-size:.75em;
  font-weight:700;
  line-height:1;
  color:#fff;
  text-align:center;
  white-space:nowrap;
  vertical-align:baseline;
  border-radius:.375rem;
  background:#6c757d;
}

.label-default{ background:#6c757d; }
.label-primary{ background:#0d6efd; }
.label-success{ background:#198754; }
.label-info{ background:#0dcaf0; color:#052c65; }
.label-warning{ background:#ffc107; color:#332701; }
.label-danger{ background:#dc3545; }

[class*="col-xs-"]{
  position:relative;
  min-height:1px;
}

.col-xs-1{ width:8.33333333%; float:left; }
.col-xs-2{ width:16.66666667%; float:left; }
.col-xs-3{ width:25%; float:left; }
.col-xs-4{ width:33.33333333%; float:left; }
.col-xs-5{ width:41.66666667%; float:left; }
.col-xs-6{ width:50%; float:left; }
.col-xs-7{ width:58.33333333%; float:left; }
.col-xs-8{ width:66.66666667%; float:left; }
.col-xs-9{ width:75%; float:left; }
.col-xs-10{ width:83.33333333%; float:left; }
.col-xs-11{ width:91.66666667%; float:left; }
.col-xs-12{ width:100%; float:left; }

.glyphicon{
  position:relative;
  top:1px;
  display:inline-block;
  font-family:"bootstrap-icons" !important;
  font-style:normal;
  font-weight:400 !important;
  line-height:1;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

.glyphicon:before{ display:inline-block; }
.glyphicon-calendar:before{ content:"\\f1f6"; }
.glyphicon-print:before{ content:"\\f4c8"; }
.glyphicon-edit:before{ content:"\\f4ca"; }
.glyphicon-ok:before{ content:"\\f26a"; }
.glyphicon-check:before{ content:"\\f26a"; }
.glyphicon-unchecked:before{ content:"\\f28a"; }
.glyphicon-thumbs-down:before{ content:"\\f406"; }
.glyphicon-chevron-left:before{ content:"\\f12f"; }
.glyphicon-chevron-right:before{ content:"\\f138"; }

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

    .bd{
    position: relative;
    padding: 1rem;
    margin: 1rem -1rem;
    border: solid #f7f7f9;
    border-width: .2rem;
    }
    
.Tipologia{
	    font-size: 12px;
    }
    
.Valore{
	text-align: center;
    }
.ValoreT{
	text-align: right;
	font-weight: bold;
    }
    
 .table-costopasto{
	 width: 99% !important;
	 border-top: 1px gray;
	 border-bottom: 1px gray;
	 }
	 
.quantitainv{
text-align: right;
}

        /* Stile per l'avviso */
.avviso {
            display: none;
            padding: 10px;
            background-color: #4CAF50; /* Verde */
            color: white;
            margin-top: 10px;
            position: fixed;
            top:10px;
            
            
        }
 .select2-container { 
  flex: 1 1 auto; 
  min-width: 0; 
  width: 100% !important;
}

/* Overlay a schermo intero per problemi rete */
  #netOverlay {
    position: fixed; inset: 0; z-index: 99997; display: none;
    background: rgba(0,0,0,.35);
    backdrop-filter: blur(2px);
  }

  /* Banner unico in alto */
  #netBanner {
    position: fixed; left: 0; right: 0; top: 0; z-index: 99998;
    display: none; padding: 12px 16px; text-align: center; font-weight: 600;
    box-shadow: 0 2px 8px rgba(0,0,0,.15);
  }
  #netBanner.ok   { background:#e6ffed; color:#0a4; }
  #netBanner.warn { background:#fff8e1; color:#8a6d3b; }
  #netBanner.err  { background:#ffe6e6; color:#a00; }

  /* Spazio per evitare che il contenuto stia sotto al banner quando visibile */
  body.with-banner { padding-top: 56px; }



/* Toast area (salvataggi / messaggi rapidi) */
#toastArea{
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

#toastArea .toast{
  pointer-events: auto;
  background: rgba(15,23,42,.95);
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  font-weight: 600;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  animation: toastFade .25s ease-out;
}

@keyframes toastFade {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Non farlo sparire quando c'è sync-pending */
.sync-pending #toastArea { opacity: 1 !important; }


/* MODULO INVENTARIO CSS */

.section-inv-header{
  background: #F1F5F9;
  border-left: 6px solid #2563EB;
  color:#0F172A;
  font-weight:700;
  letter-spacing:.04em;
  text-transform:uppercase;
}

.section-inv-header td{
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-top: 2px solid #c7d2fe;
  border-bottom: 1px solid #c7d2fe;
  padding: 10px 12px;
}

.section-inv-header{
  position: static;
  z-index: 1;
}

.inv-topbar{
  background: rgba(248,250,252,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #E2E8F0;
  z-index: 1030;
}
.inv-card{
  background:#fff;
  border:1px solid #E2E8F0;
  border-radius:16px;
  padding:16px;
  box-shadow: 0 10px 30px rgba(15,23,42,.06);
}
.inv-title{
  font-size:22px;
  font-weight:800;
  color:#0F172A;
}

.inv-local-select-wrap{
  width: min(100%, 560px);
  max-width: 560px;
}

.inv-local-select{
  width: 100%;
}

.inv-filter-card .select2-container{
  width: min(100%, 560px) !important;
  max-width: 560px;
}

.inv-filter-card .select2-container .select2-selection--single{
  min-height: 46px;
  border: 1px solid #CBD5E1;
  border-radius: 8px;
  display: flex;
  align-items: center;
}

.inv-filter-card .select2-container .select2-selection__rendered{
  color: #1F2937;
  font-size: 17px;
  font-weight: 650;
  line-height: 44px;
  padding-left: 14px;
  padding-right: 34px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inv-local-select-dropdown{
  min-width: 560px;
}

.inv-local-select-dropdown .select2-results__option{
  font-size: 16px;
  line-height: 1.25;
  padding: 10px 14px;
  white-space: normal;
}

.inv-local-select-dropdown .select2-search__field{
  min-height: 38px;
  font-size: 16px;
  padding: 6px 10px;
}

@media (max-width: 640px){
  .inv-local-select-wrap,
  .inv-filter-card .select2-container{
    width: 100% !important;
    max-width: 100%;
  }

  .inv-local-select-dropdown{
    min-width: 0;
  }
}
.inv-subtitle{
  font-size:14px;
}
.inv-badge{
  background:#2563EB;
  color:#fff;
  border-radius:999px;
  padding:6px 10px;
}

/* Quantity sheet */
.qty-sheet{
  border-radius: 18px;
  overflow: hidden;
}

.qty-title{
  font-weight: 800;
  font-size: 18px;
  line-height: 1.2;
}

.qty-sub{
  font-size: 14px;
}

.qty-label{
  font-weight: 700;
  color: #0F172A;
}

.qty-display{
  font-size: 34px;
  font-weight: 900;
  letter-spacing: .02em;
  padding: 6px 12px;
  border-radius: 12px;
  background: #F1F5F9;
  min-width: 120px;
  text-align: right;
}

.qty-quick{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.qty-pad{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.qty-key{
  height: 56px;
  font-size: 20px;
  font-weight: 800;
  border-radius: 14px;
}

.qty-back{
  font-size: 18px;
}

.qty-footer{
  position: sticky;
  bottom: 0;
  background: #fff;
  border-top: 1px solid #E2E8F0;
}

/* Display quantità "selezionato" (replace mode) */
.qty-display {
  transition: box-shadow .15s ease, transform .15s ease, background-color .15s ease;
}

.qty-display.is-active {
  background: #eef2ff;                 /* leggero azzurrino */
  box-shadow: 0 0 0 4px rgba(37,99,235,.25);
  transform: scale(1.02);
}

/* Piccolo "tap feedback" sui tasti */
.qty-key {
  transition: transform .05s ease, box-shadow .05s ease;
}

.qty-key:active {
  transform: scale(0.98);
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.08);
}

/* “Card rows” */
.table.inv-table{
  border-collapse: separate;
  border-spacing: 0 10px; /* spazio tra righe */
}

.table.inv-table tbody tr.inv-row{
  background:#fff;
  border:1px solid #e2e8f0;
  border-radius:14px;
  box-shadow: 0 6px 18px rgba(15,23,42,.06);
  overflow:hidden;
}

/* cell padding più “touch” */
.table.inv-table td, .table.inv-table th{
  padding: 14px 14px;
  vertical-align: middle;
  border-top: 0 !important;
}

.inv-num{
  font-variant-numeric: tabular-nums;
}
.inv-price, .inv-total{
  text-align:right;
  font-weight:700;
}
.inv-price{
  color:#0f172a;
  opacity:.75;
  font-weight:600;
}
.inv-total{
  font-size: 18px;
}

.quantitainv{
  width: 92px;            /* comodo su 9" */
  height: 48px;
  border-radius: 12px;
  text-align: center;
  font-size: 20px;
  font-weight: 800;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
}

.quantitainv::placeholder{ color:#94a3b8; }

.inv-row.is-done{
  border-color: rgba(34,197,94,.35);
  box-shadow: 0 8px 22px rgba(34,197,94,.10);
}

.inv-row.is-zero{
  opacity: .95;
}


.inv-prod{
  font-size: 18px;
  font-weight: 900;
  line-height: 1.15;
}
.inv-forn{
  font-size: 13px;
  color:#64748b;
  font-weight: 700;
  letter-spacing: .02em;
}
.inv-um{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 44px;
  height: 34px;
  padding: 0 10px;
  border-radius: 999px;
  background:#eef2ff;
  color:#1e40af;
  font-weight:800;
}

.section-inv-header{
  position: static;
  z-index: 1;
}


.inv-table-wrap{
  background: #fff;
  border: 1px solid #dbe2ea;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.inv-table{
  --bs-table-bg: #fff;
  --bs-table-striped-bg: #f8fafc;
  --bs-table-hover-bg: #f1f5f9;
  margin-bottom: 0;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 1.06rem;
}

.inv-table > :not(caption) > * > *{
  padding: 1.05rem 1rem;
  vertical-align: middle;
  border-bottom: 0;
  border-left: 0;
  border-right: 0;
}

.inv-table tr.inv-row td,
.inv-table tr.inv-row th{
  background: #fff;
  box-shadow: inset 0 -1px 0 #eef2f7;
}

.inv-table tbody tr.inv-row:last-of-type td{
  box-shadow: none;
}

.inv-table .quantitainv{
  max-width: 90px;
  min-width: 90px;
  text-align: center;
  font-size: 1.55rem;
  font-weight: 700;
  border-radius: 14px;
}

.inv-table .col-um{
  width: 70px;
  text-align: center;
  white-space: nowrap;
}

.inv-table .col-prezzo,
.inv-table .col-totale{
  width: 110px;
  text-align: right;
  white-space: nowrap;
  font-weight: 700;
}

.inv-table .col-qta{
  width: 110px;
  text-align: center;
}

.inv-table .prodotto-main{
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1.2;
  color: #111827;
}

.inv-table .prodotto-sub{
  margin-top: 0.2rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: #4b5563;
}

.inv-table .section-inv-header td{
  background: #eff6ff !important;
  color: #1e3a8a;
  font-size: 0.95rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #bfdbfe;
}


.inv-toolbar-head{
  margin-bottom: 1rem;
}

.inv-meta{
  font-size: .95rem;
  font-weight: 600;
  color: #64748B;
}

.inv-toolbar-filters .form-label{
  font-size: 1rem;
  font-weight: 700;
  color: #0F172A;
  margin-bottom: .35rem;
}

.inv-toolbar-filters .form-select,
.inv-toolbar-filters .form-control{
  min-height: 54px;
  border-radius: 14px;
  font-size: 1.05rem;
}

.inv-toolbar-filters .form-control::placeholder{
  color: #6B7280;
}

.inv-page-shell{
  max-width: 1560px;
  margin: 0 auto;
  padding: 24px 22px 36px 22px;
}

.inv-page-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

.inv-page-title{
  margin:0;
  color:#0f172a;
  font-size:32px;
  font-weight:800;
  letter-spacing:-.02em;
}

.inv-page-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.inv-filter-card{
  background:#fff;
  border:1px solid #dbe2ea;
  border-radius:18px;
  box-shadow:0 8px 24px rgba(15,23,42,.06);
  padding:18px 20px;
  margin-bottom:18px;
}

.inv-filter-card table{
  margin-bottom:0;
}

.inv-filter-card--search{
  margin-top:14px;
}

.inv-status-line{
  margin: 6px 0 16px 0;
  color:#475569;
  font-size:15px;
  font-weight:600;
}

.inv-search-meta{
  margin: 8px 0 14px 0;
  color:#475569;
  font-size:15px;
  font-weight:600;
}

.inv-search-meta span{
  color:#0f766e;
  font-weight:800;
}

.inv-table-actions{
  display:flex;
  justify-content:flex-end;
  margin: 0 0 14px 0;
}

.inv-muted{
  color:#334155;
  font-weight:600;
}

.inv-product-cell{
  min-width: 340px;
}

.inv-col-prev{
  background:#f8fafc;
}

.inv-table thead th{
  background:#d7e6eb;
  color:#1f2937;
  font-size:16px;
  font-weight:800;
  border-bottom:1px solid #c1d4db;
}

.inv-head-row td{
  background:#d7e6eb;
  color:#1f2937;
  font-size:16px;
  font-weight:800;
  border-bottom:1px solid #c1d4db !important;
}

.inv-table .section-inv-header td{
  background: #fef3c7 !important;
  color: #854d0e;
  border-bottom: 1px solid #fcd34d;
  font-size: 1.04rem;
}

.inv-table .inv-col-prev,
.inv-table td.inv-col-prev{
  text-align:center;
  color:#475569;
  font-weight:700;
}

.inv-prev-link{
  color:#1d4ed8;
  font-weight:800;
  text-decoration:none;
  border-bottom:1px dashed rgba(29,78,216,.35);
}

.inv-prev-link:hover{
  color:#1e3a8a;
  border-bottom-color:rgba(30,58,138,.65);
}

.inv-table td,
.inv-table th,
.inv-table font,
.inv-table b,
.inv-table strong{
  font-size: inherit;
}

.inv-table td{
  color:#1f2937;
}

.inv-table .inv-muted{
  font-size: 1rem;
}

.inv-table .inv-price,
.inv-table .inv-total,
.inv-table .inv-num{
  font-size: 1.02rem;
}

.inv-table .col-qta{
  text-align:center;
}

.inv-table .col-prezzo,
.inv-table .col-totale,
.inv-table .inv-total,
.inv-table .inv-price{
  text-align:right;
}

.inv-table .inv-total{
  color:#0f172a;
  font-weight:800;
}

.inv-row-focus td{
  background:#eff6ff !important;
  box-shadow: inset 0 0 0 1px #93c5fd, inset 0 -1px 0 #bfdbfe !important;
}

.inv-add-subtitle{
  margin-top:.2rem;
  color:#64748b;
  font-size:.95rem;
}

.inv-add-search-form{
  margin-bottom:1rem;
}

.inv-add-results-head{
  margin-bottom:.85rem;
  color:#334155;
  font-size:1rem;
}

.inv-add-results-wrap{
  border:1px solid #e2e8f0;
  border-radius:16px;
  overflow:hidden;
}

.inv-add-results-table{
  margin-bottom:0;
}

.inv-add-results-table th{
  background:#f8fafc;
  color:#334155;
  font-size:.92rem;
  font-weight:800;
}

.inv-add-results-table td{
  vertical-align:middle;
}

.inv-add-empty-state{
  padding:1.25rem;
  border:1px dashed #cbd5e1;
  border-radius:14px;
  color:#64748b;
  text-align:center;
}

@media (max-width: 992px){
  .inv-page-shell{
    padding: 18px 14px 28px 14px;
  }

  .inv-page-header{
    flex-direction:column;
    align-items:flex-start;
  }
}
/* Flash breve quando aggiorni display */
@keyframes qtyFlash {
  0%   { box-shadow: 0 0 0 0 rgba(37,99,235,.0); }
  40%  { box-shadow: 0 0 0 6px rgba(37,99,235,.18); }
  100% { box-shadow: 0 0 0 0 rgba(37,99,235,.0); }
}
.qty-display.flash {
  animation: qtyFlash .18s ease-out;
}

/* Footer della modal sempre visibile */
.qty-footer{
  position: sticky;      /* resta in fondo quando scrolli */
  bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,.08);
  padding: 12px;
  z-index: 2;
  gap: 10px;
}




/* Mobile: bottoni grandi e larghi */
@media (max-width: 576px){
  .qty-footer{
    display: flex;
    flex-direction: row;
  }
  .qty-footer .qty-cancel{
    flex: 1 1 40%;
    height: 52px;
    font-size: 18px;
    border-radius: 12px;
  }
  .qty-footer .qty-ok{
    flex: 1 1 60%;
    height: 52px;
    font-size: 18px;
    font-weight: 700;
    border-radius: 12px;
  }
}

.inv-head-price{
  font-size: 15px;
  font-weight: 600;
  color: #64748b;
}

.inv-head-total{
  font-size: 18px;
  font-weight: 800;
  color: #0f172a;
}

.inv-price-value{
  font-size: 18px;
  font-weight: 600;
  color: #667085;
  line-height: 1.1;
}

.inv-total-value{
  font-size: 22px;
  font-weight: 800;
  color: #111827;
  line-height: 1.1;
}

.inv-col-values{
  text-align: right;
}

.inv-col-values .inv-price-value{
  margin-bottom: 2px;
}



/* Desktop: lascia più “normale” */
@media (min-width: 577px){
  .qty-footer .qty-cancel,
  .qty-footer .qty-ok{
    min-width: 120px;
  }
}
@supports (padding: max(0px)) {
  .qty-footer {
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }
}
body.modal-open { overflow: hidden !important; }

/* MEGA MENU TOPBAR */
:root {
  --menu-bg: #16324f;
  --menu-bg-2: #20496f;
  --menu-surface: #ffffff;
  --menu-surface-2: #f5f8fc;
  --menu-border: #d8e2ef;
  --menu-text: #1f2f3d;
  --menu-muted: #698094;
  --menu-accent: #c58a23;
  --menu-shadow: 0 18px 48px rgba(19, 35, 52, 0.16);
}

body {
  --page-menu-gap: 24px;
  padding-top: calc(132px + var(--page-menu-gap));
}

.salus-topmenu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: linear-gradient(135deg, var(--menu-bg) 0%, var(--menu-bg-2) 100%);
  box-shadow: 0 10px 32px rgba(17, 37, 59, 0.18);
  color: #fff;
}

.salus-topmenu a {
  text-decoration: none;
}

.salus-topmenu select,
.salus-topmenu input,
.salus-topmenu button {
  font-size: 13px !important;
}

.menu-shell {
  max-width: none;
  margin: 0 auto;
  padding: 10px 12px 0 12px;
}

.menu-context {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding-bottom: 12px;
}

.menu-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.menu-brand-mark {
  width: 92px;
  height: 54px;
  border-radius: 12px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(255,255,255,0.34);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 15px;
  box-shadow: 0 6px 18px rgba(7, 20, 36, 0.16);
  overflow: hidden;
  flex: 0 0 auto;
}

.menu-brand-mark img {
  display: block;
  max-width: 78px;
  max-height: 42px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.menu-brand-mark span {
  display: none;
}

.menu-brand-text {
  min-width: 0;
}

.menu-brand-text strong {
  display: block;
  font-size: 18px;
  line-height: 1.1;
}

.menu-brand-text span {
  display: block;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.menu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.menu-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-size: 12px;
  line-height: 1;
}

.menu-chip b {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}

.menu-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.menu-control-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 6px 10px;
}

.menu-control-card label {
  margin: 0;
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  font-weight: 600;
}

.menu-control-card select {
  min-width: 110px;
  border: 0;
  border-radius: 10px;
  color: var(--menu-text);
  background: #fff;
  padding: 5px 8px;
}

.menu-nav {
  position: relative;
  display: flex;
  align-items: stretch;
  gap: 6px;
  padding: 0 0 14px 0;
  overflow: visible;
}

.menu-nav::-webkit-scrollbar {
  height: 8px;
}

.menu-nav::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.22);
  border-radius: 999px;
}

.menu-home,
.mega-item > summary,
.menu-user > summary {
  list-style: none;
  cursor: pointer;
  border-radius: 14px;
  padding: 10px 12px;
  border: 1px solid transparent;
  background: rgba(255,255,255,0.06);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.mega-item > summary::-webkit-details-marker,
.menu-user > summary::-webkit-details-marker {
  display: none;
}

.menu-home:hover,
.mega-item > summary:hover,
.menu-user > summary:hover,
.mega-item[open] > summary,
.menu-user[open] > summary {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.18);
}

.menu-user {
  position: relative;
}

.mega-panel,
.menu-user-panel {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 280px;
  background: var(--menu-surface);
  color: var(--menu-text);
  border: 1px solid var(--menu-border);
  border-radius: 20px;
  box-shadow: var(--menu-shadow);
  padding: 18px;
}

.mega-panel {
  width: min(980px, calc(100vw - 36px));
  max-height: calc(100vh - 170px);
  overflow: auto;
}

.menu-user-panel {
  right: 0;
  left: auto;
  width: 260px;
}

.mega-head {
  margin-bottom: 14px;
}

.mega-title {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #10273d;
  margin-bottom: 4px;
}

.mega-subtitle {
  display: block;
  color: var(--menu-muted);
  font-size: 13px;
}

.mega-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.mega-col {
  background: var(--menu-surface-2);
  border: 1px solid var(--menu-border);
  border-radius: 16px;
  padding: 14px;
}

.mega-col-title {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .05em;
  font-weight: 700;
  color: var(--menu-accent);
  margin-bottom: 10px;
}

.mega-link {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--menu-text);
  border: 1px solid transparent;
  margin-bottom: 8px;
  transition: background .15s ease, border-color .15s ease;
}

.mega-link:last-child {
  margin-bottom: 0;
}

.mega-link:hover,
.mega-link.is-active {
  background: #fff;
  border-color: var(--menu-border);
}

.mega-link-title {
  display: block;
  font-weight: 700;
  font-size: 14px;
}

.mega-link-note {
  display: block;
  color: var(--menu-muted);
  font-size: 12px;
  margin-top: 3px;
  line-height: 1.35;
}

.menu-user-panel .mega-link {
  margin-bottom: 6px;
}

.menu-mobile-toggle {
  display: none;
}

.menu-mobile-toggle-bars {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}

.menu-mobile-toggle-bars span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

@media (max-width: 1080px) {
  body {
    padding-top: calc(88px + var(--page-menu-gap));
  }

  .menu-shell {
    padding: 10px 12px 0 12px;
  }

  .menu-context {
    grid-template-columns: 1fr auto;
    padding-bottom: 0;
  }

  .menu-chips {
    display: none;
  }

  .menu-brand {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
  }

  .menu-controls {
    display: flex;
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 10px;
    padding-top: 10px;
    flex-wrap: nowrap;
  }

  .menu-control-card {
    flex: 0 1 auto;
  }

  .menu-control-card select {
    min-width: 150px;
  }

  .menu-control-card:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .menu-control-card:first-child select {
    width: 100%;
  }

  .menu-control-card:last-child {
    flex: 0 0 auto;
  }

  .menu-control-card:last-child label {
    display: none;
  }

  .menu-control-card:last-child select {
    min-width: 92px;
  }

  .menu-mobile-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: start;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.1);
    color: #fff;
    cursor: pointer;
    padding: 0;
    grid-column: 2;
    grid-row: 1;
  }

  .menu-nav {
    display: none;
    padding-top: 12px;
    padding-bottom: 0;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
  }

  .salus-topmenu.menu-open .menu-nav {
    display: flex;
  }

  .mega-item,
  .menu-user {
    position: relative;
    width: 100%;
  }

  .menu-home,
  .mega-item > summary,
  .menu-user > summary {
    width: 100%;
    justify-content: space-between;
  }

  .mega-panel,
  .menu-user-panel {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 10px;
    box-shadow: none;
    border-radius: 16px;
    padding: 14px;
  }
}

@media (max-width: 860px) {
  .menu-brand-mark {
    width: 68px;
    height: 42px;
  }

  .menu-brand-mark img {
    max-width: 56px;
    max-height: 32px;
  }

  .menu-brand-text strong {
    font-size: 17px;
  }

  .menu-brand-text span {
    font-size: 11px;
  }

  .menu-controls {
    gap: 8px;
  }
}
            
            
