/* Gemeinsamer Rahmen aller Seiten: Seitenleiste links, Suche und "+ Neu" oben, Leiste unten auf dem Handy.
   Vorlage: docs/design/entwurf/Navigation.dc.html. Farben nur aus theme.css. */
:root { --side-w: 264px; --sans: "Neue Haas Grotesk Display Pro", "Work Sans", "Helvetica Neue", Arial, sans-serif; }
body.shell-on { margin: 0; background: var(--bg); color: var(--text); font: 400 var(--fs-14)/1.5 var(--sans); }
.shell { display: flex; min-height: 100vh; }
.shell-side { width: var(--side-w); flex-shrink: 0; box-sizing: border-box; min-height: 100vh; position: sticky; top: 0; height: 100vh;
  overflow-y: auto; background: var(--sidebar); border-right: 1px solid var(--line);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 2px; }
.shell-brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 18px; color: var(--text); text-decoration: none; }
/* Echtes Logo: weiß in Dunkel, schwarz in Hell. Eingeklappt bleibt nur das Zeichen sichtbar. */
/* Wortbildmarke wie in der CI 2026 (Outline): ausgeklappt vollständig und gut lesbar, eingeklappt nur die Bildmarke */
.shell-brand .logo-rahmen { display: block; height: 60px; width: 156px; overflow: hidden; }
.shell-brand img { height: 60px; width: auto; display: block; }
.shell-brand .logo-hell { display: var(--logo-dark); }
.shell-brand .logo-dunkel { display: var(--logo-light); }
.shell-label { display: block; flex: none; line-height: 1.4; padding: 18px 14px 6px; font-size: var(--fs-12); letter-spacing: 0.18em; color: var(--label); text-transform: uppercase; }
.shell-item { transition: background-color var(--dauer) ease, color var(--dauer) ease; display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 14px; border-radius: var(--r-kachel);
  color: var(--side-text); text-decoration: none; }
.shell-item:hover { background: rgba(var(--accent-rgb), 0.06); }
.shell-item[aria-current="page"] { background: var(--chip); color: var(--accent-text); font-weight: 500;
  box-shadow: inset 3px 0 0 var(--accent-line); }
.shell-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.shell-item .count { margin-left: auto; padding: 1px 8px; border-radius: var(--r-pille); background: var(--bg); color: var(--accent-text); font-size: var(--fs-12); }
.shell-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; padding-top: 18px; }
.shell-foot .theme-switch { margin: 10px 6px 0; }
.shell-me { display: flex; align-items: center; gap: 10px; padding: 12px 10px 0; border-top: 1px solid var(--line); margin-top: 8px; }
.shell-me .av { width: 34px; height: 34px; border-radius: var(--r-pille); background: var(--chip); display: flex; align-items: center;
  justify-content: center; font-size: var(--fs-12); font-weight: 600; overflow: hidden; }
.shell-me .av img { width: 100%; height: 100%; object-fit: cover; }
.shell-me .who { display: flex; flex-direction: column; font-size: var(--fs-13); line-height: 1.3; }
.shell-me .who small { color: var(--muted); font-size: var(--fs-12); }
.shell-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.shell-top { display: flex; align-items: center; gap: 14px; padding: 18px 32px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20; background: var(--bg); }
.shell-search { flex: 1; max-width: 760px; position: relative; }
.shell-search input { width: 100%; box-sizing: border-box; height: 48px; padding: 0 64px 0 48px; border-radius: var(--r-pille);
  border: 1px solid var(--control-line); background: var(--card); color: var(--text); font: inherit; }
.shell-search input::placeholder { color: var(--muted); }
.shell-search input:focus { outline: 2px solid var(--accent-line); outline-offset: 1px; }
.shell-search .lupe { position: absolute; left: 18px; top: 15px; width: 18px; height: 18px; color: var(--accent-text); pointer-events: none; }
.shell-search kbd { position: absolute; right: 16px; top: 13px; padding: 2px 8px; border-radius: var(--r-feld); font: var(--fs-12) var(--sans);
  border: 1px solid var(--control-line); color: var(--muted); }
.shell-results { position: absolute; left: 0; right: 0; top: 56px; background: var(--pop); border: 1px solid var(--line);
  border-radius: var(--r-karte); padding: 14px; box-shadow: var(--shadow-pop); max-height: 70vh; overflow-y: auto; }
.shell-results .grp { display: flex; justify-content: space-between; padding: 10px 8px 4px; font-size: var(--fs-12); letter-spacing: .14em; color: var(--label); }
.shell-results a { display: flex; gap: 12px; align-items: center; padding: 8px; border-radius: var(--r-feld); color: var(--text); text-decoration: none; }
.shell-results a:hover, .shell-results a.sel { background: var(--chip); }
.shell-results small { display: block; color: var(--muted); font-size: var(--fs-12); }
.shell-results .pillen { display: flex; flex-wrap: wrap; gap: 6px; }
.shell-results .pille { padding: 2px 10px; border-radius: var(--r-pille); border: 1px solid var(--accent-line); color: var(--accent-text); font-size: var(--fs-13); }
.shell-results .assistent { margin: 4px 0 6px; padding: 14px 14px 12px; border-radius: var(--r-kachel); background: var(--chip); display: flex; flex-direction: column; gap: 10px; }
.shell-results .antwort { display: flex; gap: 10px; align-items: flex-start; font-size: var(--fs-14); line-height: 1.4; color: var(--text); }
.shell-results .antwort svg { width: 20px; height: 20px; flex-shrink: 0; color: var(--accent-text); margin-top: 1px; }
.shell-results .av-s { width: 32px; height: 32px; flex-shrink: 0; border-radius: var(--r-pille); background: var(--chip); display: inline-flex; align-items: center;
  justify-content: center; font-size: var(--fs-12); font-weight: 600; }
