.quotation-document {
  background: white;
  border: 1px solid #bfc6cb;
  max-width: 960px;
  margin: 35px auto 0;
  padding: 48px;
  color: #131313;
  font-size: 0.875rem;
  box-shadow: 0 12px 45px -35px #0007;
  overflow-wrap: anywhere;
}
.quote-doc-header {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: start;
  border-bottom: 2px solid #131313;
  padding-bottom: 28px;
}
.quote-doc-header img {
  margin-bottom: 22px;
}
.quote-doc-header strong {
  display: block;
  font-size: 0.875rem;
}
.quote-doc-header address {
  font-size: 0.75rem;
  white-space: pre-line;
  font-style: normal;
  line-height: 1.7;
  margin-top: 8px;
  color: #555;
}
.quote-doc-header a {
  font-size: 0.75rem;
}
.quote-title {
  padding-top: 4px;
}
.quote-title h2 {
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  white-space: pre-line;
  line-height: 1.3;
  margin-top: 13px;
}
.quote-title .eyebrow {
  font-size: 0.6875rem;
  color: var(--accent);
}
.quote-meta {
  margin-top: 19px;
}
.quote-meta > div {
  display: grid;
  grid-template-columns: 95px 1fr;
  gap: 10px;
  margin-top: 8px;
  font-size: 0.6875rem;
}
.quote-meta dt {
  color: #626262;
}
.quote-meta dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 0.6875rem;
}
.quote-customer {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  padding: 25px 0;
  border-bottom: 1px solid #d1d1d1;
}
.quote-customer h3 {
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  font-weight: 500;
  color: #686868;
  margin-bottom: 12px;
}
.quote-customer strong {
  font-size: 0.9375rem;
}
.quote-customer p {
  font-size: 0.8125rem;
  margin-top: 8px;
}
.quote-customer dl {
  margin: 0;
}
.quote-customer dl > div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
  font-size: 0.75rem;
  margin-bottom: 8px;
}
.quote-customer dt {
  color: #626262;
}
.quote-customer dd {
  margin: 0;
}
.preserve-lines {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.quote-introduction {
  font-size: 0.75rem;
  line-height: 1.7;
  margin: 24px 0;
}
.quote-table {
  font-size: 0.75rem;
  table-layout: fixed;
}
.quote-table tbody th strong,
.quote-table tbody th span {
  display: block;
}
.quote-table th,
.quote-table td {
  padding: 13px 9px;
}
.quote-table thead {
  background: #f1f2f3;
}
.quote-table thead th {
  font-size: 0.6875rem;
}
.quote-table th:first-child {
  width: 45%;
  padding-left: 10px;
}
.quote-table tbody th strong {
  font-size: 0.8125rem;
}
.quote-table tbody th span {
  font-size: 0.6875rem;
  line-height: 1.6;
  color: #666;
}
.quote-table td {
  font-size: 0.75rem;
  color: #242424;
}
.quote-table td:not(:first-child),
.quote-table thead th:not(:first-child) {
  text-align: right;
}
.quote-table th:nth-child(2) {
  width: 19%;
}
.quote-table th:nth-child(3) {
  width: 14%;
}
.quote-table th:nth-child(4) {
  width: 22%;
}
.quote-table .custom-quote-row td {
  color: var(--accent);
}
.quote-options {
  margin-top: 24px;
}
.quote-options h3 {
  margin-bottom: 10px;
  font-size: 0.875rem;
}
.quote-options-table {
  width: 100%;
  border-collapse: collapse;
}
.quote-options-table th,
.quote-options-table td {
  border-bottom: 1px solid #d9dfe5;
  padding: 10px 8px;
  line-height: 1.35;
}
.quote-options-table th:first-child {
  width: 16%;
  text-align: left;
}
.quote-options-table th:nth-child(2) {
  width: 28%;
}
.quote-options-table th:nth-child(3) {
  width: 26%;
}
.quote-options-table th:nth-child(4) {
  width: 30%;
}
.quote-options-table .is-selected {
  background: #eaf0f6;
}
.quote-options-table .selected-label {
  display: block;
  color: #263d6b;
  font-size: 0.625rem;
  font-weight: 700;
}
.quote-totals-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 25px;
}
.quote-total {
  margin: 0;
  padding: 16px;
  background: #f5f6f7;
  border: 1px solid #d9dfe2;
}
.quote-total > div {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 7px;
  font-size: 0.75rem;
}
.quote-total > div:first-child {
  margin: 0;
}
.quote-total dt {
  color: #626262;
}
.quote-total dd {
  margin: 0;
  white-space: nowrap;
  text-align: right;
  font-weight: 500;
}
.quote-total > div:last-child {
  padding-top: 13px;
  margin-top: 13px;
  border-top: 1px solid #c8ced1;
  font-size: 0.875rem;
  font-weight: 600;
}
.quote-total > div:last-child dt {
  color: #131313;
  max-width: 150px;
}
.quote-warning {
  font-size: 0.75rem;
  border-left: 2px solid #687888;
  padding: 8px 13px;
  margin-top: 17px;
}
.quote-notes {
  margin-top: 24px;
}
.quote-notes h3,
.quote-terms h3 {
  font-size: 0.875rem;
  margin-bottom: 8px;
}
.quote-notes p {
  font-size: 0.75rem;
}
.quote-terms {
  margin-top: 28px;
  font-size: 0.6875rem;
  color: #555;
}
.quote-terms section + section {
  margin-top: 22px;
}
.quote-terms ul {
  margin: 10px 0 0;
  padding-left: 17px;
}
.quote-terms li + li {
  margin-top: 6px;
}
.quote-doc-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #c8ced1;
  font-size: 0.6875rem;
}
.quote-doc-footer strong {
  display: block;
  margin-top: 15px;
  font-size: 0.75rem;
}

