/* Menü nach Vorschlag F (Nils 21.11.2026): links die Register, daneben die Seiten des gewählten Registers (wwwroot/js/fmenue.js).
   PC ab 1200 px: Liste daneben, einklappbar. Tablet: Leiste links, Liste klappt über der Seite auf. Handy: Leiste unten, Liste darüber.
   Farben als Variablen, die dunkle Darstellung steht unten in dieser Datei. */
:root {
  --fm-rail: #F0F4EB; --fm-rail-hover: #E2EAD9; --fm-panel: #fff; --fm-linie: #DCE3D5; --fm-text: #1B2A19; --fm-leise: #6B7766;
  --fm-gruen: #2F6B2A; --fm-on: #fff; --fm-hover: #F0F4EB; --fm-schatten: rgba(20,40,30,.16); --fm-feld: #fff; --fm-feldrand: #D9E1D2;
}

.fmenue { position: sticky; top: 78px; align-self: flex-start; height: calc(100vh - 78px); height: calc(100dvh - 78px); display: flex; flex: none; z-index: 25; }
.frail { width: 86px; flex: none; display: flex; flex-direction: column; gap: 4px; padding: 10px 6px; background: var(--fm-rail); border-right: 1px solid var(--fm-linie); overflow-y: auto; overflow-x: hidden; }
.frbtn { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 2px 8px; border: 0; border-radius: 12px; background: none; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.15; color: var(--fm-text); cursor: pointer; }
.frbtn:hover { background: var(--fm-rail-hover); }
.frbtn.hier { color: var(--fm-gruen); }
.frbtn.hier::before { content: ""; position: absolute; left: -6px; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: #8BC34A; }
.frbtn.on { background: var(--fm-on); color: var(--fm-gruen); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.frbtn:focus-visible { outline: 2px solid var(--fm-gruen); outline-offset: 1px; }
.frik { position: relative; display: grid; place-items: center; width: 28px; height: 28px; color: var(--fm-gruen); }
.frik .symbol { width: 26px; height: 26px; stroke-width: 1.7; }
.frz { position: absolute; top: -6px; right: -13px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #C0392B; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--fm-rail); }
.frl { max-width: 78px; text-align: center; overflow-wrap: anywhere; }

.fpanel { width: 258px; flex: none; background: var(--fm-panel); border-right: 1px solid var(--fm-linie); overflow-y: auto; overflow-x: hidden; padding: 14px 10px 40px; }
.fmenue.zu .fpanel { display: none; }
.fpwerk { display: flex; flex-direction: column; gap: 8px; padding: 0 4px 12px; margin-bottom: 4px; border-bottom: 1px solid var(--fm-linie); }
.fpwerk .standortwahl { margin: 0; }
.fpwerk .standortwahl label { display: block; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--fm-leise); margin: 0 0 4px 2px; }
.fpwerk .standortwahl select { width: 100%; }
.fpsuche { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border: 1px solid var(--fm-feldrand); border-radius: 10px; background: var(--fm-feld); font: inherit; font-size: 14px; color: var(--fm-leise); cursor: pointer; text-align: left; }
.fpsuche:hover { border-color: var(--fm-gruen); color: var(--fm-gruen); }
.fpsuche .symbol { width: 17px; height: 17px; flex: none; }
.fpsuche span { flex: 1; }
.fmenue kbd, .fmsuche kbd { font: 600 11px/1 inherit; font-family: inherit; padding: 4px 6px; border-radius: 6px; background: var(--fm-rail); color: var(--fm-leise); border: 1px solid var(--fm-linie); }
.fpreg[hidden] { display: none; }
.fpreg { display: flex; flex-direction: column; gap: 2px; }
.fpkopf { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 6px; }
.fpkopf b { font-size: 18px; color: var(--fm-text); }
.fpzu { border: 0; background: none; font-size: 20px; line-height: 1; color: var(--fm-leise); cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.fpzu:hover { background: var(--fm-hover); color: var(--fm-gruen); }
.fmgruppe { display: flex; flex-direction: column; gap: 2px; padding: 6px 0 4px; }
.fmname { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--fm-leise); padding: 6px 10px 2px; }
.fmenue .menue-eintrag { gap: 10px; padding: 9px 10px; border-radius: 10px; font-size: 15px; }
.fmenue .menue-eintrag > span:not(.fmik):not(.nbadge) { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fmenue .menue-eintrag.aktion { color: var(--gruen-aktiv); font-weight: 700; }
.fmik { position: relative; display: grid; place-items: center; width: 22px; height: 22px; flex: none; color: var(--fm-gruen); }
.fmik .symbol { width: 21px; height: 21px; flex: none; color: inherit; stroke-width: 1.7; }
.fmplus { position: absolute; right: -6px; bottom: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--fm-gruen); box-shadow: 0 0 0 2px var(--fm-panel); }
.fmplus::before, .fmplus::after { content: ""; position: absolute; left: 50%; top: 50%; background: #fff; transform: translate(-50%, -50%); border-radius: 1px; }
.fmplus::before { width: 8px; height: 2px; }
.fmplus::after { width: 2px; height: 8px; }
.fmenue .nbadge { flex: none; display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #C0392B; color: #fff; font-size: 12px; font-weight: 700; margin-left: auto; }
.fmenue .nbadge.fszahl { background: #FCE8E6; color: #B3261E; font-weight: 800; }

/* Lupe oben im Kopf (Tablet und Handy) */
.kopfsuche { display: none; place-items: center; width: 42px; height: 42px; margin-left: auto; margin-right: 4px; border: 0; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; flex: none; }
.kopfsuche:hover { background: rgba(255,255,255,.24); }
.kopfsuche .symbol { width: 22px; height: 22px; color: #fff; }

/* Standort im Kontomenü */
.kontomenue .kmort { margin: 0 0 4px; padding: 0 0 6px; border-bottom: 1px solid #E4EADF; }
.kontomenue .kmtitel { font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: #6B7766; padding: 6px 12px 4px; }
.kontomenue .kmwahl { display: flex; align-items: center; gap: 10px; }
.kontomenue .kmkreis { width: 18px; height: 18px; border-radius: 50%; border: 2px solid #B8C2B2; flex: none; box-sizing: border-box; }
.kontomenue .kmwahl.on { color: #2F6B2A; font-weight: 700; }
.kontomenue .kmwahl.on .kmkreis { border-color: #2F6B2A; background: radial-gradient(#2F6B2A 42%, transparent 48%); }

/* Suche (Strg+K) */
.fmsuche { position: fixed; inset: 0; background: rgba(20,30,18,.38); z-index: 200; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; }
.fmsuche[hidden] { display: none; }
.fmdlg { width: 100%; max-width: 600px; background: var(--fm-panel); color: var(--fm-text); border-radius: 18px; box-shadow: 0 20px 60px rgba(0,0,0,.28); overflow: hidden; }
.fmein { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--fm-linie); color: var(--fm-leise); }
.fmein .symbol { width: 20px; height: 20px; flex: none; }
.fmein input { flex: 1; min-width: 0; border: 0; outline: 0; font: inherit; font-size: 17px; color: var(--fm-text); background: none; padding: 0; }
.fmliste { max-height: 52vh; overflow-y: auto; padding: 6px; }
.fmliste .tr { padding: 10px 10px 4px; font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--fm-leise); }
.fmliste a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 10px; color: inherit; text-decoration: none; }
.fmliste a .ik { display: grid; place-items: center; width: 22px; color: var(--fm-gruen); flex: none; }
.fmliste a .ik svg { width: 20px; height: 20px; }
.fmliste a .t { flex: 1; min-width: 0; }
.fmliste a .t b { display: block; font-weight: 600; }
.fmliste a .t small { color: var(--fm-leise); font-size: 12.5px; }
.fmliste a .w { font-size: 12px; color: var(--fm-leise); white-space: nowrap; }
.fmliste a.sel { background: var(--aktiv-hg); }
.fmliste .nix { padding: 20px; text-align: center; color: var(--fm-leise); }
.fmfuss { padding: 8px 16px; font-size: 12px; color: var(--fm-leise); border-top: 1px solid var(--fm-linie); }

/* PC mit Zoom „Normal“ (einheit.css): Höhe ausgleichen */
@media screen and (min-width: 1100px) and (pointer: fine) {
  html[data-schrift="normal"] body:not(.monitor) .fmenue { height: calc(111.111vh - 78px); }
}

/* Tablet: Leiste links, Liste klappt über der Seite auf */
@media (max-width: 1199px) {
  .kopfsuche { display: grid; }
  .kopf .kopfsuche + .glockewrap .glocke { margin-left: 0; }
  .fpwerk { display: none; }
  .fpzu { display: none; }
  .fmenue .fpanel { display: none; }
  .fmenue.offen .fpanel { display: block; position: absolute; left: 86px; top: 0; bottom: 0; width: 280px; box-shadow: 10px 0 30px var(--fm-schatten); z-index: 40; }
}

/* Handy: Leiste unten wie bei einer App, die Liste klappt darüber auf */
@media (max-width: 699px) {
  .fmenue { position: fixed; top: auto; left: 0; right: 0; bottom: 0; height: auto !important; display: block; z-index: 50; }
  .frail { width: auto; flex-direction: row; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 2px; padding: 5px 4px calc(5px + env(safe-area-inset-bottom, 0px)); border-right: 0; border-top: 1px solid var(--fm-linie); overflow: visible; background: var(--fm-panel); }
  .frbtn { padding: 6px 0 5px; font-size: 11px; gap: 3px; min-width: 0; }
  .frbtn.hier::before { left: 25%; right: 25%; top: -5px; bottom: auto; width: auto; height: 3px; border-radius: 0 0 3px 3px; }
  .frbtn.on { background: var(--fm-rail); box-shadow: none; }
  .frik .symbol { width: 24px; height: 24px; }
  .frl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .frz { right: -12px; box-shadow: 0 0 0 2px var(--fm-panel); }
  .fmenue.offen .fpanel { position: fixed; left: 0; right: 0; top: auto; bottom: calc(62px + env(safe-area-inset-bottom, 0px)); width: auto; max-height: calc(100dvh - 150px); border-right: 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 30px var(--fm-schatten); padding: 6px 10px 12px; }
  .seite .inhalt { padding-bottom: 96px; }
  .fuss { padding-bottom: 86px; }
}

@media print { .fmenue, .kopfsuche, .fmsuche { display: none !important; } }
body.konto-druck .fmenue, body.monitor .fmenue { display: none !important; }

/* Dunkle Darstellung */
:root[data-theme="dark"] {
  --fm-rail: #171C15; --fm-rail-hover: #222A1F; --fm-panel: #1A2018; --fm-linie: #2D322A; --fm-text: #D7E3D5; --fm-leise: #A9B5A6;
  --fm-gruen: #8CC985; --fm-on: #26301F; --fm-hover: #222A1F; --fm-schatten: rgba(0,0,0,.5); --fm-feld: #1D271C; --fm-feldrand: #3F453C;
}
:root[data-theme="dark"] .kontomenue .kmort { border-bottom-color: #32372D; }
:root[data-theme="dark"] .kontomenue .kmwahl.on { color: #8CC985; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --fm-rail: #171C15; --fm-rail-hover: #222A1F; --fm-panel: #1A2018; --fm-linie: #2D322A; --fm-text: #D7E3D5; --fm-leise: #A9B5A6;
    --fm-gruen: #8CC985; --fm-on: #26301F; --fm-hover: #222A1F; --fm-schatten: rgba(0,0,0,.5); --fm-feld: #1D271C; --fm-feldrand: #3F453C;
  }
  :root:not([data-theme="light"]) .kontomenue .kmort { border-bottom-color: #32372D; }
  :root:not([data-theme="light"]) .kontomenue .kmwahl.on { color: #8CC985; }
}

/* Administration › Menü anpassen: Name und Symbol (Nils 21.11.2026) */
.ma-register { display: flex; align-items: center; gap: 8px; margin: 18px 4px 6px; }
.ma-register .menue-abschnitt { margin: 0; flex: 1; }
.ma-symbol.klein { width: 18px; height: 18px; }
.ma-symbol.klein .symbol { width: 18px; height: 18px; }
.ma-bearb { min-width: 34px; }
.ma-dialog { border: 0; border-radius: 18px; padding: 0; width: min(640px, calc(100vw - 32px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.3); background: var(--fm-panel); color: var(--fm-text); }
.ma-dialog::backdrop { background: rgba(20,30,18,.4); }
.ma-dialog form { padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.ma-dialog h2 { margin: 0 0 4px; }
.ma-feld { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.ma-feld small { font-weight: 400; color: var(--fm-leise); }
.ma-feld input { font: inherit; font-size: 16px; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--fm-feldrand); background: var(--fm-feld); color: var(--fm-text); }
.ma-std { margin: 0; }
.ma-vorschlag-kopf, .ma-alle-kopf { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ma-alle-kopf input { flex: 1; font: inherit; font-size: 14px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--fm-feldrand); background: var(--fm-feld); color: var(--fm-text); }
.ma-vorschlag, .ma-symbole { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; }
.ma-symbole { max-height: 260px; overflow-y: auto; padding: 2px; }
.ma-sym { position: relative; display: grid; place-items: center; height: 46px; border: 1px solid var(--fm-linie); border-radius: 10px; background: var(--fm-feld); color: var(--fm-gruen); cursor: pointer; }
.ma-sym[hidden] { display: none; }
.ma-sym:hover { border-color: var(--fm-gruen); }
.ma-sym .symbol { width: 24px; height: 24px; }
.ma-sym.on { background: var(--aktiv-hg); border: 2px solid var(--fm-gruen); }
.ma-vorschlag .ma-sym.erster::after { content: "★"; position: absolute; top: -7px; right: -5px; font-size: 13px; color: #D99A00; }
.ma-dialogknoepfe { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.ma-symbole[hidden], .ma-alle-kopf[hidden], .ma-vorschlag-kopf[hidden] { display: none; }
