.quote-launch {
  display: block;
  margin-top: 14px;
  padding: .5rem .85rem;
  border: 1px solid #bad7c4;
  border-radius: 8px;
  background: white;
  color: #266441;
  font: inherit;
  font-size: .875rem;
  font-weight: 650;
  min-height: 44px;
  touch-action: manipulation;
  cursor: pointer;
}
.zq {
  --green: #227746;
  --muted: #526359;
  --line: #dbe5de;
  width: min(760px, calc(100% - 20px));
  max-width: none;
  max-height: calc(100% - 20px);
  max-height: calc(100dvh - 20px);
  margin: auto;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: #18251c;
  background: white;
  overscroll-behavior: contain;
}
.zq::backdrop { background: #17271eaa; }
html:has(.zq[open]) { overflow: hidden; }
.zq * { box-sizing: border-box; }
.zq [hidden] { display: none !important; }
.zq .zq-body { padding: clamp(16px, 4vw, 30px); }
.zq .zq-header { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.zq .zq-logo { display: block; width: clamp(104px, 35vw, 198px); height: auto; }
.zq .zq-title { text-align: right; }
.zq h2, .zq h3, .zq p { margin: 0; }
.zq h2 { font-size: clamp(.98rem, 4vw, 1.3rem); letter-spacing: .08em; }
.zq time { display: block; margin-top: 5px; font-size: .875rem; color: var(--muted); }
.zq .zq-series { font-weight: 700; font-size: 1.125rem; padding-block: 16px; }
.zq .zq-rule { border: 0; border-top: 1px solid var(--line); margin: 16px 0 0; }
.zq label { display: block; font-size: .875rem; color: var(--muted); }
.zq input {
  display: block;
  width: 100%;
  min-height: 44px;
  font: inherit;
  font-size: 16px;
  padding: 9px 12px;
  margin-top: 5px;
  border: 1px solid #bfcfc4;
  border-radius: 9px;
  background: white;
  color: inherit;
}
.zq input[type=number] { appearance: textfield; }
.zq input::-webkit-inner-spin-button, .zq input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.zq button, .zq .zq-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid #b6cdbe;
  border-radius: 9px;
  background: white;
  color: var(--green);
  font: inherit;
  font-size: .9rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
}
.zq :is(button, a, input):focus-visible, .quote-launch:focus-visible { outline: 2px solid #227746; outline-offset: 2px; }
.zq button:hover, .zq .zq-button:hover, .quote-launch:hover { background: #f1f8f3; }
.zq .zq-primary { color: white; background: var(--green); border-color: var(--green); }
.zq .zq-primary:hover { background: #175c34; }
.zq button:disabled { cursor: default; opacity: .5; }
.zq .zq-item { padding: 14px 0; border-bottom: 1px solid var(--line); }
.zq .zq-product { display: grid; grid-template-columns: minmax(73px, max-content) minmax(0, 1fr); align-items: start; column-gap: 10px; }
.zq .zq-sku { font-size: .875rem; white-space: nowrap; font-weight: 700; }
.zq .zq-name { font-weight: 650; line-height: 1.35; font-size: .94rem; overflow-wrap: anywhere; }
.zq .zq-price { grid-column: 2; margin-top: 5px; color: var(--muted); font-size: .875rem; }
.zq .zq-quantity { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.zq .zq-quantity input { width: 78px; text-align: center; margin: 0; }
.zq .zq-quantity button { padding: 6px 10px; }
.zq .zq-add { display: flex; width: 100%; margin-top: 12px; }
.zq .zq-panel { background: #f5faf6; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-top: 10px; }
.zq .zq-panel-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.zq .zq-panel-header h3 { font-size: .95rem; }
.zq .zq-close-panel {
  flex: 0 0 44px;
  padding: 0;
  border-color: #b42318;
  background: #b42318;
  color: #fff;
  font-size: 1.65rem;
  line-height: 1;
}
.zq .zq-close-panel:hover { background: #8f1b13; }
.zq .zq-results { max-height: 45vh; max-height: min(40dvh, 340px); margin-top: 4px; overflow: auto; overscroll-behavior: contain; }
.zq .zq-option { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 10px 1px; border-bottom: 1px solid var(--line); }
.zq .zq-option-quantity {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: flex-end;
  gap: 8px;
  padding: 8px;
  border-radius: 9px;
  background: #eaf4ed;
}
.zq .zq-option-quantity input { width: 94px; }
.zq .zq-empty, .zq .zq-status { color: var(--muted); padding: 12px 0; font-size: .875rem; }
.zq .zq-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 16px; }
.zq .zq-summary { margin: 16px 0 0; padding: 14px; border-radius: 12px; background: #f4f8f5; font-variant-numeric: tabular-nums; }
.zq .zq-summary div { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 4px 0; }
.zq .zq-summary dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.zq .zq-summary .zq-total { font-size: 1.1rem; font-weight: 750; color: var(--green); border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.zq .zq-actions { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; margin-top: 16px; }
.zq .zq-preview > .zq-actions { margin: 0 0 16px; }
.zq .zq-document { border: 1px solid var(--line); border-radius: 9px; padding: clamp(12px, 4vw, 28px); }
.zq .zq-customer { padding-bottom: 12px; overflow-wrap: anywhere; }
@media print {
  @page { size: A4; margin: 14mm; }
  html:has(.zq[open]), html:has(.zq[open]) body { overflow: visible !important; }
  body:has(.zq[open]) > :not(.zq), .zq .zq-edit, .zq .zq-actions, .zq .zq-status { display: none !important; }
  .zq { position: static; inset: auto; display: block; overflow: visible; width: 100%; max-height: none; margin: 0; border: 0; }
  .zq::backdrop { display: none; }
  .zq .zq-body, .zq .zq-document { border: 0; padding: 0; }
  .zq .zq-item, .zq .zq-summary { break-inside: avoid; }
}
