/* OfficeOmni im Browser. Eine Datei, in dieser Reihenfolge: Schrift, Farben, Grundlagen, Bausteine (Knopf, Feld, Abzeichen,
   Reiter), Rahmen (Kopfband, Menü, Rückfrage, Meldungen), Anmeldung, Kunden (Leiste, Liste, Register, Akte), Blatt und
   Maske, schmale Fenster.
   Regeln: Farben nur aus den Marken unten (WPF-Palette Oo.Palette.Light/Dark). Blau nur für den Hauptknopf, den Fokus und
   „läuft“. Ecken 3 px, Flächen 4 px. Haarlinien statt Karten mit Schatten. Zeile 28 px, Felder 28 px. */

/* ── Schrift: IBM Plex Sans, selbst ausgeliefert (SIL OFL, fonts/OFL.txt) ───── */
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("../fonts/ibm-plex-sans-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, 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 Sans"; font-style: normal; font-weight: 100 700; font-display: swap; src: url("../fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ── Farben ─────────────────────────────────────────────────────────────────── */
:root {
  --schrift: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --grund: #F8FAFC; --flaeche: #FFFFFF; --flaeche-2: #F3F4F6; --auswahl: #E5E7EB;
  --linie: #E2E0D7; --linie-fein: #EEEDE8; --linie-stark: #D7DBDF;
  --tinte-1: #0F172A; --tinte-2: #1E293B; --tinte-3: #334155; --tinte-4: #475569; --tinte-5: #64748B; --tinte-6: #94A3B8;
  --akzent: #4F6EF7; --akzent-dunkel: #3F5BE0; --akzent-schein: rgba(79, 110, 247, .24);
  --ok: #15803D; --ok-grund: #DCFCE7; --alarm: #B91C1C; --alarm-grund: #FEE2E2; --warn: #92400E; --warn-grund: #FEF3C7;
  --violett: #7C3AED; --violett-grund: #EDE9FE;
  --ampel-rot: #DC2626; --ampel-gelb: #CA8A04; --ampel-gruen: #16A34A; --ampel-schwarz: #1E293B;
  --nacht: #10233F; --nacht-text: #E7EDF6; --nacht-text-2: #A7B8D0; --nacht-marke: #7FA8F5;
  --schatten: 0 10px 30px rgba(15, 23, 42, .14); --schleier: rgba(15, 23, 42, .36);
  /* Anmeldung wie das Anmeldefenster des PC-Programms (Lg.*) */
  --lg-primary: #2A66D4; --lg-primary-hover: #245AC0; --lg-primary-active: #1E4DA6;
  --lg-text: #1A202C; --lg-text2: #344054; --lg-text3: #5B6472; --lg-text4: #667085;
  --lg-border: #D0D5DD; --lg-card-border: #E3E8EF; --lg-bg: #F3F5F8; --lg-surface: #FFFFFF; --lg-surface2: #F2F4F7;
  --lg-check: #98A2B3; --lg-divider: #EEF1F5; --lg-error-ink: #B42318; --lg-error-bg: #FEF3F2; --lg-error-border: #FECDCA; --lg-focus: rgba(42, 102, 212, .16);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-thema="hell"]) {
    --grund: #1E1E1E; --flaeche: #252526; --flaeche-2: #3C3C3C; --auswahl: #3F3F46;
    --linie: #393938; --linie-fein: #303031; --linie-stark: #4E4E50;
    --tinte-1: #F0F0F0; --tinte-2: #DCDCDC; --tinte-3: #C5C5C5; --tinte-4: #A6A6A6; --tinte-5: #8F8F8F; --tinte-6: #767676;
    --akzent: #4F6EF7; --akzent-dunkel: #6B85F8; --akzent-schein: rgba(124, 147, 249, .34);
    --ok: #86EFAC; --ok-grund: #1B3524; --alarm: #FCA5A5; --alarm-grund: #46262A; --warn: #FCD34D; --warn-grund: #3B2F14;
    --violett: #A78BFA; --violett-grund: #352A52;
    --ampel-rot: #F87171; --ampel-gelb: #FBBF24; --ampel-gruen: #4ADE80; --ampel-schwarz: #C5C5C5;
    --nacht: #0C1A30; --schatten: 0 10px 30px rgba(0, 0, 0, .5); --schleier: rgba(0, 0, 0, .5);
    --lg-primary: #6E97E8; --lg-primary-hover: #86A9EF; --lg-primary-active: #5C88DF;
    --lg-text: #E9ECF1; --lg-text2: #C3CAD5; --lg-text3: #A2AAB8; --lg-text4: #7C8493;
    --lg-border: #3A4049; --lg-card-border: #333840; --lg-bg: #16181C; --lg-surface: #1E2126; --lg-surface2: #2C3138;
    --lg-check: #6B7482; --lg-divider: #2A2E35; --lg-error-ink: #F0736F; --lg-error-bg: #3A2020; --lg-error-border: #7A3A3A; --lg-focus: rgba(110, 151, 232, .2);
    color-scheme: dark;
  }
}
:root[data-thema="dunkel"] {
  --grund: #1E1E1E; --flaeche: #252526; --flaeche-2: #3C3C3C; --auswahl: #3F3F46;
  --linie: #393938; --linie-fein: #303031; --linie-stark: #4E4E50;
  --tinte-1: #F0F0F0; --tinte-2: #DCDCDC; --tinte-3: #C5C5C5; --tinte-4: #A6A6A6; --tinte-5: #8F8F8F; --tinte-6: #767676;
  --akzent: #4F6EF7; --akzent-dunkel: #6B85F8; --akzent-schein: rgba(124, 147, 249, .34);
  --ok: #86EFAC; --ok-grund: #1B3524; --alarm: #FCA5A5; --alarm-grund: #46262A; --warn: #FCD34D; --warn-grund: #3B2F14;
  --violett: #A78BFA; --violett-grund: #352A52;
  --ampel-rot: #F87171; --ampel-gelb: #FBBF24; --ampel-gruen: #4ADE80; --ampel-schwarz: #C5C5C5;
  --nacht: #0C1A30; --schatten: 0 10px 30px rgba(0, 0, 0, .5); --schleier: rgba(0, 0, 0, .5);
  --lg-primary: #6E97E8; --lg-primary-hover: #86A9EF; --lg-primary-active: #5C88DF;
  --lg-text: #E9ECF1; --lg-text2: #C3CAD5; --lg-text3: #A2AAB8; --lg-text4: #7C8493;
  --lg-border: #3A4049; --lg-card-border: #333840; --lg-bg: #16181C; --lg-surface: #1E2126; --lg-surface2: #2C3138;
  --lg-check: #6B7482; --lg-divider: #2A2E35; --lg-error-ink: #F0736F; --lg-error-bg: #3A2020; --lg-error-border: #7A3A3A; --lg-focus: rgba(110, 151, 232, .2);
  color-scheme: dark;
}

/* ── Grundlagen ─────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; scrollbar-width: thin; }
html { scrollbar-color: var(--linie-stark) transparent; }
html, body { height: 100%; margin: 0; }
body { font: 13px/1.38 var(--schrift); color: var(--tinte-1); background: var(--grund); font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button, input, select, textarea { font: inherit; color: inherit; margin: 0; }
button { -webkit-appearance: none; appearance: none; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--akzent); outline-offset: 1px; }
::selection { background: var(--akzent-schein); }
.sym { flex: 0 0 auto; display: block; }
.kreisel { width: 18px; height: 18px; border: 2px solid var(--linie-stark); border-top-color: var(--tinte-4); border-radius: 50%; display: inline-block; animation: dreh .7s linear infinite; flex: 0 0 auto; }
.kreisel.klein { width: 12px; height: 12px; border-width: 1.5px; margin-right: 6px; vertical-align: -1px; }
.kreisel.hell { border-color: rgba(255, 255, 255, .4); border-top-color: #fff; margin-right: 0; }
@keyframes dreh { to { transform: rotate(360deg); } }

/* ── Bausteine ──────────────────────────────────────────────────────────────── */
.kn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 28px; padding: 0 10px; border: 1px solid var(--linie-stark); border-radius: 3px;
  background: var(--flaeche); color: var(--tinte-2); font-weight: 500; text-decoration: none; white-space: nowrap; cursor: pointer; }
