/* Blankett - Oberflaeche im Fluent-/SharePoint-Erscheinungsbild.
   Farben und Masse folgen dem Microsoft-Designsystem:
   Kommunikationsblau #0078d4, neutrale Graustufen, 4-px-Raster,
   Segoe UI als Schrift, Elevation ueber weiche Schatten. */

:root {
    --blau: #0078d4;
    --blau-dunkel: #106ebe;
    --blau-tief: #005a9e;
    --blau-hell: #deecf9;
    --blau-zart: #eff6fc;

    --grau-10: #faf9f8;
    --grau-20: #f3f2f1;
    --grau-30: #edebe9;
    --grau-40: #e1dfdd;
    --grau-60: #c8c6c4;
    --grau-90: #a19f9d;
    --grau-110: #8a8886;
    --grau-130: #605e5c;
    --grau-160: #323130;
    --grau-190: #201f1e;

    --gruen: #107c10;
    --gelb: #ffb900;
    --rot: #a4262c;
    --rot-hell: #fde7e9;

    --schatten-4: 0 1.6px 3.6px rgba(0,0,0,.132), 0 .3px .9px rgba(0,0,0,.108);
    --schatten-8: 0 3.2px 7.2px rgba(0,0,0,.132), 0 .6px 1.8px rgba(0,0,0,.108);
    --schatten-16: 0 6.4px 14.4px rgba(0,0,0,.132), 0 1.2px 3.6px rgba(0,0,0,.108);
    --schatten-64: 0 25.6px 57.6px rgba(0,0,0,.22), 0 4.8px 14.4px rgba(0,0,0,.18);

    /* Die zwei Haelften tragen je eine eigene Farbe. Sie erscheint nur am
       Symbol und an einer Kante - genug, um die Zugehoerigkeit einer Seite
       auf einen Blick zu zeigen, zu wenig, um bunt zu wirken. */
    --wissen: #0078d4;
    --wissen-tief: #005a9e;
    --wissen-grund: #f3f8fd;
    --fuellen: #0f6cbd;
    --ausfuellen: #0e7c66;
    --ausfuellen-tief: #0b5f4e;
    --ausfuellen-grund: #f1f9f6;

    /* Radien: Fluent 2 rundet spuerbar staerker als Fluent 1. Eine einzelne
       Zahl entscheidet darueber, ob eine Oberflaeche aktuell wirkt. */
    --rund: 4px;
    --rund-gross: 6px;
    --rund-xl: 10px;

    --kopf: 48px;
    --site-kopf: 76px;
    --nav-breite: 244px;
}

/* --------------------------------------------------------------- Schriftbild

   Eine echte Typo-Leiter statt drei benachbarter Groessen: Ueberschriften
   duerfen gross und eng sein, Fliesstext bleibt ruhig. */

.seitentitel {
    font-size: 28px; line-height: 36px; font-weight: 600;
    letter-spacing: -.02em; margin: 0 0 6px; color: var(--grau-190);
}
.seitentext { font-size: 14px; line-height: 20px; color: var(--grau-130); margin: 0 0 20px; }

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    background: var(--grau-10);
    color: var(--grau-160);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 20px;
}

a { color: var(--blau); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; font-size: inherit; }

/* ---------------------------------------------------------------- Suite-Bar */

/* Die oberste Leiste traegt keine Aufgabe, nur Identitaet, Suche und Konto.
   Sie ist deshalb ruhig gehalten: ein tiefes Blau, das sich vom hellen
   Arbeitsbereich absetzt, ohne mit ihm um Aufmerksamkeit zu ringen. Das
   Markenblau bleibt den Knoepfen im Inhalt vorbehalten. */

.suite {
    position: fixed; inset: 0 0 auto 0; height: var(--kopf); z-index: 60;
    display: flex; align-items: center; gap: 2px;
    background: #0a4a80; color: #fff; padding: 0 12px;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .08);
}
.suite-suche { flex: 1; max-width: 560px; margin: 0 auto; position: relative; }
.suite-suche input {
    width: 100%; height: 34px; border-radius: var(--rund-gross);
    border: 1px solid rgba(255, 255, 255, .18);
    background: rgba(255, 255, 255, .12); color: #fff;
    padding: 0 12px 0 36px; font-size: 14px; outline: none;
    transition: background .12s ease, border-color .12s ease;
}
.suite-suche input::placeholder { color: rgba(255, 255, 255, .72); }
.suite-suche input:hover { background: rgba(255, 255, 255, .18); }
.suite-suche input:focus {
    background: #fff; color: var(--grau-190); border-color: #fff;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .35);
}
.suite-suche input:focus::placeholder { color: var(--grau-110); }
.suite-suche svg {
    position: absolute; left: 12px; top: 10px; pointer-events: none;
    color: rgba(255, 255, 255, .8);
}
.suite-suche input:focus + svg { color: var(--grau-130); }

.suite-rechts { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.suite-knopf {
    width: 36px; height: 36px; display: grid; place-items: center;
    background: none; border: 0; color: #fff; cursor: pointer;
    border-radius: var(--rund);
}
.suite-knopf:hover { background: rgba(255, 255, 255, .12); }
.suite-knopf:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.suite-konto {
    width: 30px; height: 30px; border-radius: 50%;
    background: #fff; color: #0a4a80;
    display: grid; place-items: center; font-weight: 600; font-size: 12px;
    margin-left: 8px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .25);
    user-select: none;
}

/* ------------------------------------------------------------- Site-Kopf */

.site-kopf {
    position: fixed; top: var(--kopf); left: 0; right: 0; height: var(--site-kopf);
    z-index: 50; background: #fff; border-bottom: 1px solid var(--grau-30);
    display: flex; align-items: center; padding: 0 24px; gap: 12px;
}
.site-logo { height: 44px; width: auto; flex: none; display: block; }
.site-namen { display: flex; flex-direction: column; min-width: 0; }
.site-titel {
    font-size: 20px; font-weight: 600; color: var(--grau-190); line-height: 26px;
    letter-spacing: -.01em;
}
.site-unter { font-size: 13px; color: var(--grau-130); }
.site-aktionen { margin-left: auto; display: flex; gap: 8px; }

/* -------------------------------------------------------------- Navigation */

