/* Kundenportal ladepark.at: Gestaltung nach Draft 3, Abschnitt 9 und Thema 11.
   Alle Farben als Variablen an einer Stelle; kein Dunkelmodus in Stufe 1 (11 3.5).
   Schriften lokal: Roboto 400 und Rajdhani 600 als woff (woff2 und Roboto 500 fehlen noch,
   das Gewicht 500 ist mit einer feinen Kontur angedeutet wie im Entwurf). */

@font-face { font-family: "Roboto"; src: url("schrift/roboto-400.woff") format("woff");
             font-weight: 400 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Rajdhani"; src: url("schrift/rajdhani-600.woff") format("woff");
             font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --navy: #111827; --text: #1f2937; --text-2: #4b5563; --text-3: #6b7280;
  --linie: #e5e7eb; --linie-stark: #d1d5db; --grund: #f3f4f6; --flaeche: #ffffff;
  --flaeche-2: #f9fafb;
  --akzent: #0f766e; --akzent-hover: #115e59; --akzent-hell: #0d9488; --akzent-kopf: #2dd4bf;
  --akzent-zart: #f0fdfa;
  --betreiber: #5b21b6; --betreiber-zart: #f5f3ff; --betreiber-rand: #ddd6fe; --betreiber-hell: #a78bfa;
  --gruen-t: #047857; --gruen-g: #ecfdf5; --gruen-r: #a7f3d0;
  --gelb-t: #92400e; --gelb-g: #fffbeb; --gelb-r: #fde68a;
  --rot-t: #b91c1c; --rot-g: #fef2f2; --rot-r: #fecaca;
  --blau-t: #1d4ed8; --blau-g: #eff6ff; --blau-r: #bfdbfe;
  --grau-t: #4b5563; --grau-g: #f3f4f6; --grau-r: #e5e7eb;
  --schrift: "Roboto", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --titel: "Rajdhani", "Roboto", system-ui, sans-serif;
  --gross: 24px; --mittel: 15px; --klein: 13px;
  --halbfett: 0.012em;  /* Kontur statt Roboto 500, bis die Datei vorliegt */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font-family: var(--schrift);
       font-size: var(--mittel); line-height: 1.5; }
