/**
 * Fulfillment-Rahmenvertrag — contract template texts (de/en).
 *
 * Best-of merge of the four real LogYou contracts (Namaste Kids 02/2026 base,
 * Wonderhome 04/2026 Sondervereinbarungen, KFP 04/2026 Ver2 start-triggers/
 * GDPR/disposal, Gutology 04/2026 Revised supplementary provisions), corrected
 * German, consolidated SLA/liability sections, PLUS the 2026 legal-research
 * integration:
 *  - AGB-validity fixes: insolvency clause decoupled from insolvency filing
 *    (BGH, §§ 103/119 InsO), three-tier liability cap with ADSp fallback
 *    (§ 307/309 BGB), cost-linked symmetric price adjustment with special
 *    termination right, staged realization instead of bare disposal
 *    (§§ 373 HGB, 1234 ff. BGB), legal fees limited to statutory amounts.
 *  - Added best-practice clauses: statutory lien §§ 464/475b/369 HGB,
 *    ownership/third-party rights, excluded & dangerous goods § 468 HGB,
 *    BBD/batch/FEFO, inbound inspection + objection period, stocktaking,
 *    goods insurance split § 472 HGB, limitation §§ 439/475a HGB, IT/data
 *    quality, volume deviation, e-invoice EN 16931, set-off restriction,
 *    SLA credits, customs (direct representation, Art. 18 UZK), VerpackG/
 *    ElektroG (LUCID) verification duty, sanctions/export control incl.
 *    Art. 12g Reg. (EU) 833/2014, MiLoG, GeschGehG confidentiality,
 *    exit management, change requests, foreign-customer VAT/EORI/language.
 *
 * ⚠ Template only — final wording MUST be reviewed by a Rechtsanwalt
 * (Fachanwalt für Transport- und Speditionsrecht) before customer use.
 * Keep edits here; the PDF builder only renders.
 *
 * Placeholders ({company}, {cutoffTime}, {noticeMonths}, {noticeClause}, {noticeSpecial}, {priceNoticeMonths},
 * {objectionWeeks}, {shrinkagePct}, {offerDate}, {curePeriodDays}) are
 * substituted by the builder.
 *
 * Block model: { t: 'p' | 'b' | 'n', ... } — p: paragraph { text },
 * b: bullet list { items }, n: numbered clauses { items: { h?, text }[] }.
 */

export type ContractBlock =
  | { t: 'p'; text: string }
  | { t: 'b'; items: string[] }
  | { t: 'n'; items: Array<{ h?: string; text: string }> }

export interface ContractSection {
  title: string
  blocks: ContractBlock[]
}