.shell-results a.alle { color: var(--accent-text); font-weight: 500; }
.shell-results .hint { padding: 10px 8px 2px; color: var(--muted); font-size: var(--fs-12); }
.shell-new { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r-pille);
  background: transparent; color: var(--accent-text); border: 1px solid var(--accent-line); font: 600 var(--fs-14) var(--sans); cursor: pointer; }
.shell-new span { font-size: var(--fs-20); line-height: 1; }
.shell-main { flex: 1; min-width: 0; }
.shell-tab { display: none; }
[hidden] { display: none !important; }

/* Menüknopf (24.18): eingeklappt bleibt eine schmale Leiste mit Symbolen */
.shell-menu { width: 44px; height: 44px; flex-shrink: 0; border-radius: var(--r-pille); border: 1px solid var(--control-line);
  background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.shell-menu svg { width: 20px; height: 20px; }
.shell-menu:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 2px; }
@media (min-width: 901px) {
  .shell.zu { --side-w: 76px; }
  .shell.zu .shell-side { padding: 22px 12px; align-items: center; }
  .shell.zu .shell-brand .logo-rahmen { width: 46px; height: 42px; }
  .shell.zu .shell-brand img { height: 42px; }
  .shell.zu .shell-label, .shell.zu .shell-item > span:not(.count), .shell.zu .shell-me .who,
  .shell.zu #shell-theme { display: none; }
  .shell.zu .shell-brand { padding: 0 0 18px; justify-content: center; }
  .shell.zu .shell-item { width: 48px; justify-content: center; padding: 0; position: relative; }
  .shell.zu .shell-item .count { position: absolute; top: 2px; right: 0; margin: 0; padding: 0 5px; }
  .shell.zu .shell-foot { align-items: center; }
  .shell.zu .shell-me { padding: 12px 0 0; }
}

/* Bestehende Seiten im Rahmen: Logo steht in der Seitenleiste */
body.shell-on .top a:has(> img.logo) { display: none !important; }

/* Fenster "+ Neu" */
.shell-dialog { border: 1px solid var(--line); border-radius: var(--r-karte); background: var(--card); color: var(--text); padding: 28px;
  width: min(720px, calc(100vw - 32px)); box-sizing: border-box; }
.shell-dialog::backdrop { background: var(--overlay); }

/* Handy: Leiste unten mit Start, Kandidaten, Neu, Aufgaben, Mehr */
@media (max-width: 900px) {
  .shell-side { position: fixed; left: 0; top: 0; z-index: 40; transform: translateX(-100%); transition: transform .2s; }
  .shell.mehr .shell-side { transform: none; box-shadow: 0 0 0 100vmax var(--overlay); }
  .shell-top { padding: 12px 16px; }
  .shell-new { min-height: 44px; padding: 0 16px; }
  .shell-new b { display: none; }
  .shell-tab { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--sidebar);
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom, 0px)); justify-content: space-around; }
  .shell-tab a, .shell-tab button { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; font: var(--fs-12) var(--sans);
    color: var(--side-text); text-decoration: none; background: none; border: 0; padding: 4px; cursor: pointer; }
  .shell-tab [aria-current="page"] { color: var(--accent-text); }
  .shell-tab svg { width: 22px; height: 22px; }
  .shell-main { padding-bottom: 76px; }
}

/* Grünakzente: aktive Seite im Menü als Lime-Fläche (Connor, 06.11.2026) */
.shell-item[aria-current="page"] { background: var(--accent-fill); color: var(--on-accent); font-weight: 600; box-shadow: none; }
.shell-item[aria-current="page"] svg { color: var(--on-accent); }
.shell-tab [aria-current="page"] svg { color: var(--accent-text); }

/* Menü weich ein- und ausklappen (Team-Anmerkung 10.11.2026): Breite gleitet, Beschriftungen blenden aus statt zu springen */
@property --side-w { syntax: "<length>"; inherits: true; initial-value: 264px; }
@media (min-width: 901px) {
  .shell { transition: --side-w 280ms cubic-bezier(.2, .7, .2, 1); }
  .shell-side { transition: padding 280ms cubic-bezier(.2, .7, .2, 1); overflow-x: hidden; }
  .shell-item > span:not(.count), .shell-label, .shell-me .who, #shell-theme {
    transition: opacity 180ms ease, max-width 280ms ease; white-space: nowrap; overflow: hidden; }
  .shell.zu .shell-label, .shell.zu .shell-item > span:not(.count), .shell.zu .shell-me .who, .shell.zu #shell-theme {
    display: inline-block !important; opacity: 0; max-width: 0; pointer-events: none; }
  .shell.zu .shell-label, .shell.zu #shell-theme { display: block !important; height: 0; margin: 0; padding: 0; }
  .shell-item { transition: width 280ms cubic-bezier(.2, .7, .2, 1), padding 280ms ease, background-color var(--dauer) ease; }
}
@media (prefers-reduced-motion: reduce) { .shell, .shell-side, .shell-item, .shell-item > span { transition: none !important; } }
