<html>
  <head>
    <meta charset="UTF-8" />
    <title>{{data.object.header}}</title>
    
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
  href="https://fonts.googleapis.com/css2?family=Changa:wght@400;500;600;700&family=Nunito:wght@300;400;600;700&display=swap"
  rel="stylesheet"
/>

    <style>
      /* {{#parameter.color}}
      :root {
        --accent-color: {{parameter.color}};
      }
      {{/parameter.color}} */
      
:root,
html {
  --font-body: "Nunito", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Changa", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --text-xs: 6.5pt;
  --text-sm: 7.5pt;
  --text-md: 8.5pt;
  --text-body: 9.5pt;
  --text-lg: 10pt;
  --text-title: 18pt;
  --text-brand: 19pt;

  --weight-light: 300;
  --weight-regular: 400;
  --weight-medium: 600;

  --color-text: #1c241f;
  --color-text-secondary: #3d4a43;
  --color-muted: #7a857e;
  --color-rule: #d5ddd8;
  --color-rule-strong: #1c241f;
  --color-page-count-bg: transparent;
  --page-count-color: var(--accent-color, var(--color-accent));
  --color-heading-bg: color-mix(
    in srgb,
    var(--accent-color, var(--color-accent)) 12%,
    #fff
  );
  --color-accent: #3d6b58;

  --space-1: 1mm;
  --space-2: 2mm;
  --space-3: 3.5mm;
  --space-4: 4.5mm;
  --space-6: 6mm;
  --space-8: 9mm;
  --space-10: 11mm;
  --space-12: 13mm;
  --space-14: 15mm;

  --qr-size: 12mm;
  --rule: 0.35mm;
  --rule-hairline: 0.2mm;
  --leading: 1.5;
  --foot-text-term-icon: none;

  --heading-weight: 500;
  --heading-leading: 1.2;
  --label-transform: uppercase;
  --label-tracking: 0.25pt;
  --table-header-bg: var(--color-heading-bg);
  --table-header-border-bottom: none;
  --table-header-padding-inline: var(--space-3);
  --table-header-radius: 999px;
  --table-heading-radius: 999px;
  --total-gross-font: var(--font-heading);
  --total-gross-size: 14pt;
  --total-gross-weight: 500;
  --total-gross-leading: 1.2;
  --meta-header-margin-top: -5mm;
  --address-divider: "/";
  --recipient-weight: var(--weight-regular);
  --foot-text-max-width: 100%;
  --foot-text-term-display: block;
  --foot-text-term-width: 100%;
  --foot-text-term-border: 0.35mm solid var(--color-rule);
  --foot-text-term-radius: 999px;
  --foot-text-term-padding: var(--space-2) var(--space-3);
}

@page {
  size: A4 portrait;
  /* Literal values: custom properties are not applied in the @page context. */
  /* 35mm top margin; address window sits 5mm into the body. 25mm left/right. */
  margin: 35mm 25mm 52mm 25mm;

  @top-left {
    content: element(headerIdentifier);
    vertical-align: top;
  }

  @bottom-left {
    content: element(footerIdentifier);
  }

  @left-middle {
    content: element(foldlinesIdentifier);
  }
}

@page :first {
  @top-right {
    content: element(qrcodeIdentifier);
    vertical-align: top;
    text-align: right;
    /* Keep a column for the QR so a wide company name cannot collapse it. */
    width: 18mm;
  }
}

body {
  font-family: var(--font-body);
  font-weight: var(--weight-light);
  line-height: var(--leading);
  margin: 0;
  counter-reset: position;
  font-size: var(--text-body);
}

h1 {
  font-family: var(--font-heading, var(--font-body));
  color: var(--color-text);
  font-size: var(--text-brand);
}

.partialInvoiceCalculation {
  font-size: var(--text-title);
}

p {
  margin: var(--space-2) 0;
}

.right {
  text-align: right;
}

.document-header {
  position: running(headerIdentifier);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding-top: 22mm;
}

.document-header__brand {
  min-width: 0;
}

.header__name {
  margin: 0;
  max-width: 100%;
  font-family: var(--font-heading, var(--font-body));
  font-weight: var(--brand-weight, var(--heading-weight, inherit));
  line-height: var(--heading-leading, 75%);
  letter-spacing: var(--heading-tracking, normal);
  color: var(--accent-color, var(--color-accent));
  overflow-wrap: anywhere;
}

.header__logo {
  margin: 0;
}

.header__logo .logo {
  display: block;
  max-width: 52mm;
  max-height: 12mm;
  width: auto;
  height: auto;
  object-fit: contain;
}