.nav {
    position: fixed; top: calc(var(--kopf) + var(--site-kopf)); bottom: 0; left: 0;
    width: var(--nav-breite); background: #fff; border-right: 1px solid var(--grau-30);
    overflow-y: auto; padding: 8px 0 24px; z-index: 40;
}
.nav-gruppe { padding: 10px 8px; }
.nav-gruppe + .nav-gruppe { border-top: 1px solid var(--grau-20); }

/* Die Gruppenueberschrift ist der Ort, an dem die zwei Haelften benannt
   werden. Sie traegt deshalb die Farbe ihrer Haelfte und einen Balken -
   ohne das liest sich die Leiste als eine einzige lange Liste. */
.nav-titel {
    font-size: 11px; font-weight: 700; color: var(--grau-130);
    padding: 10px 8px 6px 22px; text-transform: uppercase; letter-spacing: .06em;
    position: relative;
}
.nav-titel::before {
    content: ""; position: absolute; left: 8px; top: 11px;
    width: 4px; height: 12px; border-radius: 2px; background: var(--grau-60);
}
.nav-gruppe.wissen .nav-titel::before { background: var(--wissen); }
.nav-gruppe.ausfuellen .nav-titel::before { background: var(--ausfuellen); }

.nav a {
    display: flex; align-items: center; gap: 10px; min-height: 36px;
    padding: 6px 12px; color: var(--grau-160); font-size: 14px;
    border-radius: var(--rund); margin: 1px 0;
}
.nav a:hover { background: var(--grau-20); text-decoration: none; }
.nav a.aktiv { background: var(--grau-30); font-weight: 600; color: var(--grau-190); }
.nav-gruppe.wissen a.aktiv { background: var(--wissen-grund); color: var(--wissen-tief); }
.nav-gruppe.ausfuellen a.aktiv { background: var(--ausfuellen-grund); color: var(--ausfuellen-tief); }
.nav a .zahl { margin-left: auto; color: var(--grau-130); font-size: 12px; font-variant-numeric: tabular-nums; }
.nav a.unter { padding-left: 34px; min-height: 30px; font-size: 13px; }
.nav a.unter.mehr { color: var(--grau-130); font-size: 12px; }
.nav a.unter.mehr:hover { color: var(--blau); }
.nav-trenner { height: 1px; background: var(--grau-30); margin: 8px 16px; }
.nav-punkt { width: 10px; height: 10px; border-radius: var(--rund); flex: none; }

/* ------------------------------------------------------------------ Rumpf */

.rumpf {
    margin: calc(var(--kopf) + var(--site-kopf)) 0 0 var(--nav-breite);
    min-height: calc(100vh - var(--kopf) - var(--site-kopf));
    display: flex; flex-direction: column;
}
.inhalt { padding: 20px 32px 48px; flex: 1; }

/* ------------------------------------------------------------ Befehlsleiste */

.befehle {
    display: flex; align-items: center; gap: 2px; min-height: 44px;
    background: #fff; border-bottom: 1px solid var(--grau-30);
    padding: 0 32px; position: sticky; top: calc(var(--kopf) + var(--site-kopf));
    z-index: 30; flex-wrap: wrap;
}
.befehl {
    display: inline-flex; align-items: center; gap: 8px; height: 36px;
    padding: 0 10px; background: none; border: 0; border-radius: var(--rund);
    color: var(--grau-160); cursor: pointer; white-space: nowrap;
}
.befehl:hover:not(:disabled) { background: var(--grau-20); }
.befehl:disabled { color: var(--grau-90); cursor: default; }
.befehl.haupt { color: var(--blau); font-weight: 600; }
.befehl-trenner { width: 1px; height: 24px; background: var(--grau-30); margin: 0 6px; }
.befehle .rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.filter {
    height: 32px; border: 1px solid var(--grau-60); border-radius: var(--rund);
    background: #fff; padding: 0 8px; color: var(--grau-160); min-width: 150px;
}
.filter:focus { outline: 2px solid var(--blau); outline-offset: -2px; }
.suchfeld { position: relative; }
.suchfeld input {
    height: 32px; width: 240px; border: 1px solid var(--grau-60); border-radius: var(--rund);
    padding: 0 10px 0 32px; font-size: 14px; outline: none;
}
.suchfeld input:focus { border-color: var(--blau); border-width: 2px; padding-left: 31px; }
.suchfeld svg { position: absolute; left: 9px; top: 8px; color: var(--grau-130); }

/* -------------------------------------------------------------- Knoepfe */

.knopf {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 32px; padding: 0 16px; border-radius: var(--rund); cursor: pointer;
    border: 1px solid var(--grau-60); background: #fff; color: var(--grau-160);
    font-weight: 600; font-size: 14px;
}
.knopf:hover { background: var(--grau-20); }
.knopf.haupt { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf.haupt:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); }
.knopf.gefahr { color: var(--rot); border-color: var(--grau-60); }
.knopf.gefahr:hover { background: var(--rot-hell); }
.knopf:disabled { opacity: .5; cursor: default; }
.knopf.schlicht { border-color: transparent; background: none; font-weight: 400; }
.knopf.schlicht:hover { background: var(--grau-20); }

/* --------------------------------------------------------------- Kacheln */

.kacheln { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); }
.kachel {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund-gross);
    padding: 18px; display: block; color: var(--grau-160); position: relative;
    box-shadow: var(--schatten-4); overflow: hidden;
    transition: box-shadow .12s ease, transform .12s ease;
}
.kachel:hover { box-shadow: var(--schatten-16); transform: translateY(-1px); text-decoration: none; }
.kachel .streifen { position: absolute; inset: 0 auto 0 0; width: 4px; border-radius: var(--rund) 0 0 2px; }
.kachel h3 { margin: 0 0 4px; font-size: 16px; font-weight: 600; }
.kachel p { margin: 0; color: var(--grau-130); font-size: 12px; min-height: 32px; }
.kachel .anzahl { font-size: 30px; font-weight: 600; line-height: 36px; letter-spacing: -.02em; }

/* -------------------------------------------------- Startseite: zwei Wege

   Der Unterschied zwischen den beiden Haelften muss ohne Lesen erkennbar
   sein: eigene Farbe, eigenes Symbol, eine Ziffer fuer die Reihenfolge. Die
   Flaechen sind zugleich die Ablage - wer eine Datei zieht, muss nicht erst
   eine Seite tiefer. */

.wegereihe {
    display: grid; gap: 20px; margin-bottom: 36px;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}
