/* Prüfportal – ruhig, dokumentartig. Farben ausschließlich über Tokens (Hell/Dunkel). */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/static/schriften/ibm-plex-sans-latin-wght-normal.woff2') format('woff2-variations'), url('/static/schriften/ibm-plex-sans-latin-wght-normal.woff2') format('woff2');
  font-weight: 100 700; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/static/schriften/ibm-plex-sans-latin-ext-wght-normal.woff2') format('woff2');
  font-weight: 100 700; font-style: normal; font-display: swap;
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face { font-family: 'IBM Plex Mono'; src: url('/static/schriften/ibm-plex-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('/static/schriften/ibm-plex-mono-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }

:root {
  color-scheme: light;
  --schrift: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;

  --grund: #f4f3ef;
  --flaeche: #ffffff;
  --flaeche-2: #faf9f6;
  --flaeche-3: #f1efe9;
  --text: #1b1c1e;
  --text-2: #4f535a;
  --text-3: #6b6f76;
  --linie: #e2dfd7;
  --linie-stark: #cfcbc0;
  --akzent: #f2b705;
  --akzent-weich: #fff4cc;
  --akzent-text: #7a5000;
  --haupt: #1b1c1e;
  --haupt-text: #ffffff;
  --fokus: #b77900;
  --kuerzung: #b42318;
  --kuerzung-weich: #fdecea;
  --erhoehung: #1f6f43;
  --erhoehung-weich: #e6f4ec;
  --fehler: #b42318;
  --fehler-weich: #fdecea;
  --ok: #1f6f43;
  --schatten: 0 1px 2px rgb(20 20 18 / .06), 0 8px 24px -12px rgb(20 20 18 / .18);
  --radius: 10px;
  --radius-klein: 6px;
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --grund: #111214;
    --flaeche: #1a1b1e;
    --flaeche-2: #1f2024;
    --flaeche-3: #26282c;
    --text: #ecebe7;
    --text-2: #b7b8bc;
    --text-3: #9a9ca2;
    --linie: #2e3035;
    --linie-stark: #3d4046;
    --akzent: #f5c242;
    --akzent-weich: #3a2f0f;
    --akzent-text: #f5c242;
    --haupt: #f5c242;
    --haupt-text: #17140a;
    --fokus: #f5c242;
    --kuerzung: #ff9b8f;
    --kuerzung-weich: #3a1a17;
    --erhoehung: #7fd6a0;
    --erhoehung-weich: #15301f;
    --fehler: #ff9b8f;
    --fehler-weich: #3a1a17;
    --ok: #7fd6a0;
    --schatten: 0 1px 2px rgb(0 0 0 / .4), 0 10px 30px -14px rgb(0 0 0 / .7);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--grund); color: var(--text);
  font: 400 15px/1.55 var(--schrift); font-feature-settings: 'tnum' 0;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; outline: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0; }
a { color: var(--akzent-text); text-underline-offset: 2px; }
.mono { font-family: var(--mono); }
.leise { color: var(--text-3); font-weight: 400; }
.nur-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

.sprung { position: absolute; left: 12px; top: -48px; background: var(--haupt); color: var(--haupt-text); padding: 8px 14px; border-radius: var(--radius-klein); z-index: 30; }
.sprung:focus { top: 12px; }

