:root { --accent: #4477BB; --ink: #1e2430; --line: #d9dfe8; --paper: #ffffff; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
       color: var(--ink); background: #e6edf6; }
.shell { display: grid; grid-template-columns: 380px 1fr; gap: 26px;
         max-width: 1240px; margin: 26px auto; padding: 0 16px; align-items: start; }
.panel { border-radius: 14px; }
.form-panel { background: #fff; border: 1px solid var(--line); padding: 22px; position: sticky; top: 20px; }
h1 { font-size: 19px; margin: 0 0 4px; color: var(--accent); display: flex; gap: 9px; align-items: flex-start; }
h1 .sub { font-size: 13px; color: #5b6676; font-weight: 500; display: block; margin-top: 2px; }
h1 svg { margin-top: 2px; flex: 0 0 auto; }
.lead { color: #47515f; font-size: 13.5px; margin: 10px 0 16px; }
label { display: block; font-weight: 600; font-size: 13px; margin: 12px 0 4px; }
input { width: 100%; padding: 10px 12px; font-size: 15px; border: 1px solid var(--line);
        border-radius: 9px; background: #fff; color: var(--ink); }
input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
button { font-size: 15px; border-radius: 10px; padding: 12px 18px; cursor: pointer; width: 100%;
         display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--accent); }
button.primary { background: var(--accent); color: #fff; font-weight: 700; }
button.primary:hover { filter: brightness(1.08); }
button.secondary { background: #fff; color: var(--accent); font-weight: 600; margin-top: 10px; }
button.secondary:hover { background: #eef3fa; }
.actions { margin-top: 18px; }
.hint { font-size: 12.5px; color: #47515f; display: flex; gap: 7px; align-items: flex-start; margin-top: 14px; }
.hint svg { flex: 0 0 auto; margin-top: 2px; color: var(--accent); }
footer.no-print { max-width: 1240px; margin: 10px auto 40px; padding: 0 16px; font-size: 12px; color: #6b7381; }

/* Dokument-Blatt */
.doc-panel { overflow: auto; padding: 6px; }
.page { background: var(--paper); width: 720px; max-width: 100%; margin: 0 auto;
        padding: 46px 52px; box-shadow: 0 8px 28px rgba(30,52,88,.14); border-radius: 6px; }
.fields { display: grid; grid-template-columns: 1fr; gap: 5px; margin-bottom: 6px; }
.frow { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.flabel { font-weight: 600; }
.fill { flex: 1; border-bottom: 1px solid #222; min-height: 20px; font-weight: 600; }
.fill.blank { font-weight: 400; color: transparent; }
.doc-title { font-size: 17.5px; text-align: center; margin: 26px 0 22px; line-height: 1.35; }
h3 { font-size: 14.5px; margin: 22px 0 8px; }
.page p { font-size: 13.5px; text-align: justify; margin: 9px 0; }
table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 6px; }
th, td { border: 1px solid #222; padding: 6px 9px; text-align: left; vertical-align: top; }
th { background: #f0f4fa; }
th.datum, td.datum { width: 30%; }
.signrow { display: flex; justify-content: space-between; gap: 40px; margin-top: 34px; font-size: 13.5px; }
.signrow .sig { display: flex; align-items: baseline; gap: 8px; }
.signature-line { display: inline-block; width: 230px; border-bottom: 1px solid #222; min-height: 20px; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .form-panel { position: static; }
  .page { padding: 30px 24px; }
}

@media print {
  body { background: #fff; }
  .shell { display: block; margin: 0; padding: 0; max-width: none; }
  .no-print, footer { display: none !important; }
  .doc-panel { padding: 0; overflow: visible; }
  .page { box-shadow: none; border-radius: 0; width: auto; max-width: none; padding: 0; }
  @page { margin: 18mm 16mm; @top-left { content: none; } @top-center { content: none; }
           @top-right { content: none; } @bottom-left { content: none; }
           @bottom-center { content: none; } @bottom-right { content: none; } }
  header, footer { display: none !important; }
}
