/* Computer ab 901 px: wie die macOS-Systemeinstellungen – Glas-Seitenleiste links, weiße Karten auf Grau.
   Wird mit media="(min-width: 901px)" geladen, hält also das Handy nicht auf. */

.layout { display: flex; }

.sidebar {
  width: 260px; flex-shrink: 0;
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  background: var(--glas);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  backdrop-filter: saturate(1.8) blur(20px);
  border-right: .5px solid var(--border);
  z-index: 5;
}
.brand { padding: 0 8px 14px; }
.nav { overflow-y: auto; min-height: 0; flex: 1; margin: 0 -4px 10px; padding: 0 4px; }
.nav a { margin-bottom: 1px; font-size: .9375rem; }
.sidebar-footer { margin-top: auto; padding: 12px 4px 0; border-top: .5px solid var(--border); }

.main { flex: 1; padding: 32px 40px 64px; max-width: 1200px; margin: 0 auto; }
@media (min-width: 1600px) {
  body { font-size: 17px; }
  .main { max-width: 1600px; }
}

.card { border-radius: 16px; }
.topbar h1 { font-size: 1.75rem; }

/* Fenster mittig wie ein macOS-Blatt */
dialog.card { border-radius: 16px; box-shadow: var(--schatten-fenster); }

/* Personentabelle: auf schmaleren Bildschirmen Kürzel ausblenden (Name steht daneben), damit nichts abgeschnitten wird */
@media (max-width: 1500px) {
  .personen-tabelle .sp-kuerzel { display: none; }
  .personen-tabelle th, .personen-tabelle td { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 1200px) {
  .personen-tabelle .sp-rolle { display: none; }
  /* Schilder („Urlaub bis …“) dürfen umbrechen, Target-Spalte schmaler – sonst seitliches Scrollen */
  .personen-tabelle .badge { white-space: normal; border-radius: 10px; }
  .personen-tabelle .sp-target, .personen-tabelle .ziel { min-width: 100px; }
  .personen-tabelle td strong { white-space: normal; }
  .personen-tabelle th, .personen-tabelle td { padding-left: 8px; padding-right: 8px; }
}
@media (max-width: 999px) {
  .personen-tabelle .sp-buero { display: none; }
}
/* Seitenleiste: Scrollen bleibt in der Leiste (14.11.2026) */
.sidebar, .nav { overscroll-behavior: contain; }

/* Schwebende Seitenleiste, einklappbar zur Symbol-Leiste (15.11.2026): Dock-Effekt wie am Mac,
   Namensschild beim Drüberfahren, Unterpunkte einer Gruppe als Kreise im Bogen nach rechts. Skript in base.html. */
:root { --leiste-kurve: cubic-bezier(.32, .72, 0, 1); --schatten-leiste: 0 18px 44px -20px rgba(30, 45, 60, .35), 0 1px 2px rgba(0, 0, 0, .04); }
.sidebar {
  top: 14px; height: calc(100vh - 28px); margin: 14px 0 14px 14px;
  border: .5px solid var(--border); border-radius: 22px; box-shadow: var(--schatten-leiste);
  transition: width .42s var(--leiste-kurve), padding .42s var(--leiste-kurve);
}
.brand { position: relative; }
.leiste-klapp {
  display: grid; place-items: center; position: absolute; right: -27px; top: 50%; translate: 0 -64%;
  width: 26px; height: 26px; padding: 0; border-radius: 50%; cursor: pointer; z-index: 2;
  border: .5px solid var(--border); background: var(--surface); color: var(--muted);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
}
.leiste-klapp::after { content: ""; position: absolute; inset: -9px; }
.leiste-klapp:hover { color: var(--text); }
.leiste-klapp svg { width: 14px; height: 14px; transition: rotate .42s var(--leiste-kurve); }
.leiste-zu .leiste-klapp svg { rotate: 180deg; }
.sidebar .brand > span:not(.brand-logo), .sidebar .nav a, .sidebar .nav-gruppe, .konto-name { transition: color .2s, opacity .2s; }

.leiste-zu .sidebar { width: 72px; }
.leiste-zu .brand { padding-left: 8px; padding-right: 0; }
.leiste-zu .brand > span:not(.brand-logo) { opacity: 0; pointer-events: none; }
.leiste-zu .sidebar .nav-suche input { padding-right: 0; color: transparent; cursor: pointer; }
.leiste-zu .sidebar .nav-suche input::placeholder { color: transparent; }
.leiste-zu .sidebar .nav-suche::before { left: 16px; }
.leiste-zu .nav { overflow-x: hidden; scrollbar-width: none; }

/* Punkte: nur noch die Kachel, Text unsichtbar (bleibt für Screenreader), Dock-Größe über --s aus dem Skript */
.sidebar .nav a { position: relative; }
.leiste-zu .nav > a, .leiste-zu .nav-block > summary {
  --s: 1; display: flex; align-items: center; color: transparent; white-space: nowrap;
  padding: 0 0 0 11px; height: calc(36px + (var(--s) - 1) * 30px); background: none; overflow: visible;
  transition: color .2s, height .18s var(--leiste-kurve);
}
.leiste-zu .nav > a .kachel, .leiste-zu .nav-block > summary .kachel { scale: var(--s); transition: scale .18s var(--leiste-kurve); }
.leiste-zu .nav > a:hover, .leiste-zu .nav > a.aktiv { background: none; color: transparent; }
.leiste-zu .nav > a.aktiv::before, .leiste-zu .nav-block:has(> a.aktiv) > summary::before {
  content: ""; position: absolute; left: 1px; top: 50%; translate: 0 -50%; width: 4px; height: 4px; border-radius: 50%;
  background: var(--text); opacity: .55;
}
.leiste-zu .nav-block > summary { position: relative; list-style: none; cursor: pointer; }
.leiste-zu .nav-block > summary::-webkit-details-marker { display: none; }
.leiste-zu .nav-gruppe > .kachel { display: grid; }
.leiste-zu .nav-block > a { display: none; }
.leiste-zu .nav-block > summary.faecher-offen .kachel { box-shadow: 0 0 0 3px var(--primary-soft); }
.leiste-zu .nav > a + .nav-block { border-top: .5px solid var(--border); margin-top: 8px; padding-top: 8px; }
.leiste-zu div.nav-gruppe { color: transparent; height: 17px; padding: 8px 6px; }
.leiste-zu div.nav-gruppe::before { content: ""; display: block; height: .5px; background: var(--border); }
.leiste-zu .nav-zaehler {
  position: absolute; left: 25px; top: -2px; margin: 0; scale: .8; transform-origin: top left;
  box-shadow: 0 0 0 2px var(--surface);
}

/* Fuß: Profilkreis bleibt, Name weg, runde Knöpfe untereinander */
.leiste-zu .sidebar-footer { padding-left: 0; padding-right: 0; }
.leiste-zu .konto-kopf { padding: 4px 0; justify-content: center; gap: 0; }
.leiste-zu .konto-name { display: none; }
.leiste-zu .konto-knoepfe { flex-direction: column; align-items: center; gap: 8px; padding: 8px 0 2px; }

/* Namensschild */
.leiste-schild {
  display: block; position: fixed; z-index: 60; pointer-events: none; padding: 5px 10px; border-radius: 8px;
  background: var(--surface); color: var(--text); font-size: .8125rem; font-weight: 500; white-space: pre;
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, .3), 0 0 0 .5px var(--border);
  opacity: 0; translate: -6px 0; transition: opacity .15s, translate .2s var(--leiste-kurve);
}
.leiste-schild.da { opacity: 1; translate: 0 0; }