/* ── Kopfleiste ── */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--flaeche) 88%, transparent); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1320px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: 12px; min-width: 0; }
.marke-zeichen { width: 26px; height: 26px; border-radius: 7px; background: var(--text); position: relative; flex: none; }
.marke-zeichen::before, .marke-zeichen::after { content: ''; position: absolute; left: 6px; right: 6px; height: 3px; border-radius: 2px; background: var(--akzent); }
.marke-zeichen::before { top: 8px; box-shadow: 0 5px 0 var(--akzent); }
.marke-zeichen::after { top: 18px; right: 11px; }
.marke-text { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.marke-von { color: var(--text-2); }
.kopf-rechts { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.speicherstatus { font-size: 13px; color: var(--text-3); }
.speicherstatus[data-art='ok']::before { content: '✓ '; color: var(--ok); }
.speicherstatus[data-art='fehler'] { color: var(--fehler); }
.frist-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 6px; border-radius: 999px; background: var(--flaeche-3); border: 1px solid var(--linie); font-size: 13px; }
.frist-label { background: var(--text); color: var(--flaeche); border-radius: 999px; padding: 1px 9px; font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.frist-chip strong { font-weight: 600; }
.frist-chip[data-stufe='bald'] { background: var(--akzent-weich); border-color: color-mix(in srgb, var(--akzent) 60%, var(--linie)); }
.frist-chip[data-stufe='bald'] .frist-label { background: var(--akzent); color: #1b1c1e; }
.frist-chip[data-stufe='knapp'] { background: var(--kuerzung-weich); border-color: var(--kuerzung); color: var(--text); }
.frist-chip[data-stufe='knapp'] .frist-label { background: var(--kuerzung); color: var(--flaeche); }

/* ── Knöpfe und Felder ── */
.knopf { font: inherit; font-weight: 500; font-size: 14px; border-radius: var(--radius-klein); padding: 8px 14px; cursor: pointer; border: 1px solid transparent; background: none; color: var(--text); line-height: 1.2; min-height: 36px; }
.knopf:disabled { opacity: .6; cursor: progress; }
.knopf-haupt { background: var(--haupt); color: var(--haupt-text); padding: 11px 22px; font-weight: 600; min-height: 44px; }
.knopf-haupt:hover:not(:disabled) { filter: brightness(1.15); }
.knopf-zweit { background: var(--flaeche); border-color: var(--linie-stark); }
.knopf-zweit:hover { background: var(--flaeche-3); }
.knopf-leise { color: var(--text-2); }
.knopf-leise:hover { background: var(--flaeche-3); color: var(--text); }
.knopf-gefahr { color: var(--fehler); }
.knopf-zeile { border-color: var(--linie-stark); background: var(--flaeche); font-size: 13px; padding: 6px 12px; min-height: 32px; }
.knopf-zeile:hover, .knopf-zeile[aria-expanded='true'] { border-color: var(--akzent); background: var(--akzent-weich); }

.feld { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.feld > label, .feld-titel { font-size: 13px; font-weight: 500; color: var(--text-2); }
.pflicht { color: var(--text-3); }
.ist-pflicht .pflicht, .pflicht-aktiv .pflicht { color: var(--fehler); }
.feld-hinweis { font-size: 13px; color: var(--text-3); }
.feld-fehler { font-size: 13px; color: var(--fehler); font-weight: 500; }
.eingabe { font: inherit; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie-stark); border-radius: var(--radius-klein); padding: 8px 10px; width: 100%; min-height: 38px; }
.eingabe:hover { border-color: var(--text-3); }
.eingabe:focus { outline: none; border-color: var(--fokus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 35%, transparent); }
.eingabe[aria-invalid='true'] { border-color: var(--fehler); background: var(--fehler-weich); }
textarea.eingabe { resize: vertical; min-height: 64px; line-height: 1.5; }
.eingabe-gruppe { display: flex; align-items: stretch; }
.eingabe-gruppe .eingabe { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.eingabe-suffix { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--linie-stark); border-left: 0; border-radius: 0 var(--radius-klein) var(--radius-klein) 0; background: var(--flaeche-3); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.zahl-eingabe { text-align: right; font-family: var(--mono); font-size: 14px; }
.feld-schalter { flex-direction: row; align-items: center; gap: 10px; }
.feld-schalter > label { color: var(--text); font-size: 14px; font-weight: 400; }
.schalter { width: 18px; height: 18px; accent-color: var(--text); margin: 0; flex: none; }
.bestaetigung { padding: 14px 16px; background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: var(--radius-klein); }
.bestaetigung > label { font-weight: 500; }

/* ── Seitenaufbau ── */
.app { max-width: 1320px; margin: 0 auto; padding: 28px 24px 56px; }
.laden { color: var(--text-3); padding: 64px 0; text-align: center; }
.raster { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; margin-top: 24px; }
.haupt { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.seite { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 20px; box-shadow: var(--schatten); }
.karte h2 { font-size: 16px; margin-bottom: 14px; }
.ueberzeile { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent-text); margin-bottom: 6px; }

/* Einladung */
.einladung { display: grid; gap: 16px; }
.einladung h1 { font-size: 28px; font-weight: 600; letter-spacing: -.02em; }
.nachricht { margin: 12px 0 0; padding: 14px 18px; border-left: 3px solid var(--akzent); background: var(--flaeche); border-radius: 0 var(--radius-klein) var(--radius-klein) 0; max-width: 820px; }
.nachricht p { white-space: pre-wrap; }
.nachricht footer { margin-top: 10px; font-size: 13px; color: var(--text-3); }
.schritte { display: flex; gap: 12px; padding: 0; margin: 18px 0 0; list-style: none; counter-reset: s; flex-wrap: wrap; }
.schritte li { counter-increment: s; flex: 1 1 220px; font-size: 13px; color: var(--text-2); padding: 12px 14px 12px 46px; position: relative; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius-klein); }
.schritte li::before { content: counter(s); position: absolute; left: 14px; top: 12px; width: 22px; height: 22px; border-radius: 50%; background: var(--akzent-weich); color: var(--akzent-text); font-weight: 600; display: grid; place-items: center; font-size: 12px; }
.schritte strong { color: var(--text); }

/* ── Rechnungsblatt ── */
.blatt { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 36px 40px 32px; position: relative; overflow: hidden; }
.blatt::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 4px; background: linear-gradient(90deg, var(--akzent), color-mix(in srgb, var(--akzent) 30%, transparent)); }
.blatt-kopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; padding-bottom: 20px; border-bottom: 1px solid var(--linie); flex-wrap: wrap; }
.blatt-kopf h2 { font-size: 24px; letter-spacing: -.015em; }
.blatt-betrag { text-align: right; }
.blatt-betrag span { display: block; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; }
.blatt-betrag strong { font-family: var(--mono); font-size: 22px; font-weight: 500; }
.kopfdaten { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px 24px; margin: 20px 0; }
.kopfdaten dt { font-size: 12px; color: var(--text-3); }
.kopfdaten dd { margin: 2px 0 0; font-weight: 500; overflow-wrap: anywhere; }
.parteien { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; padding: 20px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.partei address { font-style: normal; margin-top: 6px; line-height: 1.6; }
.partei-daten { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; margin: 10px 0 0; font-size: 13px; }
.partei-daten dt { color: var(--text-3); }
.partei-daten dd { margin: 0; overflow-wrap: anywhere; }
.bemerkungen { margin-top: 16px; font-size: 14px; color: var(--text-2); }
.bemerkungen p { white-space: pre-wrap; margin-top: 8px; }
summary { cursor: pointer; color: var(--text-2); font-size: 13px; font-weight: 500; }
summary:hover { color: var(--text); }
.abschnitt-titel { font-size: 15px; margin: 28px 0 12px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.abschnitt-titel .leise { font-size: 13px; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 12px; flex-wrap: wrap; }
.abschnitt-kopf .abschnitt-titel { margin: 0; }

/* Tabellen */
.tabelle-rahmen { margin: 0 -12px; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle caption { text-align: left; font-size: 13px; color: var(--text-3); padding: 18px 0 6px; }
.tabelle th, .tabelle td { padding: 12px; text-align: left; vertical-align: top; }
.tabelle thead th { font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--linie-stark); padding-top: 6px; padding-bottom: 8px; }
.tabelle .num { text-align: right; white-space: nowrap; font-family: var(--mono); font-size: 14px; }
.tabelle thead .num { font-family: var(--schrift); font-size: 12px; }
.positionen tbody tr.pos td { border-bottom: 1px solid var(--linie); }
.positionen tr.pos:hover td { background: var(--flaeche-2); }
.positionen tr.pos.ist-offen td { background: var(--flaeche-2); border-bottom-color: transparent; }
.positionen tr.pos[data-status='gestrichen'] .pos-name > span:first-child { text-decoration: line-through; color: var(--text-3); }
.positionen tr.pos.hat-fehler td:first-child { box-shadow: inset 3px 0 0 var(--fehler); }
.positionen tr.pos:not([data-status='unveraendert']) td:first-child { box-shadow: inset 3px 0 0 var(--akzent); }
.positionen tr.pos.hat-fehler td:first-child { box-shadow: inset 3px 0 0 var(--fehler); }
.pos-nr { width: 64px; color: var(--text-2); font-size: 13px; }
.pos-name { font-weight: 500; }
.pos-meta { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.pos-beschreibung { margin-top: 6px; }
.pos-beschreibung p { white-space: pre-wrap; font-size: 13px; color: var(--text-2); margin-top: 6px; max-width: 70ch; }
.pos-aktion { width: 1%; text-align: right; }
.zeile-fehler { font-size: 12px; color: var(--fehler); margin-top: 6px; font-weight: 500; }
.wert del { color: var(--text-3); text-decoration-thickness: 1px; display: block; font-size: 12px; }
.wert ins { text-decoration: none; font-weight: 500; display: block; }
.wert .pfeil { display: none; }
.differenz { font-size: 12px; margin-top: 2px; font-weight: 500; }
.differenz[data-ton='kuerzung'] { color: var(--kuerzung); }
.differenz[data-ton='erhoehung'] { color: var(--erhoehung); }
.marke-status { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .03em; padding: 1px 8px; border-radius: 999px; vertical-align: 1px; background: var(--akzent-weich); color: var(--akzent-text); }
.marke-status[data-ton='gekuerzt'], .marke-status[data-ton='gestrichen'] { background: var(--kuerzung-weich); color: var(--kuerzung); }
.marke-status[data-ton='erhoeht'] { background: var(--erhoehung-weich); color: var(--erhoehung); }

/* Bearbeitung einer Position */
.pos-bearbeiten > td { padding: 0 12px 16px; border-bottom: 1px solid var(--linie); background: var(--flaeche-2); }
.bearbeiten { border: 1px solid var(--linie); border-radius: var(--radius-klein); background: var(--flaeche); padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.bearbeiten-kopf h4 { font-size: 14px; }
.bearbeiten-kopf { display: flex; flex-direction: column; gap: 4px; }
.vermerk-basis { font-size: 13px; color: var(--text-2); background: var(--flaeche-3); padding: 8px 10px; border-radius: var(--radius-klein); white-space: pre-wrap; }
.bearbeiten-raster { display: grid; grid-template-columns: minmax(150px, 220px) minmax(170px, 240px) 1fr; gap: 14px; align-items: end; }
.bearbeiten-raster .feld-schalter { padding-bottom: 9px; }
.bearbeiten-fuss { display: flex; justify-content: flex-end; gap: 8px; }

.beleg-zuschlaege th { font-weight: 500; }
.beleg-zuschlaege td, .beleg-zuschlaege th { border-bottom: 1px solid var(--linie); font-size: 14px; }

/* Abzüge */
.abzug { border: 1px solid var(--linie); border-radius: var(--radius-klein); padding: 16px; margin-bottom: 12px; display: flex; flex-direction: column; gap: 12px; background: var(--flaeche-2); }
.abzug.hat-fehler { border-color: var(--fehler); }
.abzug-kopf { display: flex; justify-content: space-between; align-items: center; }
.abzug-kopf h4 { font-size: 14px; }
.abzug-raster { display: grid; grid-template-columns: minmax(0, 2fr) minmax(170px, 1fr) minmax(110px, 140px); gap: 12px; align-items: start; }
.leer { color: var(--text-3); font-size: 14px; padding: 14px 16px; border: 1px dashed var(--linie-stark); border-radius: var(--radius-klein); }
.zahlungsbedingungen { margin-top: 20px; font-size: 13px; white-space: pre-wrap; }

/* Summen */
.summen-tabelle { width: 100%; border-collapse: collapse; font-size: 14px; }
.summen-tabelle th, .summen-tabelle td { padding: 6px 0; text-align: left; font-weight: 400; }
.summen-tabelle thead th { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; border-bottom: 1px solid var(--linie); }
.summen-tabelle .num { text-align: right; font-family: var(--mono); white-space: nowrap; padding-left: 10px; }
.summen-tabelle tr.leise th, .summen-tabelle tr.leise td { color: var(--text-3); font-size: 13px; }
.summen-tabelle tr.stark th, .summen-tabelle tr.stark td { font-weight: 600; border-top: 1px solid var(--linie); }
.summen-tabelle tr.gesamt th, .summen-tabelle tr.gesamt td { border-top: 2px solid var(--text); padding-top: 9px; }
.summen-tabelle .geaendert { color: var(--akzent-text); font-weight: 600; }
.summen-differenz { margin-top: 14px; display: flex; justify-content: space-between; align-items: baseline; padding: 10px 12px; border-radius: var(--radius-klein); background: var(--flaeche-3); font-size: 14px; }
.summen-differenz strong { font-family: var(--mono); font-weight: 600; }
.summen-differenz[data-ton='kuerzung'] { background: var(--kuerzung-weich); color: var(--kuerzung); }
.summen-differenz[data-ton='erhoehung'] { background: var(--erhoehung-weich); color: var(--erhoehung); }
.summen .feld-hinweis, .summen .feld-fehler { margin-top: 10px; }

/* Anlagen */
.anlagen-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.anlagen-liste li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 14px; }
.anlagen-liste a { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 0; text-decoration: none; color: var(--text); }
.anlagen-liste a:hover .anlage-name { text-decoration: underline; }
.anlage-typ { font-size: 10px; font-weight: 700; letter-spacing: .04em; padding: 3px 6px; border-radius: 4px; background: var(--flaeche-3); color: var(--text-2); flex: none; }
.anlage-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.anlagen-liste .leise { font-size: 12px; white-space: nowrap; }

/* Abschluss */
.abschluss { padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.abschluss h2 { font-size: 20px; margin: 0; }
.abschluss-raster { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.abschluss-fuss { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-top: 16px; border-top: 1px solid var(--linie); flex-wrap: wrap; }
.abgabe-summe { color: var(--text-2); }
.abgabe-summe strong { font-family: var(--mono); font-size: 18px; color: var(--text); margin-left: 6px; }
.fehler-box { border: 1px solid var(--fehler); background: var(--fehler-weich); border-radius: var(--radius-klein); padding: 14px 16px; }
.fehler-box h3 { font-size: 15px; color: var(--fehler); outline: none; }
.fehler-box ul { margin: 8px 0 0; padding-left: 18px; font-size: 14px; }
.fehler-box a { color: var(--text); }

/* Dialog */
.dialog { border: 1px solid var(--linie); border-radius: var(--radius); background: var(--flaeche); color: var(--text); padding: 28px; width: min(480px, calc(100vw - 32px)); box-shadow: 0 30px 80px -20px rgb(0 0 0 / .5); }
.dialog::backdrop { background: rgb(15 15 14 / .45); backdrop-filter: blur(2px); }
.dialog h2 { font-size: 19px; margin-bottom: 8px; }
.dialog p { color: var(--text-2); }
.dialog-zahlen { margin: 18px 0; display: grid; gap: 8px; }
.dialog-zahlen > div, .fertig-zahlen > div { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--linie); padding-bottom: 6px; }
.dialog-zahlen dt, .fertig-zahlen dt { color: var(--text-2); }
.dialog-zahlen dd, .fertig-zahlen dd { margin: 0; font-family: var(--mono); text-align: right; }
.dialog-zahlen dd.stark { font-weight: 600; }
.dialog-zahlen dd.text { font-family: var(--schrift); }
.dialog-knoepfe { display: flex; justify-content: flex-end; gap: 10px; }

/* Abschlussbestätigung und Meldungen */
.fertig, .meldung-gross { max-width: 640px; margin: 48px auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 40px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 16px; }
.fertig h1, .meldung-gross h1 { font-size: 26px; outline: none; }
.fertig-ueber { color: var(--text-3); font-size: 13px; }
.fertig-zeichen { width: 52px; height: 52px; border-radius: 50%; background: var(--erhoehung-weich); position: relative; }
.fertig-zeichen::after { content: ''; position: absolute; left: 18px; top: 13px; width: 12px; height: 22px; border: solid var(--ok); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.fertig-zahlen { display: grid; gap: 8px; margin: 8px 0; }
.fertig-zahlen .hervor dd { font-weight: 600; font-size: 18px; }
.fertig .knopf { align-self: flex-start; }

/* Hinweisseite */
.hinweis-seite { justify-content: center; }
.hinweis { display: grid; place-items: center; padding: 24px; }
.hinweis-karte { max-width: 520px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); padding: 40px; box-shadow: var(--schatten); display: flex; flex-direction: column; gap: 12px; }
.hinweis-karte h1 { font-size: 24px; }
.hinweis-karte p { color: var(--text-2); }
.hinweis-ueber { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--akzent-text) !important; }
.marke-gross { width: 36px; height: 36px; border-radius: 9px; }
.marke-gross::before { left: 9px; right: 9px; top: 11px; height: 4px; box-shadow: 0 7px 0 var(--akzent); }
.marke-gross::after { left: 9px; right: 16px; top: 25px; height: 4px; }

.fuss { max-width: 1320px; margin: 0 auto; padding: 0 24px 32px; width: 100%; }
.fuss p { font-size: 12px; color: var(--text-3); border-top: 1px solid var(--linie); padding-top: 16px; }

/* ── Schmale Schirme: Tabelle wird zu Karten ── */
@media (max-width: 1080px) {
  .raster { grid-template-columns: 1fr; }
  .seite { position: static; }
}
@media (max-width: 760px) {
  body { font-size: 15px; }
  .kopf { position: static; }
  .kopf-innen { padding: 10px 16px; gap: 8px; }
  .kopf-rechts { gap: 6px 10px; width: 100%; justify-content: space-between; }
  .speicherstatus { order: 3; width: 100%; }
  .frist-chip { font-size: 12px; }
  #abmelden { min-height: 32px; padding: 6px 10px; }
  .marke-von { display: none; }
  .app { padding: 20px 16px 40px; }
  .einladung h1 { font-size: 23px; }
  .blatt { padding: 24px 18px; }
  .parteien { grid-template-columns: 1fr; }
  .tabelle-rahmen { margin: 0; }
  .positionen thead { display: none; }
  .positionen, .positionen tbody { display: block; }
  .positionen tr.pos { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; padding: 14px 0; border-bottom: 1px solid var(--linie); }
  .positionen tr.pos td { display: block; padding: 0; border: 0 !important; background: none !important; box-shadow: none !important; }
  .positionen tr.pos td[data-label]::before { content: attr(data-label); display: block; font-family: var(--schrift); font-size: 11px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; }
  .positionen tr.pos .pos-nr { grid-column: 1 / -1; width: auto; }
  .positionen tr.pos .pos-text { grid-column: 1 / -1; }
  .positionen tr.pos .num { text-align: left; }
  .positionen tr.pos .pos-aktion { grid-column: 1 / -1; text-align: left; }
  .positionen tr.pos:not([data-status='unveraendert']) { border-left: 3px solid var(--akzent); padding-left: 10px; }
  .positionen tr.pos.hat-fehler { border-left-color: var(--fehler); }
  .positionen tr.pos-bearbeiten { display: block; }
  .positionen tr.pos-bearbeiten > td { display: block; padding: 0 0 14px; background: none; }
  .bearbeiten-raster, .abzug-raster, .abschluss-raster { grid-template-columns: 1fr; }
  .abschluss { padding: 20px; }
  .abschluss-fuss .knopf-haupt { width: 100%; }
  .fertig, .meldung-gross, .hinweis-karte { padding: 28px 20px; margin: 24px auto; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

@media print {
  .kopf, .fuss, .knopf, .sprung, .seite .anlagen { display: none !important; }
  body { background: #fff; color: #000; }
  .fertig, .blatt, .karte { box-shadow: none; border-color: #bbb; }
}
