/* Willkommen-Fenster nach der ersten Anmeldung (Bauplan Willkommen W4–W8, Entwurf Downloads\OfficeOmni-Willkommen-1611\entwurf.html).
   Vorsatz wk-. Marken aus oo.css, eckig 3 px, Haarlinien, Blau nur für den einen Hauptknopf. Über Masken (z 50), unter Dialogen
   (z 60) und Meldungen (z 70). Vorschau des Briefkopfs ab 1100 px; bis 640 px füllt das Fenster den Bildschirm.
   ☠️ Obere Grenzen bei …,98 px wie oo.hauptmenue.css (Bruchpixel bei Windows-Skalierung). */

.oo-schleier.wk-schleier { z-index: 54; }

.wk-fenster { position: fixed; z-index: 55; left: 50%; top: calc(50% + 20px); transform: translate(-50%, -50%); margin: 0;
  width: min(980px, calc(100vw - 48px)); height: min(660px, calc(100vh - 88px)); display: flex; flex-direction: column;
  background: var(--flaeche); color: var(--tinte-1); border: 1px solid var(--linie-stark); border-radius: 3px; box-shadow: var(--schatten);
  overflow: hidden; }
.wk-fenster:focus { outline: none; }

/* ── Kopf ─────────────────────────────────────────────────────────────────── */
.wk-kopf { flex: 0 0 52px; display: flex; align-items: center; gap: 12px; padding: 0 20px; border-bottom: 1px solid var(--linie); }
.wk-marke { flex: 0 0 auto; width: 84px; height: 15px; background: var(--tinte-1);
  -webkit-mask: url("../img/officeomni-weiss.svg") left center / contain no-repeat; mask: url("../img/officeomni-weiss.svg") left center / contain no-repeat; }
.wk-kopf-trenner { width: 1px; height: 18px; background: var(--linie-stark); }
.wk-kopf-titel { font-weight: 600; color: var(--tinte-2); white-space: nowrap; }
.wk-schritte { display: flex; align-items: center; list-style: none; margin: 0 0 0 auto; padding: 0; }
.wk-schritte li { display: flex; align-items: center; gap: 7px; color: var(--tinte-5); font-weight: 500; white-space: nowrap; }
.wk-schritte li + li::before { content: ""; width: 28px; height: 1px; background: var(--linie-stark); margin: 0 10px; }
.wk-nr { width: 20px; height: 20px; flex: 0 0 20px; border-radius: 3px; border: 1px solid var(--linie-stark); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 600; color: var(--tinte-5); background: var(--flaeche); }
.wk-schritte li.aktiv { color: var(--tinte-1); font-weight: 600; }
.wk-schritte li.aktiv .wk-nr { background: var(--tinte-1); border-color: var(--tinte-1); color: var(--flaeche); }
.wk-schritte li.fertig { color: var(--tinte-3); }
.wk-schritte li.fertig .wk-nr { background: var(--ok-grund); border-color: transparent; color: var(--ok); }
.wk-mobil-stand, .wk-mobil-spaeter { display: none; }

/* ── Rumpf ────────────────────────────────────────────────────────────────── */
.wk-rumpf { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 330px; }
.wk-inhalt { min-height: 0; overflow: auto; padding: 24px 28px 20px; }
.wk-titel { margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em; color: var(--tinte-1); }
.wk-text { margin: 5px 0 0; color: var(--tinte-4); max-width: 540px; }
.wk-laedt { margin: 0; color: var(--tinte-5); }
.wk-raster { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; margin-top: 18px; }
.wk-raster .c12 { grid-column: span 12; } .wk-raster .c8 { grid-column: span 8; } .wk-raster .c6 { grid-column: span 6; }
.wk-raster .c4 { grid-column: span 4; } .wk-raster .c2 { grid-column: span 2; }
.wk-feld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.wk-feld > label, .wk-frage { font-size: 12px; font-weight: 500; color: var(--tinte-4); }
.wk-feld .pf { color: var(--tinte-5); margin-left: 2px; }
.wk-hilfe { margin: 0; font-size: 12px; color: var(--tinte-5); }
.wk-abschnitt { margin: 20px 0 0; padding-bottom: 6px; border-bottom: 1px solid var(--linie-fein); font-size: 12.5px; font-weight: 600;
  color: var(--tinte-2); display: flex; align-items: baseline; gap: 8px; }
.wk-abschnitt .frei { font-weight: 400; color: var(--tinte-5); font-size: 12px; }
.wk-abschnitt + .wk-raster, .wk-abschnitt + .wk-befunde { margin-top: 12px; }

