.v6-offer-page {
  background: #f3f6f8;
}

.v6-offer-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
}

.v6-offer-actions {
  align-items: center;
}

.v6-offer-shell {
  display: grid;
  gap: 16px;
  max-width: 1680px;
}

.v6-offer-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px;
  background: linear-gradient(135deg, #ffffff, #edf5f3);
}

.v6-eyebrow {
  margin: 0 0 6px;
  color: #177865;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
}

.v6-offer-logo-strip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid #d3dde7;
  border-radius: 8px;
  background: #ffffff;
}

.v6-offer-logo-strip img {
  width: 118px;
  max-height: 42px;
  object-fit: contain;
  background: #101820;
}

.v6-offer-logo-strip img[data-partner-logo] {
  background: #ffffff;
}

.v6-offer-logo-strip span {
  color: #51647a;
  font-weight: 900;
}

.v6-offer-logo-strip b {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #9bd0c3;
  border-radius: 8px;
  background: #eefaf6;
  color: #075f4b;
  font-weight: 900;
}

.v6-offer-total-card {
  min-width: 230px;
  padding: 14px 16px;
  border: 1px solid rgba(23, 120, 101, 0.22);
  border-radius: 8px;
  background: #ffffff;
  text-align: right;
}

.v6-offer-total-card span {
  display: block;
  color: #51647a;
  font-weight: 800;
}

.v6-offer-total-card strong {
  display: block;
  margin-top: 4px;
  color: #0f1720;
  font-size: 28px;
}

.v6-offer-message {
  border: 1px solid #9bd0c3;
  border-radius: 8px;
  background: #eefaf6;
  color: #075f4b;
  font-weight: 900;
  padding: 12px 14px;
}

.v6-offer-message[data-level="error"] {
  border-color: #ef9a9a;
  background: #fff1f1;
  color: #b42318;
}

.v6-offer-grid {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.v6-offer-summary {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.v6-summary-item {
  padding: 12px;
  border: 1px solid #d3dde7;
  border-radius: 8px;
  background: #f8fbfb;
}

.v6-summary-item span {
  display: block;
  color: #51647a;
  font-size: 13px;
  font-weight: 900;
}

.v6-summary-item strong {
  display: block;
  margin-top: 4px;
  font-size: 19px;
}

.v6-labor-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 900;
}

.v6-labor-badge[data-color="danger"] {
  background: #ffe4e0;
  color: #a11b11;
}

.v6-labor-badge[data-color="warning"] {
  background: #fff2d7;
  color: #865005;
}

.v6-labor-badge[data-color="success"],
.v6-labor-badge[data-color="normal"] {
  background: #e5f4ee;
  color: #046344;
}

.v6-offer-lines {
  overflow: visible;
}

.v6-lines-head {
  align-items: start;
  gap: 12px;
}

.v6-quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.v6-quick-actions .merci-button {
  min-height: 38px;
  padding: 0 12px;
  font-size: 14px;
}

.v6-line-table {
  display: grid;
  gap: 10px;
}

.v6-line-head,
.v6-line-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(220px, 1.2fr) 100px 105px 130px 130px 72px;
  gap: 8px;
  align-items: end;
}

.v6-line-head {
  color: #51647a;
  font-size: 13px;
  font-weight: 900;
  padding: 0 4px;
}

.v6-line-row {
  padding: 10px;
  border: 1px solid #d3dde7;
  border-radius: 8px;
  background: #ffffff;
}

.v6-line-row input,
.v6-line-row select {
  min-height: 42px;
  width: 100%;
}

.v6-line-total {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid #d3dde7;
  border-radius: 8px;
  background: #edf2f4;
  font-weight: 900;
}

.v6-line-remove {
  min-height: 42px;
  border: 0;
  border-radius: 8px;
  background: #ba261c;
  color: #fff;
  font-weight: 900;
  cursor: pointer;
}

.v6-offer-note-card,
.v6-offer-footer {
  padding: 16px;
}

.v6-offer-footer {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.v6-footer-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.v6-footer-actions .merci-button {
  min-width: 180px;
}

.v6-action-menu {
  position: relative;
}

.v6-action-menu summary {
  list-style: none;
}

.v6-action-menu summary::-webkit-details-marker {
  display: none;
}

.v6-action-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 60;
  display: grid;
  min-width: 240px;
  padding: 8px;
  border: 1px solid #d3dde7;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 40px rgba(15, 23, 32, 0.16);
}

.v6-action-menu-panel-up {
  top: auto;
  bottom: calc(100% + 8px);
}

.v6-action-menu-panel button {
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0f1720;
  cursor: pointer;
  font-weight: 900;
  text-align: left;
  padding: 0 10px;
}

.v6-action-menu-panel button:hover {
  background: #edf5f3;
}

@media print {
  .v6-offer-topbar,
  .v6-quick-actions,
  .v6-footer-actions,
  .v6-offer-message,
  [data-private-output] {
    display: none !important;
  }

  .v6-offer-page {
    background: #fff;
  }
}

@media (max-width: 1023px) {
  .v6-offer-topbar {
    position: static;
  }

  .v6-offer-actions,
  .v6-offer-hero,
  .v6-footer-actions {
    align-items: stretch;
  }

  .v6-offer-actions,
  .v6-footer-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .v6-offer-grid,
  .v6-offer-footer {
    grid-template-columns: 1fr;
  }

  .v6-offer-hero {
    flex-direction: column;
  }

  .v6-offer-total-card {
    min-width: 0;
    width: 100%;
    text-align: left;
  }

  .v6-line-head {
    display: none;
  }

  .v6-line-row {
    grid-template-columns: 1fr 1fr;
  }

  .v6-line-row > *:nth-child(1),
  .v6-line-row > *:nth-child(2) {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .v6-line-row {
    grid-template-columns: 1fr;
  }

  .v6-line-row > * {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1024px) {
  .v6-offer-shell {
    gap: 12px;
    max-width: 1540px;
  }

  .v6-offer-hero {
    gap: 12px;
    padding: 14px;
  }

  .v6-offer-total-card {
    min-width: 200px;
    padding: 12px 14px;
  }

  .v6-offer-total-card strong {
    font-size: 24px;
  }

  .v6-offer-summary {
    gap: 10px;
    padding: 12px;
  }

  .v6-summary-item {
    padding: 10px;
  }

  .v6-summary-item strong {
    font-size: 17px;
  }

  .v6-quick-actions .merci-button {
    min-height: 34px;
    font-size: 13px;
  }

  .v6-line-table {
    gap: 8px;
  }

  .v6-line-row {
    padding: 8px;
  }

  .v6-line-row input,
  .v6-line-row select,
  .v6-line-total,
  .v6-line-remove {
    min-height: 36px;
  }

  .v6-offer-note-card,
  .v6-offer-footer {
    padding: 12px;
  }

  .v6-footer-actions .merci-button {
    min-width: 140px;
  }
}