export const CONTRACT_TEXTS: any = {
  de: {
    docTitle: 'Fulfillment-Rahmenvertrag',
    docSubtitle: 'Vertrag über Fulfillment-Dienstleistungen',
    dateWord: 'Datum',
    between: 'zwischen',
    logyouParty: 'LogYou GmbH | Mühlenweg 4 | 35510 Butzbach',
    logyouRef: 'nachfolgend als „LogYou" bezeichnet',
    and: 'und',
    customerRef: 'nachfolgend als „Kunde" bezeichnet',
    tocTitle: 'Inhaltsverzeichnis',
    page: 'Seite',
    of: 'von',

    master: {
      title: 'Rahmenvereinbarung',
      blocks: [
        { t: 'p', text: 'Willkommen bei LogYou! Diese Rahmenvereinbarung bildet die Grundlage der Geschäftsbeziehung zwischen LogYou und dem Kunden. Im Sinne dieser Vereinbarung werden LogYou und der Kunde einzeln als „Partei" und gemeinsam als „Parteien" bezeichnet.' },
        { t: 'p', text: 'Die beigefügten Allgemeinen Geschäftsbedingungen („AGB") von LogYou, von denen der Kunde Kenntnis genommen und denen er zugestimmt hat, gelten ausschließlich für diese Rahmenvereinbarung. Etwaige entgegenstehende oder abweichende Geschäftsbedingungen des Kunden werden nicht Vertragsbestandteil.' },
        { t: 'p', text: 'Alle aufgeführten Preise sind Nettopreise und verstehen sich zuzüglich der gesetzlichen Umsatzsteuer.' },
        { t: 'p', text: 'Es gelten die folgenden Dokumente in dieser Rangfolge: 1. dieser Rahmenvertrag, 2. die AGB von LogYou, 3. die Allgemeinen Deutschen Spediteurbedingungen 2017 (ADSp 2017), 4. die Logistik-AGB 2019. Die ADSp 2017 gelten für speditions-, fracht- und lagervertragliche Leistungen; die Logistik-AGB 2019 gelten ergänzend für darüber hinausgehende logistische Zusatzleistungen (z. B. Retouren-Aufbereitung, Konfektionierung). Individuell ausgehandelte Abreden gehen allen Bedingungswerken vor (§ 305b BGB). Die genannten Bedingungswerke werden dem Kunden bei Vertragsschluss zugänglich gemacht; auf die Haftungsregelungen der Ziffern 22–24 ADSp 2017 wird ausdrücklich hingewiesen.' },
        { t: 'p', text: 'Jede Partei sichert der anderen zu, dass sie über die volle Rechts- und Geschäftsfähigkeit sowie alle erforderlichen Befugnisse verfügt, diesen Vertrag abzuschließen und zu erfüllen, und dass der Abschluss dieses Vertrages nicht gegen anderweitige Verpflichtungen der jeweiligen Partei verstößt.' }
      ]
    },

    services: {
      title: 'Erbrachte Dienstleistungen',
      blocks: [
        { t: 'p', text: 'LogYou bietet eine integrierte Operations-Software und Dienstleistungen an, die das Wachstum des Kunden entlang der gesamten Lieferkette unterstützen. Im Einzelnen umfasst dies die folgenden Leistungen:' },
        { t: 'b', items: [
          'Nahtlose Verbindung und Datenübertragung zwischen der Online-Plattform des Kunden (z. B. Online-Shop oder Warenwirtschaftssystem; abhängig von Kompatibilität und Verfügbarkeit) und den Systemen von LogYou. Diese Integration gewährleistet den automatischen Austausch von Schlüsselinformationen wie Sendungen, Beständen und Auftragsdaten. Voraussetzung sind die Verfügbarkeit und Abrufbarkeit der Schnittstelle.',
          'Effizienter Wareneingang ab dem Moment der Bestandsankunft. Die Kosten der Eingangsverarbeitung sind im Fulfillment-Preis enthalten, solange die Ware angemeldet, sortiert, palettiert und mit einem scannerlesbaren Strichcode versehen ist. Der Bearbeitungsaufwand für nicht standardgemäße Anlieferungen wird als Zusatzarbeit zum vereinbarten Stundensatz abgerechnet, soweit nichts anderes vereinbart ist.',
          'Sorgfältige Auftragsabwicklung mit modernen Prozessen, unterstützt durch das eigene Lagerverwaltungssystem von LogYou. Die Teams in jedem Lager gewährleisten die präzise Durchführung der Pick- und Packprozesse — vom Falten der Versandkartons über das Kommissionieren der Produkte bis zum Verschließen des Versandkartons. Bei Bedarf wird transportgeeignetes Füllmaterial bereitgestellt, um Transportschäden zu vermeiden. Die Leistung von LogYou für ausgehende Bestellungen endet mit der Übergabe an den Versanddienstleister.',
          'Ein dedizierter Ansprechpartner, der das Setup überprüft, den Kunden bei der Verbesserung seiner gesamten Abläufe unterstützt und den Kunden beim Wachstum begleitet.'
        ] },
        { t: 'p', text: 'Wählt der Kunde mit Zustimmung von LogYou einen bestimmten Versanddienstleister oder Spediteur aus, übergibt LogYou die bearbeiteten Sendungen an den jeweiligen Frachtführer zur Abholung. Mit der Übergabe der Sendungen an den Frachtführer geht die Gefahr des zufälligen Untergangs und der zufälligen Verschlechterung der Waren auf den Kunden über. LogYou haftet ab diesem Zeitpunkt nicht mehr für Verlust, Beschädigung oder Verzögerungen während des Transports. Dies gilt nicht, soweit LogYou vorsätzlich oder grob fahrlässig gehandelt hat, insbesondere bei offensichtlich ungeeigneter oder unsachgemäßer Verpackung.' },
        { t: 'p', text: 'Der Kunde ist für Richtigkeit, Vollständigkeit und Aktualität der von ihm oder seinen Systemen (Shop, Marktplatz, API) übermittelten Auftrags-, Artikel-, Empfänger- und Zolldaten verantwortlich; eine inhaltliche Prüfung durch LogYou erfolgt nicht. Erstanbindung und vom Kunden veranlasste Änderungen der Schnittstellen werden gemäß Angebot bzw. nach Aufwand vergütet.' },
        { t: 'p', text: 'Änderungen des Leistungsumfangs, des Sortiments (insbesondere die Aufnahme gefahrgut-, MHD- oder chargenpflichtiger Artikel), der Verpackungsvorgaben oder der Schnittstellen bedürfen eines Change Requests in Textform. LogYou unterbreitet binnen angemessener Frist ein Angebot zu Umsetzung, Zeitplan und Vergütung; bis zur Einigung bleibt der bisherige Leistungsumfang maßgeblich.' },
        { t: 'p', text: 'Weitere Dienstleistungen sind gesondert zu vereinbaren. Weitere Einzelheiten zu den Dienstleistungen und den Mitwirkungspflichten des Kunden sind in den AGB geregelt.' },
        { t: 'p', text: 'LogYou ist berechtigt, Subunternehmer einzusetzen. LogYou informiert den Kunden mindestens dreißig (30) Tage vor Beauftragung eines neuen Subunternehmers, der Zugang zu Waren oder personenbezogenen Daten des Kunden erhält, in Textform; dem Kunden steht ein Widerspruchsrecht aus wichtigem Grund zu. Mit allen solchen Subunternehmern schließt LogYou eine DSGVO-konforme Vereinbarung zur Auftragsverarbeitung ab.' }
      ]
    },

    term: {
      title: 'Start, Dauer und Kündigung',
      blocks: [
        { t: 'p', text: 'Der Vertrag beginnt mit dem operativen Start. Der operative Start — und damit der Beginn jeglicher Abrechnung — wird ausschließlich durch das erstmalige Eintreten eines der beiden folgenden Ereignisse ausgelöst, je nachdem, welches zuerst eintritt: (a) erstmaliger dokumentierter Eingang von Lagerbestand des Kunden bei LogYou oder (b) Beginn der technischen Systemanbindung.' },
        { t: 'p', text: 'Erfolgt innerhalb von sechs (6) Monaten ab Vertragsunterzeichnung kein operativer Start, endet dieser Vertrag automatisch; die Fortsetzung der Zusammenarbeit bedarf eines neuen Vertrages.' },
        { t: 'p', text: 'Voraussetzung für die Aufnahme des Betriebs ist, dass der Kunde für jedes Land, in dem Ware gelagert wird, vor dem geplanten operativen Start eine gültige Umsatzsteuer-Identifikationsnummer bereitstellt. Dem Kunden ist bekannt, dass die Lagerung seiner Waren in einem deutschen Lager regelmäßig ab dem ersten steuerbaren Umsatz eine umsatzsteuerliche Registrierungspflicht in Deutschland begründet; Kunden mit Sitz außerhalb der EU weisen zusätzlich eine gültige EORI-Nummer nach. LogYou schuldet keine Steuer- oder Rechtsberatung.' },
        { t: 'p', text: 'Jede Partei kann diesen Vertrag {noticeClause} zum Ende eines Kalendermonats in Textform (§ 126b BGB) kündigen; eine E-Mail an den benannten Ansprechpartner der anderen Partei wahrt die Form.{noticeSpecial}' },
        { t: 'p', text: 'Das Recht zur außerordentlichen Kündigung aus wichtigem Grund bleibt unberührt. Ein wichtiger Grund liegt für LogYou insbesondere vor, wenn der Kunde mit der Zahlung von mehr als zwei (2) fälligen Rechnungen im Rückstand ist oder ein offener Rechnungsbetrag von mehr als 5.000,00 EUR besteht und die fälligen Forderungen nicht vollständig beglichen wurden, sowie wenn die andere Partei ihre Zahlungen dauerhaft einstellt oder ihre Geschäftstätigkeit aufgibt. Die gesetzlichen Rechte im Insolvenzfall — einschließlich des Wahlrechts des Insolvenzverwalters (§ 103 InsO) — bleiben unberührt.' },
        { t: 'p', text: 'LogYou kann die Leistungserbringung aussetzen, wenn der Kunde zwei (2) fällige Rechnungen auch fünf (5) Tage nach der zweiten Mahnung nicht beglichen hat. Beim ersten Zahlungsverzug innerhalb eines rollierenden Zeitraums von zwölf (12) Monaten gewährt LogYou vor einer Aussetzung eine Nachfrist von {curePeriodDays} Werktagen ab Mitteilung in Textform; bei einem wiederholten Zahlungsverzug innerhalb desselben Zeitraums besteht das sofortige Aussetzungsrecht ohne weitere Nachfrist.' },
        { t: 'p', text: 'Der Kunde ist verpflichtet, sämtliche im Lager befindlichen Waren (einschließlich Retouren) spätestens innerhalb von dreißig (30) Tagen nach Vertragsende auf eigene Kosten abzuholen, vorausgesetzt, alle offenen Forderungen von LogYou sind vollständig beglichen. LogYou nimmt nach Vertragsende eingehende Waren oder Retouren des Kunden für einen Zeitraum von maximal dreißig (30) Tagen an und lagert sie ein.' },
        { t: 'p', text: 'Holt der Kunde die Waren nicht fristgerecht ab, geht LogYou wie folgt gestuft vor: (1) Abholaufforderung mit angemessener Nachfrist in Textform, (2) Androhung der Verwertung, (3) Verwertung durch freihändigen Verkauf oder Versteigerung entsprechend §§ 373 HGB, 1234 ff. BGB unter Anrechnung des Erlöses auf offene Forderungen und Auskehr eines Übererlöses an den Kunden, (4) Vernichtung nur, wenn die Ware objektiv wertlos ist oder die Verwertungskosten den erzielbaren Erlös übersteigen. Bis zur Verwertung fällt weiterhin das vereinbarte Lagergeld an; LogYou kann sämtliche mit Lagerung, Handling, Verwertung oder Entsorgung verbundenen Kosten in Rechnung stellen.' },
        { t: 'p', text: 'Exit-Management: Bei Vertragsbeendigung unterstützt LogYou die geordnete Rückführung der Bestände; Auslagerung, Verpackung, Palettierung und Versand werden nach dem bei Beendigung gültigen Preisstand vergütet. LogYou stellt dem Kunden binnen zehn (10) Werktagen die Bestands-, Auftrags- und — soweit geführt — Chargendaten in einem gängigen maschinenlesbaren Format bereit.' }
      ]
    },

    pricing: {
      title: 'Preisstruktur',
      blocks: [
        { t: 'p', text: 'Es gelten die Preise des Angebots vom {offerDate} (Anlage 1). Berechnet wird nur, was tatsächlich geleistet wurde; bis zum ersten Wareneingang entstehen keine Kosten. Die Abrechnung erfolgt nach diesen Grundsätzen:' },
        { t: 'n', items: [
          { h: 'Fulfillment je Sendung', text: 'Je versendete Sendung wird der Grundpreis laut Angebot berechnet. Er enthält die dort genannte Anzahl Picks (Entnahmepositionen); jeder weitere Pick kostet den vereinbarten Pick-Preis. Wird eine Bestellung in mehreren Sendungen versandt, zählt jede Sendung einzeln.' },
          { h: 'Retouren', text: 'Je bearbeitete Retoure wird der Retouren-Grundpreis zuzüglich des Preises je zurückgeführter Position berechnet. Enthalten sind Annahme, Sichtprüfung und Wiedereinlagerung verkaufsfähiger Ware.' },
          { h: 'Versandkosten', text: 'Versandkosten werden je Sendung nach der Versandkostentabelle des Angebots berechnet. Versendet LogYou über den eigenen Frachtführer-Account des Kunden, fallen keine Versandkosten gegenüber LogYou an.' },
          { h: 'Verpackungsmaterial', text: 'LogYou-Standardverpackung wird je Paket nach tatsächlichem Verbrauch zu den Preisen des Angebots berechnet. Kundeneigenes Material wird separat beschafft und wie Lagerware behandelt.' },
          { h: 'Lagerung', text: 'Lagerkosten werden nach dem im Angebot vereinbarten Modell berechnet: entweder je belegtem Kubikmeter (tagesgenau) oder als Monatspauschale je belegter Lagereinheit (Fachboden M, Fachboden L, Palettenplatz), jeweils nach der höchsten Belegung im Monat.' },
          { h: 'Zusätzliche Tätigkeiten', text: 'Arbeiten außerhalb des Standard-Fulfillments (z. B. Etikettieren, Umpacken, Inventur auf Wunsch, Sonderwareneingang) werden nach erfasster Zeit zum vereinbarten Stundensatz berechnet. Jeder Vorgang wird als Ticket in der LogShip-App dokumentiert und erscheint mit Datum und Ticketnummer auf der Rechnung.' },
          { h: 'Monatliche Grundgebühr', text: 'Sofern im Angebot vereinbart, wird für die LogShip-App eine monatliche Grundgebühr berechnet, erstmals für den Monat nach dem ersten Wareneingang.' }
        ] },
        { t: 'p', text: 'Alle Leistungen sind für den Kunden jederzeit in der LogShip-App einsehbar und werden auf der Rechnung je Leistungsart mit Menge und Einzelpreis ausgewiesen.' }
      ]
    },

    assumptions: {
      title: 'Annahmen',
      intro: 'Die vom Kunden bereitgestellten Informationen wurden als Grundlage für die Kalkulation der folgenden Kostenfaktoren verwendet:',
      onboarding: 'Onboarding- & Setupkosten: KOSTENFREI',
      integration: 'Für die technische Integration ist die Abrufbarkeit mittels API zu gewährleisten; hierfür stellt der Kunde LogYou die erforderlichen Zugangsdaten bereit. LogYou benötigt außerdem einen Benutzerzugang zur Weboberfläche der Warenwirtschaft bzw. des Shopsystems, um Lagerbestand, Artikeldaten und Aufträge/Lieferscheine überprüfen zu können. LogYou stellt die vereinbarten Schnittstellen mit banküblicher Sorgfalt bereit, haftet jedoch nicht für Schäden, die durch Ausfälle oder Fehlfunktionen der Schnittstellen bzw. der Systeme Dritter entstehen.',
      labels: {
        plannedStart: 'Geplantes operatives Startdatum',
        businessModel: 'Geschäftsmodell',
        shopSystem: 'LogYou-Setup / Shopsystem',
        ordersPerMonth: 'Ø Bestellungen pro Monat',
        avgPicks: 'Ø Picks pro Bestellung',
        skuCount: 'Ø gelagerte Artikel (SKUs)',
        storage: 'Ø genutzte Lagerfläche'
      }
    },

    adjustments: {
      title: 'Anpassungen',
      blocks: [
        { t: 'p', text: 'Preisänderungen (mit Ausnahme derjenigen, die der Preisgestaltungsmatrix unterliegen) treten {priceNoticeMonths} Monat(e) nach der Benachrichtigung per E-Mail in Kraft. Der Kunde hat das Recht, der Preisänderung innerhalb von {objectionWeeks} Wochen nach Benachrichtigung durch Kündigung des Vertrages zu widersprechen; in diesem Fall gewährleistet LogYou Preisstabilität für die Dauer der Kündigungsfrist. Kündigt der Kunde nicht innerhalb dieser Frist, gilt die neue Preisgestaltung als vereinbart. LogYou behält sich das Recht vor, die Preise alle sechs (6) Monate anzupassen.' },
        { t: 'p', text: 'Der Preiskalkulation liegen die Annahmen gemäß dem Abschnitt „Annahmen" zugrunde (insbesondere Aufträge pro Monat, Ø Picks pro Auftrag, Artikelanzahl und Lagerbedarf). Weichen die tatsächlichen Werte erheblich — um mehr als 25 % nach oben oder unten — von diesen Annahmen ab, kann LogYou die Preiskonditionen entsprechend anpassen, insbesondere durch Zuordnung zu der dem tatsächlichen Volumen entsprechenden Stufe der Preismatrix des Angebots. Eine solche Anpassung wird wie eine Preisänderung nach Absatz 1 angekündigt; das Widerspruchs- und Kündigungsrecht des Kunden gilt entsprechend. Bei einer Abweichung nach oben gibt LogYou günstigere Konditionen in gleicher Weise an den Kunden weiter.' }
      ]
    },

    payment: {
      title: 'Zahlungsbedingungen',
      transfer: { t: 'p', text: 'Die Abrechnung erfolgt auf Rechnung. Rechnungsbeträge sind sofort nach Rechnungsdatum ohne Abzug per Überweisung fällig. Die Parteien können jederzeit in Textform die Umstellung auf das SEPA-Firmenlastschriftverfahren (Geschäftskunden-Lastschrift, nicht SEPA-Basislastschrift) vereinbaren; LogYou kündigt Lastschrifteinzüge dann mindestens fünf (5) Tage vor Fälligkeit an (Pre-Notification).' },
      sepa: { t: 'p', text: 'Die Abrechnung erfolgt auf Rechnung; die Zahlung erfolgt per SEPA-Firmenlastschrift (Geschäftskunden-Lastschrift, nicht SEPA-Basislastschrift) sofort nach Rechnungsdatum gemäß dem erteilten SEPA-Firmenlastschriftmandat. LogYou kündigt Lastschrifteinzüge mindestens fünf (5) Tage vor Fälligkeit an (Pre-Notification). Kosten berechtigter Rücklastschriften trägt der Kunde; ihm bleibt der Nachweis geringerer Kosten unbenommen.' },
      common: [
        { t: 'p', text: 'Rechnungen werden von LogYou ausschließlich in elektronischer Form als strukturierte E-Rechnung nach der Norm EN 16931 (z. B. ZUGFeRD oder XRechnung) einmal pro Monat oder alle fünfzehn (15) Tage ausgestellt; der Kunde mit Sitz im Inland gewährleistet die Empfangsbereitschaft (§ 14 UStG). Fracht- und Verpackungskosten können separat in Rechnung gestellt werden.' },
        { t: 'p', text: 'Bei Zahlungsverzug gelten die gesetzlichen Regelungen, insbesondere die Verzugszinsen gemäß § 288 BGB.' }
      ]
    },

    sla: {
      title: 'Service-Level & betriebliche Regelungen',
      blocks: [
        { t: 'n', items: [
          { h: 'Cut-off-Zeit für D2C (Paketversand an Endkunden)', text: 'Bestellungen, die bis zur vereinbarten Cut-off-Zeit ({cutoffTime} Uhr) im System LogShip eingehen, werden am selben Werktag (Montag bis Freitag, außer an Feiertagen sowie an den in den AGB genannten Tagen) bearbeitet, versendet und dem Versanddienstleister übergeben.' },
          { h: 'Wareneingang (Anlieferung an das Lager)', text: 'Angemeldete, korrekt etikettierte und sortenreine Ware wird innerhalb von zwei (2) Werktagen nach Anlieferung vollständig eingebucht und eingelagert. Nicht angemeldete, falsch etikettierte oder unsortierte Ware (ausgenommen Container) wird innerhalb von fünf (5) Werktagen eingelagert; der zusätzliche Bearbeitungsaufwand wird nach tatsächlichem Aufwand berechnet. LogYou bestätigt jede Wareneingangsanmeldung innerhalb von 24 Stunden nach Anlieferung im System.' },
          { h: 'Schnittstellenkontrolle & Rügefrist', text: 'LogYou prüft angelieferte Ware bei Wareneingang auf äußerlich erkennbare Schäden. Eine Zählprüfung der Packstück- oder Artikelanzahl sowie eine weitergehende Qualitäts-, Funktions- oder Echtheitsprüfung sind nicht geschuldet; die Erfassung der Mengen erfolgt auf Basis der Frachtpapiere und der avisierten Daten. Festgestellte Schäden werden dem Kunden unverzüglich über das System gemeldet. Einwendungen gegen Wareneingangsmeldungen hat der Kunde innerhalb von zehn (10) Werktagen in Textform zu erheben; nach Fristablauf gilt die Meldung als gebilligt, worauf in der Meldung hingewiesen wird.' },
          { h: 'Trackingdaten', text: 'LogYou stellt Trackingdaten innerhalb von zwei (2) Stunden nach Versand an das Kundensystem bereit.' },
          { h: 'B2B-Kommissionierung & Speditionsversand', text: 'B2B-Bestellungen über Palettenversand, die bis 10:00 Uhr eines Werktags eingehen, werden innerhalb von zwei (2) Werktagen versandfertig kommissioniert. LogYou übernimmt auf Wunsch den Speditionsversand einschließlich Angebotseinholung, Rücksprache mit dem Kunden, Avisierung und Koordination; hierfür wird die im Angebot ausgewiesene Pauschale berechnet, die Speditionskosten werden weiterberechnet. Fehlmengen, Transportschäden oder Unstimmigkeiten beim Warenausgang werden dem Kunden unverzüglich gemeldet.' },
          { h: 'Retourenbearbeitung', text: 'Die Annahme und Einlagerung zurückgesendeter Retouren erfolgt innerhalb von zwei (2) Werktagen nach Eintreffen im Lager. Der Kunde wird über eingetroffene Retouren durch Bereitstellung von Informationen (z. B. Bestellnummer) informiert. Der Basispreis für Retouren umfasst Annahme und Einlagerung; Prüfung, Aufbereitung oder Klassifizierung (A/B/C) erfolgen nach Kundenwunsch und werden nach Zeitaufwand berechnet.' },
        ] }
      ],
      express: { h: 'Express-Versand', text: 'LogYou bietet für definierte Versandprofile einen Express-Versand an. Voraussetzung ist der Bestelleingang im System LogShip bis spätestens {cutoffTime} Uhr (Cut-off-Zeit). Bei rechtzeitigem Eingang wird die Sendung am selben Werktag als DHL-Paket versendet. Ein Wechsel des Versanddienstleisters erfolgt ausschließlich nach vorheriger Abstimmung mit dem Kunden. Nach ordnungsgemäßer und fristgerechter Übergabe an den Versanddienstleister übernimmt LogYou keine Haftung für Zustellverzögerungen, die durch den Versanddienstleister verursacht werden. Der Express-Versand ist kein gesondertes Expressprodukt des Versanddienstleisters, sondern basiert ausschließlich auf der definierten Cut-off-Zeit und der taggleichen Übergabe.' }
    },

    liability: {
      title: 'Haftung',
      blocks: [
        { t: 'n', items: [
          { h: 'Sorgfaltsmaßstab', text: 'LogYou erbringt die Leistungen nach diesem Vertrag gemäß seinen dokumentierten betrieblichen Verfahren und mit der Sorgfalt, die in den ADSp 2017 und den Logistik-AGB 2019 zum Ausdruck kommt.' },
          { h: 'Eignung der Lagerstätten & Genehmigungen', text: 'LogYou gewährleistet, dass (a) seine Fulfillment-Center für die Lagerung der Waren des Kunden geeignet sind und (b) LogYou über alle für den Betrieb seiner Fulfillment-Center erforderlichen Genehmigungen und Erlaubnisse verfügt.' },
          { h: 'Haftungsmaßstab und Haftungsobergrenzen', text: 'LogYou haftet unbeschränkt für Vorsatz und grobe Fahrlässigkeit sowie für Schäden aus der Verletzung von Leben, Körper oder Gesundheit. Bei einfach fahrlässiger Verletzung wesentlicher Vertragspflichten (Kardinalpflichten) ist die Haftung auf den vertragstypischen, bei Vertragsschluss vorhersehbaren Schaden begrenzt; im Übrigen ist die Haftung für einfache Fahrlässigkeit ausgeschlossen. Für Verlust oder Beschädigung von Waren des Kunden ist die Haftung der Höhe nach auf den Einstandswert (Landed Cost) der betroffenen Waren begrenzt, nachzuweisen durch die Original-Einkaufsrechnungen. Der Kunde kann für einzelne Schlüsselartikel durch Wertdeklaration in Textform einen höheren Wert vereinbaren; ein etwaiger Zuschlag wird in Textform festgehalten. Sollte eine der vorstehenden Begrenzungen unwirksam sein, gelten ersatzweise die Haftungshöchstbeträge der ADSp 2017 (Ziffern 23–24) bzw. der Logistik-AGB 2019.' },
          { h: 'Wechselseitige Freistellung', text: 'Ergänzend zu den Freistellungsregelungen der AGB stellt jede Partei die andere Partei von Ansprüchen Dritter, Schäden, Verlusten und angemessenen Aufwendungen frei, soweit diese auf grober Fahrlässigkeit oder Vorsatz der freistellenden Partei bei der Erfüllung dieses Vertrages beruhen.' },
          { h: 'Verjährung', text: 'Ansprüche aus den speditions-, fracht- und lagervertraglichen Leistungen verjähren nach Maßgabe der §§ 439, 475a HGB in einem Jahr, bei Vorsatz oder gleichstehendem Verschulden in drei Jahren. Im Übrigen gelten die gesetzlichen Verjährungsfristen.' }
        ] }
      ]
    },

    property: {
      title: 'Waren & Eigentum',
      blocks: [
        { t: 'n', items: [
          { h: 'Eigentum und Rechte Dritter', text: 'Der Kunde sichert zu, dass er Eigentümer der eingelagerten Waren ist oder uneingeschränkt über sie verfügen darf und dass keine Rechte Dritter der Leistungserbringung entgegenstehen. Bestehende Sicherungsrechte Dritter (z. B. verlängerter Eigentumsvorbehalt, Sicherungsübereignung an Finanzierer) sind LogYou vor Anlieferung in Textform offenzulegen. Der Kunde stellt LogYou von allen Ansprüchen Dritter frei, die auf einer Verletzung dieser Zusicherung beruhen.' },
          { h: 'Ausgeschlossene Güter & Gefahrgut', text: 'Von der Einlagerung ausgeschlossen sind — vorbehaltlich abweichender Vereinbarung in Textform — Gefahrgüter im Sinne des ADR und Gefahrstoffe, temperaturgeführte oder leicht verderbliche Waren, lebende Tiere und Pflanzen, Waffen und Munition, verbrauchsteuerpflichtige Waren, gefälschte oder nicht verkehrsfähige Waren sowie Waren mit einem Wert über 5.000,00 EUR je Stück. Soll gefährliches Gut gelagert werden, teilt der Kunde LogYou rechtzeitig vor Anlieferung in Textform die genaue Art der Gefahr und die erforderlichen Vorsichtsmaßnahmen mit (§ 468 Abs. 1 HGB) und übergibt Sicherheitsdatenblätter. Bei Verstößen darf LogYou die Annahme verweigern oder die Ware auf Kosten des Kunden zurückweisen, gesondert sichern oder auslagern; der Kunde ersetzt hierdurch entstehende Schäden und Aufwendungen auch ohne Verschulden.' },
        ] }
      ]
    },

    compliance: {
      title: 'Zoll & Compliance',
      blocks: [
        { t: 'n', items: [
          { h: 'Zollabwicklung', text: 'Zollabwicklungen (Ein-/Ausfuhr einschließlich CN22/CN23-Erklärungen) erbringt LogYou nur aufgrund gesonderter Beauftragung in Textform und ausschließlich als direkter Vertreter im Namen und für Rechnung des Kunden (Art. 18 UZK); Anmelder und Schuldner der Einfuhrabgaben ist der Kunde. Der Kunde unterhält — soweit erforderlich — eine gültige EORI-Nummer und stellt alle für Zollanmeldungen erforderlichen Angaben vollständig und richtig bereit; er stellt LogYou von Abgaben, Bußgeldern und Aufwendungen frei, die auf unrichtigen oder unvollständigen Angaben beruhen. Zur indirekten Vertretung ist LogYou nicht verpflichtet.' },
          { h: 'Produktverantwortung (VerpackG / ElektroG / BattG)', text: 'Der Kunde sichert zu, seinen Produktverantwortungspflichten nachzukommen, insbesondere der Registrierung im Verpackungsregister LUCID und der Systembeteiligung für systembeteiligungspflichtige Verpackungen (§§ 7, 9 VerpackG) sowie — soweit einschlägig — der Registrierung bei der stiftung ear (ElektroG) und den batterierechtlichen Pflichten. Er teilt LogYou vor Leistungsbeginn seine LUCID-Registrierungsnummer und gegebenenfalls WEEE-Reg.-Nr. mit und hält diese während der Vertragslaufzeit aktuell. LogYou ist gesetzlich verpflichtet, diese Registrierungen zu prüfen (§ 7 Abs. 7 VerpackG; Prüfpflichten nach dem ElektroG), und berechtigt, seine Leistungen auszusetzen, solange Nachweise fehlen; hierdurch bedingte Verzögerungen gehen nicht zu Lasten von LogYou. Der Kunde stellt LogYou von Bußgeldern und Ansprüchen frei, die auf der Verletzung dieser Zusicherungen beruhen.' },
          { h: 'Sanktionen & Exportkontrolle', text: 'Die Leistungserbringung steht unter dem Vorbehalt, dass ihr keine Vorschriften des nationalen oder internationalen Außenwirtschafts-, Zoll-, Exportkontroll- oder Sanktionsrechts entgegenstehen. Der Kunde gewährleistet, dass weder er noch die Warenempfänger auf einschlägigen Sanktionslisten (EU, UN, ggf. US) geführt werden und dass keine Lieferung gegen Embargovorschriften verstößt, einschließlich des Reexportverbots nach Russland gemäß Art. 12g VO (EU) 833/2014. LogYou darf Aufträge ablehnen oder aussetzen, deren Ausführung hiergegen verstoßen könnte, ohne dass dem Kunden hieraus Ansprüche entstehen.' },
          { h: 'Mindestlohn (MiLoG)', text: 'LogYou verpflichtet sich, seinen Arbeitnehmern mindestens das gesetzliche Mindestentgelt nach dem MiLoG zu zahlen und diese Verpflichtung von ihm eingesetzten Nachunternehmern aufzuerlegen; die Einhaltung weist LogYou auf Verlangen in geeigneter Form nach. LogYou stellt den Kunden von einer Inanspruchnahme nach § 13 MiLoG frei, soweit diese auf einer Pflichtverletzung von LogYou oder seiner Nachunternehmer beruht.' }
        ] }
      ]
    },

    privacy: {
      title: 'Datenschutz & Vertraulichkeit',
      blocks: [
        { t: 'p', text: 'Soweit LogYou im Rahmen der Leistungserbringung personenbezogene Daten im Auftrag des Kunden verarbeitet (insbesondere Empfängerdaten der Endkunden), schließen die Parteien eine Vereinbarung zur Auftragsverarbeitung gemäß Art. 28 DSGVO ab, die diesem Vertrag als Anlage beigefügt wird und die technischen und organisatorischen Maßnahmen sowie die genehmigten Subprozessoren regelt. Versanddienstleister werden dabei regelmäßig als eigenverantwortliche Verantwortliche tätig. Beide Parteien verpflichten sich zur Einhaltung der anwendbaren datenschutzrechtlichen Bestimmungen.' },
        { t: 'p', text: 'Die Parteien behandeln alle bei der Vertragsdurchführung erlangten Geschäftsgeheimnisse und vertraulichen Informationen der jeweils anderen Partei vertraulich, schützen sie durch angemessene Geheimhaltungsmaßnahmen im Sinne des § 2 Nr. 1 lit. b GeschGehG und nutzen sie ausschließlich zur Vertragsdurchführung. Diese Pflicht besteht für die Vertragslaufzeit und fünf (5) Jahre darüber hinaus fort; gesetzliche Offenlegungspflichten bleiben unberührt.' }
      ]
    },

    marketing: {
      title: 'Marketingrechte',
      consent: { t: 'p', text: 'Der Kunde stimmt grundsätzlich zu — eine vorherige Anfrage von LogYou erfolgt dennoch —, dass LogYou in Marketingmaterialien (Bild, Text, Video, Audio), in sozialen Medien und auf der LogYou-Website auf das Unternehmen des Kunden, das Logo des Kunden, die Produkte des Kunden, Effizienzkennzahlen und eine Kurzbeschreibung hinweisen darf. Die Mitwirkung an Testimonials, White Papers oder Interviews bedarf einer gesonderten Zustimmung im Einzelfall. Der Kunde kann diese Zustimmung jederzeit mit Wirkung für die Zukunft in Textform widerrufen.' },
      approval: { t: 'p', text: 'Jede Nutzung von Name, Logo, Produktabbildungen oder Kennzahlen des Kunden zu Marketingzwecken bedarf der vorherigen Freigabe durch den Kunden in Textform im Einzelfall. Eine pauschale Vorab-Zustimmung wird nicht erteilt.' }
    },

    jurisdiction: {
      title: 'Anwendbares Recht & Gerichtsstand',
      blocks: [
        { t: 'p', text: 'Dieser Vertrag unterliegt dem Recht der Bundesrepublik Deutschland unter Ausschluss des UN-Kaufrechts (CISG) und ohne Berücksichtigung kollisionsrechtlicher Grundsätze, die zur Anwendung des Rechts einer anderen Rechtsordnung führen würden. Ausschließlicher Gerichtsstand für alle Streitigkeiten aus oder im Zusammenhang mit diesem Vertrag ist das Landgericht Gießen; diese Gerichtsstandsvereinbarung ist als ausschließliche Vereinbarung im Sinne des Haager Gerichtsstandsübereinkommens 2005 zu verstehen.' },
        { t: 'p', text: 'Vertragssprache ist Deutsch. Eine etwaige englische Fassung dient lediglich der Information; bei Abweichungen geht die deutsche Fassung vor.' }
      ]
    },

    final: {
      title: 'Schlussbestimmungen',
      blocks: [
        { t: 'n', items: [
          { h: 'Änderungen', text: 'Änderungen und Ergänzungen dieses Vertrages sowie seine Aufhebung bedürfen einer von beiden Parteien unterzeichneten Vereinbarung in Textform, soweit dieser Vertrag nichts anderes bestimmt.' },
          { h: 'Höhere Gewalt', text: 'Die Verpflichtungen beider Parteien können ohne Haftung ausgesetzt werden, wenn die Leistung durch Ereignisse außerhalb der zumutbaren Kontrolle der jeweiligen Partei behindert oder unmöglich gemacht wird, z. B. höhere Gewalt, Krieg, Unruhen, Brand, Explosion, Epidemie, Überschwemmung, Streik oder Aussperrung. Die betroffene Partei benachrichtigt die andere Partei unverzüglich und unternimmt alle zumutbaren Anstrengungen, um die Leistungen nach Wegfall der Ursache umgehend wieder aufzunehmen.' },
          { h: 'Abtretung', text: 'Keine Partei darf diesen Vertrag ohne vorherige Zustimmung der anderen Partei in Textform ganz oder teilweise auf Dritte übertragen; die Zustimmung darf nicht unbillig verweigert oder verzögert werden. Das Recht von LogYou, im gewöhnlichen Geschäftsbetrieb Subunternehmer einzusetzen, bleibt hiervon unberührt.' },
          { h: 'Kein Verzicht', text: 'Die unterlassene oder verzögerte Ausübung eines Rechts aus diesem Vertrag gilt nicht als Verzicht auf dieses Recht; die einmalige oder teilweise Ausübung schließt die weitere Ausübung desselben oder eines anderen Rechts nicht aus.' },
          { h: 'Nicht-Exklusivität', text: 'LogYou wird als nicht-exklusiver Dienstleister beauftragt. Dem Kunden bleibt es unbenommen, weitere Fulfillment- oder Logistikdienstleister zu beauftragen; LogYou bleibt es unbenommen, Leistungen für andere Kunden zu erbringen.' },
          { h: 'Rechtsverfolgungskosten', text: 'Im Falle einer Vertragsverletzung ist die nicht vertragsbrüchige Partei berechtigt, von der vertragsbrüchigen Partei die notwendigen Kosten der Rechtsverfolgung in gesetzlicher Höhe ersetzt zu verlangen.' },
          { h: 'Salvatorische Klausel', text: 'Die Parteien erkennen an, dass dieser Vertrag in seiner Gesamtheit verhandelt wurde. Sollten einzelne Bestimmungen dieses Vertrages unwirksam oder undurchführbar sein oder werden, bleibt die Wirksamkeit des Vertrages im Übrigen unberührt. Die unwirksame oder undurchführbare Bestimmung wird durch eine wirksame und durchführbare Bestimmung ersetzt, deren Wirkungen dem wirtschaftlichen Ziel am nächsten kommen, das die Parteien mit der unwirksamen oder undurchführbaren Bestimmung verfolgt haben.' }
        ] }
      ]
    },

    special: {
      title: 'Sondervereinbarungen',
      intro: 'Die folgenden Sondervereinbarungen gelten ergänzend zu und — im Falle von Widersprüchen — vorrangig vor den übrigen Bestimmungen dieses Vertrages:'
    },

    annex: {
      title: 'Anlagen',
      blocks: [
        { t: 'p', text: 'Anlage 1: Angebot vom {offerDate} (Leistungsverzeichnis und Preisblatt). Das Angebot der LogYou GmbH vom {offerDate} ist Bestandteil dieses Vertrages. Im Falle von Widersprüchen zwischen diesem Vertrag und dem Angebot gehen die Regelungen dieses Vertrages vor, sofern nicht ausdrücklich etwas anderes vereinbart ist.' },
        { t: 'p', text: 'Anlage 2: Allgemeine Geschäftsbedingungen (AGB) der LogYou GmbH sowie ADSp 2017 und Logistik-AGB 2019.' },
        { t: 'p', text: 'Anlage 3: Vereinbarung zur Auftragsverarbeitung gemäß Art. 28 DSGVO (einschließlich technischer und organisatorischer Maßnahmen und Subprozessorenliste).' },
        { t: 'p', text: 'Anlage 4: Compliance-Selbstauskunft des Kunden (USt-IdNr., ggf. EORI-Nummer, LUCID-Registrierungsnummer, ggf. WEEE-Reg.-Nr.).' }
      ]
    },

    signatures: {
      title: 'Unterschriften',
      logyouCity: 'Butzbach',
      logyouSigner: 'Dennis Montag',
      logyouPosition: 'Geschäftsführer',
      logyouCompany: 'LogYou GmbH',
      customerWord: 'Kunde',
      date: 'Datum',
      signature: 'Unterschrift',
      name: 'Name',
      position: 'Position',
      company: 'Unternehmen',
      vatId: 'USt-IdNr.',
      address: 'Anschrift',
      dots: '…………………………………………………………..'
    }
  },

  en: {
    docTitle: 'Fulfillment Service Agreement',
    docSubtitle: 'Master agreement on fulfillment services',
    dateWord: 'Date',
    between: 'between',
    logyouParty: 'LogYou GmbH | Mühlenweg 4 | 35510 Butzbach, Germany',
    logyouRef: 'hereinafter referred to as "LogYou"',
    and: 'and',
    customerRef: 'hereinafter referred to as the "Customer"',
    tocTitle: 'Table of Contents',
    page: 'Page',
    of: 'of',

    master: {
      title: 'Master Agreement',
      blocks: [
        { t: 'p', text: 'Welcome to LogYou! This master agreement forms the basis of the business relationship between LogYou and the Customer. For the purposes of this agreement, LogYou and the Customer are individually referred to as a "Party" and collectively as the "Parties".' },
        { t: 'p', text: 'The attached General Terms and Conditions ("GTC") of LogYou, which the Customer has reviewed and accepted, apply exclusively to this master agreement. Any conflicting or deviating terms and conditions of the Customer shall not become part of this business relationship.' },
        { t: 'p', text: 'All listed prices are net prices and are subject to statutory VAT.' },
        { t: 'p', text: 'The following documents apply in this order of precedence: 1. this master agreement, 2. the GTC of LogYou, 3. the German Freight Forwarders\' Standard Terms and Conditions 2017 (ADSp 2017), 4. the Logistics General Terms and Conditions 2019 (Logistik-AGB 2019). The ADSp 2017 apply to freight-forwarding, carriage and warehousing services; the Logistik-AGB 2019 additionally apply to logistics services going beyond these (e.g. returns refurbishment, kitting). Individually negotiated agreements prevail over all standard terms (Section 305b German Civil Code). The named standard terms are made available to the Customer upon conclusion of the contract; express reference is made to the liability provisions in clauses 22–24 ADSp 2017.' },
        { t: 'p', text: 'Each Party represents and warrants to the other that it has full legal capacity and authority to enter into and perform this agreement, and that execution of this agreement does not conflict with any other obligation of that Party.' }
      ]
    },

    services: {
      title: 'Services Provided',
      blocks: [
        { t: 'p', text: 'LogYou offers integrated operations software and services designed to support the Customer\'s growth throughout the entire supply chain. Specifically, the following services are included:' },
        { t: 'b', items: [
          'Seamless connection and data transfer between the Customer\'s online platform (e.g. online shop or ERP system, depending on compatibility and availability) and LogYou\'s systems. This integration ensures the automatic exchange of key information such as shipments, inventory levels and order data. Availability and accessibility of the interface are required.',
          'Efficient inbound goods processing starting from the moment inventory arrives. Costs for inbound processing are included in the fulfillment price as long as the goods are announced, sorted, palletized and labelled with a scanner-readable barcode. Processing time required for non-standard inbound deliveries will be charged as additional work at the agreed hourly rate unless otherwise agreed.',
          'Careful order fulfillment using modern processes supported by LogYou\'s proprietary warehouse management system. The teams in each warehouse ensure precise execution of pick-and-pack processes — from folding shipping cartons to picking products and sealing shipping boxes. Suitable void-fill material will be provided if required to prevent transport damage. LogYou\'s service for outbound orders ends once the shipment is handed over to the shipping carrier.',
          'A dedicated contact person who reviews the setup, supports the Customer in improving operational processes and accompanies the Customer\'s growth.'
        ] },
        { t: 'p', text: 'If the Customer selects a specific shipping carrier or freight forwarder with LogYou\'s consent, LogYou will hand over the processed shipments to the respective carrier for pickup. Upon handover of the shipments to the carrier, the risk of accidental loss and accidental deterioration of the goods passes to the Customer. From this point in time, LogYou is no longer liable for loss, damage or delays during transport. This does not apply where LogYou has acted with intent or gross negligence, in particular in the case of obviously unsuitable or improper packaging.' },
        { t: 'p', text: 'The Customer is responsible for the accuracy, completeness and currency of the order, article, recipient and customs data transmitted by it or its systems (shop, marketplace, API); LogYou does not review such data substantively. Initial integration and interface changes initiated by the Customer are remunerated in accordance with the offer or based on effort.' },
        { t: 'p', text: 'Changes to the scope of services, the assortment (in particular the addition of articles subject to dangerous-goods, best-before-date or batch requirements), the packaging specifications or the interfaces require a change request in text form. LogYou will submit a proposal for implementation, schedule and remuneration within a reasonable period; until agreement is reached, the previous scope of services remains authoritative.' },
        { t: 'p', text: 'Additional services must be agreed separately. Further details regarding the services and the Customer\'s duties to cooperate are set out in the GTC.' },
        { t: 'p', text: 'LogYou may appoint subcontractors. LogYou will notify the Customer in text form at least thirty (30) days before engaging a new subcontractor who will have access to the Customer\'s goods or personal data; the Customer has a right to object for good cause. LogYou will conclude a GDPR-compliant data processing agreement with all such subcontractors.' }
      ]
    },

    term: {
      title: 'Start, Term and Termination',
      blocks: [
        { t: 'p', text: 'The contract begins with the operational start. The operational start — and thus the beginning of any billing — is triggered exclusively by the first occurrence of one of the following two events, whichever comes first: (a) the first documented receipt of the Customer\'s inventory at LogYou, or (b) the start of the technical system integration.' },
        { t: 'p', text: 'If no operational start has occurred within six (6) months of signing, this contract ends automatically; continuation of the cooperation requires a new contract.' },
        { t: 'p', text: 'In order to commence operations, the Customer must provide a valid VAT identification number for each country in which goods are stored before the planned operational start date. The Customer is aware that storing its goods in a German warehouse regularly triggers a German VAT registration obligation from the first taxable supply; customers established outside the EU additionally provide evidence of a valid EORI number. LogYou does not owe tax or legal advice.' },
        { t: 'p', text: 'Either Party may terminate this contract in text form (Section 126b German Civil Code — an email to the named contact person of the other Party satisfies this requirement) {noticeClause} to the end of a calendar month.{noticeSpecial}' },
        { t: 'p', text: 'The right to extraordinary termination for good cause remains unaffected. Good cause exists for LogYou in particular if the Customer is in arrears with payment of more than two (2) due invoices or if an outstanding invoice amount exceeds EUR 5,000.00 and all due claims have not been fully settled, and if the other Party permanently suspends its payments or abandons its business operations. The statutory rights in the event of insolvency — including the insolvency administrator\'s right of election (Section 103 German Insolvency Code) — remain unaffected.' },
        { t: 'p', text: 'LogYou may suspend the provision of services if the Customer has failed to settle two (2) due invoices within five (5) days after the second reminder. In the case of the Customer\'s first payment default within any rolling twelve (12) month period, LogYou will grant a cure period of {curePeriodDays} business days from notice in text form before suspending services; in the event of a repeat payment default within the same period, the immediate suspension right applies without a further cure period.' },
        { t: 'p', text: 'The Customer is obliged to collect all goods in the warehouse (including returns) at its own expense no later than thirty (30) days after termination of the contract, provided all outstanding claims of LogYou have been settled in full. LogYou will accept and store incoming goods or returns of the Customer for a maximum period of thirty (30) days after termination.' },
        { t: 'p', text: 'If the Customer fails to collect the goods in time, LogYou will proceed in the following stages: (1) collection demand with a reasonable grace period in text form, (2) warning of realization, (3) realization by private sale or auction in accordance with Sections 373 German Commercial Code, 1234 et seq. German Civil Code, with the proceeds credited against outstanding claims and any surplus paid out to the Customer, (4) destruction only if the goods are objectively worthless or the costs of realization exceed the achievable proceeds. The agreed storage fee continues to accrue until realization; LogYou may charge all costs connected with storage, handling, realization or disposal.' },
        { t: 'p', text: 'Exit management: Upon termination, LogYou supports the orderly return of the inventory; de-stocking, packaging, palletizing and shipping are remunerated at the price level applicable at termination. LogYou provides the Customer with the inventory, order and — where maintained — batch data in a common machine-readable format within ten (10) business days.' }
      ]
    },

    pricing: {
      title: 'Pricing Structure',
      blocks: [
        { t: 'p', text: 'The prices of the offer dated {offerDate} (Annex 1) apply. Only services actually rendered are charged; no costs arise before the first goods receipt. Billing follows these principles:' },
        { t: 'n', items: [
          { h: 'Fulfillment per shipment', text: 'For each shipment dispatched, the base price per the offer is charged. It includes the number of picks (order lines) stated there; each additional pick costs the agreed pick price. If an order is dispatched in several shipments, each shipment counts individually.' },
          { h: 'Returns', text: 'For each processed return, the return base price plus the price per returned line is charged. This includes receipt, visual inspection and restocking of saleable goods.' },
          { h: 'Shipping costs', text: 'Shipping costs are charged per shipment according to the shipping cost table of the offer. If LogYou ships via the Customer\'s own carrier account, no shipping costs are payable to LogYou.' },
          { h: 'Packaging material', text: 'LogYou standard packaging is charged per parcel based on actual consumption at the prices of the offer. Customer-owned material is procured separately and treated like stored goods.' },
          { h: 'Storage', text: 'Storage costs are charged according to the model agreed in the offer: either per occupied cubic metre (daily) or as a monthly flat rate per occupied storage unit (shelf M, shelf L, pallet space), in each case based on the highest occupancy in the month.' },
          { h: 'Additional services', text: 'Work outside standard fulfillment (e.g. labelling, repacking, stocktaking on request, non-standard goods receipt) is charged by recorded time at the agreed hourly rate. Each operation is documented as a ticket in the LogShip app and appears on the invoice with date and ticket number.' },
          { h: 'Monthly base fee', text: 'Where agreed in the offer, a monthly base fee is charged for the LogShip app, for the first time for the month following the first goods receipt.' }
        ] },
        { t: 'p', text: 'All services can be viewed by the Customer at any time in the LogShip app and are itemised on the invoice per service type with quantity and unit price.' }
      ]
    },

    assumptions: {
      title: 'Assumptions',
      intro: 'The information provided by the Customer was used as the basis for calculating the following cost factors:',
      onboarding: 'Onboarding & setup costs: FREE OF CHARGE',
      integration: 'For the technical integration, accessibility via API must be ensured; for this purpose the Customer provides LogYou with the necessary credentials. LogYou also requires a user account for the web interface of the ERP or shop system in order to review inventory levels, product data and orders/delivery notes. LogYou provides the agreed interfaces with due care but is not liable for damage caused by failures or malfunctions of the interfaces or third-party systems.',
      labels: {
        plannedStart: 'Planned operational start date',
        businessModel: 'Business model',
        shopSystem: 'LogYou setup / shop system',
        ordersPerMonth: 'Avg. orders per month',
        avgPicks: 'Avg. picks per order',
        skuCount: 'Avg. stored items (SKUs)',
        storage: 'Avg. storage space used'
      }
    },

    adjustments: {
      title: 'Adjustments',
      blocks: [
        { t: 'p', text: 'Price changes (except those governed by the pricing matrix) take effect {priceNoticeMonths} month(s) after notification by e-mail. The Customer has the right to object to the price change within {objectionWeeks} weeks of the notification by terminating the agreement; in this case LogYou guarantees price stability for the duration of the notice period. If the Customer does not terminate within this period, the new pricing is deemed agreed. LogYou reserves the right to adjust prices every six (6) months.' },
        { t: 'p', text: 'The pricing is based on the assumptions set out in the section "Assumptions" (in particular orders per month, average picks per order, number of SKUs and storage requirement). If the actual values deviate significantly — by more than 25 % upwards or downwards — from these assumptions, LogYou may adjust the pricing conditions accordingly, in particular by assigning the tier of the offer\'s pricing matrix that corresponds to the actual volume. Such an adjustment is announced like a price change under paragraph 1; the Customer\'s right of objection and termination applies accordingly. In the event of an upward deviation, LogYou passes on more favourable conditions to the Customer in the same manner.' }
      ]
    },

    payment: {
      title: 'Payment Terms',
      transfer: { t: 'p', text: 'Services are billed on invoice. Invoice amounts are due immediately after the invoice date without deduction by bank transfer. The parties may at any time agree in text form to switch to the SEPA B2B direct debit scheme (business direct debit, not SEPA core direct debit); LogYou will then announce direct debits at least five (5) days before the due date (pre-notification).' },
      sepa: { t: 'p', text: 'Services are billed on invoice; payment is made by SEPA B2B direct debit (business direct debit, not SEPA core direct debit) immediately after the invoice date in accordance with the SEPA B2B mandate granted. LogYou announces direct debits at least five (5) days before the due date (pre-notification). The Customer bears the costs of justified return debits; the Customer remains free to prove lower costs.' },
      common: [
        { t: 'p', text: 'Invoices are issued by LogYou exclusively in electronic form as structured e-invoices in accordance with standard EN 16931 (e.g. ZUGFeRD or XRechnung), either once per month or every fifteen (15) days; Customers established in Germany ensure their ability to receive such invoices (Section 14 German VAT Act). Freight and packaging costs may be invoiced separately.' },
        { t: 'p', text: 'In the event of late payment, the statutory provisions apply, in particular default interest pursuant to Section 288 German Civil Code (BGB).' }
      ]
    },

    sla: {
      title: 'Service Levels & Operational Provisions',
      blocks: [
        { t: 'n', items: [
          { h: 'Cut-off time for D2C (parcel shipping to end customers)', text: 'Orders received in the LogShip system by the agreed cut-off time ({cutoffTime}) are processed, shipped and handed over to the shipping carrier on the same business day (Monday to Friday, except public holidays and the days specified in the GTC).' },
          { h: 'Inbound goods (delivery to the warehouse)', text: 'Announced, correctly labelled and sorted goods are fully booked in and stored within two (2) business days of delivery. Unannounced, incorrectly labelled or unsorted goods (except containers) are stored within five (5) business days; the additional processing effort is charged based on actual effort. LogYou confirms each inbound goods announcement in the system within 24 hours of delivery.' },
          { h: 'Interface inspection & objection period', text: 'Upon receipt, LogYou inspects delivered goods for externally visible damage. A count of packages or items as well as any further quality, functional or authenticity inspection is not owed; quantities are recorded on the basis of the shipping documents and the announced data. Damage identified is reported to the Customer without delay via the system. The Customer must raise objections to goods receipt reports within ten (10) working days in text form; after expiry of this period the report is deemed approved, which is pointed out in the report.' },
          { h: 'Tracking data', text: 'LogYou provides tracking data to the Customer\'s system within two (2) hours of shipping.' },
          { h: 'B2B picking & freight forwarding', text: 'B2B orders via pallet shipping received by 10:00 on a business day are picked ready for dispatch within two (2) business days. On request, LogYou handles freight forwarding including obtaining quotes, consultation with the Customer, notification and coordination; the flat fee stated in the offer is charged for this, and the freight costs are passed on. Shortfalls, transport damage or discrepancies in outgoing goods are reported to the Customer without delay.' },
          { h: 'Returns processing', text: 'Returned goods are accepted and stored within two (2) business days of arrival at the warehouse. The Customer is informed of received returns through the provision of information (e.g. order number). The base price for returns covers acceptance and storage; inspection, refurbishment or classification (A/B/C) are performed at the Customer\'s request and charged based on time spent.' },
        ] }
      ],
      express: { h: 'Express shipping', text: 'LogYou offers express shipping for defined shipping profiles. This requires the order to be received in the LogShip system by no later than {cutoffTime} (cut-off time). If received in time, the shipment is dispatched on the same business day as a DHL parcel. A change of shipping carrier only takes place after prior consultation with the Customer. After proper and timely handover to the shipping carrier, LogYou assumes no liability for delivery delays caused by the carrier. Express shipping is not a separate express product of the carrier but is based exclusively on the defined cut-off time and same-day handover.' }
    },

    liability: {
      title: 'Liability',
      blocks: [
        { t: 'n', items: [
          { h: 'Standard of care', text: 'LogYou performs the services under this agreement in accordance with its documented operational procedures and with the care reflected in the ADSp 2017 and the Logistik-AGB 2019.' },
          { h: 'Warehouse suitability & permits', text: 'LogYou warrants that (a) its fulfillment centres are suitable for the storage of the Customer\'s goods and (b) it holds all permits, licences and authorisations required to operate its fulfillment centres.' },
          { h: 'Standard of liability and liability caps', text: 'LogYou is liable without limitation for intent and gross negligence as well as for damage resulting from injury to life, body or health. In the case of a simply negligent breach of material contractual obligations (cardinal obligations), liability is limited to the typical damage foreseeable at the time of conclusion of the contract; otherwise, liability for simple negligence is excluded. For loss of or damage to the Customer\'s goods, liability is capped at the landed cost of the affected goods, as evidenced by the original purchase invoices. The Customer may agree a higher value for specific key stock items by declared-value notice in text form; any additional charge is recorded in text form. Should any of the foregoing limitations be invalid, the maximum liability amounts of the ADSp 2017 (clauses 23–24) or the Logistik-AGB 2019 apply instead.' },
          { h: 'Mutual indemnification', text: 'In addition to the indemnification framework set out in the GTC, each Party shall indemnify and hold the other Party harmless from and against third-party claims, damages, losses and reasonable expenses to the extent arising out of the indemnifying Party\'s gross negligence or wilful misconduct in the performance of this agreement.' },
          { h: 'Limitation period', text: 'Claims arising from the freight-forwarding, carriage and warehousing services become time-barred in accordance with Sections 439, 475a German Commercial Code (HGB) after one year, or three years in the case of intent or equivalent fault. Otherwise, the statutory limitation periods apply.' }
        ] }
      ]
    },

    property: {
      title: 'Goods & Ownership',
      blocks: [
        { t: 'n', items: [
          { h: 'Ownership and third-party rights', text: 'The Customer warrants that it is the owner of the stored goods or is entitled to dispose of them without restriction, and that no third-party rights conflict with the performance of this agreement. Existing third-party security interests (e.g. extended retention of title, security assignment to financiers) must be disclosed to LogYou in text form before delivery. The Customer indemnifies LogYou against all third-party claims based on a breach of this warranty.' },
          { h: 'Excluded goods & dangerous goods', text: 'Excluded from storage — unless otherwise agreed in text form — are dangerous goods within the meaning of the ADR and hazardous substances, temperature-controlled or highly perishable goods, live animals and plants, weapons and ammunition, excise goods, counterfeit or non-marketable goods, and goods with a value exceeding EUR 5,000.00 per item. If dangerous goods are to be stored, the Customer must notify LogYou in text form in good time before delivery of the exact nature of the hazard and the necessary precautions (Section 468 (1) German Commercial Code) and hand over safety data sheets. In the event of violations, LogYou may refuse acceptance or reject, separately secure or remove the goods at the Customer\'s expense; the Customer compensates resulting damage and expenses even without fault.' },
        ] }
      ]
    },

    compliance: {
      title: 'Customs & Compliance',
      blocks: [
        { t: 'n', items: [
          { h: 'Customs handling', text: 'LogYou performs customs handling (import/export including CN22/CN23 declarations) only on the basis of a separate instruction in text form and exclusively as a direct representative in the name and for the account of the Customer (Art. 18 Union Customs Code); the Customer is the declarant and the debtor of the import duties. The Customer maintains — where required — a valid EORI number and provides all information required for customs declarations completely and correctly; it indemnifies LogYou against duties, fines and expenses based on incorrect or incomplete information. LogYou is not obliged to act as an indirect representative.' },
          { h: 'Product responsibility (German Packaging Act / WEEE / Batteries)', text: 'The Customer warrants that it complies with its product responsibility obligations, in particular registration in the German packaging register LUCID and participation in a dual system for packaging subject to system participation (Sections 7, 9 German Packaging Act — VerpackG), as well as — where applicable — registration with stiftung ear (German Electrical Act — ElektroG) and battery-law obligations. Before the start of services, the Customer provides LogYou with its LUCID registration number and, where applicable, WEEE registration number, and keeps these up to date during the term. LogYou is legally obliged to verify these registrations (Section 7 (7) VerpackG; verification duties under the ElektroG) and entitled to suspend its services as long as evidence is missing; resulting delays are not attributable to LogYou. The Customer indemnifies LogYou against fines and claims based on a breach of these warranties.' },
          { h: 'Sanctions & export control', text: 'The provision of services is subject to the proviso that no provisions of national or international foreign trade, customs, export control or sanctions law conflict with it. The Customer warrants that neither it nor the recipients of the goods are listed on relevant sanctions lists (EU, UN, where applicable US) and that no delivery violates embargo provisions, including the prohibition of re-export to Russia pursuant to Art. 12g Regulation (EU) 833/2014. LogYou may refuse or suspend orders whose execution could violate the foregoing, without the Customer deriving any claims therefrom.' },
          { h: 'Minimum wage (German MiLoG)', text: 'LogYou undertakes to pay its employees at least the statutory minimum wage under the German Minimum Wage Act (MiLoG) and to impose this obligation on subcontractors it engages; LogYou provides suitable evidence of compliance upon request. LogYou indemnifies the Customer against claims under Section 13 MiLoG to the extent they are based on a breach of duty by LogYou or its subcontractors.' }
        ] }
      ]
    },

    privacy: {
      title: 'Data Protection & Confidentiality',
      blocks: [
        { t: 'p', text: 'To the extent that LogYou processes personal data on behalf of the Customer in the course of providing the services (in particular recipient data of end customers), the Parties will conclude a data processing agreement pursuant to Art. 28 GDPR, which is attached to this agreement as an annex and which governs the technical and organisational measures as well as the approved sub-processors. Shipping carriers regularly act as independent controllers in this context. Both Parties undertake to comply with the applicable data protection provisions.' },
        { t: 'p', text: 'The Parties treat all trade secrets and confidential information of the other Party obtained in the performance of the contract as confidential, protect them by appropriate confidentiality measures within the meaning of Section 2 No. 1 lit. b of the German Trade Secrets Act (GeschGehG) and use them exclusively for the performance of the contract. This obligation continues for the term of the contract and for five (5) years thereafter; statutory disclosure obligations remain unaffected.' }
      ]
    },

    marketing: {
      title: 'Marketing Rights',
      consent: { t: 'p', text: 'The Customer generally agrees — subject to prior notification by LogYou — that LogYou may reference the Customer\'s company, logo, products, efficiency metrics and a short description in marketing materials (image, text, video, audio), on social media and on the LogYou website. Participation in testimonials, white papers or interviews requires separate approval in each individual case. The Customer may revoke this consent at any time with effect for the future in text form.' },
      approval: { t: 'p', text: 'Any use of the Customer\'s name, logo, product images or metrics for marketing purposes requires the Customer\'s prior approval in text form in each individual case. No blanket advance consent is granted.' }
    },

    jurisdiction: {
      title: 'Governing Law & Jurisdiction',
      blocks: [
        { t: 'p', text: 'This agreement is governed by the laws of the Federal Republic of Germany, excluding the UN Convention on Contracts for the International Sale of Goods (CISG) and without regard to conflict-of-law principles that would require the application of the laws of another jurisdiction. The exclusive place of jurisdiction for all disputes arising from or in connection with this agreement is the Regional Court (Landgericht) of Gießen, Germany; this jurisdiction clause is intended as an exclusive choice-of-court agreement within the meaning of the 2005 Hague Convention on Choice of Court Agreements.' },
        { t: 'p', text: 'This agreement is provided in English for convenience. Legal terms referring to German statutes (BGB, HGB, InsO, ADSp) are to be interpreted in accordance with German law. If a German version of this agreement has been executed, the German version prevails in the event of deviations.' }
      ]
    },

    final: {
      title: 'Final Provisions',
      blocks: [
        { t: 'n', items: [
          { h: 'Amendments', text: 'Amendments and supplements to this agreement, as well as its cancellation, require an agreement in text form signed by both Parties, unless this agreement provides otherwise.' },
          { h: 'Force majeure', text: 'The obligations of both Parties may be suspended without liability if performance is hindered or made impossible by events beyond the reasonable control of the respective Party, e.g. force majeure, war, unrest, fire, explosion, epidemic, flood, strike or lockout. The affected Party will notify the other Party without delay and make all reasonable efforts to resume the services promptly once the cause has been resolved.' },
          { h: 'Assignment', text: 'Neither Party may assign this agreement, in whole or in part, to any third party without the prior consent of the other Party in text form, such consent not to be unreasonably withheld or delayed. LogYou\'s right to appoint subcontractors in the ordinary course of its business remains unaffected.' },
          { h: 'Non-waiver', text: 'No failure or delay by either Party in exercising any right under this agreement shall operate as a waiver of that right, nor shall any single or partial exercise preclude any further exercise of the same or any other right.' },
          { h: 'Non-exclusive appointment', text: 'LogYou is appointed as a non-exclusive provider of fulfillment services. Nothing in this agreement prevents the Customer from engaging other fulfillment or logistics providers, nor prevents LogYou from providing services to other customers.' },
          { h: 'Recovery of legal fees', text: 'In the event of a breach of this agreement, the non-breaching Party is entitled to recover from the breaching Party the necessary costs of legal enforcement in the statutory amount.' },
          { h: 'Severability', text: 'The Parties acknowledge that this agreement was negotiated in its entirety. Should individual provisions of this agreement be or become invalid or unenforceable, the validity of the remainder of the agreement remains unaffected. The invalid or unenforceable provision will be replaced by a valid and enforceable provision whose effects come closest to the economic objective pursued by the Parties with the invalid or unenforceable provision.' }
        ] }
      ]
    },

    special: {
      title: 'Supplementary Agreements',
      intro: 'The following supplementary agreements apply in addition to and — in the event of conflicts — with precedence over the other provisions of this agreement:'
    },

    annex: {
      title: 'Annexes',
      blocks: [
        { t: 'p', text: 'Annex 1: Offer dated {offerDate} (service specification and price sheet). The offer of LogYou GmbH dated {offerDate} forms an integral part of this agreement. In the event of conflicts between this agreement and the offer, the provisions of this agreement prevail unless expressly agreed otherwise.' },
        { t: 'p', text: 'Annex 2: General Terms and Conditions (GTC) of LogYou GmbH as well as ADSp 2017 and Logistik-AGB 2019.' },
        { t: 'p', text: 'Annex 3: Data processing agreement pursuant to Art. 28 GDPR (including technical and organisational measures and sub-processor list).' },
        { t: 'p', text: 'Annex 4: Compliance self-declaration of the Customer (VAT ID, EORI number where applicable, LUCID registration number, WEEE registration number where applicable).' }
      ]
    },

    signatures: {
      title: 'Signatures',
      logyouCity: 'Butzbach',
      logyouSigner: 'Dennis Montag',
      logyouPosition: 'Managing Director',
      logyouCompany: 'LogYou GmbH',
      customerWord: 'Customer',
      date: 'Date',
      signature: 'Signature',
      name: 'Name',
      position: 'Position',
      company: 'Company',
      vatId: 'VAT ID',
      address: 'Address',
      dots: '…………………………………………………………..'
    }
  }
}

/**
 * Selectable contract parts. Every key maps to a section object above whose
 * `title` is shown as the checkbox label in the contract modal. The cover page
 * and the signature block are always rendered; everything listed here can be
 * switched off per contract (persisted with the sent conditions as
 * `contract.sections` — `{ key: false }` = omitted, absent/true = included).
 */
export const CONTRACT_SECTION_KEYS = [
  'master', 'services', 'term', 'pricing', 'assumptions', 'adjustments', 'payment', 'sla',
  'liability', 'property', 'compliance', 'privacy', 'marketing', 'special', 'jurisdiction', 'final', 'annex'
] as const

export type ContractSectionKey = typeof CONTRACT_SECTION_KEYS[number]

export const contractSectionOptions = (language: string) => {
  const T = CONTRACT_TEXTS[language === 'en' ? 'en' : 'de']
  return CONTRACT_SECTION_KEYS.map((key) => ({ key, title: String(T[key]?.title || key) }))
}

/** true unless the section was explicitly switched off. */
export const isContractSectionOn = (sections: any, key: string): boolean => !(sections && sections[key] === false)