.header__qrcode {
  position: running(qrcodeIdentifier);
  width: var(--qr-size);
  padding-top: 22mm;
  text-align: right;
}

.header__qrcode .url-qrcode {
  display: inline-block;
  margin-left: auto;
  width: var(--qr-size);
  height: var(--qr-size);
}

footer {
  position: running(footerIdentifier);
}

.footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  column-gap: var(--space-2);
  width: 100%;
  font-size: var(--text-xs);
}

.footer__page-count {
  justify-self: end;
  align-self: end;
}

.page-count {
  text-align: right;
}

.page-count__inner {
  display: inline-flex;
  align-items: baseline;
  column-gap: 0.15em;
  padding: var(--page-count-padding, var(--space-1) var(--space-2));
  background-color: var(--color-page-count-bg);
  color: var(--page-count-color, inherit);
  border-radius: var(--page-count-radius, 0);
  border-bottom: var(--page-count-border-bottom, none);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  text-transform: var(--page-count-transform, none);
  letter-spacing: var(--page-count-tracking, normal);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.page::before {
  content: counter(page);
}

.totalPages::before {
  content: counter(pages);
}

.footer__section {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.footer__sender {
  word-wrap: anywhere;
}

.footer__label {
  font-weight: var(--weight-medium);
}

.url-qrcode {
  width: var(--qr-size);
  height: var(--qr-size);
  display: block;
  mix-blend-mode: var(--qr-blend, normal);
}

.url-qrcode img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.qrcode {
  -ro-replacedelement: qrcode;
}

.foldlines {
  position: running(foldlinesIdentifier);
}

.foldlines hr {
  position: absolute;
  left: 0;
  margin: 0;
  padding: 0;
  height: 0;
  border: none;
  border-bottom: 0.5pt solid #000;
}

/* Offsets are relative to @left-middle (starts after the 35mm top margin). */
.foldline1 {
  top: calc(105mm - 35mm);
  width: 4mm;
}

.foldline2 {
  top: calc(210mm - 35mm);
  width: 4mm;
}

.foldline3 {
  top: calc(148.5mm - 35mm);
  width: 7mm;
}

.meta-header {
  width: calc(100% + 5mm);
  display: grid;
  grid-template-columns: 85mm minmax(0, 1fr);
  column-gap: 8mm;
  min-height: 45mm;
  margin: var(--meta-header-margin-top, 5mm) 0 0 -5mm;
  align-items: start;
}

.adress-window {
  display: flex;
  flex-direction: column;
  gap: 3.5mm;
  box-sizing: border-box;
  width: 85mm;
  min-height: 45mm;
  max-width: 85mm;
  padding: 5mm 5mm;
  min-width: 0;
}

.adress-window__sender {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  min-width: 0;
  font-size: var(--text-sm);
}

.descbox {
  font-size: var(--text-md);
  min-width: 0;
  max-width: 75mm;
  margin-top: 5mm;
  justify-self: start;
}

.descbox__grid {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: var(--space-6);
  row-gap: 0.25mm;
  align-items: baseline;
}

.descbox__table-label {
  white-space: nowrap;
}

.descbox__table-value {
  min-width: 0;
  overflow-wrap: anywhere;
}

.adress-window__sender .divider::before {
  content: var(--address-divider, "•");
}

.recipient {
  white-space: pre-line;
  word-wrap: anywhere;
  font-weight: var(--recipient-weight, var(--weight-medium));
}

div.descbox .descbox__grid > :nth-child(1),
div.descbox .descbox__grid > :nth-child(2) {
  font-weight: var(--weight-medium);
}

.document-title {
  margin-top: var(--title-margin-top, var(--space-10));
  font-family: var(--font-heading, var(--font-body));
  font-size: var(--text-title);
  font-weight: var(--heading-weight, var(--weight-regular));
  line-height: var(--heading-leading, var(--leading));
  letter-spacing: var(--heading-tracking, normal);
  text-transform: var(--title-transform, none);
}

.head-text {
  margin-top: var(--space-6);
  max-width: 96%;
  font-size: var(--text-lg);
}

.head-text p {
  margin: var(--space-3) 0;
}

.head-text > p:last-of-type {
  break-inside: avoid;
  page-break-inside: avoid;
}

@page {
  background-color: #fff;
  margin-top: 45mm;
  margin-bottom: 52mm;
  margin-left: 25mm;
  margin-right: 25mm;

  @top-left {
    content: element(headerIdentifier);
    vertical-align: top;
    width: 100%;
  }

  @top-right {
    content: none;
    width: 0;
  }
}

@page :first {
  @top-right {
    content: none;
    width: 0;
  }
}

.document-header {
  overflow: visible;
  text-align: center;
  padding-top: 14mm;
}

.header__oval {
  position: absolute;
  left: 50%;
  top: 0;
  width: 210mm;
  height: 40mm;
  transform: translateX(-50%);
  overflow: visible;
  pointer-events: none;
  fill: color-mix(in srgb, var(--accent-color, var(--color-accent)) 14%, #fff);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}

.header__oval ellipse {
  fill: inherit;
}

.document-header__brand {
  position: relative;
  display: flex;
  justify-content: center;
}

.header__name {
  text-align: center;
}

.header__logo .logo {
  margin-inline: auto;
  max-height: 14mm;
}

.table-header {
  margin: 0 -3mm;
  line-height: 1;
}

.document-title-row {
  display: grid;
  grid-template-columns: 1fr auto;
  column-gap: var(--space-6);
  align-items: center;
  margin-top: var(--space-10);
}

.document-title-row .document-title {
  margin-top: 0;
  min-width: 0;
}

.title-qrcode .url-qrcode {
  display: block;
  width: var(--qr-size);
  height: var(--qr-size);
}

.footer {
  grid-template-columns: 1fr 1fr 1fr auto;
  grid-template-rows: auto auto;
  row-gap: var(--space-3);
}

.footer__sender {
  grid-column: 1 / 4;
  grid-row: 1;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: baseline;
  gap: 0.45em;
  min-width: 0;
}

.footer__sender .footer__row {
  white-space: nowrap;
}

.footer__sender .footer__row:not(:last-child)::after {
  content: "·";
  margin-left: 0.45em;
}

.footer__details {
  grid-column: 1 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  column-gap: var(--space-2);
  min-width: 0;
}

.footer__details .footer__section {
  min-width: 0;
}

.footer__details .footer__row {
  min-width: 0;
  overflow-wrap: anywhere;
}

.footer__page-count {
  grid-column: 4;
  grid-row: 2;
  align-self: end;
}

    </style>
  <style data-demo-watermark>

html,
body {
  min-height: 297mm;
}
body {
  isolation: isolate;
}
.sevdesk-demo-watermark {
  position: fixed;
  top: 0;
  left: 0;
  width: 210mm;
  height: 297mm;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  z-index: -1;
}
.sevdesk-demo-watermark span {
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-weight: 700;
  font-size: 160pt;
  color: #eee;
  transform: rotate(-45deg);
  letter-spacing: 0.08em;
  line-height: 1;
  white-space: nowrap;
  user-select: none;
}

</style>
</head>

  <body>
<div class="sevdesk-demo-watermark" aria-hidden="true"><span>DEMO</span></div>
    
<header class="document-header">
  <svg
    class="header__oval"
    xmlns="http://www.w3.org/2000/svg"
    viewBox="0 0 210 40"
    preserveAspectRatio="xMidYMin slice"
    aria-hidden="true"
    focusable="false"
  >
    <ellipse cx="105" cy="-6" rx="168" ry="42" />
  </svg>
  <div class="document-header__brand">
    {{#parameter.letterpaper_S}} {{#data.is_logo}}
    <div class="header__logo">
      <img
        class="logo"
        alt="{{data.client.name}}"
        src="{{#data.logo_data_url}}{{{data.logo_data_url}}}{{/data.logo_data_url}}{{^data.logo_data_url}}data:image/png;base64,{{data.logo}}{{/data.logo_data_url}}"
      />
    </div>
    {{/data.is_logo}} {{^data.is_logo}}
    <h1 class="header__name">{{data.client.name}}</h1>
    {{/data.is_logo}} {{/parameter.letterpaper_S}}
  </div>
</header>

<!-- qrcode relocated to document title -->

<footer>
  <div class="footer">
    <div class="footer__section footer__sender">
      <div class="footer__row">{{data.client.name}}</div>
      {{#data.client.name_addition}}
      <div class="footer__row">{{data.client.name_addition}}</div>
      {{/data.client.name_addition}}
      <div class="footer__row">{{data.client.address_street}}</div>
      <div class="footer__row">
        {{data.client.address_zip}} {{data.client.address_city}}
      </div>
      <!-- {{#data.client.address_country}}
      <div class="footer__row">{{data.client.address_country}}</div>
      {{/data.client.address_country}} -->
    </div>

    <div class="footer__details">
      <div class="footer__section footer__contact">
        {{#data.client.contact_phone}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Tel{{/ i18n}}</span>
          {{data.client.contact_phone}}
        </div>
        {{/data.client.contact_phone}} {{#data.client.contact_fax}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Fax{{/ i18n}}</span>
          {{data.client.contact_fax}}
        </div>
        {{/data.client.contact_fax}} {{#data.client.contact_email}}
        <div class="footer__row">
          <span class="footer__label">E-Mail</span>
          {{data.client.contact_email}}
        </div>
        {{/data.client.contact_email}} {{#data.client.website}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Web{{/ i18n}}</span>
          {{data.client.website}}
        </div>
        {{/data.client.website}}
      </div>

      <div class="footer__section footer__bank">
        {{#data.client.bank}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Bank{{/ i18n}}</span>
          {{data.client.bank}}
        </div>
        {{/data.client.bank}} {{#data.client.bank_account_number}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Account no.{{/ i18n}}</span>
          {{data.client.bank_account_number}}
        </div>
        {{/data.client.bank_account_number}} {{#data.client.bank_number}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Bank no.{{/ i18n}}</span>
          {{data.client.bank_number}}
        </div>
        {{/data.client.bank_number}} {{#data.client.bank_iban}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}IBAN{{/ i18n}}</span>
          {{data.client.bank_iban}}
        </div>
        {{/data.client.bank_iban}} {{#data.client.bank_bic}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}BIC{{/ i18n}}</span>
          {{data.client.bank_bic}}
        </div>
        {{/data.client.bank_bic}}
      </div>

      <div class="footer__section footer__tax">
        {{#data.client.vat_number}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}VAT.-ID{{/ i18n}}</span>
          {{data.client.vat_number}}
        </div>
        {{/data.client.vat_number}} {{#data.client.tax_number}}
        <div class="footer__row">
          <span class="footer__label">{{# i18n }}Tax-No.{{/ i18n}}</span>
          {{data.client.tax_number}}
        </div>
        {{/data.client.tax_number}}
      </div>
    </div>

    {{#parameter.printPageNumbers_Y}}
    <div class="footer__page-count">
      <div class="page-count">
        <div class="page-count__inner">
          <span class="page"></span
          ><span class="page-count__of">{{# i18n }}PageOf{{/ i18n}}</span
          ><span class="totalPages"></span>
        </div>
      </div>
    </div>
    {{/parameter.printPageNumbers_Y}} {{#parameter.printFooter_Y}}
    {{/parameter.printFooter_Y}}
  </div>
</footer>

{{#parameter.printFoldLines_Y}}
<aside class="foldlines">
  <hr class="foldline1" />
  <hr class="foldline2" />
  <hr class="foldline3" />
</aside>
{{/parameter.printFoldLines_Y}}

<div class="meta-header">
  <div class="adress-window">
    {{#parameter.printDeliveryReturn_Y}}
    <div class="adress-window__sender">
      {{data.client.name}}
      <span class="divider"></span> {{data.client.address_street}}
      <span class="divider"></span> {{data.client.address_zip}}
      {{data.client.address_city}}
    </div>
    {{/parameter.printDeliveryReturn_Y}}
    <div class="recipient">{{data.object.address}}</div>
  </div>

  <div class="descbox">
    <div class="descbox__grid">
      <span class="descbox__table-label">{{# i18n }}Date{{/ i18n}}</span>
      <span class="descbox__table-value"
        >{{# date }}{{data.object.letter_date}}{{/ date }}</span
      >

      {{#parameter.printCustomerNumber_Y}}
      <span class="descbox__table-label"
        >{{# i18n }}Your customer no.{{/ i18n}}</span
      >
      <span class="descbox__table-value">{{data.object.customer_number}}</span>
      {{/parameter.printCustomerNumber_Y}} {{#parameter.printContactPerson_Y}}
      <span class="descbox__table-label"
        >{{# i18n }}Your contact{{/ i18n}}</span
      >
      <span class="descbox__table-value descbox__table-value__contact"
        >{{data.object.contact_person}}</span
      >
      {{/parameter.printContactPerson_Y}}
    </div>
  </div>
</div>

<div class="document-title-row">
  <div class="document-title">{{data.object.header}}</div>
  {{#parameter.qrCode_Y}}
  <div class="title-qrcode">
    <a href="{{data.object.qr_url}}" class="qrcode url-qrcode">
      {{#data.object.qr_code_data_url}}
      <img src="{{data.object.qr_code_data_url}}" alt="" />
      {{/data.object.qr_code_data_url}}
    </a>
  </div>
  {{/parameter.qrCode_Y}}
</div>

<div class="head-text">{{{data.object.text}}}</div>

  </body>
</html>
