<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=Aldrich&family=Barlow:wght@300;400;500;600;700&display=swap"
  rel="stylesheet"
/>

    <style>
      /* {{#parameter.color}}
      :root {
        --accent-color: {{parameter.color}};
      }
      {{/parameter.color}} */
      
:root,
html {
  --font-body: "Barlow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-heading: "Aldrich", "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: 15pt;
  --text-brand: 17pt;

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

  --color-text: #1c1e21;
  --color-text-secondary: #3d4146;
  --color-muted: #7a7e84;
  --color-rule: #c8ccd0;
  --color-rule-strong: #1c1e21;
  --color-page-count-bg: #1c1e21;
  --color-heading-bg: #eef0f2;
  --color-accent: #e24a17;

  --space-1: 1mm;
  --space-2: 2mm;
  --space-3: 3mm;
  --space-4: 4mm;
  --space-6: 6mm;
  --space-8: 8mm;
  --space-10: 10mm;
  --space-12: 12mm;
  --space-14: 14mm;

  --qr-size: 12mm;
  --rule: 0.4mm;
  --rule-hairline: 0.25mm;
  --leading: 1.45;
  --foot-text-term-icon: none;

  --heading-weight: 400;
  --heading-tracking: 0.06em;
  --heading-leading: 1.15;
  --title-transform: uppercase;
  --label-transform: uppercase;
  --label-tracking: 0.35pt;
  --table-header-color: #fff;
  --table-header-bg: var(--color-text);
  --table-header-border-bottom: 0.75mm solid var(--color-accent);
  --table-gutter: 2.5mm;
  --table-heading-indent: 0;
  --table-row-stripe: var(--color-heading-bg);
  --table-position-rule: none;
  --page-count-color: #fff;
  --page-count-transform: uppercase;
  --page-count-tracking: 0.35pt;
  --total-gross-font: var(--font-heading);
  --total-gross-weight: 400;
  --total-gross-tracking: 0.04em;
}

@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 {
  /* Literal values: custom properties are not applied in the @page context. */
  background-color: #fff;
  background-image:
    linear-gradient(to top, transparent 5mm, #fff 5mm),
    linear-gradient(to top, #1c1e21 0 3.5mm, #e24a17 3.5mm 5mm, #e24a17 5mm);
}

.foot-text strong {
  font-weight: 700;
}

    </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">
  <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>

{{#parameter.qrCode_Y}}
<div class="header__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}}

<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__section">
      {{#data.client.contact_phone}}
      <div>
        <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}} {{#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 class="footer__section">
      {{#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>
    {{#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">{{data.object.header}}</div>

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

  </body>
</html>