@media print {
  @page {
    size: A4;
    margin: 14mm 13mm 15mm;
    @bottom-right {
      content: "Wrensys · " counter(page) " / " counter(pages);
      font:
        7pt Arial,
        sans-serif;
      color: #555;
    }
  }
  html,
  body {
    background: #fff !important;
    color: #000 !important;
    scroll-behavior: auto;
    height: auto !important;
    overflow: visible !important;
    display: block !important;
    padding: 0 !important;
    width: auto !important;
  }
  body > * {
    display: none !important;
  }
  body:not(.quote-ready) > .print-instruction {
    display: block !important;
    font:
      12pt Arial,
      sans-serif;
    margin: 20mm;
  }
  body.quote-ready > #quote-output {
    display: block !important;
    width: auto !important;
    max-width: none;
    margin: 0;
    padding: 0;
  }
  .quote-toolbar,
  .print-help {
    display: none !important;
  }
  .quotation-document {
    border: 0;
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 0;
    color: #000;
    font-size: 9pt;
    overflow: visible;
  }
  .quote-doc-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8mm;
    padding-bottom: 6mm;
    break-inside: avoid;
  }
  .quote-doc-header img {
    width: 55mm;
    height: auto;
    margin-bottom: 4mm;
  }
  .quote-doc-header strong {
    font-size: 9pt;
  }
  .quote-doc-header address,
  .quote-doc-header a {
    font-size: 8pt;
    color: #333;
  }
  .quote-title {
    border: 0;
    padding: 1mm 0 0;
  }
  .quote-title h2 {
    font-size: 15pt;
    margin-top: 3mm;
  }
  .quote-title .eyebrow {
    font-size: 8pt;
  }
  .quote-meta {
    margin-top: 4mm;
  }
  .quote-meta > div {
    grid-template-columns: 23mm 1fr;
    font-size: 7.5pt;
    margin-top: 2mm;
    gap: 2mm;
  }
  .quote-meta dd {
    font-size: 7pt;
  }
  .quote-customer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8mm;
    padding: 6mm 0;
    break-inside: avoid;
  }
  .quote-customer h3 {
    font-size: 8pt;
  }
  .quote-customer strong {
    font-size: 10pt;
  }
  .quote-customer p {
    font-size: 8pt;
  }
  .quote-customer dl > div {
    grid-template-columns: 27mm 1fr;
    gap: 2mm;
    font-size: 8pt;
    margin-bottom: 2mm;
  }
  .quote-introduction {
    font-size: 8pt;
    margin: 5mm 0;
    line-height: 1.5;
  }
  .quote-table-wrap {
    overflow: visible;
  }
  .quote-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    font-size: 8pt;
  }
  .quote-table caption {
    font-size: 8pt;
    padding-bottom: 3mm;
  }
  .quote-table th,
  .quote-table td {
    padding: 3mm 2mm;
    font-size: 8pt;
  }
  .quote-table thead th {
    font-size: 7.5pt;
    white-space: normal;
  }
  .quote-table tbody th strong {
    font-size: 8.5pt;
  }
  .quote-table tbody th span {
    font-size: 7.5pt;
    line-height: 1.5;
  }
  .quote-table th:first-child {
    width: 43%;
    padding-left: 2mm;
  }
  .quote-table th:nth-child(2) {
    width: 20%;
  }
  .quote-table th:nth-child(3) {
    width: 14%;
  }
  .quote-table th:nth-child(4) {
    width: 23%;
  }
  .quote-options {
    margin-top: 4mm;
    break-inside: avoid;
  }
  .quote-options h3 {
    font-size: 9pt;
    margin-bottom: 2mm;
  }
  .quote-options-table th,
  .quote-options-table td {
    padding: 1.5mm;
    font-size: 7.5pt;
    line-height: 1.3;
  }
  .quote-options-table thead th {
    font-size: 7pt;
  }
  .quote-options-table th:first-child {
    width: 16%;
  }
  .quote-options-table th:nth-child(2) {
    width: 28%;
  }
  .quote-options-table th:nth-child(3) {
    width: 26%;
  }
  .quote-options-table th:nth-child(4) {
    width: 30%;
  }
  .quote-options-table .selected-label {
    font-size: 6.5pt;
  }
  thead {
    display: table-header-group;
  }
  tfoot {
    display: table-footer-group;
  }
  tr {
    break-inside: avoid;
    page-break-inside: avoid;
  }
  .quote-totals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6mm;
    margin-top: 4mm;
    break-inside: avoid;
  }
  .quote-total {
    padding: 3mm;
    border: 1px solid #bbb;
    background: #f6f6f6;
  }
  .quote-total > div {
    font-size: 8pt;
    gap: 2mm;
    flex-wrap: nowrap;
  }
  .quote-total > div:last-child {
    font-size: 9pt;
    margin-top: 2mm;
    padding-top: 2mm;
  }
  .quote-total > div:last-child dt {
    font-size: 8.5pt;
    max-width: 42mm;
  }
  .quote-total dd {
    white-space: normal;
  }
  .quote-warning {
    font-size: 8pt;
    padding: 2mm 3mm;
    margin-top: 4mm;
    break-inside: avoid;
  }
  .quote-notes {
    margin-top: 3mm;
  }
  .quote-notes h3,
  .quote-terms h3 {
    font-size: 9pt;
    break-after: avoid;
  }
  .quote-notes p {
    font-size: 8pt;
    line-height: 1.6;
  }
  .quote-terms {
    font-size: 8pt;
    line-height: 1.4;
    margin-top: 3mm;
    color: #333;
  }
  .quote-terms li {
    break-inside: avoid;
  }
  .quote-terms section {
    break-inside: avoid;
  }
  .quote-terms li + li {
    margin-top: 1mm;
  }
  .quote-terms section + section {
    margin-top: 3mm;
  }
  .quote-doc-footer {
    margin-top: 3mm;
    padding-top: 2mm;
    break-inside: avoid;
    font-size: 7.5pt;
  }
  .quote-doc-footer strong {
    font-size: 8pt;
  }
  .quote-doc-footer p {
    color: #333;
  }
  p {
    orphans: 3;
    widows: 3;
  }
  a {
    color: inherit;
    text-decoration: none;
  }
  * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
