/* Suggerimenti codice prodotto WeClapp (Quote workbench) */
.qv-code-suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 2px);
  z-index: 1200;
  max-height: 220px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.qv-code-suggest-item {
  display: flex;
  gap: 8px;
  width: 100%;
  text-align: left;
  padding: 8px 10px;
  border: 0;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.3;
}
.qv-code-suggest-item:hover,
.qv-code-suggest-item:focus {
  background: #eff6ff;
}
.qv-code-suggest-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 700;
  color: #1d4ed8;
  flex: 0 0 auto;
  min-width: 52px;
}
.qv-code-suggest-name {
  color: #374151;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.qv-code-suggest-msg {
  padding: 10px 12px;
  font-size: 12px;
  color: #6b7280;
}
.qv-code-suggest-msg--err {
  color: #b91c1c;
}
.qv-customer-search-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
  width: 100%;
}
.qv-customer-search-wrap .dedit {
  flex: 1;
  min-width: 0;
}
.qv-customer-search-btn {
  flex: 0 0 auto;
  padding: 6px 14px;
  border: 1px solid #b9c0cc;
  border-radius: 6px;
  background: #f8fafc;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.qv-customer-search-btn:hover {
  background: #eff6ff;
  border-color: #93c5fd;
}
.qv-customer-suggest-sub {
  display: block;
  font-size: 11px;
  color: #6b7280;
  margin-top: 2px;
  white-space: normal;
}

/* Gate cliente obbligatorio — nuova quotazione (fullscreen friendly) */
body.qv-customer-gate-open {
  overflow: hidden;
}

.qv-customer-gate {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.qv-customer-gate-card {
  width: min(680px, 100%);
  max-height: min(90vh, 760px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.28);
  border: 1px solid #d4d9e0;
  padding: 28px 28px 20px;
}

.qv-customer-gate-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.qv-customer-gate-step {
  display: inline-block;
  margin-bottom: 12px;
  padding: 5px 12px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #047857;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.qv-customer-gate-title {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
  color: #1a1a2e;
}

.qv-customer-gate-hint {
  margin: 0 0 22px;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
}

.qv-customer-gate-lab {
  display: block;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #374151;
  letter-spacing: 0.01em;
}

.qv-customer-gate-search {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.qv-customer-gate-inp {
  flex: 1 1 280px;
  min-width: 0;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid #c5cad3;
  border-radius: 10px;
  background: #fff;
  font-size: 14px;
  color: #1a1a2e;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
}

.qv-customer-gate-inp:focus {
  outline: none;
  border-color: #e87722;
  box-shadow: 0 0 0 3px rgba(232, 119, 34, 0.18);
}

.qv-customer-gate-btn {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(180deg, #2ecc71 0%, #27ae60 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(39, 174, 96, 0.35);
  white-space: nowrap;
}

.qv-customer-gate-btn:hover {
  background: linear-gradient(180deg, #34d87a 0%, #229954 100%);
}

.qv-customer-gate-btn:active {
  transform: translateY(1px);
}

.qv-customer-gate-msg {
  min-height: 20px;
  margin-top: 14px;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.45;
}

.qv-customer-gate-msg.is-err {
  color: #b91c1c;
}

.qv-customer-gate-results {
  margin-top: 16px;
  padding: 12px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(48vh, 380px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qv-customer-gate-results:empty {
  display: none;
}

.qv-customer-gate-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border: 1px solid #d4d9e0;
  border-radius: 12px;
  margin: 0;
  cursor: pointer;
  background: #fff;
  font-size: 14px;
  line-height: 1.45;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.qv-customer-gate-item:last-child {
  margin-bottom: 0;
}

.qv-customer-gate-item:hover,
.qv-customer-gate-item:focus {
  background: #eff6ff;
  border-color: #60a5fa;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.1);
}

.qv-customer-gate-item .qv-code-suggest-name {
  white-space: normal;
  font-weight: 700;
  color: #1a1a2e;
  font-size: 14px;
}

.qv-customer-gate-item .qv-customer-suggest-sub {
  margin-top: 6px;
  font-size: 12px;
  color: #64748b;
}

.qv-wc-missing-box {
  padding: 18px 16px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #fcd34d;
  box-shadow: inset 0 0 0 1px rgba(251, 191, 36, 0.15);
}

.qv-wc-missing-kicker {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b45309;
}

.qv-wc-missing-name {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  color: #1a1a2e;
}

.qv-wc-missing-meta {
  margin: 0 0 12px;
  font-size: 13px;
  color: #64748b;
}

.qv-wc-missing-hint {
  margin: 0 0 18px;
  font-size: 14px;
  line-height: 1.55;
  color: #4b5563;
}

.qv-wc-missing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.qv-wc-missing-cancel {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid #c5cad3;
  border-radius: 10px;
  background: #fff;
  color: #374151;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.qv-wc-missing-cancel:hover {
  background: #f3f4f6;
}

.qv-customer-gate-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* Form nascosto finché non c'è cliente */
.plus-detail-shell.qv-customer-locked {
  display: none !important;
}