.wk-plan { margin: 18px 0 0; padding: 0; display: grid; border: 1px solid var(--linie); border-radius: 3px; max-width: 560px; }
.wk-plan li { display: grid; grid-template-columns: 24px 140px 1fr; align-items: center; gap: 10px; padding: 10px 14px; list-style: none; }
.wk-plan li + li { border-top: 1px solid var(--linie-fein); }
.wk-plan b { font-weight: 600; color: var(--tinte-2); }
.wk-plan span:last-child { color: var(--tinte-5); }
.wk-notiz { margin-top: 16px; max-width: 560px; padding: 10px 14px; border: 1px solid var(--linie); border-radius: 3px; background: var(--grund);
  color: var(--tinte-3); }
.wk-notiz b { font-weight: 600; color: var(--tinte-1); }

/* Befunde, Meldungen */
.wk-befunde { margin-top: 14px; padding: 8px 12px; border-left: 3px solid var(--alarm); border-radius: 3px; background: var(--alarm-grund);
  color: var(--tinte-2); font-size: 12.5px; }
.wk-befunde strong { display: block; font-weight: 600; color: var(--alarm); }
.wk-befunde ul { margin: 4px 0 0; padding-left: 18px; }
.wk-meldung { margin: 14px 0 0; padding: 8px 12px; border-left: 3px solid var(--alarm); border-radius: 3px; background: var(--alarm-grund);
  color: var(--tinte-2); font-size: 12.5px; }
.wk-feldfehler { margin: 4px 0 0; font-size: 12px; color: var(--alarm); }

/* Steuern */
.wk-wahl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }
.wk-kachel { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--linie-stark); border-radius: 3px;
  background: var(--flaeche); color: inherit; font: inherit; cursor: pointer; text-align: left; }
.wk-kachel:hover { background: var(--flaeche-2); }
.wk-kachel.an { border-color: var(--tinte-3); box-shadow: inset 0 0 0 1px var(--tinte-3); }
.wk-kachel:focus-visible, .wk-radio:focus-visible, .wk-aendern:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
.wk-kreis { flex: 0 0 16px; width: 16px; height: 16px; margin-top: 1px; border-radius: 50%; border: 1.5px solid var(--tinte-6); display: grid;
  place-items: center; }
.wk-kachel.an .wk-kreis, .wk-radio.an .wk-kreis { border-color: var(--tinte-2); }
.wk-kachel.an .wk-kreis::after, .wk-radio.an .wk-kreis::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--tinte-2); }
.wk-kachel strong { display: block; font-weight: 600; color: var(--tinte-1); }
.wk-kachel small { display: block; margin-top: 2px; font-size: 12px; color: var(--tinte-5); line-height: 1.35; }
.wk-frage { margin: 18px 0 0; }
.wk-frage + .wk-zeile { margin-top: 6px; }
.wk-zeile { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; }
.wk-radio { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; padding: 0; border: 0; background: none; color: var(--tinte-2);
  font: inherit; cursor: pointer; }
.wk-radio .wk-kreis { margin: 0; }
.wk-radio small { margin-left: 4px; color: var(--tinte-5); font-size: 12px; }
.wk-haken-feld { justify-content: flex-end; }
.wk-haken-feld .haken { min-height: 28px; }
.wk-gesetz { margin: 14px 0 0; padding: 8px 12px; border-left: 3px solid var(--linie-stark); background: var(--grund); color: var(--tinte-4);
  font-size: 12px; }

/* Ihre Rechnungen */
.wk-logo-feld { position: relative; margin-top: 12px; display: flex; align-items: center; gap: 14px; padding: 12px 14px;
  border: 1px dashed var(--linie-stark); border-radius: 3px; background: var(--grund); }
.wk-logo-bild { flex: 0 0 120px; height: 52px; border: 1px solid var(--linie); border-radius: 3px; background: #fff; display: grid; place-items: center;
  overflow: hidden; }