img { display: inline-block; vertical-align: middle; }
a { color: var(--akzent); }
h1, h2 { margin: 0; }
:focus-visible { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprung { position: absolute; left: 16px; top: -48px; background: var(--flaeche); padding: 8px 16px; z-index: 50; }
.sprung:focus { top: 8px; }
.menue a.aktiv, .kachel-titel, .firma-name, .knopf, .marke, .schalter-titel, th,
.wechsler-name, .chip, .reiter a { -webkit-text-stroke: var(--halbfett) currentColor; font-weight: 500; }

/* Kopf (11 6.1), mit Band oben fixiert */
.oben { position: sticky; top: 0; z-index: 20; }
.kopf { display: flex; align-items: center; height: 56px; padding: 0 32px; background: var(--navy); color: #fff; gap: 0; }
.logo { display: flex; align-items: center; min-height: 44px; }
.logo-voll { height: 24px; width: auto; }
.logo-zeichen { display: none; }
.trenner { width: 1px; height: 24px; background: rgba(255,255,255,.2); margin: 0 16px; }
.firma-knopf { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 8px;
               color: #fff; cursor: pointer; list-style: none; max-width: 340px; }
.firma-knopf::-webkit-details-marker { display: none; }
.firma-knopf:hover { background: rgba(255,255,255,.08); }
.firma-knopf.einzeln { cursor: default; }
.firma-knopf.einzeln:hover { background: none; }
.firma-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pfeil { filter: invert(1); opacity: .8; }
.zeichen { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 24px; height: 24px;
           border-radius: 6px; color: #fff; font-family: var(--titel); font-weight: 600; font-size: 12px; letter-spacing: .02em; }
.zeichen-0 { background: #334155; } .zeichen-1 { background: #0f766e; } .zeichen-2 { background: #1e40af; }
.zeichen-3 { background: #6d28d9; } .zeichen-4 { background: #9a3412; } .zeichen-5 { background: #3f6212; }
.menue { display: flex; align-self: stretch; margin-left: 32px; gap: 4px; }
.menue a { display: flex; align-items: center; padding: 0 12px; color: #cbd5e1; text-decoration: none;
           border-bottom: 3px solid transparent; border-top: 3px solid transparent; }
.menue a:hover { color: #fff; }
.menue a.aktiv { color: #fff; border-bottom-color: var(--akzent-kopf); }
.personenmenue { margin-left: auto; position: relative; }
.personenmenue summary { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; list-style: none; color: #fff; }
.personenmenue summary::-webkit-details-marker { display: none; }
.initialen { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px;
             border-radius: 50%; background: #374151; color: #fff; font-size: 12px; }
.personen-blatt { position: absolute; right: 0; top: 48px; min-width: 200px; background: var(--flaeche);
                  border: 1px solid var(--linie); border-radius: 12px; box-shadow: 0 8px 24px rgba(17,24,39,.12); padding: 8px 0; }
.personen-blatt a, .personen-blatt button { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 44px;
  padding: 0 16px; color: var(--text); text-decoration: none; font: inherit; background: none; border: 0; cursor: pointer; }
.personen-blatt a:hover, .personen-blatt button:hover { background: var(--flaeche-2); }
.personen-blatt form { margin: 0; }

/* Betreiberband (11 6.5): nur der Betreiber */
.band { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 28px;
        padding: 4px 32px 4px 28px; background: var(--betreiber); color: #fff; font-size: var(--klein);
        border-left: 4px solid var(--betreiber-hell); }
.band-wege { display: flex; gap: 8px; }
.band-wege a { color: #fff; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 0 8px; text-decoration: none; }
.kennzeichen { display: inline-flex; align-items: center; height: 24px; padding: 0 12px; border-radius: 999px; font-size: var(--klein); }
.kennzeichen-betreiber { background: var(--betreiber); color: #fff; }

/* Firmenwechsler (11 6.4) */
.wechsler { position: relative; }
.wechsler-blatt { position: absolute; left: 0; top: 52px; width: 360px; max-height: 70vh; overflow: auto; z-index: 30;
                  background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 12px;
                  box-shadow: 0 8px 24px rgba(17,24,39,.12); padding: 8px 0; }
.blatt-kopf { display: none; }
.wechsler-suche { padding: 8px 16px; }
.wechsler-suchfeld, .feld input, textarea { width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--linie-stark);
  border-radius: 8px; font: inherit; color: var(--text); background: var(--flaeche); }
.wechsler-suchfeld:focus, .feld input:focus, textarea:focus { outline: none; border-color: var(--akzent-hell);
  box-shadow: 0 0 0 3px rgba(13,148,136,.25); }
.wechsler-leer { margin: 8px 0 0; color: var(--text-2); font-size: var(--klein); }
.wechsler-bereich, .wechsler-neu { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  min-height: 44px; padding: 0 16px; text-decoration: none; }
.wechsler-neu { justify-content: flex-start; border-top: 1px solid var(--linie); color: var(--akzent); }
.wechsler .marke { padding: 8px 16px 0; }
.wechsler-liste { list-style: none; margin: 0; padding: 0; }
.wechsler-eintrag a, .wechsler-ohne-ziel { display: flex; align-items: center; gap: 12px; min-height: 44px;
  padding: 6px 16px; color: var(--text); text-decoration: none; }
.wechsler-eintrag a:hover { background: var(--flaeche-2); }
.wechsler-eintrag.aktiv a, .wechsler-eintrag.aktiv .wechsler-ohne-ziel { background: var(--akzent-zart); }
.wechsler-eintrag.grau { opacity: .6; }
.wechsler-text { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.haken { margin-left: auto; }

/* Seite und Inhalt (11 5) */
.seite { display: flex; gap: 24px; max-width: 1184px; margin: 0 auto; padding: 32px; align-items: flex-start; }
.inhalt { flex: 1; min-width: 0; max-width: 1120px; margin: 0 auto; }
.mit-chat .inhalt { margin: 0; }
.chat { flex: none; width: 300px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 24px; font-size: var(--klein); }
.chat h2 { font-family: var(--titel); font-weight: 600; font-size: 20px; color: var(--navy); margin-bottom: 8px; }
.chat textarea { height: auto; padding: 8px 12px; margin: 4px 0 12px; resize: none; }
.titelzeile { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
h1 { font-family: var(--titel); font-weight: 600; font-size: var(--gross); line-height: 1.2; color: var(--navy); }
.titelknoepfe { display: flex; gap: 8px; }
.pfadzeile ol { display: flex; flex-wrap: wrap; list-style: none; margin: 0 0 4px; padding: 0; font-size: var(--klein); color: var(--text-2); }
.pfadzeile li + li::before { content: "›"; margin: 0 8px; color: var(--text-3); }
.pfadzeile a { color: var(--text-2); text-decoration: none; }
.pfadzeile a:hover { text-decoration: underline; }
.reiter ul { display: flex; gap: 24px; list-style: none; margin: -8px 0 24px; padding: 0; border-bottom: 1px solid var(--linie);
             overflow-x: auto; }
.reiter a { display: block; padding: 8px 0; color: var(--text-2); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.reiter a.aktiv { color: var(--navy); border-bottom-color: var(--akzent); }
.marke { margin: 0 0 12px; font-size: var(--klein); text-transform: uppercase; letter-spacing: .12em; color: var(--text-2); }
.zweitzeile { display: block; font-size: var(--klein); color: var(--text-2); }

/* Karten, Kacheln, Kennzahlen (11 7.1, 7.2) */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 24px; margin-bottom: 16px; }
.karte-betreiber { background: var(--betreiber-zart); border-color: var(--betreiber-rand); }
.leer-zustand { text-align: center; color: var(--text-2); padding: 48px 24px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-bottom: 24px; }
.kachel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-height: 148px; padding: 20px;
          background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; color: var(--text); text-decoration: none;
          transition: border-color .12s, transform .12s; }
.kachel:hover, .kachel:focus-visible { border-color: var(--akzent-hell); transform: translateY(-1px); }
.kachel-zeichen { width: 40px; height: 40px; border-radius: 10px; margin-bottom: 8px; }
.kachel-initialen { display: inline-flex; align-items: center; justify-content: center; background: var(--navy); color: #fff;
                    font-family: var(--titel); font-weight: 600; }
.kachel-titel { color: var(--navy); }
.kachel-text { font-size: var(--klein); color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.kachel .chip { margin-top: auto; }
.kachel.abgelaufen { background: var(--flaeche-2); }
.kachel.abgelaufen .kachel-zeichen { filter: grayscale(1); opacity: .6; }
.kachel.abgelaufen .kachel-titel { color: var(--text-2); }
.kennzahlen { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; }
.kennzahl { display: flex; flex-direction: column; padding: 16px 24px; text-decoration: none; color: var(--text); }
.kennzahl + .kennzahl { border-left: 1px solid var(--linie); }
.kennzahl-zahl { font-family: var(--titel); font-weight: 600; font-size: var(--gross); color: var(--navy); }
.kennzahl-wort { font-size: var(--klein); color: var(--text-2); }

/* Tabellen (11 7.3) */
.tabelle-karte { padding: 0; overflow: hidden; }
.tabelle { width: 100%; border-collapse: collapse; }
.tabelle th { text-align: left; font-size: var(--klein); text-transform: uppercase; letter-spacing: .06em; color: var(--text-2);
              background: var(--flaeche-2); padding: 12px 16px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 12px 16px; height: 52px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle tr:last-child td { border-bottom: 0; }
.tabelle tbody tr:hover { background: var(--flaeche-2); }
.tabelle .zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle .haupt { display: block; }
.tabelle tr.leer td { text-align: center; color: var(--text-2); }

/* Zustandschips (11 8): Wort plus Punktform */
.chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: 999px;
        font-size: var(--klein); border: 1px solid; white-space: nowrap; }
.chip-gruen { color: var(--gruen-t); background: var(--gruen-g); border-color: var(--gruen-r); }
.chip-gelb { color: var(--gelb-t); background: var(--gelb-g); border-color: var(--gelb-r); }
.chip-rot { color: var(--rot-t); background: var(--rot-g); border-color: var(--rot-r); }
.chip-blau { color: var(--blau-t); background: var(--blau-g); border-color: var(--blau-r); }
.chip-grau { color: var(--grau-t); background: var(--grau-g); border-color: var(--grau-r); }
.chip-violett { color: #fff; background: var(--betreiber); border-color: var(--betreiber); }
.punkt { display: inline-block; width: 8px; height: 8px; flex: none; }
.punkt-voll { border-radius: 50%; background: currentColor; }
.punkt-ring { border-radius: 50%; border: 1.5px solid currentColor; }
.punkt-halb { border-radius: 50%; border: 1.5px solid currentColor; background: linear-gradient(90deg, currentColor 50%, transparent 50%); }
.punkt-strich { height: 2px; width: 9px; background: currentColor; }
.punkt-quadrat { background: currentColor; }

/* Meldungen (11 7.7) */
.meldung { display: flex; align-items: flex-start; gap: 12px; padding: 12px 16px; margin-bottom: 16px; border-radius: 12px; border: 1px solid; }
.meldung p { margin: 0; }
.meldung-gruen { background: var(--gruen-g); border-color: var(--gruen-r); }
.meldung-gelb { background: var(--gelb-g); border-color: var(--gelb-r); }
.meldung-rot { background: var(--rot-g); border-color: var(--rot-r); }
.meldung-blau { background: var(--blau-g); border-color: var(--blau-r); }
.meldung-grau { background: var(--grau-g); border-color: var(--grau-r); }

/* Knöpfe (11 7.5) */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px;
         border-radius: 8px; border: 1px solid; font: inherit; text-decoration: none; cursor: pointer; white-space: nowrap; }
.knopf-haupt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopf-haupt:hover { background: var(--akzent-hover); }
.knopf-zweit { background: var(--flaeche); border-color: var(--linie-stark); color: var(--text); }
.knopf-gefahr { background: var(--flaeche); border-color: var(--rot-r); color: var(--rot-t); }
.knopf-betreiber { background: var(--flaeche); border-color: var(--betreiber-rand); color: var(--betreiber); }
.knopf[disabled] { opacity: .55; cursor: not-allowed; }
.knopf-grund { display: block; margin-top: 4px; font-size: var(--klein); color: var(--text-2); }
.knopf-text { background: none; border: 0; padding: 0; color: var(--akzent); font: inherit; cursor: pointer; }

/* Formulare (11 7.6) */
.feld { margin-bottom: 16px; max-width: 560px; }
.bezeichnung { display: block; margin-bottom: 4px; font-size: var(--klein); color: var(--text); }
.hilfe { margin: 4px 0 0; font-size: var(--klein); color: var(--text-2); }
.feldfehler { margin: 4px 0 0; font-size: var(--klein); color: var(--rot-t); }
.mit-fehler input { border-color: var(--rot-t); }

/* Schalter Ja/Nein (11 7.4): Wort immer sichtbar, Zustand nie nur über Farbe */
.schalter-zeile { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 44px;
                  padding: 8px 0; border-bottom: 1px solid var(--linie); cursor: pointer; }
.schalter-zeile.unter { margin-left: 28px; padding-left: 12px; border-left: 1px solid var(--linie); }
.schalter-zeile.ruht { opacity: .5; }
.schalter { position: relative; display: inline-flex; align-items: center; gap: 8px; flex: none; }
.schalter input { position: absolute; opacity: 0; width: 40px; height: 24px; margin: 0; cursor: pointer; }
.schiene { position: relative; width: 40px; height: 24px; border-radius: 12px; background: var(--linie-stark); transition: background .12s; }
.schiene::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
                  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .12s; }
.schalter input:checked + .schiene { background: var(--akzent); }
.schalter input:checked + .schiene::after { left: 18px; }
.schalter input:focus-visible + .schiene { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.wort-ja, .wort-nein { min-width: 36px; font-weight: 500; }
.wort-ja { display: none; color: var(--akzent); }
.wort-nein { color: var(--text-2); }
.schalter input:checked ~ .wort-ja { display: inline; }
.schalter input:checked ~ .wort-nein { display: none; }

/* Kundenseiten (Nachtrag B7, bereiche_kunde): Bild 02, 03a bis 03e, 04, 08a bis 08d, 09.
   Der Rahmen bindet nur diese eine Datei ein; deshalb stehen die Klassen der Kundenseiten hier. */
.klein { font-size: var(--klein); color: var(--text-2); }
.mittig { text-align: center; }
.unterzeile { margin: -16px 0 24px; font-size: var(--klein); color: var(--text-2); }
.fusszeile { margin: 8px 0 24px; font-size: var(--klein); color: var(--text-2); }
.breit { width: 100%; }
.hell { filter: invert(1); }
.schwach { color: var(--text-2); font-size: var(--klein); }
.knopf-gefahr-voll { background: var(--rot-t); border-color: var(--rot-t); color: #fff; }
.knopf-text.unterstrichen { text-decoration: underline; }
.knopfzeile, .dialog-knoepfe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.dialog-knoepfe { justify-content: flex-end; margin-top: 16px; }
.feldpaar { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; max-width: 560px; }
.abschnitt { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--linie); }
.abschnitt-titel { font-size: var(--mittel); color: var(--navy); margin-bottom: 4px; }
.haken-zeile { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.haupt { display: block; }

/* Kopf der Benutzerseiten: Platzlink und Einladen */
.seitenkopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 16px; margin: -8px 0 16px; }
.platzlink { font-size: var(--klein); color: var(--akzent); text-decoration: none; }
.platzlink.voll { color: var(--gelb-t); background: var(--gelb-g); border: 1px solid var(--gelb-r); border-radius: 999px; padding: 2px 10px; }
.knopf-mit-grund { display: inline-flex; flex-direction: column; align-items: flex-end; max-width: 320px; }
.aktionen { display: inline-flex; gap: 16px; align-items: center; }
.aktionen form { margin: 0; }

/* Hinweisblock auf Apps (10 3.7) */
.hinweisblock { background: var(--gelb-g); border: 1px solid var(--gelb-r); border-radius: 12px; margin-bottom: 24px; }
.hinweis-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 16px; }
.hinweis-zeile + .hinweis-zeile { border-top: 1px solid var(--gelb-r); }
.hinweis-zeile p { flex: 1; margin: 0; }
.hinweis-zeile form { margin: 0; }
.hinweis-weg { font-size: var(--klein); text-decoration: none; }

/* Zugang: zwei Karten zum Wählen, Rollen als Knopfreihe (Bild 03b, 03c) */
.zugangwahl { border: 0; padding: 0; margin: 0 0 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.zugangwahl legend { margin-bottom: 4px; }
.zugang-radio { position: absolute; opacity: 0; }
.zugang-karte { display: block; padding: 12px 16px 12px 40px; border: 1px solid var(--linie-stark); border-radius: 8px;
                background: var(--flaeche); color: var(--text); text-decoration: none; cursor: pointer; position: relative; }
.zugang-karte::before { content: ""; position: absolute; left: 14px; top: 16px; width: 16px; height: 16px; border-radius: 50%;
                        border: 1.5px solid var(--linie-stark); background: var(--flaeche); }
.zugang-radio:checked + .zugang-karte, .zugang-karte.gewaehlt { border-color: var(--akzent); background: var(--akzent-zart); }
.zugang-radio:checked + .zugang-karte::before, .zugang-karte.gewaehlt::before { border: 5px solid var(--akzent); }
.zugang-radio:focus-visible + .zugang-karte { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.zugang-titel { display: block; color: var(--navy); }
.nach-rolle, .als-admin { grid-column: 1 / -1; }
.als-admin { display: none; }
#zugang-admin:checked ~ .nach-rolle { display: none; }
#zugang-admin:checked ~ .als-admin { display: block; }
.rollenzeile { display: grid; grid-template-columns: 120px 1fr; align-items: start; gap: 8px 16px; padding: 8px 0;
               border-bottom: 1px dashed var(--linie); margin: 0; }
.rollen-app { padding-top: 8px; color: var(--navy); }
.knopfreihe { display: flex; flex-wrap: wrap; }
.knopfreihe .wahl { position: absolute; opacity: 0; }
.knopfreihe label, .rollenknopf { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; margin: 0 -1px 4px 0;
  border: 1px solid var(--linie-stark); background: var(--flaeche); color: var(--text); font: inherit; font-size: var(--klein); cursor: pointer; }
.knopfreihe .wahl:checked + label, .rollenknopf.gewaehlt { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.knopfreihe .wahl:focus-visible + label { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.rolleninhalt { display: none; order: 99; flex-basis: 100%; margin: 4px 0 0; font-size: var(--klein); color: var(--text-2); }
.knopfreihe .wahl:checked + label + .rolleninhalt, .rolleninhalt.sichtbar { display: block; }
.rolleninhalt.sichtbar { grid-column: 2; }

/* Seitenblatt (L3: die Liste bleibt dahinter sichtbar) und Rückfrage (10 7.4) */
.blatt-grund, .dialog-grund { position: fixed; inset: 0; z-index: 40; background: rgba(17,24,39,.4); }
.blatt { position: absolute; top: 0; right: 0; bottom: 0; width: 520px; max-width: 100%; background: var(--flaeche);
         box-shadow: -8px 0 24px rgba(17,24,39,.16); }
.blatt-form { display: flex; flex-direction: column; height: 100%; margin: 0; }
.blatt-kopfzeile { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--linie); }
.blatt-kopfzeile h2, .dialog h2 { font-family: var(--titel); font-weight: 600; font-size: 20px; color: var(--navy); }
.blatt-zu { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
.blatt-inhalt { flex: 1; overflow: auto; padding: 16px 24px; }
.blatt-inhalt .zugangwahl { grid-template-columns: 1fr; }
.blatt-fuss { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 24px; border-top: 1px solid var(--linie); }
.dialog-grund { display: flex; align-items: center; justify-content: center; padding: 16px; }
.dialog { width: 480px; max-width: 100%; max-height: 100%; overflow: auto; background: var(--flaeche); border-radius: 12px;
          padding: 24px; box-shadow: 0 8px 24px rgba(17,24,39,.2); }
.dialog p { margin: 8px 0 0; }
.rollen-im-dialog { margin-top: 12px; }

/* Einzelseite, Rollen, Leistungen, Konto */
.meldung-mit-knopf p { flex: 1; }
.meldung-mit-knopf form { margin: 0; }
.personenzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -16px 0 24px; }
.sieht { display: grid; grid-template-columns: 200px 1fr; gap: 8px 16px; margin: 0; }
.sieht dt { font-size: var(--klein); color: var(--text-2); }
.sieht dd { margin: 0; }
.rolle-eintrag + .rolle-eintrag { border-top: 1px solid var(--linie); padding-top: 12px; margin-top: 12px; }
.rolle-name, .rolle-teile { margin: 0; }
.teil.grau { color: var(--text-3); }
.angaben, .aufstellung { margin: 0; }
.angaben > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 4px 0; }
.angaben dt { font-size: var(--klein); color: var(--text-2); }
.angaben dd, .aufstellung dd { margin: 0; }
.aufstellung > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--linie); }
.aufstellung > div:last-child { border-bottom: 0; }
.aufstellung .summe { font-weight: 500; }
.aufstellung dd { text-align: right; }
.betreiber-notiz dt, .betreiber-notiz dd { color: var(--betreiber); }
.kasten { background: var(--flaeche-2); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 16px; margin-bottom: 16px; }
.kasten > div { grid-template-columns: 120px 1fr; }
.appkarte-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.appkarte-titel { flex: 1; color: var(--navy); }
.klein-zeichen { width: 28px; height: 28px; margin: 0; font-size: 12px; border-radius: 8px; }
.einklappen summary { cursor: pointer; min-height: 32px; }
.einklappen[open] summary { margin-bottom: 12px; }
.schluss { font-size: var(--klein); color: var(--text-2); }
.anmeldekarte { max-width: 480px; margin: 0 auto; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 32px; }
.anmeldekarte .feld { max-width: none; }
.codefeld { letter-spacing: .5em; text-align: center; font-size: 24px; height: 56px !important; }


/* Betreiberseiten (Nachtrag B8, bereiche_betreiber): Bild 01c, 05a bis 05f, 06, 06a.
   Violett (11 3.3) nur in Klassen, die nur der Betreiber sieht. */
.bereich-knopf { display: flex; align-items: center; gap: 8px; min-height: 40px; padding: 4px 8px; border-radius: 8px;
                 cursor: pointer; list-style: none; }
.bereich-knopf::-webkit-details-marker { display: none; }
.betreiber-marke { color: var(--betreiber); }
.karte-betreiber .abschnitt-titel { margin-top: 0; }
.such-und-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 24px 0 16px; }
.suche { display: flex; gap: 8px; margin: 0 0 16px; }
.such-und-filter .suche { margin: 0; }
.suche input { height: 40px; min-width: 240px; padding: 0 12px; border: 1px solid var(--linie-stark); border-radius: 8px; font: inherit; }
.filterleiste { display: flex; flex-wrap: wrap; border: 1px solid var(--linie-stark); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.such-und-filter .filterleiste { margin-bottom: 0; }
.filterleiste a { padding: 8px 14px; color: var(--text); text-decoration: none; font-size: var(--klein); background: var(--flaeche); }
.filterleiste a + a { border-left: 1px solid var(--linie-stark); }
.filterleiste a.aktiv { background: var(--akzent); color: #fff; }
.firmenlink { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); text-decoration: none; }
.tabelle tr.grau td { color: var(--text-3); }
.zeilenmenue { position: relative; }
.zeilenmenue summary { list-style: none; cursor: pointer; min-height: 32px; display: inline-flex; align-items: center; }
.zeilenmenue summary::-webkit-details-marker { display: none; }
.zeilenmenue-blatt { position: absolute; right: 0; z-index: 10; min-width: 200px; background: var(--flaeche);
                     border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 8px 24px rgba(17,24,39,.12); padding: 4px 0; }
.zeilenmenue-blatt a { display: block; padding: 8px 16px; color: var(--text); text-decoration: none; }
.zeilenmenue-blatt a:hover { background: var(--flaeche-2); }
.einrichtung { list-style: none; margin: 0; padding: 0; }
.einrichtung-punkt { display: flex; align-items: center; gap: 12px; min-height: 44px; }
.einrichtung-text { flex: 1; }
.kreis { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--text-3); }
.kreis.haken { border-color: var(--gruen-t); background: var(--gruen-g); }
.kreis.haken::after { content: ""; display: block; width: 5px; height: 9px; margin: 2px auto 0;
                      border: solid var(--gruen-t); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.appwahl { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.appwahl:hover { border-color: var(--akzent-hell); }
.appwahl-text { flex: 1; }
.appwahl-titel { color: var(--akzent); }
.klein-zeichen.grau { filter: grayscale(1); opacity: .6; }
.lizenzkopf { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: -16px 0 16px; }
.lizenzraster { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.block-kopf { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.kennzeichen-zeile { margin: 0 0 8px; }
.schalter-rahmen.geaendert { background: var(--gelb-g); box-shadow: inset 3px 0 0 #f59e0b; }
.zweierwahl { border: 0; padding: 0; margin: 0 0 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zweierwahl .wahl { position: absolute; opacity: 0; }
.zweierwahl label:not(.nur-vorlesen) { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  border: 1px solid var(--linie-stark); background: var(--flaeche); cursor: pointer; }
.zweierwahl .wahl:checked + label { background: var(--akzent); border-color: var(--akzent); color: #fff; }
.zweierwahl .wahl:focus-visible + label { outline: 2px solid var(--akzent-hell); outline-offset: 2px; }
.zweierwahl input[type=date], .feld input[type=date] { height: 40px; padding: 0 8px; border: 1px solid var(--linie-stark); border-radius: 8px; font: inherit; }
.feld select, .feld textarea { width: 100%; height: 40px; padding: 0 8px; border: 1px solid var(--linie-stark); border-radius: 8px; font: inherit; background: var(--flaeche); }
.position { border-bottom: 1px solid var(--linie); padding: 8px 0 12px; margin: 0 0 8px; }
fieldset.position { border: 0; border-bottom: 1px solid var(--linie); padding: 8px 0 12px; }
.position-kopf { display: flex; justify-content: space-between; gap: 12px; margin: 0; }
.kundenvorschau { border: 1px dashed var(--linie-stark); border-radius: 8px; padding: 8px 12px; font-size: var(--klein); }
.speicherformular { padding-bottom: 88px; }
.speicherleiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; display: flex; flex-wrap: wrap;
                  align-items: center; justify-content: space-between; gap: 12px; padding: 12px 32px;
                  background: var(--flaeche); border-top: 1px solid var(--linie); box-shadow: 0 -4px 16px rgba(17,24,39,.08); }
.speicherleiste p { margin: 0; }
.aenderungen { list-style: none; margin: 12px 0; padding: 0; }
.aenderung { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--linie); }
.wirkung { font-weight: 500; }
.erklaerung { list-style: none; margin: 0; padding: 0; }
.erklaerung-zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 8px 0; border-bottom: 1px solid var(--linie); }
.erklaerung-zeile.unter { margin-left: 28px; padding-left: 12px; border-left: 1px solid var(--linie); }
.erklaerung-titel { flex: 1; min-width: 200px; }
.haken-liste { border: 0; padding: 0; margin: 16px 0 0; }
.haken-zeile.unter { margin-left: 28px; padding-left: 12px; border-left: 1px solid var(--linie); }
.haken-zeile input { width: 18px; height: 18px; accent-color: var(--akzent); }
.zeilenform { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 8px 0 0; }
.platzhalter-zeile { cursor: default; color: var(--text-3); }
.einladung-karte form { margin: 0; }
.zusammenfassung-grund { min-height: 320px; }

/* Menüleiste unten (nur Handy) */
.menue-unten { display: none; }

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

/* Tablet */
@media (max-width: 1079px) {
  .kacheln { grid-template-columns: repeat(2, 1fr); }
  .seite { padding: 24px; }
  .chat { width: 260px; }
}

/* Handy bis 767 px (11 9) */
@media (max-width: 767px) {
  :root { --gross: 22px; --mittel: 16px; }
  .kopf { height: 52px; padding: 0 16px; }
  .logo-voll { display: none; }
  .logo-zeichen { display: inline-block; }
  .trenner { margin: 0 12px; }
  .menue, .vorname, .personenmenue .pfeil { display: none; }
  .firma-knopf { max-width: 60vw; }
  .band { padding: 4px 16px 4px 12px; gap: 8px; }   /* einzeilig (11 6.5) */
  .band-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .band-wege { flex: none; }
  .seite { display: block; padding: 16px; }
  .chat { width: auto; margin-top: 16px; }
  .karte { padding: 16px; }
  .kacheln { grid-template-columns: 1fr; }
  .kachel { min-height: 120px; padding: 16px; }
  .kachel-text { -webkit-line-clamp: 1; }
  .kennzahlen { grid-template-columns: 1fr 1fr; }
  .kennzahl:nth-child(3) { border-left: 0; }
  .titelzeile { flex-wrap: wrap; }
  .titelknoepfe, .titelknoepfe .knopf { width: 100%; }
  .knopf { height: 44px; }
  .feld input, .wechsler-suchfeld { height: 44px; font-size: 16px; }
  .wechsler-blatt { position: fixed; inset: 0; width: auto; max-height: none; border-radius: 0; z-index: 40; padding-top: 0; }
  .blatt-kopf { display: flex; align-items: center; justify-content: space-between; height: 64px; padding: 0 16px;
                border-bottom: 1px solid var(--linie); }
  .blatt-titel { font-family: var(--titel); font-weight: 600; font-size: 20px; color: var(--navy); }
  .wechsler-zu { min-width: 44px; min-height: 44px; }
  /* Tabellen werden Karten */
  .tabelle-karte { background: none; border: 0; }
  .tabelle thead { display: none; }
  .tabelle, .tabelle tbody, .tabelle tr, .tabelle td { display: block; width: 100%; }
  .tabelle tr { background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; margin-bottom: 12px; padding: 12px 16px; }
  .tabelle td { height: auto; padding: 4px 0; border: 0; text-align: left; }
  .tabelle td.zahl { text-align: left; }
  .tabelle td::before { content: attr(data-label); display: block; font-size: var(--klein); color: var(--text-2); }
  .tabelle td:first-child::before { display: none; }
  .mit-menue-unten { padding-bottom: 64px; }
  .feldpaar, .zugangwahl, .sieht, .angaben > div, .rollenzeile { grid-template-columns: 1fr; }
  .rolleninhalt.sichtbar { grid-column: 1; }
  .blatt { width: 100%; }
  .dialog-grund { align-items: flex-end; padding: 0; }
  .dialog { border-radius: 12px 12px 0 0; }
  .seitenkopf { justify-content: space-between; margin-top: 0; }
  .anmeldekarte { padding: 20px 16px; }
  .menue-unten { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: 64px; z-index: 20;
                 background: var(--flaeche); border-top: 1px solid var(--linie); }
  .menue-unten a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
                   color: var(--text-2); font-size: var(--klein); text-decoration: none; border-top: 2px solid transparent; }
  .menue-unten a.aktiv { color: var(--akzent); border-top-color: var(--akzent); }
  /* Betreiberseiten (Nachtrag B8): eine Spalte, Speicherleiste über der Menüleiste (4.2) */
  .lizenzraster { grid-template-columns: 1fr; }
  .speicherleiste { padding: 8px 16px; }
  .mit-menue-unten .speicherleiste { bottom: 64px; }
  .suche input { min-width: 0; flex: 1; }
}
