@font-face {
  font-family: "AVEO Signature";
  src: url("/fonts/signature.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  color-scheme: light;
  --ink: #172033;
  --ink-soft: #42506a;
  --muted: #6d778a;
  --line: #dfe5ec;
  --line-strong: #cbd4df;
  --surface: #fff;
  --surface-soft: #f6f8fb;
  --surface-blue: #eff5ff;
  --brand: #1e63e9;
  --brand-dark: #1648ad;
  --navy: #12213d;
  --green: #12805c;
  --amber: #a86500;
  --red: #b42318;
  --shadow: 0 16px 44px rgba(25, 38, 64, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; scrollbar-width: thin; scrollbar-gutter: stable; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-thumb { border: 2px solid transparent; border-radius: 999px; background: #8892a1; background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }
html { min-width: 320px; scrollbar-gutter: stable; }
body { margin: 0; color: var(--ink); background: var(--surface-soft); min-height: 100vh; }
body.sign-page-body { background: #f2f5f9; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.signer-name { min-inline-size: 0; overflow-wrap: anywhere; word-break: break-word; }
.brand { color: var(--ink); font-size: 1.35rem; font-weight: 830; letter-spacing: -.045em; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--brand); }
.brand-light { color: white; }
.eyebrow, .panel-kicker { margin-bottom: .55rem; color: var(--brand); font-size: .72rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.eyebrow-light { color: #8eb8ff; }
.muted { color: var(--muted); line-height: 1.55; }
.status-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: .35rem .58rem; font-size: .69rem; font-weight: 760; }
.status-pill--sent { color: var(--brand-dark); background: var(--surface-blue); }
.status-pill--in-progress { color: var(--amber); background: #fff5df; }
.status-pill--needs-review { color: #9a3412; background: #fff0e8; }
.status-pill--completed { color: var(--green); background: #e9f8f2; }
.status-pill--cancelled, .status-pill--declined, .status-pill--expired { color: var(--muted); background: #edf0f4; }
.status-pill--draft { color: var(--ink-soft); background: #edf0f4; }

.button { min-height: 43px; border: 1px solid transparent; border-radius: 9px; padding: .68rem 1rem; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; color: inherit; background: transparent; font-weight: 730; text-decoration: none; cursor: pointer; transition: background .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:disabled { opacity: .48; cursor: not-allowed; }
.button--primary { color: white; background: var(--brand); box-shadow: 0 8px 18px rgba(30, 99, 233, .2); }
.button--primary:hover:not(:disabled) { background: var(--brand-dark); box-shadow: 0 10px 24px rgba(30, 99, 233, .26); }
.button--secondary { color: var(--brand-dark); background: var(--surface-blue); border-color: #d3e2ff; }
.button--ghost { color: var(--ink-soft); border-color: var(--line); background: white; }
.button--danger { color: white; background: var(--red); box-shadow: 0 8px 18px rgba(180, 35, 24, .22); }
.button--danger:hover:not(:disabled) { background: #93190f; box-shadow: 0 10px 24px rgba(180, 35, 24, .3); }
.button--wide { width: 100%; }
.text-button { border: 0; padding: .5rem; color: var(--brand); background: transparent; font-weight: 700; cursor: pointer; }
.icon-button { width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 9px; background: white; color: var(--ink-soft); font-size: 1.1rem; cursor: pointer; }
.back-button { width: fit-content; border: 0; padding: .25rem 0; color: var(--muted); background: transparent; font-weight: 650; cursor: pointer; }
.button:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .pdf-viewer:focus-visible { outline: 3px solid rgba(30, 99, 233, .28); outline-offset: 2px; }

label { display: grid; gap: .43rem; color: var(--ink-soft); font-size: .86rem; font-weight: 690; }
input, select, textarea { width: 100%; border: 1px solid var(--line-strong); border-radius: 9px; padding: .72rem .8rem; color: var(--ink); background: white; transition: border-color .15s ease, box-shadow .15s ease; }
textarea { resize: vertical; }
input::placeholder, textarea::placeholder { color: #9aa5b5; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30, 99, 233, .1); outline: none; }
label small { color: var(--muted); font-weight: 500; line-height: 1.35; }
.check-row, .consent-row { display: flex; align-items: flex-start; gap: .62rem; line-height: 1.45; }
.check-row input, .consent-row input { width: 1.15rem; height: 1.15rem; margin: .1rem 0 0; flex: 0 0 auto; accent-color: var(--brand); }
.form-grid { display: grid; gap: .9rem; }
.two-columns { grid-template-columns: 1fr 1fr; }
.stacked-form, .auth-form { display: grid; gap: 1rem; }
.form-status { min-height: 1.4rem; margin-top: .85rem; font-size: .88rem; font-weight: 650; line-height: 1.45; }
.form-status.working { color: var(--brand-dark); }
.form-status.error { color: var(--red); }
.field-error { min-height: 1rem; color: var(--red); font-size: .76rem; font-weight: 620; }
input[aria-invalid="true"] { border-color: var(--red); box-shadow: 0 0 0 3px rgba(180, 35, 24, .08); }
.field-validation-error { display: block; margin-top: .35rem; color: var(--red); font-size: .75rem; font-weight: 650; line-height: 1.35; }

.floating-status { max-width: min(480px, calc(100vw - 2rem)); padding: .85rem 1rem; position: fixed; left: 50%; bottom: 1rem; z-index: 100; transform: translateX(-50%); border-radius: 9px; color: var(--brand-dark); background: white; box-shadow: var(--shadow); font-size: .8rem; font-weight: 680; }
.floating-status.error { color: white; background: var(--red); }

@media (max-width: 780px) {
  .two-columns { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
.form-status.success { color: var(--brand-dark); }

/* Blazor setzt bei erweiterter Navigation den Fokus auf die Seitenüberschrift;
   ein sichtbarer Fokusring auf einer nicht interaktiven Überschrift stört nur. */
h1:focus { outline: none; }

/* Die Browserprofilsperre muss bereits vor dem Blazor-Start sichtbar sein. */
html[data-handoff-active="true"] body > * { visibility: hidden; }
html[data-handoff-active="true"] body::before { content: "Vor-Ort-Signatur aktiv. Absenderdaten sind gesperrt."; position: fixed; inset: 0; display: grid; place-items: center; background: #f2f5f9; color: #16213a; visibility: visible; z-index: 2147483647; }

.aveo-modal::backdrop { backdrop-filter: blur(3px); }

.signflow-modal-body { padding: 1.2rem; }

.signflow-message-modal { --aveo-modal-width: 430px; }
.signflow-signature-modal { --aveo-modal-width: 740px; }
.signflow-onsite-modal { --aveo-modal-width: 600px; }
.signflow-email-preview-modal { --aveo-modal-width: 1380px; }
.signflow-signature-modal .signature-dialog__body { display: grid; gap: 1rem; }
.signflow-signature-modal .signature-dialog__body > p:first-child { margin-top: 0; }
.signflow-signature-modal .consent-row { margin: .3rem 0; padding: .75rem; border-radius: 8px; background: var(--surface-soft); font-size: .74rem; }
.signflow-signature-modal .consent-row.has-error { color: var(--red); background: #fff4f2; border: 1px solid #efb3ad; }
