{{define "content"}}

{{if .Overdue}}
  <h1 style="margin:0 0 12px 0;font-size:20px;line-height:1.3;color:#b91c1c;">
    &Uuml;berf&auml;llig ({{.OverdueCount}})
  </h1>
  <p style="margin:0 0 12px 0;color:#7f1d1d;font-weight:600;">
    Systemausfall: diese Fristen wurden nicht rechtzeitig erledigt. Der Eskalations&shy;kontakt wurde informiert.
  </p>
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:0 0 24px 0;border:1px solid #fecaca;border-radius:6px;border-collapse:separate;border-spacing:0;">
    <tr style="background:#fef2f2;">
      <th align="left" style="padding:10px 12px;font-size:12px;color:#7f1d1d;font-weight:600;border-bottom:1px solid #fecaca;">F&auml;llig</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#7f1d1d;font-weight:600;border-bottom:1px solid #fecaca;">Titel</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#7f1d1d;font-weight:600;border-bottom:1px solid #fecaca;">Akte</th>
    </tr>
    {{range .Overdue}}
    <tr>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #fee2e2;white-space:nowrap;color:#b91c1c;font-weight:600;">{{.DueDate}}</td>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #fee2e2;">
        <a href="{{.URL}}" style="color:#1c1917;text-decoration:none;font-weight:500;">{{.Title}}</a>
        {{if .IsOtherOwner}}<div style="font-size:11px;color:#78716c;">Eigent&uuml;mer: {{.OwnerName}}</div>{{end}}
      </td>
      <td style="padding:10px 12px;font-size:13px;color:#57534e;border-bottom:1px solid #fee2e2;">
        {{.ProjectReference}}{{if .ProjectTitle}} &mdash; {{.ProjectTitle}}{{end}}
      </td>
    </tr>
    {{end}}
  </table>
{{end}}

{{if .DueToday}}
  <h2 style="margin:0 0 12px 0;font-size:18px;line-height:1.3;color:#b45309;">
    {{if .IsEvening}}DRINGEND &mdash; heute noch offen ({{.DueTodayCount}}){{else}}Heute f&auml;llig ({{.DueTodayCount}}){{end}}
  </h2>
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:0 0 24px 0;border:1px solid #fde68a;border-radius:6px;border-collapse:separate;border-spacing:0;">
    <tr style="background:#fffbeb;">
      <th align="left" style="padding:10px 12px;font-size:12px;color:#92400e;font-weight:600;border-bottom:1px solid #fde68a;">F&auml;llig</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#92400e;font-weight:600;border-bottom:1px solid #fde68a;">Titel</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#92400e;font-weight:600;border-bottom:1px solid #fde68a;">Akte</th>
    </tr>
    {{range .DueToday}}
    <tr>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #fef3c7;white-space:nowrap;">{{.DueDate}}</td>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #fef3c7;">
        <a href="{{.URL}}" style="color:#1c1917;text-decoration:none;font-weight:500;">{{.Title}}</a>
        {{if .IsOtherOwner}}<div style="font-size:11px;color:#78716c;">Eigent&uuml;mer: {{.OwnerName}}</div>{{end}}
      </td>
      <td style="padding:10px 12px;font-size:13px;color:#57534e;border-bottom:1px solid #fef3c7;">
        {{.ProjectReference}}{{if .ProjectTitle}} &mdash; {{.ProjectTitle}}{{end}}
      </td>
    </tr>
    {{end}}
  </table>
{{end}}

{{if .DueWarning}}
  <h2 style="margin:0 0 12px 0;font-size:18px;line-height:1.3;color:#1c1917;">
    In einer Woche f&auml;llig ({{.DueWarningCount}})
  </h2>
  <table role="presentation" width="100%" cellpadding="0" cellspacing="0" border="0" style="margin:0 0 24px 0;border:1px solid #e7e5e4;border-radius:6px;border-collapse:separate;border-spacing:0;">
    <tr style="background:#f5f5f4;">
      <th align="left" style="padding:10px 12px;font-size:12px;color:#57534e;font-weight:600;border-bottom:1px solid #e7e5e4;">F&auml;llig</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#57534e;font-weight:600;border-bottom:1px solid #e7e5e4;">Titel</th>
      <th align="left" style="padding:10px 12px;font-size:12px;color:#57534e;font-weight:600;border-bottom:1px solid #e7e5e4;">Akte</th>
    </tr>
    {{range .DueWarning}}
    <tr>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #f5f5f4;white-space:nowrap;">{{.DueDate}}</td>
      <td style="padding:10px 12px;font-size:13px;border-bottom:1px solid #f5f5f4;">
        <a href="{{.URL}}" style="color:#1c1917;text-decoration:none;font-weight:500;">{{.Title}}</a>
        {{if .IsOtherOwner}}<div style="font-size:11px;color:#78716c;">Eigent&uuml;mer: {{.OwnerName}}</div>{{end}}
      </td>
      <td style="padding:10px 12px;font-size:13px;color:#57534e;border-bottom:1px solid #f5f5f4;">
        {{.ProjectReference}}{{if .ProjectTitle}} &mdash; {{.ProjectTitle}}{{end}}
      </td>
    </tr>
    {{end}}
  </table>
{{end}}

<p style="margin:24px 0 0 0;">
  <a href="{{.DeadlinesURL}}" style="display:inline-block;background:#1c1917;color:#ffffff;padding:10px 20px;border-radius:6px;text-decoration:none;font-weight:600;font-size:14px;">
    Alle Fristen
  </a>
</p>
{{end}}