.kn:hover { background: var(--flaeche-2); }
.kn:disabled { opacity: .55; cursor: default; }
.kn-haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.kn-haupt:hover { background: var(--akzent-dunkel); border-color: var(--akzent-dunkel); }
.kn-stark { background: var(--tinte-1); border-color: var(--tinte-1); color: var(--flaeche); }
.kn-stark:hover { background: var(--tinte-3); border-color: var(--tinte-3); }
.kn-gefahr { background: var(--ampel-rot); border-color: var(--ampel-rot); color: #fff; }
.kn-gefahr:hover { background: #B91C1C; border-color: #B91C1C; }
.kn-leise { border-color: transparent; background: transparent; color: var(--tinte-4); }
.kn-leise:hover, .kn-leise.an { background: var(--flaeche-2); color: var(--tinte-1); }
.kn-leise.an { border-color: var(--linie-stark); }
.kn-symbol { width: 28px; padding: 0; }

.ein, .aus { height: 28px; width: 100%; min-width: 0; padding: 0 8px; border: 1px solid var(--linie-stark); border-radius: 3px; background: var(--flaeche); color: var(--tinte-1); outline: none; }
.aus { padding: 0 4px 0 6px; }
.ein:focus, .aus:focus { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent-schein); }
.ein::placeholder { color: var(--tinte-6); }
.ein.fehler { border-color: var(--ampel-rot); box-shadow: 0 0 0 2px color-mix(in srgb, var(--ampel-rot) 24%, transparent); }
.ein.schmal { flex: 0 0 96px; width: 96px; }
.ein.zahl { text-align: right; }
.ein.mehrzeilig { height: auto; min-height: 76px; padding: 6px 8px; line-height: 1.42; resize: vertical; }

.haken { display: inline-flex; align-items: center; gap: 7px; min-height: 24px; cursor: pointer; }
.haken input { -webkit-appearance: none; appearance: none; flex: 0 0 15px; width: 15px; height: 15px; border: 1.5px solid var(--tinte-6); border-radius: 3px; background: var(--flaeche);
  display: grid; place-items: center; cursor: pointer; }
.haken input:checked { background: var(--tinte-3); border-color: var(--tinte-3); }
.haken input:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid var(--flaeche); border-bottom: 2px solid var(--flaeche); transform: translateY(-1px) rotate(-45deg); }

.abz { display: inline-flex; align-items: center; gap: 4px; height: 19px; padding: 0 6px; border-radius: 3px; font-size: 11.5px; font-weight: 600; white-space: nowrap; max-width: 100%; }
.abz-ok { background: var(--ok-grund); color: var(--ok); }
.abz-warn { background: var(--warn-grund); color: var(--warn); }
.abz-alarm { background: var(--alarm-grund); color: var(--alarm); }
.abz-violett { background: var(--violett-grund); color: var(--violett); }
.abz-neutral { background: var(--flaeche-2); color: var(--tinte-4); }
.punkt { display: inline-block; flex: 0 0 7px; width: 7px; height: 7px; border-radius: 50%; }
.punkt.gross { flex-basis: 10px; width: 10px; height: 10px; }
.punkt.rot { background: var(--ampel-rot); } .punkt.gelb { background: var(--ampel-gelb); } .punkt.gruen { background: var(--ampel-gruen); } .punkt.schwarz { background: var(--ampel-schwarz); }

