/* Büro-Web-App – Gestaltung (gehört zu buero.html) */
  :root {
    --rot: #D62827; --rose: #E6CFD0; --hell: #FBF5F5; --text: #1E1A1A; --grau: #6B5E5F;
    --linie: #ead9da; --weiss: #fff; --gruen: #2E7D32;
  }
  * { box-sizing: border-box; }
  body { margin: 0; font-family: "Segoe UI", Arial, sans-serif; background: var(--hell); color: var(--text); }
  button, .knopf {
    font: inherit; border: 0; border-radius: 20px; padding: 8px 16px; cursor: pointer;
    background: var(--rot); color: #fff; font-weight: 600;
  }
  button.leise { background: #fff; color: var(--text); border: 1px solid var(--linie); }
  button.klein { padding: 4px 10px; font-size: 13px; }
  button:disabled { opacity: .5; cursor: default; }
  input { font: inherit; padding: 8px 10px; border: 1px solid #d9c7c8; border-radius: 8px; background: #fff; }
  .reiter { display: flex; gap: 6px; margin-bottom: 16px; }
  .reiter button { background: #fff; color: var(--grau); border: 1px solid var(--linie); }
  .reiter button.an { background: var(--rot); color: #fff; border-color: var(--rot); }
  .unterreiter { display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 2px solid var(--linie); }
  .unterreiter button { background: none; color: var(--grau); border-radius: 0; padding: 8px 16px; margin-bottom: -2px;
                        border-bottom: 3px solid transparent; }
  .unterreiter button.an { color: var(--rot); border-bottom-color: var(--rot); }
  .zahl { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; line-height: 18px;
          background: var(--linie); color: var(--text); text-align: center; margin-left: 4px; }
  .an .zahl, .zahl.wichtig { background: var(--rot); color: #fff; }
  .reiter button.an .zahl.wichtig { background: #fff; color: var(--rot); }
  .karte { background: #fff; border-radius: 14px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
  .zeile { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  .grau { color: var(--grau); font-size: 13px; }
  .tag { font-weight: 700; margin: 18px 0 8px; font-size: 15px; }
  table { width: 100%; border-collapse: collapse; font-size: 14px; }
  th { text-align: left; color: var(--grau); font-weight: 600; font-size: 12px; text-transform: uppercase;
       letter-spacing: .4px; padding: 6px 8px; border-bottom: 1px solid var(--linie); }
  td { padding: 8px; border-bottom: 1px solid #f3e9e9; vertical-align: top; }
  .art { display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; }
  .art.SIMULATOR { background: #e3ecf7; color: #2a4f7a; }
  .art.BERATUNG { background: var(--rose); color: #7a2a2a; }
  .art.BUERO { background: #eee6d8; color: #6b4e1d; }
  .art.FAHRSTUNDE { background: #D62827; color: #fff; }
  .art.FAHRSTUNDE.PRUEFUNG { background: #8E1517; }
  .code { font-family: Consolas, monospace; font-weight: 700; letter-spacing: .5px; }
  td.code { white-space: nowrap; }
  .status-ok { color: var(--gruen); font-weight: 600; }
  .status-gesperrt { color: var(--rot); font-weight: 600; }
  .status-benutzt { color: #2a4f7a; font-weight: 600; }
  tr.alt td { color: #a89a9b; }
  tr.abgesagt td { color: #a89a9b; }
  tr.abgesagt td b, tr.abgesagt .art { text-decoration: line-through; }
  .marke { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 0 6px; margin-left: 4px; }
  .marke.buero { background: #eee6d8; color: #6b4e1d; }
  .marke.ab { background: #fde2e1; color: #8a1c1b; }
  .marke.ok { background: #e3f1e4; color: #1f5f23; } .marke.rot { background: #fde2e1; color: #8a1c1b; }
  .marke.offen { background: #f1ecec; color: var(--grau); }
  .ampel { display: inline-flex; gap: 6px; align-items: center; }
  .ampel i { width: 14px; height: 14px; border-radius: 50%; background: #e7e0e0; display: inline-block; }
  .ampel i.rot.an { background: #D62827; } .ampel i.gelb.an { background: #E8A317; } .ampel i.gruen.an { background: #2E7D32; }
  .ampelwahl { display: flex; gap: 6px; margin: 8px 0; }
  .ampelwahl button { font-size: 12px; padding: 4px 10px; background: #fff; color: var(--text); border: 1px solid var(--linie); }
  .ampelwahl button.an.rot { background: #D62827; color: #fff; border-color: #D62827; }
  .ampelwahl button.an.gelb { background: #E8A317; color: #fff; border-color: #E8A317; }
  .ampelwahl button.an.gruen { background: #2E7D32; color: #fff; border-color: #2E7D32; }
  .hilfebox { background: #fff4e5; border: 1px solid #f3d3a6; border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; }
  .hilfebox b { color: #8a4b00; } .hilfebox ul { margin: 6px 0 0; padding-left: 18px; }
  .hilfepunkt { width: 8px; height: 8px; border-radius: 50%; background: #E8A317; flex: none; }
  .sch small.hilfe { color: #8a4b00; display: block; }
  select { font: inherit; padding: 8px 10px; border: 1px solid #d9c7c8; border-radius: 8px; background: #fff; }
  /* ---------- Schüler: Liste links, Akte rechts */
  .layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
  .sliste { padding: 12px; position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow: auto; }
  .sliste input { width: 100%; margin-bottom: 8px; }
  .sfilter { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
  .sfilter button { font-size: 12px; padding: 3px 10px; background: #fff; color: var(--grau); border: 1px solid var(--linie); }
  .sfilter button.an { background: var(--rose); color: #7a2a2a; border-color: var(--rose); }
  .sch { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; }
  .sch:hover { background: var(--hell); }
  .sch.an { background: var(--hell); box-shadow: inset 3px 0 0 var(--rot); }
  .av { width: 34px; height: 34px; border-radius: 50%; background: var(--rose); color: #7a2a2a; font-weight: 800;
        display: flex; align-items: center; justify-content: center; font-size: 13px; flex: none; }
  .sch b { display: block; font-size: 14px; }
  .sch small { color: var(--grau); font-size: 12px; }
  .punkt { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); margin-left: auto; flex: none; }
  .akopf { display: flex; gap: 18px; align-items: center; }
  .akopf .av { width: 56px; height: 56px; font-size: 20px; }
  .akopf h2 { margin: 0; font-size: 22px; }
  .offen { margin-left: auto; text-align: right; }
  .offen b { font-size: 24px; color: var(--rot); display: block; }
  .aunter { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 2px solid var(--linie); margin: 16px 0 14px; }
  .aunter > button { background: none; color: var(--grau); border-radius: 0; padding: 8px 16px; margin-bottom: -2px;
                     border-bottom: 3px solid transparent; }
  .aunter > button.an { color: var(--rot); border-bottom-color: var(--rot); }
  .raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
  .kasten { border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; }
  .kasten h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--grau); }
  .z { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; padding: 3px 0; }
  .z > span:first-child { color: var(--grau); }
  .summen { display: flex; gap: 12px; margin-bottom: 14px; }
  .summe { flex: 1; background: var(--hell); border-radius: 12px; padding: 10px 14px; }
  .summe b { font-size: 22px; display: block; }
  .summe span { font-size: 12px; color: var(--grau); }
  .balken { height: 8px; background: #f1e4e5; border-radius: 4px; overflow: hidden; margin: 4px 0 10px; }
  .balken div { height: 100%; background: var(--rot); }
  .aktionen { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }
  .neu-marke { font-size: 11px; font-weight: 700; color: #fff; background: var(--rot); border-radius: 8px; padding: 0 6px; }
  a.name { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--grau); }
  a.name:hover { color: var(--rot); }
  .blatt table.fb { font-size: 9pt; margin-top: 4mm; }
  .blatt table.fb th { font-size: 7.5pt; padding: 1.5mm 2mm; }
  .blatt table.fb td { padding: 1.5mm 2mm; }
  .blatt .fbsummen { display: flex; gap: 6mm; margin: 3mm 0 2mm; }
  .blatt .fbsummen div { background: #FBF5F5; border-radius: 2mm; padding: 2mm 4mm; }
  .blatt .fbsummen b { display: block; font-size: 13pt; }
  .formular { display: grid; grid-template-columns: 110px 1fr; gap: 10px 12px; align-items: center; margin: 12px 0; }
  .formular label { color: var(--grau); font-size: 13px; }
  .formular input, .formular select { width: 100%; }
  .meldung { padding: 10px 14px; border-radius: 10px; background: #fff3cd; margin-bottom: 12px; }
  .meldung.fehler { background: #fde2e1; color: #8a1c1b; }
  #anmeldung { max-width: 360px; margin: 80px auto; text-align: center; }
  #anmeldung input { width: 100%; margin: 12px 0; }
  #anmeldung input[type=checkbox] { width: auto; margin: 0; }
  #einrichtungBereich input { margin: 6px 0; }
  .neu { display: flex; gap: 20px; align-items: center; }
  .neu .qr svg { width: 120px; height: 120px; }
  .neu .code { font-size: 24px; }
  .versteckt { display: none !important; }
  /* Nur für Admins sichtbar (body.admin setzt kontoLaden) */
  body:not(.admin) .nur-admin { display: none !important; }
  .klassenwahl { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
  .klassenwahl button { background: #fff; color: var(--text); border: 1px solid #d9c7c8; padding: 4px 12px; font-weight: 600; }
  .klassenwahl button.an { background: var(--rot); border-color: var(--rot); color: #fff; }
  .kl { display: inline-block; font-size: 12px; font-weight: 700; color: var(--rot); border: 1px solid var(--linie);
        border-radius: 10px; padding: 0 6px; margin: 1px 2px 1px 0; }
  .dialoghintergrund { position: fixed; inset: 0; background: rgba(30,26,26,.45); display: flex;
                       align-items: center; justify-content: center; z-index: 50; }
  .dialog { width: 420px; max-width: calc(100% - 32px); }
  .treffer { position: absolute; left: 0; right: 0; top: 42px; background: #fff; border: 1px solid var(--linie);
             border-radius: 10px; box-shadow: 0 6px 20px rgba(0,0,0,.08); z-index: 5; max-height: 320px; overflow: auto; }
  .treffer div { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f3e9e9; }
  .treffer div:hover { background: var(--hell); }
  /* ---------- Gerüst: Seitenleiste links, Kopfleiste und Inhalt rechts */
  .app { display: flex; min-height: 100vh; }
  .seitenleiste { flex: 0 0 248px; background: #fff; border-right: 1px solid var(--linie); padding: 16px 12px;
                  display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; overflow: auto; }
  .marke-kopf { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
  .marke-kopf img { height: 40px; }
  .marke-kopf b { display: block; font-size: 14px; }
  .marke-kopf small { color: var(--grau); font-size: 12px; }
  .seitenleiste .gruppe { font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase;
                          color: var(--grau); padding: 12px 12px 4px; }
  .nav { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; color: var(--text);
         border-radius: 10px; padding: 10px 12px; font-size: 14px; font-weight: 600; text-decoration: none; }
  .nav:hover { background: #F9EDED; }
  .nav.an { background: var(--rot); color: #fff; }
  .nav svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; flex: none; }
  .nav .zahl { margin-left: auto; }
  .nav.an .zahl.wichtig { background: #fff; color: var(--rot); }
  .nav.klein-nav { font-weight: 500; font-size: 13px; padding: 8px 12px; }
  .seitenleiste .leer { flex: 1; }
  .seitenleiste .fuss { border-top: 1px solid var(--linie); margin-top: 12px; padding-top: 10px; display: flex; flex-direction: column; gap: 2px; }
  /* fixed: die Seitenleiste scrollt (overflow) und würde das breitere Menü sonst abschneiden */
  #fsmMenue { position: fixed; left: 12px; bottom: 56px; width: 320px; max-height: calc(100vh - 72px); overflow: auto;
              z-index: 20; box-shadow: 0 6px 24px rgba(0,0,0,.15); }
  .punkt-status { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; }
  #sicherung.faellig { background: #fde2e1; color: #8a1c1b; font-weight: 700; }
  .hauptbereich { flex: 1; min-width: 0; display: flex; flex-direction: column; }
  .kopfleiste { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 28px; background: #fff;
                border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 15; }
  .kopfleiste .titel { flex: 1 1 220px; }
  .kopfleiste h1 { margin: 0; font-size: 21px; }
  .suche { position: relative; flex: 1 1 300px; max-width: 440px; display: flex; align-items: center; gap: 8px;
           border: 1px solid var(--linie); border-radius: 22px; padding: 0 14px; background: var(--hell); }
  .suche svg { width: 16px; height: 16px; fill: none; stroke: var(--grau); stroke-width: 2; flex: none; }
  .suche input { border: 0; background: transparent; flex: 1; min-width: 0; padding: 9px 0; outline: none; }
  .suche .treffer { top: 44px; }
  main { width: 100%; max-width: 1240px; margin: 0 auto; padding: 22px 28px 60px; box-sizing: border-box; }
  .kastentitel { margin: 0; font-size: 17px; }
  /* ---------- Heute */
  .kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin-bottom: 18px; }
  .kachel { position: relative; display: flex; align-items: center; gap: 14px; text-align: left; background: #fff; color: var(--text);
            border: 2px solid transparent; border-radius: 16px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06); font-weight: 400; }
  .kachel:hover { border-color: var(--rot); }
  .kachel .sym { width: 44px; height: 44px; border-radius: 12px; background: #FFE9E9; color: var(--rot); display: flex;
                 align-items: center; justify-content: center; flex: none; }
  .kachel .sym svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; }
  .kachel b { display: block; font-size: 15px; }
  .kachel small { font-size: 12px; color: var(--grau); }
  .kachel .p { position: absolute; top: 8px; right: 10px; background: var(--rot); color: #fff; border-radius: 12px; font-size: 12px;
               padding: 0 8px; font-weight: 800; }
  .kachel.haupt { background: var(--rot); color: #fff; }
  .kachel.haupt small { color: #FBE3E3; }
  .kachel.haupt .sym { background: rgba(255,255,255,.2); color: #fff; }
  .kachel.haupt:hover { border-color: #8E1517; }
  .spalten { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
  .spalte-breit { flex: 1 1 420px; min-width: 0; }
  .aufgabe { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3e9e9; font-size: 14px; }
  .aufgabe:last-child { border-bottom: 0; }
  .aufgabe .txt { flex: 1; min-width: 0; }
  .aufgabe .pt { width: 8px; height: 8px; border-radius: 50%; background: var(--rot); flex: none; }
  .aufgabe .pt.gelb { background: #E8A317; }
  .aufgabe-offen { border: 2px solid var(--rot); border-radius: 12px; padding: 12px 14px; margin: 6px 0; background: #FFFAFA;
                   display: flex; flex-direction: column; gap: 10px; }
  .aufgabe-offen .daten { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; font-size: 14px; }
  .aufgabe-offen .daten > div > span:first-child { display: block; font-size: 12px; color: var(--grau); }
  table.heute td { padding: 8px 6px; }
  tr.jetzt td { background: #FFF4F4; }
  tr.vorbei td { color: #a89a9b; }
  .ereignis { display: flex; gap: 10px; font-size: 14px; padding: 4px 0; }
  .ereignis .zt { color: var(--grau); width: 74px; flex: none; font-size: 13px; }
  /* ---------- Kalender */
  .kalleiste { padding: 10px 14px; }
  .umschalter { display: flex; border: 1px solid var(--linie); border-radius: 16px; overflow: hidden; margin-left: 6px; }
  .umschalter button { background: #fff; color: var(--text); border-radius: 0; padding: 5px 12px; font-size: 13px; }
  .umschalter button.an { background: var(--rot); color: #fff; }
  .legende { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 12px; margin: 0 4px 12px; }
  .legende i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
  .wraster { display: grid; position: relative; }
  .wkopf { padding: 8px 6px; text-align: center; border-left: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
  .wkopf b { display: block; font-size: 16px; }
  .wkopf.heute { background: #FFF4F4; color: var(--rot); }
  .wspalte { position: relative; border-left: 1px solid var(--linie); cursor: copy; }
  .wstunde { font-size: 11px; color: var(--grau); text-align: right; padding-right: 6px; position: absolute; left: 0; right: 0; }
  .wlinie { position: absolute; left: 0; right: 0; border-top: 1px solid #f3e9e9; pointer-events: none; }
  .block { position: absolute; border-radius: 7px; padding: 3px 6px; font-size: 11.5px; line-height: 1.3; overflow: hidden;
           cursor: pointer; box-sizing: border-box; border: 1px solid rgba(255,255,255,.6); }
  .block:hover { filter: brightness(.95); z-index: 5; }
  .b-FAHRSTUNDE { background: #D62827; color: #fff; } .b-PRUEFUNG { background: #8E1517; color: #fff; }
  .b-SIMULATOR { background: #e3ecf7; color: #2a4f7a; } .b-BERATUNG { background: #f1e1e2; color: #6e2626; }
  .b-BUERO { background: #eee6d8; color: #5e4419; }
  .b-ab { background: #fff !important; color: #8f8283 !important; border: 1px dashed #c9b8b9; text-decoration: line-through; }
  .jetztlinie { position: absolute; left: 0; right: 0; border-top: 2px solid var(--rot); z-index: 6; pointer-events: none; }
  .tafel { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
  .tspalte { background: #fff; border-radius: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); min-width: 0; }
  .tspalte .tk { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--linie); }
  .tspalte .tk small { display: block; color: var(--grau); font-size: 12px; }
  .tspalte .tl { padding: 10px; display: flex; flex-direction: column; gap: 7px; }
  .tkarte { border-radius: 10px; padding: 8px 10px; font-size: 13px; line-height: 1.35; cursor: pointer; text-align: left;
            font-weight: 400; display: block; width: 100%; }
  .tkarte.vorbei { opacity: .5; }
  .tkarte.laeuft { outline: 3px solid var(--text); outline-offset: 1px; }
  .tfrei { border: 1px dashed #d9c7c8; color: var(--grau); background: #fff; text-align: center; border-radius: 10px; padding: 7px;
           font-size: 13px; font-weight: 400; width: 100%; }
  .tfrei:hover { border-color: var(--rot); color: var(--rot); }
  /* ---------- Neue Schüler & Codes */
  .schritte { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 14px; }
  .schritte .karte { display: flex; gap: 12px; align-items: center; margin: 0; padding: 12px 16px; font-size: 14px; }
  .schritte .nr { width: 30px; height: 30px; border-radius: 50%; background: var(--rot); color: #fff; display: flex; align-items: center;
                  justify-content: center; font-weight: 800; flex: none; }
  .tabelle-box { overflow-x: auto; }
  /* ---------- Akte: Aktionen oben, Seltenes unter „Mehr“ */
  .akteaktionen { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; align-items: center; }
  details.mehr { position: relative; }
  details.mehr summary { list-style: none; cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 12px; border-radius: 20px;
                         border: 1px solid var(--linie); background: #fff; }
  details.mehr summary::-webkit-details-marker { display: none; }
  details.mehr > div { position: absolute; z-index: 12; top: 34px; left: 0; background: #fff; border: 1px solid var(--linie);
                       border-radius: 12px; box-shadow: 0 6px 20px rgba(0,0,0,.12); padding: 6px; display: flex; flex-direction: column;
                       min-width: 200px; }
  details.mehr > div button { background: none; color: var(--text); text-align: left; border-radius: 8px; font-weight: 500; padding: 8px 12px; }
  details.mehr > div button:hover { background: var(--hell); }
  /* ---------- Schmale Fenster: Seitenleiste oben */
  @media (max-width: 900px) {
    .app { flex-direction: column; }
    .seitenleiste { position: static; height: auto; flex: none; flex-direction: row; flex-wrap: wrap; border-right: 0;
                    border-bottom: 1px solid var(--linie); }
    .seitenleiste .gruppe, .seitenleiste .leer, .marke-kopf small { display: none; }
    .seitenleiste .nav { width: auto; }
    .seitenleiste .fuss { flex-direction: row; flex-wrap: wrap; border-top: 0; margin: 0; padding: 0; }
    .layout { grid-template-columns: 1fr !important; }
    .sliste { position: static !important; max-height: none !important; }
    main { padding: 16px; }
    .kopfleiste { position: static; padding: 12px 16px; }
    #fsmMenue { top: 56px; bottom: auto; left: 16px; width: min(320px, calc(100vw - 32px)); max-height: calc(100vh - 72px); }
  }
  /* ---------- Ausbildung: Stunden abschließen, freie Fahrstunden, Theorie-Anmeldung, Nachrichten */
  .stufe3 { display: flex; border: 1px solid var(--linie); border-radius: 14px; overflow: hidden; flex-shrink: 0; }
  .stufe3 button { background: #fff; color: var(--grau); border-radius: 0; padding: 5px 10px; font-size: 12px; font-weight: 600; }
  .stufe3 button + button { border-left: 1px solid var(--linie); }
  .stufe3 button.an[data-w="0"] { background: #f1ecec; color: var(--text); }
  .stufe3 button.an[data-w="1"] { background: #f6dfb3; color: #6b4e1d; }
  .stufe3 button.an[data-w="2"] { background: var(--gruen); color: #fff; }
  .planzeile { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 1px solid #f3e9e9; }
  .planzeile > span { flex: 1; font-size: 14px; }
  details.stufe { border: 1px solid var(--linie); border-radius: 12px; padding: 6px 12px; margin-bottom: 8px; }
  details.stufe summary { cursor: pointer; font-weight: 700; padding: 4px 0; display: flex; gap: 8px; align-items: center; }
  details.stufe summary .grau { font-weight: 500; margin-left: auto; }
  .dialog.gross { width: 660px; max-height: 88vh; overflow: auto; }
  .dialog.gross.breit { width: 900px; }
  textarea { font: inherit; padding: 8px 10px; border: 1px solid #d9c7c8; border-radius: 8px; background: #fff; width: 100%; resize: vertical; }
  .qrgross { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
  .qrgross svg { width: min(340px, 78vw); height: auto; background: #fff; padding: 12px; border-radius: 12px; }
  .checkincode { font-size: 44px; font-weight: 800; letter-spacing: 6px; color: var(--rot); }
  .pm { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 8px; padding: 1px 7px; }
  .pm.w1 { background: #f6dfb3; color: #6b4e1d; } .pm.w2 { background: #e3f1e4; color: #1f5f23; } .pm.w0 { background: #f1ecec; color: var(--grau); }
  .zweispaltig { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
  .listezeile { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid #f3e9e9; flex-wrap: wrap; }
  .listezeile > div { flex: 1; min-width: 180px; }
  @media (max-width: 900px) { .zweispaltig { grid-template-columns: 1fr; } }
  @media (max-width: 600px) {
    .dialoghintergrund { align-items: flex-end; }
    .dialog.gross { width: 100%; max-width: 100%; max-height: 94vh; border-radius: 16px 16px 0 0; }
    .planzeile { flex-wrap: wrap; }
  }
  details.tstunde { border-bottom: 1px solid #f3e9e9; padding: 8px 0; }
  details.tstunde summary { cursor: pointer; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
  details.tstunde summary b { flex: 1; min-width: 200px; }
  .tnzeile { display: flex; gap: 10px; align-items: center; padding: 4px 0 4px 14px; }
  .tnzeile > span:first-child { flex: 1; }
  .xknopf { background: none; color: var(--grau); padding: 0 6px; font-size: 16px; }
  .xknopf:hover { color: var(--rot); background: none; }
  .blatt table.nw { width: 100%; border-collapse: collapse; margin-top: 4mm; font-size: 10pt; }
  .blatt table.nw th, .blatt table.nw td { border-bottom: 0.3mm solid #E6CFD0; padding: 2mm 1.5mm; text-align: left; }
  .blatt table.nw th { color: #6B5E5F; font-weight: 600; }
  #druck { display: none; }
  /* ---------- Drucklayout: Zugangsblatt (A4, Corporate Design, zurückhaltend) ---------- */
  @page { size: A4; margin: 0; }
  @media print {
    body { background: #fff; }
    body > *:not(#druck) { display: none !important; }
    #druck { display: block; }
  }
  .blatt { width: 210mm; height: 296mm; box-sizing: border-box; padding: 16mm 20mm 14mm; position: relative;
           font-family: "Segoe UI", Arial, sans-serif; color: #1E1A1A; background: #fff; font-size: 10.5pt; line-height: 1.45;
           -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .blatt .kopf { display: flex; justify-content: space-between; align-items: flex-end; padding-bottom: 7mm; position: relative; }
  .blatt .kopf img { height: 17mm; }
  .blatt .kopf .slogan { color: #D62827; font-weight: 700; font-size: 10pt; }
  .blatt .linie { height: 0.8mm; background: linear-gradient(90deg, rgba(214,40,39,0), #D62827 18%, #D62827 82%, rgba(214,40,39,0));
                  transform: rotate(-0.8deg); margin: 0 -6mm 9mm; }
  .blatt h1 { font-size: 19pt; margin: 0 0 1.5mm; font-weight: 800; }
  .blatt .balken { width: 13mm; height: 1.4mm; background: #D62827; transform: skewX(-35deg); margin: 0 0 6mm 0.6mm; }
  .blatt p { margin: 0 0 3.5mm; }
  .blatt .zugang { display: flex; align-items: center; gap: 9mm; background: #FBF5F5; border-left: 1.4mm solid #D62827;
                   border-radius: 0 3mm 3mm 0; padding: 5mm 8mm; margin: 2mm 0 4mm; }
  .blatt .zugang svg { width: 36mm; height: 36mm; display: block; }
  .blatt .schritt { display: flex; align-items: baseline; gap: 3mm; margin: 7mm 0 3mm; }
  .blatt .schritt .nr { color: #fff; background: #D62827; font-weight: 800; font-size: 10pt; width: 6.5mm; height: 6.5mm;
                        border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
                        position: relative; top: -0.4mm; }
  .blatt .schritt h2 { margin: 0; }
  .blatt .install { display: flex; gap: 8mm; align-items: flex-start; }
  .blatt .install .qr { flex: none; text-align: center; font-size: 8pt; color: #6B5E5F; }
  .blatt .install .qr svg { width: 32mm; height: 32mm; display: block; margin-bottom: 1.5mm; }
  .blatt .install ol { margin: 0; }
  .blatt .link { font-size: 8.5pt; color: #6B5E5F; word-break: break-all; }
  .blatt .zugang .klein { font-size: 8.5pt; color: #6B5E5F; text-transform: uppercase; letter-spacing: .6pt; }
  .blatt .zugang .code { font-family: Consolas, "Courier New", monospace; font-size: 22pt; font-weight: 700;
                         letter-spacing: 1.2pt; margin: 1mm 0 3mm; }
  .blatt .zugang .gueltig { font-size: 9.5pt; color: #4b3a3b; }
  .blatt h2 { font-size: 11.5pt; margin: 0 0 3mm; font-weight: 700; }
  .blatt ol { margin: 0 0 4mm; padding-left: 5.5mm; }
  .blatt ol li { margin-bottom: 1.3mm; padding-left: 1mm; }
  .blatt ol li::marker { color: #D62827; font-weight: 700; }
  .blatt .hinweise { display: grid; grid-template-columns: 1fr 1fr; gap: 4mm 8mm; font-size: 9.5pt; color: #4b3a3b; margin-top: 7mm; }
  .blatt .hinweise b { color: #1E1A1A; display: block; }
  .blatt .fuss { position: absolute; left: 20mm; right: 20mm; bottom: 14mm; border-top: 0.3mm solid #E6CFD0;
                 padding-top: 4mm; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6mm; font-size: 8.5pt; color: #6B5E5F; }
  .blatt .fuss b { color: #D62827; display: block; font-size: 9pt; }