.wk-logo-bild .es-lg-bild { width: 100%; height: 100%; border: 0; background: transparent; }
.wk-logo-bild.leer { border-style: dashed; border-color: var(--linie-stark); background: transparent; color: var(--tinte-6); font-size: 12px; }
.wk-logo-text { flex: 1; min-width: 0; color: var(--tinte-4); }
.wk-logo-text b { display: block; color: var(--tinte-1); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-logo-datei { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.wk-logo-datei:focus-visible + .wk-logo-knopf { outline: 2px solid var(--akzent); outline-offset: 1px; }
.wk-logo-datei:disabled + .wk-logo-knopf { opacity: .55; pointer-events: none; }
.wk-nummer { display: flex; align-items: center; gap: 10px; }
.wk-nummer .ein { flex: 0 0 110px; width: 110px; }

/* Fertig */
.wk-fertig-kopf { display: flex; align-items: center; gap: 14px; }
.wk-fertig-zeichen { flex: 0 0 40px; width: 40px; height: 40px; border-radius: 3px; background: var(--ok-grund); color: var(--ok); display: grid;
  place-items: center; }
.wk-fertig-zeichen.fast { background: var(--warn-grund); color: var(--warn); }
.wk-fertig-kopf .wk-text { margin-top: 2px; }
.wk-liste { margin: 18px 0 0; padding: 0; max-width: 560px; border: 1px solid var(--linie); border-radius: 3px; }
.wk-liste li { list-style: none; display: grid; grid-template-columns: 18px 150px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 9px 14px; }
.wk-liste li + li { border-top: 1px solid var(--linie-fein); }
.wk-liste .h { color: var(--ok); display: grid; place-items: center; }
.wk-liste .was { color: var(--tinte-4); }
.wk-liste .wert { color: var(--tinte-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-liste .wert.leer { color: var(--tinte-5); }
.wk-aendern { padding: 0; border: 0; background: none; color: var(--tinte-5); font: inherit; font-size: 12px; text-decoration: underline;
  text-underline-offset: 2px; cursor: pointer; }
.wk-aendern:hover { color: var(--tinte-1); }
.wk-weiter { margin-top: 20px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Vorschau des Briefkopfs: Papier bleibt weiß, auch im dunklen Design ─────── */
.wk-vorschau { min-height: 0; overflow: hidden auto; padding: 20px 22px; border-left: 1px solid var(--linie); background: var(--grund); display: flex;
  flex-direction: column; }
.wk-vorschau-titel { font-size: 12px; font-weight: 600; color: var(--tinte-3); }
.wk-vorschau-text { font-size: 12px; color: var(--tinte-5); margin-top: 2px; }
.wk-papier-huelle { --wk-skala: .44; margin-top: 12px; width: calc(595px * var(--wk-skala)); height: calc(842px * var(--wk-skala));
  position: relative; flex: 0 0 auto; align-self: center; }
.wk-papier { position: absolute; left: 0; top: 0; width: 595px; height: 842px; transform: scale(var(--wk-skala)); transform-origin: 0 0; background: #fff;
  color: #1F2937; box-shadow: 0 1px 2px rgba(15, 23, 42, .16), 0 8px 28px rgba(15, 23, 42, .10); font: 10.5px/1.4 var(--schrift); padding: 44px 50px;
  overflow: hidden; }
.p-logo { position: absolute; right: 50px; top: 38px; width: 150px; height: 56px; display: grid; place-items: center; }
.p-logo img { display: block; max-width: 100%; max-height: 100%; object-fit: contain; }
.p-logo.leer { border: 1.5px dashed #CBD5E1; color: #94A3B8; font-size: 12px; }
.p-absender { margin-top: 92px; display: inline-block; max-width: 300px; font-size: 8px; color: #475569; border-bottom: 1px solid #94A3B8;
  padding-bottom: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-empf { margin-top: 8px; color: #94A3B8; line-height: 1.5; }
.p-info { position: absolute; right: 50px; top: 150px; width: 200px; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 9.5px;
  color: #475569; }
.p-info b { font-weight: 500; color: #1F2937; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-titel { margin-top: 38px; font-size: 17px; font-weight: 600; color: #0F172A; }
.p-zeilen { margin-top: 14px; border-top: 1px solid #CBD5E1; }
.p-zeile { display: grid; grid-template-columns: 1fr 70px; gap: 10px; padding: 7px 0; border-bottom: 1px solid #EEF0F3; }
.p-zeile i { display: block; height: 7px; border-radius: 1px; background: #E5E7EB; }
.p-zeile i.k { width: 70%; } .p-zeile i.k2 { width: 58%; } .p-zeile i.k3 { width: 64%; }
.p-zeile i.r { justify-self: end; width: 46px; }
.p-summe { margin: 12px 0 0 auto; width: 210px; display: grid; grid-template-columns: 1fr auto; gap: 3px 10px; font-size: 10px; color: #475569; }
.p-summe b { color: #0F172A; font-weight: 600; text-align: right; }
.p-summe .g { border-top: 1px solid #94A3B8; padding-top: 4px; font-weight: 600; color: #0F172A; }
.p-hinweis { margin-top: 14px; font-size: 9.5px; color: #475569; }
.p-fuss { position: absolute; left: 50px; right: 50px; bottom: 34px; border-top: 1px solid #CBD5E1; padding-top: 7px; display: grid;
  grid-template-columns: 1.15fr 1fr 1.25fr; gap: 12px; font-size: 8px; line-height: 1.5; color: #475569; }
.p-fuss > div { min-width: 0; overflow-wrap: anywhere; }
.wk-papier .ph { color: #94A3B8; background: repeating-linear-gradient(90deg, #E2E8F0 0 4px, transparent 4px 7px) bottom / 100% 1px no-repeat; }
.wk-fehlt { margin-top: 14px; font-size: 12px; color: var(--tinte-4); line-height: 1.5; }
.wk-fehlt b { font-weight: 600; color: var(--tinte-2); }
.wk-fehlt.ok b { color: var(--ok); }
/* Niedrige Fenster (Laptop mit 1366 × 768: rund 657 px im Browser): das Blatt wird kleiner, damit „Für Rechnungen fehlt noch …“
   darunter ganz zu sehen bleibt (Befund der Durchsicht; Stufen gemessen am längsten Satz, Schritt 1 einer leeren Firma). Reicht es
   trotzdem nicht, rollt die Vorschau. */
@media (max-height: 711.98px) { .wk-papier-huelle { --wk-skala: .37; } }
@media (max-height: 655.98px) { .wk-papier-huelle { --wk-skala: .31; } }
@media (max-height: 605.98px) { .wk-papier-huelle { --wk-skala: .25; } }
@media (max-height: 555.98px) { .wk-papier-huelle { display: none; } }

/* ── Fuß ──────────────────────────────────────────────────────────────────── */
.wk-fuss { flex: 0 0 56px; display: flex; align-items: center; gap: 8px; padding: 0 20px 0 14px; border-top: 1px solid var(--linie);
  background: var(--flaeche); }
.wk-fuss-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wk-zaehler { color: var(--tinte-5); font-size: 12px; margin-right: 6px; white-space: nowrap; }
.wk-fuss .kn-haupt { min-width: 96px; }

/* ── Ohne Vorschau: 641 bis 1099 px ───────────────────────────────────────── */
@media (max-width: 1099.98px) {
  .wk-rumpf { grid-template-columns: minmax(0, 1fr); }
  .wk-vorschau { display: none; }
  .wk-fenster { width: min(720px, calc(100vw - 32px)); }
  /* Im schmaleren Fenster passen Titel und lange Verbinder nicht neben die vier Schritte (bei 1024 px fehlte „Ihre Rechnungen“). */
  .wk-kopf-titel, .wk-kopf-trenner { display: none; }
  .wk-schritte li + li::before { width: 14px; margin: 0 6px; }
}

/* ── Handy: das Fenster füllt den Bildschirm ──────────────────────────────── */
@media (max-width: 640.98px) {
  .oo-schleier.wk-schleier { display: none; }
  .wk-fenster { left: 0; top: 0; transform: none; width: 100vw; height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .wk-kopf { flex-basis: 48px; padding: 0 8px 0 16px; }
  .wk-kopf-trenner, .wk-schritte, .wk-kopf-titel { display: none; }
  .wk-mobil-spaeter { display: inline-flex; margin-left: auto; }
  .wk-mobil-stand { display: block; padding: 10px 16px 12px; border-bottom: 1px solid var(--linie); }
  .wk-mobil-stand .zeile { display: flex; justify-content: space-between; font-size: 12px; color: var(--tinte-5); }
  .wk-mobil-stand .zeile b { color: var(--tinte-1); font-weight: 600; }
  .wk-mobil-balken { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 8px; }
  .wk-mobil-balken i { height: 4px; border-radius: 2px; background: var(--auswahl); }
  .wk-mobil-balken i.an { background: var(--tinte-2); }
  .wk-inhalt { padding: 18px 16px 24px; }
  .wk-titel { font-size: 18px; }
  .wk-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .wk-raster .c12, .wk-raster .c8, .wk-raster .c6, .wk-raster .c4, .wk-raster .c2 { grid-column: span 2; }
  .wk-raster .m1 { grid-column: span 1; }
  .wk-fenster .ein, .wk-fenster .aus { height: 36px; font-size: 16px; }
  .wk-wahl { grid-template-columns: 1fr; }
  .wk-plan li { grid-template-columns: 24px 1fr; }
  .wk-plan li span:last-child { grid-column: 2; }
  .wk-liste li { grid-template-columns: 18px minmax(0, 1fr) auto; }
  .wk-liste .was { display: none; }
  .wk-logo-feld { flex-wrap: wrap; }
  .wk-fuss { flex-basis: 64px; padding: 0 16px; }
  .wk-fuss .kn { height: 40px; flex: 1; }
  .wk-fuss-rechts { flex: 1; }
  .wk-zaehler, .wk-fuss .wk-spaeter { display: none; }
}

@media (forced-colors: active) {
  .wk-marke { forced-color-adjust: none; background: CanvasText; }
}