/* Kreis-Fächer */
.leiste-faecher { display: block; position: fixed; z-index: 60; pointer-events: none; visibility: hidden; }
.leiste-faecher.da { pointer-events: auto; visibility: visible; }
.leiste-faecher a {
  position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; color: var(--text); text-decoration: none;
  background: var(--glas); border: .5px solid var(--border);
  -webkit-backdrop-filter: saturate(1.8) blur(20px); backdrop-filter: saturate(1.8) blur(20px);
  box-shadow: 0 10px 28px -12px rgba(0, 0, 0, .35);
  translate: calc(var(--start) - 23px) calc(var(--mitte) - 23px); scale: .3; opacity: 0;
  transition: opacity .18s, translate .46s cubic-bezier(.34, 1.45, .5, 1), scale .46s cubic-bezier(.34, 1.45, .5, 1);
  transition-delay: calc(var(--i) * 40ms);
}
.leiste-faecher.da a { translate: calc(var(--x) - 23px) calc(var(--y) - 23px); scale: 1; opacity: 1; }
.leiste-faecher.da a:hover, .leiste-faecher.da a:focus-visible { scale: 1.14; z-index: 2; transition-delay: 0s; }
.leiste-faecher a.aktiv { box-shadow: 0 0 0 3px var(--primary), 0 10px 28px -12px rgba(0, 0, 0, .35); }
.leiste-faecher .kachel { width: 36px; height: 36px; border-radius: 50%; }
.leiste-faecher .kachel svg { width: 18px; height: 18px; }
.leiste-faecher .faecher-name {
  position: absolute; left: 52px; top: 50%; translate: 0 -50%; padding: 3px 9px; border-radius: 8px;
  font-size: .8125rem; font-weight: 500; white-space: nowrap; color: var(--text); background: var(--surface);
  box-shadow: 0 4px 14px -6px rgba(0, 0, 0, .25), 0 0 0 .5px var(--border);
}
.leiste-faecher .nav-zaehler { position: absolute; right: -4px; top: -4px; margin: 0; scale: .82; box-shadow: 0 0 0 2px var(--surface); }

@media (prefers-reduced-motion: reduce) {
  .sidebar, .leiste-klapp svg, .leiste-schild, .leiste-faecher a,
  .leiste-zu .nav > a, .leiste-zu .nav-block > summary, .leiste-zu .nav .kachel { transition: none; }
}