.weg {
    position: relative; background: #fff; border: 1px solid var(--grau-30);
    border-top: 3px solid var(--grau-60); border-radius: var(--rund-xl);
    padding: 28px 28px 24px; cursor: pointer;
    display: flex; flex-direction: column; align-items: flex-start; gap: 10px;
    box-shadow: var(--schatten-4);
    transition: box-shadow .14s ease, transform .14s ease, border-color .14s ease;
}
.weg:hover { box-shadow: var(--schatten-16); transform: translateY(-2px); }
.weg.wissen { border-top-color: var(--wissen); }
.weg.ausfuellen { border-top-color: var(--ausfuellen); }

.weg-nummer {
    position: absolute; top: 20px; right: 24px;
    font-size: 40px; line-height: 1; font-weight: 700; letter-spacing: -.04em;
    color: var(--grau-30); user-select: none;
}
.weg-zeichen {
    width: 60px; height: 60px; border-radius: var(--rund-gross);
    display: grid; place-items: center; margin-bottom: 2px;
}
.weg.wissen .weg-zeichen { background: var(--wissen-grund); color: var(--wissen-tief); }
.weg.ausfuellen .weg-zeichen { background: var(--ausfuellen-grund); color: var(--ausfuellen-tief); }

.weg h2 {
    margin: 0; font-size: 22px; line-height: 28px; font-weight: 600;
    letter-spacing: -.015em; color: var(--grau-190);
}
.weg-satz { margin: 0; font-size: 14px; line-height: 20px; color: var(--grau-160); }
.weg-folge { margin: 0; font-size: 13px; line-height: 19px; color: var(--grau-130); }
.weg .knopf {
    margin-top: auto; pointer-events: none;
    background: var(--wissen); border-color: var(--wissen); color: #fff;
}
.weg.ausfuellen .knopf {
    background: var(--ausfuellen); border-color: var(--ausfuellen);
}

/* Waehrend eine Datei ueber der Flaeche schwebt. */
.weg.bereit {
    border-style: dashed; border-width: 2px; border-color: var(--wissen);
    background: var(--wissen-grund); transform: translateY(-2px);
}
.weg.ausfuellen.bereit { border-color: var(--ausfuellen); background: var(--ausfuellen-grund); }

.abschnitt-kopf {
    display: flex; align-items: baseline; justify-content: space-between;
    gap: 12px; margin: 0 0 12px;
}
.abschnitt-kopf h2 {
    margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.01em;
    color: var(--grau-190);
}
.abschnitt-kopf a { font-size: 13px; }

/* Die zuletzt bearbeiteten Formulare als Miniaturen nebeneinander. Ein Blatt
   erkennt man schneller am Aussehen als am Dateinamen. */