.reiter { display: flex; gap: 18px; padding: 0 14px; border-bottom: 1px solid var(--linie); flex: 0 0 auto; }
.reiter button { height: 32px; padding: 0; margin-bottom: -1px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--tinte-5); font-weight: 500; cursor: pointer; white-space: nowrap; }
.reiter button:hover { color: var(--tinte-2); }
.reiter button.aktiv { color: var(--tinte-1); font-weight: 600; border-bottom-color: var(--tinte-1); }

/* ── Rahmen ─────────────────────────────────────────────────────────────────── */
.oo-app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; overflow: hidden; }
.oo-band { flex: 0 0 40px; display: flex; align-items: center; gap: 20px; min-width: 0; padding: 0 10px 0 14px; background: var(--nacht); color: var(--nacht-text); }
.oo-marke { display: flex; align-items: center; height: 40px; flex: 0 0 auto; }
.oo-marke img { display: block; height: 17px; width: auto; }
.oo-module { display: flex; align-self: stretch; gap: 2px; min-width: 0; }
.oo-modul { display: flex; align-items: center; padding: 2px 12px 0; border-bottom: 2px solid transparent; color: var(--nacht-text-2); font-weight: 500; text-decoration: none; white-space: nowrap; }
.oo-modul:hover { color: #fff; }
.oo-modul.aktiv { color: #fff; border-bottom-color: var(--nacht-marke); }
.oo-band :focus-visible { outline-color: #fff; }
.oo-band-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; min-width: 0; }
.oo-band-marke { height: 20px; display: inline-flex; align-items: center; padding: 0 7px; border-radius: 3px; background: rgba(255, 255, 255, .12); color: var(--nacht-text); font-size: 12px; white-space: nowrap; }
.oo-firma { display: flex; align-items: center; gap: 6px; height: 28px; max-width: 340px; padding: 0 7px 0 10px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 3px; background: transparent; color: #fff; cursor: pointer; }
.oo-firma:hover { background: rgba(255, 255, 255, .09); }
.oo-firma .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.oo-hinweisband { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 8px 6px 14px; background: var(--warn-grund); color: var(--warn); }
.oo-inhalt { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.oo-leer { margin: 12vh auto 0; max-width: 460px; padding: 0 24px; display: grid; gap: 10px; justify-items: start; }
.oo-leer h1 { font-size: 20px; font-weight: 600; }
.oo-leer p { color: var(--tinte-4); font-size: 14px; }

.oo-schleier { position: fixed; inset: 0; z-index: 40; background: var(--schleier); }
.oo-schleier.klar { z-index: 30; background: transparent; }
.oo-schleier.vorn { z-index: 59; }
.oo-menue { position: absolute; z-index: 31; min-width: 200px; padding: 4px; border: 1px solid var(--linie-stark); border-radius: 4px; background: var(--flaeche); box-shadow: var(--schatten); }
.oo-kontomenue { position: fixed; top: 44px; right: 8px; width: 268px; }
.oo-menue button[role="menuitem"] { display: flex; align-items: center; gap: 8px; width: 100%; height: 30px; padding: 0 8px; border: 0; border-radius: 3px; background: transparent; color: var(--tinte-2); text-align: left; cursor: pointer; }
.oo-menue button[role="menuitem"]:hover { background: var(--flaeche-2); }
.oo-menue button[role="menuitem"] .sym { color: var(--tinte-5); }
.oo-menue .kopf { display: grid; gap: 1px; padding: 8px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--linie); }
.oo-menue .kopf strong { font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.oo-menue .kopf span { color: var(--tinte-5); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.oo-menue .gruppe { padding: 6px 8px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--linie); }
.oo-menue .gruppe .titel { display: block; margin-bottom: 6px; color: var(--tinte-5); font-size: 12px; }
.oo-menue .fuss { padding: 6px 8px 4px; color: var(--tinte-6); font-size: 11.5px; }
.segment { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 2px; border-radius: 3px; background: var(--flaeche-2); }
.segment button { height: 24px; border: 1px solid transparent; border-radius: 2px; background: transparent; color: var(--tinte-4); font-size: 12px; cursor: pointer; }
.segment button.gewaehlt { background: var(--flaeche); border-color: var(--linie-stark); color: var(--tinte-1); font-weight: 600; }

.oo-dialog { position: fixed; z-index: 60; left: 50%; top: 20%; transform: translateX(-50%); width: min(460px, calc(100vw - 32px)); padding: 16px 18px 14px;
  border: 1px solid var(--linie-stark); border-radius: 4px; background: var(--flaeche); box-shadow: 0 18px 50px rgba(15, 23, 42, .24); }
.oo-dialog h2 { margin-bottom: 6px; font-size: 15px; font-weight: 600; }
.oo-dialog p { margin-bottom: 16px; color: var(--tinte-3); white-space: pre-line; }
.oo-dialog .knoepfe { display: flex; justify-content: flex-end; gap: 8px; }

.oo-meldungen { position: fixed; z-index: 70; right: 16px; bottom: 16px; width: min(390px, calc(100vw - 32px)); display: grid; gap: 8px; pointer-events: none; }
.oo-meldung { pointer-events: auto; display: flex; align-items: flex-start; gap: 8px; padding: 10px 6px 10px 12px; border-left: 3px solid var(--tinte-6); border-radius: 4px;
  background: #0F172A; color: #F1F5F9; box-shadow: 0 12px 30px rgba(15, 23, 42, .26); animation: meldung-ein .16s ease-out; }
.oo-meldung.ok { border-left-color: #4ADE80; } .oo-meldung.fehler { border-left-color: #F87171; } .oo-meldung.hinweis { border-left-color: #FBBF24; }
.oo-meldung .text { flex: 1 1 auto; display: grid; gap: 2px; white-space: pre-line; min-width: 0; overflow-wrap: anywhere; }
.oo-meldung .kn { color: #CBD5E1; height: 22px; width: 22px; }
.oo-meldung .kn:hover { background: rgba(255, 255, 255, .12); color: #fff; }
@keyframes meldung-ein { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Verbindung zum Server unterbrochen: Blazor schaltet die Klassen an diesem Kasten. */
#components-reconnect-modal { display: none; position: fixed; z-index: 90; inset: 0; background: var(--schleier); align-items: flex-start; justify-content: center; }
#components-reconnect-modal.components-reconnect-show, #components-reconnect-modal.components-reconnect-retrying, #components-reconnect-modal.components-reconnect-failed,
#components-reconnect-modal.components-reconnect-rejected, #components-reconnect-modal.components-reconnect-paused, #components-reconnect-modal.components-reconnect-resume-failed { display: flex; }
#components-reconnect-modal .kasten { margin-top: 18vh; width: min(420px, calc(100vw - 32px)); padding: 16px 18px; border: 1px solid var(--linie-stark); border-radius: 4px; background: var(--flaeche); box-shadow: var(--schatten); display: grid; gap: 12px; }
#components-reconnect-modal .laeuft, #components-reconnect-modal .gescheitert { display: none; align-items: center; gap: 10px; }
#components-reconnect-modal.components-reconnect-show .laeuft, #components-reconnect-modal.components-reconnect-retrying .laeuft { display: flex; }
#components-reconnect-modal.components-reconnect-failed .gescheitert, #components-reconnect-modal.components-reconnect-rejected .gescheitert,
#components-reconnect-modal.components-reconnect-paused .gescheitert, #components-reconnect-modal.components-reconnect-resume-failed .gescheitert { display: grid; gap: 12px; justify-items: start; }

/* ── Anmeldung (Seiten aus OfficeOmni.App.Shared, Optik der Web-App) ────────── */
.lg { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 15vh 16px 32px; background: var(--lg-bg); color: var(--lg-text); }
.lg-karte { width: 100%; max-width: 408px; padding: 26px 28px 26px; border: 1px solid var(--lg-card-border); border-radius: 6px; background: var(--lg-surface); }
.lg-marke { display: block; height: 24px; margin: 2px auto 10px; }
.lg-untertitel { margin: 0 0 4px; text-align: center; font-size: 13px; color: var(--lg-text3); }
.lg-titel { margin: 0 0 8px; font-size: 16px; font-weight: 600; color: var(--lg-text); }
.lg-text { margin: 0 0 12px; font-size: 13px; line-height: 18px; color: var(--lg-text2); }
.lg-block { margin-top: 14px; }
.lg-label { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; font-size: 13px; font-weight: 600; line-height: 18px; color: var(--lg-text2); }
.lg-label small { font-weight: 400; font-size: 12px; color: var(--lg-text3); }
.lg-eingabe { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--lg-border); border-radius: 4px; background: var(--lg-surface); color: var(--lg-text); font-size: 14px; outline: none; }
.lg-eingabe::placeholder { color: var(--lg-text4); }
.lg-eingabe:focus { border-color: var(--lg-primary); box-shadow: 0 0 0 3px var(--lg-focus); }
.lg-eingabe.schluessel { text-transform: uppercase; letter-spacing: .3px; }
.lg-eingabe.code { font-size: 20px; letter-spacing: 6px; text-align: center; height: 44px; }
.lg-passwort { position: relative; }
.lg-passwort .lg-eingabe { padding-right: 40px; }
.lg-auge { position: absolute; right: 3px; top: 3px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 3px; background: transparent; color: var(--lg-text3); cursor: pointer; }
.lg-auge:hover { background: var(--lg-surface2); }
.lg-regel { margin: 6px 0 0; font-size: 12px; line-height: 16px; color: var(--lg-text3); }
.lg-zeile { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.lg-link { padding: 0; border: 0; background: none; color: var(--lg-primary); font-size: 13px; text-decoration: none; cursor: pointer; }
.lg-link:hover { text-decoration: underline; }
.lg-haken { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; font-size: 13px; line-height: 18px; color: var(--lg-text2); }
.lg-haken input { -webkit-appearance: none; appearance: none; flex: 0 0 16px; width: 16px; height: 16px; margin: 1px 0 0; border: 1.5px solid var(--lg-check); border-radius: 3px; background: var(--lg-surface); display: grid; place-items: center; cursor: pointer; }
.lg-haken input:checked { background: var(--lg-primary); border-color: var(--lg-primary); }
.lg-haken input:checked::after { content: ""; width: 8px; height: 4px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: translateY(-1px) rotate(-45deg); }
.lg-haupt { width: 100%; height: 38px; margin-top: 16px; border: 0; border-radius: 4px; background: var(--lg-primary); color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.lg-haupt:hover { background: var(--lg-primary-hover); }
.lg-haupt:active { background: var(--lg-primary-active); }
.lg-haupt:disabled { opacity: .55; cursor: default; }
.lg-neben { height: 32px; padding: 0 14px; border: 1px solid var(--lg-border); border-radius: 4px; background: var(--lg-surface); color: var(--lg-text2); font-size: 13px; font-weight: 500; cursor: pointer; }
.lg-neben:hover { background: var(--lg-surface2); }
.lg-knoepfe { display: flex; justify-content: space-between; gap: 10px; margin-top: 18px; }
.lg-knoepfe .rechts { display: flex; gap: 10px; }
.lg-knoepfe .lg-haupt { width: auto; height: 32px; margin: 0; padding: 0 16px; font-size: 13px; }
.lg-fehler, .lg-info { margin: 12px 0 0; padding: 9px 12px; border-radius: 4px; font-size: 13px; line-height: 18px; white-space: pre-line; }
.lg-fehler { border: 1px solid var(--lg-error-border); background: var(--lg-error-bg); color: var(--lg-error-ink); }
.lg-info { border: 1px solid var(--lg-card-border); background: var(--lg-surface2); color: var(--lg-text2); }
.lg-fehler strong, .lg-info strong { display: block; margin-bottom: 2px; }
.lg-fuss { width: 100%; max-width: 408px; margin-top: 14px; font-size: 13px; color: var(--lg-text3); }
.lg-fuss .registrieren { margin-bottom: 14px; text-align: center; }
.lg-fuss .zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.lg-fuss .rechtliches { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.lg-fuss .rechtliches button { padding: 0; border: 0; background: none; color: var(--lg-text3); font-size: 12px; cursor: pointer; }
.lg-fuss .rechtliches button:hover { color: var(--lg-text); text-decoration: underline; }
.lg-fuss .version { font-size: 11.5px; }
.lg-liste { margin-top: 12px; border: 1px solid var(--lg-card-border); border-radius: 4px; overflow: hidden; }
.lg-liste button { display: block; width: 100%; padding: 7px 12px 8px; border: 0; border-left: 2px solid transparent; border-top: 1px solid var(--lg-divider); background: transparent; color: var(--lg-text); text-align: left; cursor: pointer; }
.lg-liste button:first-child { border-top: 0; }
.lg-liste button:hover { background: var(--lg-surface2); }
.lg-liste button.gewaehlt { border-left-color: var(--lg-text); background: var(--lg-surface2); }
.lg-liste button:disabled { color: var(--lg-text3); cursor: default; }
.lg-liste strong { display: block; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lg-liste small { display: block; margin-top: 1px; font-size: 12.5px; color: var(--lg-text2); }
.lg-firma { margin-top: 12px; padding: 10px 12px; border: 1px solid var(--lg-card-border); border-radius: 4px; }
.lg-firma strong { display: block; font-size: 14px; }
.lg-firma span { display: block; font-size: 12.5px; color: var(--lg-text2); }
.lg-firma .inhaber { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--lg-divider); font-size: 12.5px; color: var(--lg-text2); }
.lg-laden { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 22px 0 8px; font-size: 13px; color: var(--lg-text3); }
.lg-oder { display: flex; align-items: center; gap: 12px; margin: 16px 0 0; font-size: 12.5px; color: var(--lg-text3); }
.lg-oder::before, .lg-oder::after { content: ""; flex: 1 1 auto; height: 1px; background: var(--lg-divider); }
.lg-warten { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; padding: 8px 12px; border: 1px solid var(--lg-border); border-radius: 4px; background: var(--lg-surface2); font-size: 13px; line-height: 18px; color: var(--lg-text2); }
.lg-warten .text { flex: 1 1 auto; }
.lg-warnung { margin: 10px 0 0; font-size: 12.5px; line-height: 17px; color: var(--lg-text2); }
/* Hinweis des Vorführ-Wirts: steht unter der Anmeldung, die als eigene Seite (.lg) die volle Höhe füllt. */
.lg-vorfuehrung { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); width: min(408px, calc(100vw - 32px)); margin: 0; padding: 8px 12px; border: 1px dashed var(--lg-border);
  border-radius: 4px; background: var(--lg-surface); color: var(--lg-text2); font-size: 12.5px; line-height: 17px; text-align: center; white-space: pre-line; }

/* ── Kunden: Arbeitsfläche ──────────────────────────────────────────────────── */
.kd { --leiste: 236px; --register: 24px; --akte: clamp(384px, 31vw, 456px);
  flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: var(--leiste) var(--register) minmax(0, 1fr) var(--akte); background: var(--flaeche); }
.kd.ohne-leiste { grid-template-columns: var(--register) minmax(0, 1fr) var(--akte); }
.kd.ohne-akte { grid-template-columns: var(--leiste) var(--register) minmax(0, 1fr); }
.kd.ohne-leiste.ohne-akte { grid-template-columns: var(--register) minmax(0, 1fr); }
.kd-fuell { flex: 1 1 auto; }

/* Filterleiste: wie die Hauptnavigation des PC-Programms */
.kd-leiste { min-height: 0; overflow-y: auto; padding: 8px 6px 20px; border-right: 1px solid var(--linie); background: var(--grund); }
.fl-e { display: flex; align-items: center; gap: 7px; width: 100%; min-height: 26px; padding: 0 8px 0 22px; border: 0; border-left: 2px solid transparent; border-radius: 0 3px 3px 0;
  background: transparent; color: var(--tinte-3); text-align: left; cursor: pointer; }
.fl-e:hover { background: color-mix(in srgb, var(--tinte-1) 5%, transparent); }
.fl-e .t { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-e .zahl { flex: 0 0 auto; color: var(--tinte-6); font-size: 12px; }
.fl-e.leer { color: var(--tinte-6); }
.fl-e.kind { padding-left: 36px; }
.fl-e.gewaehlt { border-left-color: var(--tinte-1); background: var(--auswahl); color: var(--tinte-1); font-weight: 600; }
.fl-e.gewaehlt .zahl { color: var(--tinte-4); }
.fl-alle { margin-bottom: 6px; padding-left: 8px; color: var(--tinte-1); font-weight: 600; }
.fl-gruppe.im-bereich { margin-left: 12px; }
.fl-kopf { display: flex; align-items: center; gap: 4px; width: 100%; height: 26px; padding: 0 6px; border: 0; border-radius: 3px; background: transparent; color: var(--tinte-1); font-weight: 600; text-align: left; cursor: pointer; }
.fl-kopf:hover { background: color-mix(in srgb, var(--tinte-1) 5%, transparent); }
.fl-kopf .sym { color: var(--tinte-5); }
.fl-kopf .t { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fl-kopf .wahl { flex: 1 1 0; min-width: 0; margin-left: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; color: var(--tinte-5); font-size: 12px; font-weight: 400; }
.fl-mehr { margin: 2px 0 4px 22px; padding: 2px 0; border: 0; background: transparent; color: var(--tinte-5); font-size: 12px; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.fl-mehr:hover { color: var(--tinte-1); }
.fl-hinweis { margin: 12px 8px 0; color: var(--tinte-5); font-size: 12px; }

/* Kopfleiste der Liste */
.kd-mitte { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.kd-kopf { flex: 0 0 auto; display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.kd-suche { position: relative; flex: 0 1 320px; min-width: 150px; display: flex; align-items: center; }
.kd-suche > .sym { position: absolute; left: 8px; color: var(--tinte-6); pointer-events: none; }
.kd-suche input { width: 100%; height: 28px; padding: 0 26px 0 29px; border: 1px solid var(--linie-stark); border-radius: 3px; background: var(--flaeche); color: var(--tinte-1); outline: none; }
.kd-suche input:focus { border-color: var(--akzent); box-shadow: 0 0 0 2px var(--akzent-schein); }
.kd-suche input::placeholder { color: var(--tinte-6); }
.kd-suche input::-webkit-search-cancel-button { display: none; }
.kd-suche .leeren { position: absolute; right: 3px; width: 22px; height: 22px; display: grid; place-items: center; border: 0; border-radius: 3px; background: transparent; color: var(--tinte-5); cursor: pointer; }
.kd-suche .leeren:hover { background: var(--flaeche-2); color: var(--tinte-1); }
.kd-chips { display: flex; gap: 6px; min-width: 0; overflow: hidden; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; border: 1px solid var(--linie-stark); border-radius: 3px; background: var(--flaeche); color: var(--tinte-3); font-size: 12px; white-space: nowrap; cursor: pointer; }
.chip:hover { background: var(--flaeche-2); }
.chip .zahl { color: var(--tinte-6); }
.chip.gewaehlt { border-color: var(--tinte-5); background: var(--flaeche-2); color: var(--tinte-1); font-weight: 600; }
.kd-aufheben .sym { display: none; }
.kd-spaltenwahl { position: relative; }
.kd-spaltenmenue { top: 32px; right: 0; width: 216px; max-height: calc(100dvh - 96px); overflow-y: auto; display: grid; gap: 1px; padding: 8px 10px; }
.kd-spaltenmenue .kn { justify-self: start; margin: 6px 0 0 -8px; }
.kd-band { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--linie); }
.kd-band.fehler { background: var(--alarm-grund); color: var(--alarm); }

/* Liste */
.kd-tab { position: relative; flex: 1 1 auto; min-height: 0; display: flex; }
.kd-rollen { flex: 1 1 auto; min-width: 0; overflow: auto; outline: none; }
.kd-th, .kd-z { display: grid; grid-template-columns: var(--raster); min-width: var(--breite); padding: 0 8px; }
.kd-th { position: sticky; top: 0; z-index: 2; height: 30px; border-bottom: 1px solid var(--linie-stark); background: var(--flaeche); }
.kd-h { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 0 8px; border: 0; background: transparent; color: var(--tinte-5); font-size: 12px; font-weight: 600; text-align: left; white-space: nowrap; overflow: hidden; cursor: pointer; }
.kd-h.rechts { justify-content: flex-end; }
.kd-h:hover, .kd-h.sortiert { color: var(--tinte-1); }
.kd-z { height: 28px; align-items: center; border-bottom: 1px solid var(--linie-fein); cursor: default; }
.kd-z:hover { background: var(--grund); }
.kd-z.gewaehlt { background: var(--auswahl); box-shadow: inset 2px 0 0 var(--tinte-1); }
.kd-rollen:focus-visible .kd-z.gewaehlt { box-shadow: inset 2px 0 0 var(--akzent); }
.kd-c { display: flex; align-items: center; gap: 6px; min-width: 0; height: 100%; padding: 0 8px; overflow: hidden; white-space: nowrap; }
.kd-c.rechts { justify-content: flex-end; }
.kd-c .kurz, .kd-c .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.kd-c .name { color: var(--tinte-1); font-weight: 600; }
.kd-c .vor { color: var(--tinte-4); font-weight: 400; }
.kd-c .nr, .kd-c .blass { color: var(--tinte-5); }
.kd-c > .sym { color: var(--tinte-6); }
.kd-c .zeichen { display: inline-flex; flex: 0 0 auto; }
.kd-c .zeichen.warn { color: var(--warn); } .kd-c .zeichen.alarm { color: var(--alarm); }
.kd-c .land { flex: 0 0 auto; padding: 0 3px; border: 1px solid var(--linie-stark); border-radius: 2px; color: var(--tinte-5); font-size: 10.5px; line-height: 14px; }
.kd-c .zahl.alarm { color: var(--alarm); font-weight: 600; } .kd-c .zahl.warn { color: var(--warn); }
.kd-c.c-LastDocument .zahl.alarm { font-weight: 400; }
.kd-c.c-Open .zahl { font-weight: 600; }
.kd-c.c-Email { color: var(--tinte-3); }
.kd-nichts { position: absolute; left: 0; right: 0; top: 72px; display: grid; justify-items: center; gap: 4px; padding: 0 24px; color: var(--tinte-5); text-align: center; pointer-events: none; }
.kd-nichts strong { color: var(--tinte-2); font-size: 14px; font-weight: 600; }
.kd-fuss { flex: 0 0 30px; display: flex; align-items: center; gap: 18px; padding: 0 12px; border-top: 1px solid var(--linie); background: var(--grund); color: var(--tinte-4); font-size: 12px; white-space: nowrap; overflow: hidden; }
.kd-fuss .summe { color: var(--tinte-2); font-weight: 600; }
.kd-fuss .summe .wl { margin-right: 6px; color: var(--tinte-5); font-weight: 400; }
.kd-fuss .summe.alarm { color: var(--alarm); }
.kd-fuss .stand { display: inline-flex; align-items: center; gap: 5px; color: var(--tinte-5); }
.kd-fuss .stand.warn { color: var(--warn); }

/* Register A–Z: die Kundenkartei, links an der Liste (dort beginnen die Namen) */
.kd-register { min-height: 0; display: flex; flex-direction: column; padding: 4px 0; border-right: 1px solid var(--linie); background: var(--flaeche); overflow: hidden; }
.kd-register button { flex: 1 1 0; min-height: 0; max-height: 25px; padding: 0; border: 0; background: transparent; color: var(--tinte-3); font-size: 11px; font-weight: 600; line-height: 1; cursor: pointer; }
.kd-register button:hover { background: color-mix(in srgb, var(--tinte-1) 8%, transparent); color: var(--tinte-1); }
.kd-register button.leer { color: var(--tinte-6); font-weight: 400; opacity: .6; }
.kd-register button.gewaehlt { background: var(--tinte-1); color: var(--flaeche); opacity: 1; }

/* Kundenakte */
.kd-akte { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--flaeche); }
.ak-leer { margin: 72px 28px 0; display: grid; gap: 4px; color: var(--tinte-5); text-align: center; }
.ak-leer strong { color: var(--tinte-2); font-size: 14px; font-weight: 600; }
.ak-kopf { flex: 0 0 auto; display: grid; gap: 6px; padding: 12px 10px 10px 14px; border-bottom: 1px solid var(--linie); }
.ak-titel { display: flex; align-items: flex-start; gap: 8px; }
.ak-titel h2 { flex: 1 1 auto; min-width: 0; font-size: 17px; line-height: 1.25; font-weight: 600; letter-spacing: -.005em; overflow-wrap: anywhere; }
.ak-zu { margin-top: -3px; }
.ak-unter { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--tinte-4); }
.ak-unter .nr { color: var(--tinte-5); }
.ak-zeichen { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ak-zeichen:empty { display: none; }
.ak-bemerkung { color: var(--warn); font-size: 12px; }
.ak-ampel { display: inline-flex; align-items: center; gap: 6px; color: var(--tinte-2); }
.ak-aktionen { display: flex; align-items: center; gap: 6px; margin-top: 2px; padding-right: 4px; }
.ak-blick { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 12px; padding: 9px 14px 11px; border-bottom: 1px solid var(--linie); }
.ak-blick .wert { display: grid; gap: 1px; min-width: 0; }
.ak-blick .wl { color: var(--tinte-5); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ak-blick b { color: var(--tinte-1); font-size: 14px; font-weight: 600; white-space: nowrap; }
.ak-blick .alarm b { color: var(--alarm); } .ak-blick .warn b { color: var(--warn); }
.ak-inhalt { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 2px 14px 24px; }
.ak-ab { padding: 11px 0 9px; border-bottom: 1px solid var(--linie); }
.ak-ab:last-child { border-bottom: 0; }
.ak-ab h3 { margin-bottom: 6px; font-size: 13px; font-weight: 600; }
.ak-zeile { display: grid; grid-template-columns: 124px minmax(0, 1fr) 22px; align-items: center; gap: 8px; min-height: 24px; }
.ak-zeile .wl, .ak-anschrift .wl { color: var(--tinte-5); }
.ak-zeile a, .ak-zeile .w { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ak-zeile a, .ak-person a { color: var(--tinte-1); text-decoration: underline; text-decoration-color: var(--linie-stark); text-underline-offset: 2px; }
.ak-zeile a:hover, .ak-person a:hover { text-decoration-color: var(--tinte-3); }
.ak-zeile .kopie { width: 22px; height: 22px; opacity: 0; }
.ak-zeile:hover .kopie, .ak-zeile .kopie:focus-visible { opacity: 1; }
.ak-nichts { margin: 2px 0; color: var(--tinte-5); }
.ak-anschrift { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ak-anschrift span { display: block; }
.ak-anschrift.zweite { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--linie); }
.ak-belege .beleg { display: grid; grid-template-columns: minmax(0, 1fr) 72px 90px 76px; align-items: center; gap: 8px; min-height: 26px; border-bottom: 1px solid var(--linie-fein); }
.ak-belege .beleg:last-child { border-bottom: 0; }
.ak-belege .art { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.ak-belege .datum { color: var(--tinte-4); }
.ak-belege .betrag, .ak-belege .stand { text-align: right; white-space: nowrap; }
.ak-belege .blass, .ak-person .blass, .ak-anschrift .blass { color: var(--tinte-5); font-weight: 400; }
.ak-person { display: grid; gap: 1px; padding: 6px 0; border-bottom: 1px solid var(--linie-fein); }
.ak-person:last-child { border-bottom: 0; }
.ak-person .kopf { display: flex; align-items: center; gap: 8px; }
.ak-person strong { font-weight: 600; }
.ak-tags { display: flex; flex-wrap: wrap; gap: 4px; grid-column: 2 / span 2; }
.ak-notiz { color: var(--tinte-3); white-space: pre-wrap; overflow-wrap: anywhere; }
.ak-meldung { margin: 8px 0; padding: 8px 10px; border-radius: 3px; background: var(--alarm-grund); color: var(--alarm); }

/* ── Blatt und Maske ────────────────────────────────────────────────────────── */
.blatt { position: fixed; z-index: 50; top: 0; right: 0; bottom: 0; width: min(1060px, 100vw); display: flex; flex-direction: column; border-left: 1px solid var(--linie-stark);
  background: var(--flaeche); box-shadow: -18px 0 48px rgba(15, 23, 42, .18); animation: blatt-ein .14s ease-out; }
@keyframes blatt-ein { from { transform: translateX(22px); opacity: .5; } to { transform: none; opacity: 1; } }
.bl-kopf { flex: 0 0 46px; display: flex; align-items: center; gap: 12px; padding: 0 10px 0 18px; border-bottom: 1px solid var(--linie); }
.bl-kopf h2 { font-size: 15px; font-weight: 600; white-space: nowrap; }
.bl-wer { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--tinte-3); font-weight: 500; }
.bl-nr { color: var(--tinte-5); white-space: nowrap; }
.bl-rumpf { flex: 1 1 auto; min-height: 0; display: grid; grid-template-columns: 178px minmax(0, 1fr); }
.bl-nav { display: flex; flex-direction: column; gap: 1px; padding: 10px 6px; border-right: 1px solid var(--linie); background: var(--grund); overflow-y: auto; }
.bl-nav button { display: flex; justify-content: space-between; align-items: center; gap: 6px; height: 26px; padding: 0 10px; border: 0; border-radius: 3px; background: transparent; color: var(--tinte-3); text-align: left; cursor: pointer; }
.bl-nav button:hover { background: color-mix(in srgb, var(--tinte-1) 6%, transparent); color: var(--tinte-1); }
.bl-nav .zahl { color: var(--tinte-6); font-size: 12px; }
.bl-inhalt { min-width: 0; overflow-y: auto; padding: 2px 22px 32px; }
.bl-meldung { margin: 12px 0 2px; padding: 9px 12px; border-radius: 3px; white-space: pre-line; }
.bl-meldung.fehler { background: var(--alarm-grund); color: var(--alarm); }
.bl-meldung strong { display: block; }
.bl-fuss { flex: 0 0 48px; display: flex; align-items: center; gap: 8px; padding: 0 18px; border-top: 1px solid var(--linie); background: var(--grund); }
.bl-fuss .stand { color: var(--warn); font-size: 12px; }
.bl-leer { margin: 96px auto 0; display: grid; justify-items: center; gap: 12px; padding: 0 24px; color: var(--tinte-4); text-align: center; }

.fm-ab { padding: 15px 0 10px; border-bottom: 1px solid var(--linie); scroll-margin-top: 2px; }
.fm-ab:last-of-type { border-bottom: 0; }
.fm-ab h3 { margin-bottom: 11px; font-size: 14px; font-weight: 600; }
.fm-raster { columns: 2; column-gap: 38px; }
.fm-z { display: grid; grid-template-columns: 136px minmax(0, 1fr); align-items: center; gap: 10px; min-height: 28px; margin-bottom: 6px; break-inside: avoid; }
.fm-z > label { color: var(--tinte-4); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fm-z > label[title] { cursor: help; }
.fm-z .pflicht { color: var(--ampel-rot); }
.fm-z.hoch { align-items: start; }
.fm-z.hoch > label { padding-top: 6px; }
.fm-f { display: flex; align-items: center; gap: 6px; min-width: 0; }
.fm-haken { display: grid; gap: 2px; margin: 4px 0 8px 146px; break-inside: avoid; }
.fm-hinweis { margin: -2px 0 8px 146px; color: var(--warn); font-size: 12px; break-inside: avoid; }
.fm-kopfzeile { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.fm-kopfzeile h3 { margin: 0; }
.fm-eintrag { margin-bottom: 10px; padding: 12px 12px 4px; border: 1px solid var(--linie); border-radius: 4px; background: var(--grund); }
.fm-eintragfuss { display: flex; align-items: center; gap: 8px; min-height: 36px; margin-top: 4px; border-top: 1px solid var(--linie); }
.fm-nichts { margin-bottom: 6px; color: var(--tinte-5); }
.fm-raster.nur-lesen span { color: var(--tinte-2); }

/* ── Schmale Fenster ────────────────────────────────────────────────────────── */
@media (max-width: 1240px) {
  /* Die Akte liegt als Blatt über der Liste, statt ihr Breite zu nehmen. */
  .kd, .kd.ohne-akte { grid-template-columns: var(--leiste) var(--register) minmax(0, 1fr); }
  .kd.ohne-leiste, .kd.ohne-leiste.ohne-akte { grid-template-columns: var(--register) minmax(0, 1fr); }
  .kd-akte { position: fixed; z-index: 20; top: 40px; right: 0; bottom: 0; width: min(448px, 100vw); border-left: 1px solid var(--linie-stark); box-shadow: -14px 0 36px rgba(15, 23, 42, .16); }
  /* Ohne gewählten Kunden deckt das Blatt nichts zu. */
  .kd-akte.leer { display: none; }
}
@media (max-width: 860px) {
  .kd, .kd.ohne-akte, .kd.ohne-leiste, .kd.ohne-leiste.ohne-akte { grid-template-columns: var(--register) minmax(0, 1fr); }
  /* Die Filterleiste ist hier ein Blatt, das der Filterknopf aufzieht (KundenSeite: LeisteAlsBlatt). */
  .kd-leiste { display: none; }
  .kd.leiste-blatt .kd-leiste { display: block; position: fixed; z-index: 31; top: 40px; left: 0; bottom: 0; width: min(264px, 86vw); box-shadow: 14px 0 36px rgba(15, 23, 42, .16); }
  .oo-band { gap: 12px; }
  .oo-firma { max-width: 44vw; }
  .bl-rumpf { grid-template-columns: minmax(0, 1fr); }
  .bl-nav { display: none; }
  .fm-raster { columns: 1; }
  .bl-inhalt { padding: 2px 14px 28px; }
  .kd-kopf .kn-haupt span { display: none; }
}
@media (max-width: 560px) {
  .oo-band-marke { display: none; }
  .oo-firma { max-width: 42vw; }
  .oo-modul { padding: 2px 8px 0; }
  .kd-fuss .summe { display: none; }
  .kd-chips, .kd-spaltenwahl { display: none; }
  /* Sonst läuft die Kopfleiste über und „Neuer Kunde“ ist abgeschnitten. */
  .kd-aufheben { flex: 0 0 28px; width: 28px; padding: 0; justify-content: center; }
  .kd-aufheben span { display: none; }
  .kd-aufheben .sym { display: block; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
