/* U-161: Menü links nach Entwurf K2 – alle Einträge gleiche Schrift (IBM Plex Sans 15 px), Linien-Symbole, eckige Zähler,
   Fußzeile mit Kürzel/Name/Rolle und getrenntem „Abmelden“. Ersetzt die früheren Seitenleisten-Regeln in getwirtly.css.
   Farben kommen aus den Variablen von getwirtly.css (hell/dunkel); aktiv = hell-terrakotta. Nichts rund/oval. */
html body.wirtly {
  --menue-aktiv-bg: #FBEDE6;
  --menue-aktiv-ink: #9E4524;
}
@media (prefers-color-scheme: dark) {
  html body.wirtly {
    --menue-aktiv-bg: color-mix(in srgb, var(--accent) 18%, var(--surface));
    --menue-aktiv-ink: var(--accent-ink);
  }
}

/* Karte und Abstände */
html body.wirtly .side-nav { padding: 10px; gap: 2px; }
html body.wirtly .side-group, html body.wirtly .side-group[open] { gap: 2px; padding-bottom: 0; }
html body.wirtly .side-nav > .side-group { margin-top: 0; }
@media (min-width: 901px) {
  html body.wirtly .shell { grid-template-columns: 244px minmax(0, 1fr); }
}

/* Einträge und Gruppen: ein Maß für alles */
html body.wirtly .side-link,
html body.wirtly button.side-link,
html body.wirtly .side-group > summary {
  box-sizing: border-box; display: flex; align-items: center; gap: 12px;
  min-height: 42px; height: 42px; margin: 0; padding: 0 12px;
  border-radius: 9px; border: 0; background: transparent; box-shadow: none; width: 100%;
  font: 500 15px/1.2 var(--f-sans); letter-spacing: 0; text-transform: none; text-align: left;
  color: var(--ink2); text-decoration: none; cursor: pointer;
}
html body.wirtly .side-group > summary { list-style: none; user-select: none; }
html body.wirtly .side-group > summary::-webkit-details-marker { display: none; }
html body.wirtly .side-link:hover,
html body.wirtly .side-group > summary:hover { background: var(--surface-2); color: var(--ink); }
html body.wirtly .side-group[open] > summary { color: var(--ink); }
html body.wirtly .side-link.is-active { background: var(--menue-aktiv-bg); color: var(--menue-aktiv-ink); font-weight: 600; box-shadow: none; }
html body.wirtly .side-link:focus-visible,
html body.wirtly .side-group > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
html body.wirtly .side-ico { flex: none; width: 18px; height: 18px; }
html body.wirtly .side-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Unterpunkte: eingerückt, 14 px, ohne Symbol (Text beginnt unter dem Text der Gruppe) */
html body.wirtly .side-link.side-sub { height: 38px; min-height: 38px; padding-left: 42px; font-size: 14px; }

/* Pfeil › grau, dreht beim Aufklappen */
html body.wirtly .side-chev { margin-left: 0; width: 7px; height: 7px; flex: none; border-right: 1.8px solid var(--faint); border-bottom: 1.8px solid var(--faint); opacity: 1; transform: rotate(-45deg); transition: transform .15s ease; }
html body.wirtly .side-group[open] > summary .side-chev { transform: rotate(45deg); }
@media (prefers-reduced-motion: reduce) { html body.wirtly .side-chev { transition: none; } }

/* Zähler: eckig, links vom Pfeil */
html body.wirtly .side .nav-badge {
  flex: none; margin-left: 0; min-width: 20px; height: 20px; padding: 0 6px; box-sizing: border-box;
  display: inline-grid; place-items: center; border-radius: 6px; box-shadow: none; vertical-align: baseline;
  font: 500 12px/1 var(--f-mono); background: var(--accent); color: var(--on-acc);
}
html body.wirtly .side-group[open] > summary .nav-badge { display: none; }
html body.wirtly .side-hilfe-link .hilfe-n { flex: none; border-radius: 6px; }

/* Fußzeile */
html body.wirtly .side-me { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px 2px 0; border-top: 1px solid var(--line); }
html body.wirtly .side-me-kuerzel { flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; background: var(--menue-aktiv-bg); color: var(--menue-aktiv-ink); font: 600 13px/1 var(--f-sans); }
html body.wirtly .side-me-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--ink); text-decoration: none; }
html body.wirtly .side-me-name b { font: 600 15px/1.2 var(--f-sans); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
html body.wirtly .side-me-name small { font: 400 12px/1.2 var(--f-sans); color: var(--muted); }
html body.wirtly .side-me form { margin: 0; flex: none; }
html body.wirtly .side-abmelden { height: 32px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font: 500 13px/1 var(--f-sans); cursor: pointer; }
html body.wirtly .side-abmelden:hover { color: var(--ink); background: var(--chip); }
html body.wirtly .side-recht { display: block; padding: 8px 2px 0; font-size: 12px; color: var(--faint); text-decoration: none; }
html body.wirtly .side-recht:hover { color: var(--muted); }

/* Handy: Menü-Blatt mit denselben Symbolen und Schriftgrößen */
@media (max-width: 900px) {
  html body.wirtly .side.is-open .side-link,
  html body.wirtly .side.is-open button.side-link,
  html body.wirtly .side.is-open .side-group > summary { min-height: 46px; height: 46px; font-size: 15px; }
  html body.wirtly .side.is-open .side-link.side-sub { min-height: 42px; height: 42px; font-size: 14px; }
}