.blattreihe {
    display: grid; gap: 12px;
    grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
}
.blattkachel {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund);
    padding: 10px; display: flex; flex-direction: column; gap: 6px;
    color: var(--grau-160);
}
.blattkachel:hover {
    text-decoration: none; border-color: var(--blau); box-shadow: var(--schatten-8);
}
.blattkachel-bild {
    position: relative; display: block; background: var(--grau-20);
    border: 1px solid var(--grau-30); aspect-ratio: 1 / 1.414; overflow: hidden;
}
.blattkachel-bild img {
    width: 100%; height: 100%; object-fit: cover; object-position: top center;
    display: block;
}
.blattkachel-marke {
    position: absolute; left: 6px; bottom: 6px; height: 18px; padding: 0 6px;
    border-radius: var(--rund); font-size: 11px; display: inline-flex; align-items: center;
    background: rgba(255, 255, 255, .92); color: var(--grau-160);
    box-shadow: 0 0 0 1px var(--grau-30);
}
.blattkachel-marke.gut { background: #dff6dd; color: #0b6a0b; }
.blattkachel-marke.mittel { background: #fff4ce; color: #7a5c00; }
.blattkachel-name {
    font-size: 13px; font-weight: 600; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.blattkachel-still { font-size: 11px; color: var(--grau-130); }
.blattkachel-balken { height: 2px; background: var(--grau-30); display: block; }
.blattkachel-balken > span { display: block; height: 100%; background: var(--blau); }

.zahlen { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); margin-bottom: 24px; }
.zahlkachel { background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund); padding: 14px 16px; }
.zahlkachel .wert { font-size: 28px; font-weight: 600; line-height: 34px; }
.zahlkachel .name { color: var(--grau-130); font-size: 12px; }
.zahlkachel.warnung .wert { color: var(--rot); }

/* ----------------------------------------------------------- DetailsList */

.liste {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund-gross);
    overflow: hidden; box-shadow: var(--schatten-4);
}
.liste:has(table.details) { overflow-x: auto; }
.liste table.details { min-width: 900px; }
table.details { width: 100%; border-collapse: collapse; }
table.details thead th {
    text-align: left; font-size: 12px; font-weight: 600; color: var(--grau-160);
    padding: 0 12px; height: 42px; border-bottom: 1px solid var(--grau-30);
    background: #fff; white-space: nowrap; position: sticky; top: 0; z-index: 5;
}
table.details thead th a { color: inherit; display: inline-flex; align-items: center; gap: 4px; }
table.details thead th a:hover { text-decoration: none; color: var(--blau); }
table.details tbody td {
    padding: 0 12px; height: 42px; border-bottom: 1px solid var(--grau-20);
    color: var(--grau-160); font-size: 14px; vertical-align: middle;
}
table.details tbody tr:hover { background: var(--grau-20); cursor: pointer; }
table.details tbody tr.gewaehlt { background: var(--blau-zart); }
table.details tbody tr.gewaehlt td:first-child { box-shadow: inset 2px 0 0 var(--blau); }
.spalte-wahl { width: 40px; padding-left: 12px !important; }
.zelle-haupt { font-weight: 600; color: var(--blau); }
.zelle-still { color: var(--grau-130); font-size: 12px; }
/* Wie in einer DetailsList: Zellen laufen nicht um, sie werden gekuerzt. */
table.details tbody td { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.details td.spalte-wahl { max-width: none; }
.spalte-schmal { width: 120px; }
.zelle-wert { font-variant-numeric: tabular-nums; }

.merker {
    display: inline-flex; align-items: center; gap: 6px; height: 20px; padding: 0 8px;
    border-radius: var(--rund); font-size: 12px; background: var(--grau-20); color: var(--grau-130);
    white-space: nowrap;
}
.merker.gut { background: #dff6dd; color: #0b6a0b; }
.merker.mittel { background: #fff4ce; color: #7a5c00; }
.merker.schwach { background: var(--rot-hell); color: var(--rot); }
.merker.quelle { background: var(--blau-zart); color: var(--blau-tief); }
.merker .punkt { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* Felder, die direkt in der Liste bearbeitet werden. */
.zellenfeld {
    width: 100%; height: 28px; border: 1px solid transparent; border-radius: var(--rund);
    padding: 2px 6px; font: inherit; color: var(--grau-160); background: transparent;
}
.zellenfeld:hover { border-color: var(--grau-60); background: #fff; }
.zellenfeld:focus { outline: none; border: 2px solid var(--blau); background: #fff; padding: 1px 5px; }
select.zellenfeld { min-width: 140px; height: 30px; }
table.details tbody td:has(> .zellenfeld) { max-width: none; overflow: visible; }
table.details tbody tr.abweichend { background: #fff9f9; }
table.details tbody tr.abweichend:hover { background: #fff4f4; }
table.details tbody tr.abgewaehlt { opacity: .45; }
table.details tbody tr.abgewaehlt .zellenfeld { text-decoration: line-through; }

/* Ladeanzeige waehrend der Auswertung. */
.kreisel {
    width: 16px; height: 16px; border: 2px solid var(--grau-40);
    border-top-color: var(--blau); border-radius: 50%;
    animation: dreht .8s linear infinite; display: inline-block; flex: none;
}
@keyframes dreht { to { transform: rotate(360deg); } }
.nav .plakette {
    margin-left: auto; min-width: 20px; height: 18px; padding: 0 6px; border-radius: 9px;
    background: var(--blau); color: #fff; font-size: 11px; font-weight: 600;
    display: inline-flex; align-items: center; justify-content: center;
}

/* Leerer Listenbereich. Nicht '.leer' nennen: so heisst auch der Zustand
   eines Feldes ohne Wert, und der soll keine zentrierte Schrift bekommen. */
.leerhinweis { padding: 56px 24px; text-align: center; color: var(--grau-130); }
.leerhinweis h3 { margin: 12px 0 4px; color: var(--grau-160); font-size: 16px; }

/* ----------------------------------------------------------------- Panel */

.panel-schirm {
    position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 80;
    opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.panel-schirm.offen { opacity: 1; pointer-events: auto; }
.panel {
    position: fixed; top: 0; right: 0; bottom: 0; width: 440px; max-width: 100vw;
    background: #fff; z-index: 90; box-shadow: var(--schatten-64);
    transform: translateX(100%); transition: transform .18s cubic-bezier(.1,.9,.2,1);
    display: flex; flex-direction: column;
}
.panel.offen { transform: none; }
.panel-kopf { padding: 18px 24px 12px; display: flex; align-items: flex-start; gap: 12px; }
.panel-kopf h2 { margin: 0; font-size: 20px; font-weight: 600; flex: 1; }
.panel-kopf .schliessen {
    background: none; border: 0; cursor: pointer; color: var(--grau-130);
    width: 32px; height: 32px; border-radius: var(--rund); display: grid; place-items: center;
}
.panel-kopf .schliessen:hover { background: var(--grau-20); color: var(--grau-160); }
.panel-rumpf { padding: 0 24px 16px; overflow-y: auto; flex: 1; }
.panel-verweise { display: flex; flex-direction: column; border-top: 1px solid var(--grau-30); margin-top: 8px; }
.panel-verweise a {
    padding: 11px 4px; border-bottom: 1px solid var(--grau-20); color: var(--grau-160);
}
.panel-verweise a:hover { color: var(--blau); text-decoration: none; background: var(--grau-20); }

.panel-fuss {
    padding: 16px 24px; border-top: 1px solid var(--grau-30); display: flex; gap: 8px;
}

/* ----------------------------------------------------------------- Formular */

.feld { margin-bottom: 16px; }
.feld label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.feld .hinweis { font-size: 12px; color: var(--grau-130); margin-top: 4px; }
.feld input[type=text], .feld input[type=date], .feld input[type=number],
.feld input[type=password], .feld input[type=email], .feld input[type=search],
.feld select, .feld textarea {
    width: 100%; min-height: 32px; border: 1px solid var(--grau-60); border-radius: var(--rund);
    padding: 5px 8px; font-size: 14px; font-family: inherit; color: var(--grau-160);
    background: #fff;
}
.feld textarea { min-height: 72px; resize: vertical; }
.feld input:focus, .feld select:focus, .feld textarea:focus {
    outline: none; border: 2px solid var(--blau); padding: 4px 7px;
}
.feld.fehler input, .feld.fehler select { border-color: var(--rot); }
.feld-fehler { color: var(--rot); font-size: 12px; margin-top: 4px; }
.feld-reihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.kontroll { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

/* --------------------------------------------------------------- Aufgaben */

.aufgabenliste { display: flex; flex-direction: column; gap: 8px; }
.aufgabe {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund); padding: 12px 16px;
}
.aufgabe .kopf { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.aufgabe .name { font-weight: 600; flex: 1; }
.balken { height: 2px; background: var(--grau-30); border-radius: 1px; overflow: hidden; }
.balken > div { height: 100%; background: var(--blau); transition: width .3s ease; }
.balken.unbestimmt > div { width: 33% !important; animation: laeuft 1.4s infinite ease-in-out; }
@keyframes laeuft { 0% { margin-left: -33%; } 100% { margin-left: 100%; } }

.ablage { transition: border-color .12s ease, background .12s ease; }
.ablage.bereit { border-color: var(--blau) !important; background: var(--blau-zart); }
.ablage.bereit h3 { color: var(--blau-tief); }

.meldung {
    display: flex; gap: 12px; padding: 12px 16px; border-radius: var(--rund); margin-bottom: 16px;
    background: var(--blau-zart); border-left: 4px solid var(--blau);
}
.meldung.warnung { background: #fff4ce; border-left-color: var(--gelb); }
.meldung.fehler { background: var(--rot-hell); border-left-color: var(--rot); }
.meldung.erfolg { background: #dff6dd; border-left-color: var(--gruen); }

/* --------------------------------------------------------------- Hinweise */

.brot { display: flex; align-items: center; gap: 6px; color: var(--grau-130); font-size: 12px; margin-bottom: 8px; }
.brot a { color: var(--grau-130); }
.karte {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund-gross);
    padding: 22px 26px; box-shadow: var(--schatten-4);
}
.karte h2 { margin: 0 0 12px; font-size: 16px; font-weight: 600; }
.zwei-spalten { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; align-items: start; }
.verlaufsliste { list-style: none; margin: 0; padding: 0; }
.verlaufsliste li { padding: 8px 0; border-bottom: 1px solid var(--grau-20); font-size: 13px; }
.verlaufsliste li:last-child { border-bottom: 0; }
.verlaufsliste .zeit { color: var(--grau-130); font-size: 12px; }

.toast-bereich { position: fixed; right: 20px; bottom: 20px; z-index: 120; display: flex; flex-direction: column; gap: 8px; }
.toast {
    background: #fff; border: 1px solid var(--grau-30); border-left: 4px solid var(--blau);
    box-shadow: var(--schatten-16); border-radius: var(--rund); padding: 12px 16px; min-width: 260px;
    animation: rein .2s ease;
}
.toast.erfolg { border-left-color: var(--gruen); }
.toast.fehler { border-left-color: var(--rot); }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 900px) {
    .nav { display: none; }
    .rumpf { margin-left: 0; }
    .inhalt, .befehle { padding-left: 16px; padding-right: 16px; }
    .zwei-spalten { grid-template-columns: 1fr; }
}

/* --------------------------------------------------- Formular ausfuellen */

.formular-raum { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.formular-spalte { min-width: 0; }

/* Werkzeuge ueber dem Blatt - Zoom, Seiten, Drucken. */
.blatt-werkzeuge {
    position: sticky; top: calc(var(--kopf) + var(--site-kopf) + 44px); z-index: 20;
    display: flex; align-items: center; gap: 2px; padding: 6px 8px; margin-bottom: 12px;
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund);
    box-shadow: var(--schatten-4);
}
.werkzeug {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    height: 30px; min-width: 30px; padding: 0 8px; border: 0; border-radius: var(--rund);
    background: none; color: var(--grau-160); cursor: pointer; text-decoration: none;
}
.werkzeug:hover { background: var(--grau-20); text-decoration: none; }
.werkzeug.zoomwert { min-width: 66px; font-variant-numeric: tabular-nums; font-size: 13px; }
.werkzeug-trenner { width: 1px; height: 20px; background: var(--grau-30); margin: 0 6px; }
.werkzeug-text { font-size: 13px; color: var(--grau-130); padding: 0 6px;
                 font-variant-numeric: tabular-nums; }
.werkzeug-schalter {
    display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
    color: var(--grau-160); margin-left: auto; padding: 0 8px; cursor: pointer;
}

.formular-blatt {
    display: flex; flex-direction: column; gap: 20px; align-items: flex-start;
    overflow-x: auto; padding-bottom: 8px;
}
.blattseite {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund);
    width: calc(100% * var(--zoom, 1)); flex: none; scroll-margin-top: 160px;
}
.blattkopf {
    padding: 8px 12px; border-bottom: 1px solid var(--grau-30);
    font-size: 12px; color: var(--grau-130);
}
.blattbild { position: relative; line-height: 0; background: #fff; }
.blattbild img, .blattbild canvas { width: 100%; height: auto; display: block; }
/* Bis PDF.js gezeichnet hat, haelt das Seitenverhaeltnis den Platz frei -
   sonst springen die Feldkaesten beim Laden. */
.blattleinwand { min-height: 1px; }

.feldkasten {
    position: absolute; border: 1.5px solid var(--blau); border-radius: 1px;
    background: rgba(0, 120, 212, .08); cursor: pointer; padding: 0;
    display: flex; align-items: center; overflow: hidden; line-height: 1;
    /* Ein <button> zentriert von sich aus. Auf einem Formular beginnt ein
       Eintrag aber am linken Rand seiner Schreiblinie, nie in der Mitte. */
    text-align: left; justify-content: flex-start;
}
.feldkasten:hover { background: rgba(0, 120, 212, .18); }
.feldkasten.leer { border-color: var(--grau-90); background: rgba(138, 136, 134, .1); }
.feldkasten.unsicher { border-color: var(--gelb); background: rgba(255, 185, 0, .16); }
.feldkasten.ankreuz { border-color: var(--gruen); background: rgba(16, 124, 16, .1); }
.feldkasten.gewaehlt {
    border-width: 2.5px; border-color: var(--rot); background: rgba(164, 38, 44, .12);
    box-shadow: 0 0 0 3px rgba(164, 38, 44, .18);
}
.blattbild.ohne-felder .feldkasten { border-color: transparent; background: none; box-shadow: none; }
.blattbild.ohne-felder .feldkasten:hover { background: rgba(0, 120, 212, .08); }

/* Die Schrift folgt der Feldhoehe, wie sie es im fertigen PDF auch tut.
   Den genauen Wert setzt app.js je Kasten - hier steht nur der Notnagel. */
.feldinhalt {
    position: relative; display: block; width: 100%; height: 100%;
    font-size: 11px; color: var(--grau-190); line-height: 1;
    font-family: "Segoe UI", -apple-system, sans-serif;
}
.feldtext {
    position: absolute; left: 0; top: 50%; transform: translateY(-50%);
    max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    text-align: left;
}
/* Kammfeld: jedes Zeichen sitzt ueber genau einem gedruckten Kaestchen.
   Die Breiten kommen aus den erkannten Zaehnen, nicht aus einer Schaetzung. */
.feldzelle {
    position: absolute; top: 50%; transform: translateY(-50%);
    text-align: center; white-space: pre; overflow: hidden;
}
/* Wie im PDF: die Unterschrift sitzt auf der Linie und darf darueber
   hinausragen - eine Unterschrift passt sich keiner Zeilenhoehe an. */
.feldstrich {
    position: absolute; left: 0; bottom: 0; max-height: 300%; max-width: 100%;
    width: auto; height: auto; pointer-events: none;
}
.feldkasten.typ-unterschrift { align-items: flex-end; overflow: visible; }
.feldkasten.typ-ankreuz .feldtext,
.feldkasten.typ-radio .feldtext { left: 0; right: 0; text-align: center; }

.formular-hilfe {
    position: sticky; top: calc(var(--kopf) + var(--site-kopf) + 56px);
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund);
    max-height: calc(100vh - var(--kopf) - var(--site-kopf) - 88px); display: flex;
    flex-direction: column;
}
.hilfe-kopf { padding: 16px 20px 8px; border-bottom: 1px solid var(--grau-30); }
.hilfe-titel { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hilfe-titel .knopf { height: 26px; padding: 0 8px; font-size: 12px; font-weight: 400; }
.hilfe-kopf h2 { margin: 0 0 2px; font-size: 16px; }
.hilfe-kopf p { margin: 0; font-size: 12px; }
.hilfe-liste { overflow-y: auto; }
.hilfe-feld { padding: 12px 20px; border-bottom: 1px solid var(--grau-20); cursor: pointer; }
.hilfe-feld:hover { background: var(--grau-10); }
.hilfe-feld.gewaehlt { background: var(--blau-zart); box-shadow: inset 3px 0 0 var(--blau); }
.hilfe-zeile { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.hilfe-pfeil { flex: none; color: var(--grau-130); transition: transform .12s ease; }

/* Ein gefuelltes Feld ist erledigt - es zeigt nur noch seinen Wert. Erst ein
   Klick holt Eingabe, Herkunft und Hilfetext wieder hervor. */
.hilfe-feld.zu > :not(.hilfe-zeile):not(.hilfe-kurz) { display: none; }
.hilfe-feld.zu { padding: 8px 20px; }
.hilfe-feld.zu .hilfe-zeile { margin-bottom: 0; }
.hilfe-feld:not(.zu) .hilfe-pfeil { transform: rotate(90deg); }
.hilfe-feld:not(.zu) .hilfe-kurz { display: none; }
.hilfe-kurz {
    font-size: 12px; color: var(--grau-160); padding-left: 20px;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hilfe-kurz:empty { display: none; }
.hilfe-kurz.still { color: var(--grau-130); font-style: italic; }
.hilfe-feld:not(.zu) .hilfe-kurz.still { display: none; }

/* Unterschriftenfeld: gezeichnet wird rechts, gesetzt wird links im Blatt. */
.strichfeld { margin-top: 6px; }
.strichblatt {
    width: 100%; height: 96px; display: block; cursor: crosshair;
    border: 1px solid var(--grau-60); border-radius: var(--rund);
    background: #fff repeating-linear-gradient(90deg,
        transparent 0 6px, rgba(0, 0, 0, .04) 6px 7px) bottom/100% 1px no-repeat;
    touch-action: none;
}
.strichblatt:focus { outline: 2px solid var(--blau); outline-offset: 1px; }
.strich-leiste {
    display: flex; align-items: center; gap: 6px; margin-top: 6px;
    font-size: 12px; flex-wrap: wrap;
}
.strich-leiste .zelle-still { flex: 1; }
.strich-leiste .knopf { height: 26px; padding: 0 10px; font-size: 12px; }
.hilfe-label { font-weight: 600; flex: 1; font-size: 13px; }
.hilfe-eingabe {
    width: 100%; height: 32px; border: 1px solid var(--grau-60); border-radius: var(--rund);
    padding: 0 8px; font: inherit;
}
.hilfe-eingabe:focus { outline: none; border: 2px solid var(--blau); padding: 0 7px; }
.hilfe-text {
    font-size: 12px; color: var(--grau-160); margin-top: 8px; padding-left: 10px;
    border-left: 2px solid var(--blau-hell); line-height: 17px;
}
.hilfe-grund { font-size: 12px; color: var(--grau-130); margin-top: 6px; }
.hilfe-alternativen { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hilfe-alternativen .knopf { height: 26px; padding: 0 8px; font-size: 12px; font-weight: 400; }

@media (max-width: 1200px) {
    .formular-raum { grid-template-columns: 1fr; }
    .formular-hilfe { position: static; max-height: none; }
}

/* Drucken: nur das Blatt, ohne Rahmenwerk und ohne Feldmarkierungen. */
@media print {
    .suite, .site-kopf, .nav, .befehle, .formular-hilfe, .blatt-werkzeuge,
    .brot, .toast-bereich, .panel, .panel-schirm, .blattkopf { display: none !important; }
    body, html { background: #fff; }
    .rumpf { margin: 0; }
    .inhalt { padding: 0; }
    .seitentitel, .seitentext { display: none; }
    .formular-raum { display: block; }
    .blattseite { width: 100% !important; border: 0; break-after: page; }
    .feldkasten { border-color: transparent !important; background: none !important;
                  box-shadow: none !important; }
    .feldinhalt, .feldtext, .feldzelle { color: #000; }
}

/* ------------------------------------------- Angaben pruefen vor dem Druck

   Einspaltig und untereinander. In mehrspaltigen Formularen werden Felder mit
   unerwuenscht vorbelegtem Inhalt nachweislich uebersehen - genau das ist der
   Fehler, den dieser Schritt abfangen soll. */

.pruefkarte {
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund-gross);
    max-width: 900px; box-shadow: var(--schatten-4); overflow: hidden;
}
.pruefzeile {
    display: grid; grid-template-columns: 260px 1fr 80px; gap: 16px;
    padding: 14px 20px; border-bottom: 1px solid var(--grau-20); align-items: start;
}
.pruefzeile:last-child { border-bottom: 0; }
.pruefzeile.fehlt { background: #fff9f9; box-shadow: inset 3px 0 0 var(--rot); }
.pruefzeile-name { font-weight: 600; font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; }
.pruefzeile-name > .zelle-still { flex-basis: 100%; font-weight: 400; }
.pruefzeile-wert { font-size: 14px; min-width: 0; overflow-wrap: anywhere; }
.pruefzeile-wert strong { font-weight: 600; }
.pruefzeile-herkunft { font-size: 12px; color: var(--grau-130); margin-top: 4px; }
.pruefzeile-aktion { text-align: right; }
.pruefzeile-aktion a { font-size: 14px; }
.pruefstrich {
    max-height: 48px; max-width: 220px; width: auto; display: block;
    border-bottom: 1px solid var(--grau-60);
}

.pruefabschluss {
    max-width: 900px; margin-top: 20px; padding: 20px 24px;
    background: #fff; border: 1px solid var(--grau-30); border-radius: var(--rund);
}
.pruefabschluss p { margin: 0 0 14px; font-size: 13px; color: var(--grau-160); max-width: 70ch; }
.knopf.gross { height: 40px; padding: 0 22px; font-size: 15px; }

/* Nur fuer Screenreader: macht gleichlautende Links unterscheidbar. */
.nur-vorleser {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (max-width: 720px) {
    .pruefzeile { grid-template-columns: 1fr; gap: 6px; }
    .pruefzeile-aktion { text-align: left; }
}

/* ------------------------------------------- Unterschriften anfordern */

.anforderungsliste { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; }
.anforderungsliste li {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 5px 0; border-top: 1px solid var(--grau-20);
}
.anforderungsliste .knopf { height: 24px; padding: 0 8px; font-size: 12px; margin-left: auto; }

.regelliste { margin: 0; padding-left: 20px; font-size: 13px; line-height: 20px; color: var(--grau-160); }
.regelliste li { margin-bottom: 8px; }

/* --------------------------------------------------- Gastseite (extern)

   Wer den Unterschriftenlink bekommt, kennt die Anwendung nicht. Er sieht
   ein Blatt, sonst nichts: keine Navigation, kein Weg in den Bestand. */

body.gast { background: var(--grau-20); padding: 40px 16px; }
.gastblatt {
    max-width: 620px; margin: 0 auto; background: #fff; border-radius: var(--rund-xl);
    padding: 40px 44px 32px; box-shadow: var(--schatten-16);
}
.gast-logo { height: 44px; width: auto; display: block; margin-bottom: 24px; }
.gastblatt h1 {
    font-size: 26px; line-height: 32px; font-weight: 600; letter-spacing: -.02em;
    margin: 0 0 10px; color: var(--grau-190);
}
.gast-text { font-size: 15px; line-height: 22px; color: var(--grau-160); margin: 0 0 24px; }
.gast-fuss {
    font-size: 12px; line-height: 17px; color: var(--grau-130);
    margin: 24px 0 0; padding-top: 16px; border-top: 1px solid var(--grau-20);
}
.gastblatt .knopf.gross { width: 100%; }
.strichblatt.gross { height: 160px; }

/* Handlung am Unterschriftenfeld selbst, nicht in der Liste nebenan.
   Liegt als Geschwister ueber dem Feldkasten - ein Knopf im Knopf waere
   ungueltiges Markup und fuer Tastaturbedienung eine Sackgasse. */
.feldgriff {
    position: absolute; pointer-events: none;
    display: flex; align-items: flex-start; justify-content: flex-end; gap: 4px;
}
.feldgriff-knopf, .feldgriff-stand {
    pointer-events: auto; transform: translateY(-50%);
    height: 22px; padding: 0 8px; border-radius: 11px; font-size: 11px;
    display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
    box-shadow: var(--schatten-4);
}
.feldgriff-knopf {
    background: var(--ausfuellen); color: #fff; border: 0; cursor: pointer;
    font-weight: 600; font-family: inherit;
}
.feldgriff-knopf:hover { background: var(--ausfuellen-tief); }
.feldgriff-stand {
    background: #fff; color: var(--grau-130);
    box-shadow: 0 0 0 1px var(--grau-40), var(--schatten-4);
}
.feldgriff-stand.gut { background: #dff6dd; color: #0b6a0b; }
.blattbild.ohne-felder .feldgriff { display: none; }
@media print { .feldgriff { display: none !important; } }

/* --- Anmeldung ------------------------------------------------------------

   Nach dem Vorbild der Microsoft-Anmeldung: eine schmale weisse Karte auf
   ruhigem Grund, Logo oben, eine Ueberschrift, das Noetigste an Feldern, der
   Knopf rechts unten. Kantig statt rund - die Anmeldung ist die eine Seite,
   die Microsoft bewusst NICHT abrundet, und das gibt ihr den sachlichen Zug.

   Was hier bewusst fehlt: erklaerender Fliesstext. Wer sich anmeldet, will
   sich anmelden. Sicherheitszusagen auf einer Anmeldemaske liest niemand,
   und wer sie liest, kann sie nicht pruefen. */

body.anmeldung {
    min-height: 100vh;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--grau-20);
    padding: 24px;
    box-sizing: border-box;
}

.anmeldeblatt {
    width: 100%;
    max-width: 440px;
    background: #fff;
    padding: 44px;
    box-sizing: border-box;
    box-shadow: var(--schatten-16);
    /* 2px statt der sonst ueblichen 4-10px: die Anmeldung wirkt dadurch
       fester, weniger wie eine Einblendung. */
    border-radius: 2px;
}

/* Logo und Wortmarke nebeneinander: auf einer sonst wortkargen Seite ist
   das die einzige Stelle, die sagt, wo man ueberhaupt ist. */
.anmeldeblatt .marke {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
}
.anmeldeblatt .marke img { height: 24px; width: auto; display: block; }
.anmeldeblatt .marke span {
    font-size: 15px;
    font-weight: 600;
    color: var(--grau-160);
    letter-spacing: -.01em;
}

.anmeldeblatt h1 {
    font-size: 24px;
    line-height: 28px;
    font-weight: 600;
    letter-spacing: -.01em;
    color: var(--grau-190);
    margin: 0 0 16px;
}

/* Wo doch ein Satz noetig ist - welche Adresse den Code bekam, etwa -,
   bleibt er kurz und steht direkt unter der Ueberschrift. */
.anmeldeblatt .zeile {
    font-size: 15px;
    line-height: 20px;
    color: var(--grau-160);
    margin: 0 0 16px;
}

.anmeldeblatt .zurueck {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    color: var(--grau-160);
    text-decoration: none;
    margin-bottom: 16px;
}
.anmeldeblatt .zurueck:hover { text-decoration: underline; }

/* Felder: unauffaellig bis zum Fokus, dann eine klare blaue Unterkante -
   so macht es Microsoft, und es lenkt das Auge ohne Rahmenwechsel. */
.anmeldefeld { margin-bottom: 16px; }
.anmeldefeld label {
    display: block;
    font-size: 13px;
    color: var(--grau-130);
    margin-bottom: 4px;
}
.anmeldefeld input {
    width: 100%;
    box-sizing: border-box;
    height: 36px;
    padding: 6px 10px;
    font-family: inherit;
    font-size: 15px;
    color: var(--grau-190);
    background: #fff;
    border: 1px solid var(--grau-110);
    border-radius: 2px;
    outline: none;
}
.anmeldefeld input:hover { border-color: var(--grau-160); }
.anmeldefeld input:focus {
    border-color: var(--blau);
    box-shadow: inset 0 -2px 0 0 var(--blau);
}
.anmeldefeld input[readonly] {
    background: var(--grau-20);
    color: var(--grau-130);
}

/* Der Code wird abgetippt, nicht gelesen: gross, gesperrt, feste Breite -
   damit man beim Vergleichen mit der Mail nicht verrutscht. */
.anmeldefeld input.code {
    font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
    font-size: 22px;
    letter-spacing: .5em;
    text-indent: .5em;
    height: 44px;
}

.anmeldeblatt .hinweis {
    font-size: 12px;
    line-height: 16px;
    color: var(--grau-130);
    margin-top: 4px;
}

.anmeldeblatt .kontroll {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 16px 0;
    font-size: 14px;
    color: var(--grau-160);
}
.anmeldeblatt .kontroll input { margin: 0; }

/* Der Knopf steht rechts - die Leserichtung endet dort, und Microsoft
   setzt ihn genau so. */
.anmelde-aktion {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 24px;
}
.anmelde-knopf {
    min-width: 108px;
    height: 32px;
    padding: 0 16px;
    font-family: inherit;
    font-size: 15px;
    color: #fff;
    background: var(--blau);
    border: 1px solid var(--blau);
    border-radius: 2px;
    cursor: pointer;
}
.anmelde-knopf:hover { background: var(--blau-dunkel); border-color: var(--blau-dunkel); }
.anmelde-knopf:active { background: var(--blau-tief); border-color: var(--blau-tief); }
.anmelde-knopf.still {
    color: var(--grau-190);
    background: var(--grau-20);
    border-color: var(--grau-60);
}
.anmelde-knopf.still:hover { background: var(--grau-30); }

.anmelde-verweise {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 13px;
}
.anmelde-verweise a { color: var(--blau); text-decoration: none; }
.anmelde-verweise a:hover { text-decoration: underline; }

/* Meldungen sitzen ueber den Feldern, wo der Blick ohnehin hingeht.
   Rot mit Symbol, kein Kasten - Microsoft verzichtet auf den Rahmen. */
.anmelde-meldung {
    display: flex;
    gap: 8px;
    font-size: 13px;
    line-height: 18px;
    color: var(--rot);
    margin: 0 0 16px;
}
.anmelde-meldung.gut { color: var(--gruen); }
.anmelde-meldung svg { flex: none; margin-top: 1px; }

/* Ausserhalb der Karte, unten rechts - wie die Nutzungsbedingungen bei
   Microsoft. Nichts, was zum Anmelden noetig waere. */
.anmelde-fuss {
    position: fixed;
    right: 0;
    bottom: 0;
    padding: 12px 24px;
    font-size: 12px;
    color: var(--grau-130);
}

@media (max-width: 480px) {
    body.anmeldung { padding: 0; background: #fff; }
    .anmeldeblatt { box-shadow: none; padding: 24px; max-width: none; }
    .anmelde-fuss { position: static; text-align: right; }
}

/* --- Kontomenue im Kopf ---------------------------------------------------

   Kuerzel des Angemeldeten, darunter auf Klick das Menue. Ohne die
   display:none-Vorgabe steht es offen ueber der Seite - genau das ist
   passiert, als dieser Abschnitt beim Umbau der Anmeldeseite mit
   weggeraeumt wurde. */
.suite-konto { cursor: pointer; }

.kontomenue {
    position: absolute;
    top: 44px;
    right: 12px;
    z-index: 60;
    display: none;
    min-width: 240px;
    padding: 8px;
    background: #fff;
    border-radius: var(--rund-gross);
    box-shadow: var(--schatten-16);
}
.kontomenue.auf { display: block; }

.kontomenue-kopf {
    padding: 8px 10px 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid var(--grau-30);
}
.kontomenue-mail {
    font-size: 13px;
    color: var(--grau-160);
    word-break: break-all;
}
.kontomenue-rolle {
    font-size: 11px;
    color: var(--grau-110);
    margin-top: 2px;
}
.kontomenue a,
.kontomenue button {
    display: block;
    width: 100%;
    padding: 8px 10px;
    font-family: inherit;
    font-size: 13px;
    text-align: left;
    color: var(--grau-190);
    background: none;
    border: 0;
    border-radius: var(--rund);
    cursor: pointer;
    text-decoration: none;
}
.kontomenue a:hover,
.kontomenue button:hover { background: var(--grau-20); }
.kontomenue form { margin: 0; }

/* --- Statusleiste ---------------------------------------------------------

   Unten links, solange im Hintergrund etwas laeuft. Sie ist auf jeder Seite
   da: wer einen Beleg hochlaedt und dann weiterklickt, soll trotzdem sehen,
   dass gearbeitet wird - und woran. Ohne sie verschwindet der Hinweis nach
   drei Sekunden, waehrend die Auswertung noch eine Minute braucht. */
.statusleiste {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 70;
    width: 280px;
    padding: 12px 14px;
    background: #fff;
    border-radius: var(--rund-gross);
    box-shadow: var(--schatten-16);
    font-size: 13px;
    color: var(--grau-160);
}
.statusleiste-kopf {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}
.statusleiste-text {
    margin: 6px 0 8px;
    font-size: 12px;
    color: var(--grau-130);
    /* Zwei Zeilen genuegen - danach schneiden, statt die Leiste wachsen zu
       lassen und den Inhalt darunter zu verdecken. */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.statusleiste .balken { margin-top: 4px; }

@media (max-width: 640px) {
    .statusleiste { left: 8px; right: 8px; width: auto; bottom: 8px; }
}

/* --- Befund der Nachpruefung ----------------------------------------------

   Was der zweite Blick geaendert oder bemaengelt hat, steht neben dem Wert.
   Der urspruengliche Wert bleibt sichtbar - eine Berichtigung, die ihre
   Herkunft verschweigt, sieht aus wie eine Erfindung. */
.befund {
    margin-top: 4px;
    font-size: 11px;
    line-height: 15px;
    color: var(--grau-130);
}
.befund.warnung { color: #8a5700; }
.befund .roh {
    font-family: ui-monospace, Consolas, monospace;
    text-decoration: line-through;
    color: var(--grau-110);
}
tr.fragwuerdig { background: #fffbf2; }
tr.berichtigt .zellenfeld { border-color: var(--blau-hell); }
