/* primover — Oberfläche. Ein Stylesheet, kein Build-Schritt.
   Farben nur über die Tokens unten: hell ist der Grundfall, dunkel gilt bei dunklem Gerät oder eigener Wahl
   (<html data-theme="light|dark">, sonst entscheidet das Gerät). Jeder Kasten mit data-theme zeigt seinen Modus.
   Die Seite „Farben und Bausteine“ liest die Werte aus dieser Datei (App\Support\DesignTokens): Zwischen
   „tokens:…“ und „tokens:end“ steht je Zeile genau ein „--name: wert;“. Beide Dunkel-Blöcke bleiben gleich. */

/* tokens:light */
:root, [data-theme="light"] {
  color-scheme: light;
  --bg: #F4F6FA;
  --seite: #ECF0F6;
  --fl: #FFFFFF;
  --fl-2: #E6EBF3;
  --fl-3: #DCE3EE;
  --linie: #E1E6EF;
  --linie-2: #CBD3E1;
  --text: #0B1220;
  --text-2: #2C3850;
  --text-3: #46526A;
  --text-4: #5A667C;
  --mint: #4DF0C0;
  --mint-hover: #3BE3B3;
  --mint-kante: #2FD3A3;
  --mint-ink: #066F53;
  --auf-mint: #04120D;
  --mint-fl: #E2F8F0;
  --mint-rand: #A9E9D4;
  --koralle-ink: #B13F1E;
  --bernstein-ink: #8A5300;
  --lavendel-ink: #3A51C2;
  --lavendel-fl: #E9EDFF;
  --krit-ink: #B3261E;
  --warn-fl: #FFF5D6;
  --krit-fl: #FDE8E6;
  --balken-mint: #14B88A;
  --balken-koralle: #F2764F;
  --balken-bernstein: #E9A23B;
  --balken-lavendel: #6F86F0;
  --schatten: 0 18px 40px -24px rgba(16, 24, 40, .22);
  --ring: 0 0 0 3px rgba(6, 111, 83, .22);
  --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%235A667C' stroke-width='1.6'/%3E%3C/svg%3E");
}
/* tokens:end */

/* tokens:dark-system */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #070B14;
    --seite: #0A0F1C;
    --fl: #0D1322;
    --fl-2: #121A2C;
    --fl-3: #18223A;
    --linie: #1C2740;
    --linie-2: #2A3753;
    --text: #EEF2FA;
    --text-2: #C9D1E0;
    --text-3: #AEB7C9;
    --text-4: #8A94A8;
    --mint: #4DF0C0;
    --mint-hover: #7AF5D2;
    --mint-kante: #4DF0C0;
    --mint-ink: #4DF0C0;
    --auf-mint: #04120D;
    --mint-fl: #0D1A18;
    --mint-rand: #1E3A33;
    --koralle-ink: #FF9B7A;
    --bernstein-ink: #FFC78A;
    --lavendel-ink: #9DB2FF;
    --lavendel-fl: #161D36;
    --krit-ink: #FF8A80;
    --warn-fl: #2A2410;
    --krit-fl: #2A1418;
    --balken-mint: #4DF0C0;
    --balken-koralle: #FF9B7A;
    --balken-bernstein: #FFC78A;
    --balken-lavendel: #9DB2FF;
    --schatten: 0 18px 40px -24px rgba(0, 0, 0, .6);
    --ring: 0 0 0 3px rgba(77, 240, 192, .35);
    --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238A94A8' stroke-width='1.6'/%3E%3C/svg%3E");
  }
}
/* tokens:end */

/* tokens:dark */
[data-theme="dark"] {
  color-scheme: dark;
  --bg: #070B14;
  --seite: #0A0F1C;
  --fl: #0D1322;
  --fl-2: #121A2C;
  --fl-3: #18223A;
  --linie: #1C2740;
  --linie-2: #2A3753;
  --text: #EEF2FA;
  --text-2: #C9D1E0;
  --text-3: #AEB7C9;
  --text-4: #8A94A8;
  --mint: #4DF0C0;
  --mint-hover: #7AF5D2;
  --mint-kante: #4DF0C0;
  --mint-ink: #4DF0C0;
  --auf-mint: #04120D;
  --mint-fl: #0D1A18;
  --mint-rand: #1E3A33;
  --koralle-ink: #FF9B7A;
  --bernstein-ink: #FFC78A;
  --lavendel-ink: #9DB2FF;
  --lavendel-fl: #161D36;
  --krit-ink: #FF8A80;
  --warn-fl: #2A2410;
  --krit-fl: #2A1418;
  --balken-mint: #4DF0C0;
  --balken-koralle: #FF9B7A;
  --balken-bernstein: #FFC78A;
  --balken-lavendel: #9DB2FF;
  --schatten: 0 18px 40px -24px rgba(0, 0, 0, .6);
  --ring: 0 0 0 3px rgba(77, 240, 192, .35);
  --pfeil: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4' fill='none' stroke='%238A94A8' stroke-width='1.6'/%3E%3C/svg%3E");
}
/* tokens:end */

:root {
  --f-display: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --f-text: 'Geist', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, Menlo, monospace;

  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 24px; --s-6: 32px; --s-7: 48px;
  --r-1: 10px; --r-2: 16px; --r-3: 20px; --r-4: 24px; --r-pill: 999px;
  --foot-h: 46px;
}

/* Jeder Kasten mit eigenem Modus malt seinen Grund selbst. */
[data-theme] { background: var(--bg); color: var(--text); }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  accent-color: var(--mint-ink);
  font-family: var(--f-text);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--mint-ink); text-underline-offset: 2px; }
a:hover { color: var(--text); }
:focus-visible { outline: none; box-shadow: var(--ring); }
img, svg { max-width: 100%; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { margin: 0; }
code, kbd { font-family: var(--f-mono); font-size: .86em; }
hr { border: 0; border-top: 1px solid var(--linie); margin: var(--s-5) 0; }
::selection { background: var(--mint); color: var(--auf-mint); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Marke ---------- */
.wordmark { display: inline-flex; align-items: center; gap: .45em; font-family: var(--f-display); font-weight: 650; letter-spacing: -0.03em; line-height: 1; color: var(--text); text-decoration: none; }
.wordmark:hover { color: var(--text); }
.wordmark svg { flex: none; height: 1.2em; width: calc(1.2em * 43 / 50); }
.symbol-dot { fill: var(--mint-ink); }
.label { font-family: var(--f-mono); font-size: 11px; font-weight: 400; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
.muted { color: var(--text-3); }
.small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------- App-Rahmen (Launchpad): obere Leiste mit App-Umschalter, kein Seitenmenü ---------- */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.lp-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 20px; background: var(--fl); border-bottom: 1px solid var(--linie); }
.lp-bar .wordmark { font-size: 19px; flex: none; }
.lp-switch { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; padding: 0; border: 0; border-radius: 12px; background: var(--fl-2); color: var(--text-2); cursor: pointer; }
.lp-switch:hover, .lp-switch[aria-expanded="true"] { background: var(--fl-3); color: var(--text); }
.lp-switch .app-icon { width: 20px; height: 20px; }
.lp-ws { min-width: 0; max-width: 24ch; font-size: 13px; color: var(--text-4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-crumb { color: var(--text-4); }
.lp-here { display: inline-flex; align-items: center; gap: 8px; min-width: 0; font-size: 14.5px; font-weight: 650; color: var(--text); text-decoration: none; }
.lp-here:hover { color: var(--text); }
.lp-here > span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp-bar-end { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.lp-bar .search-open { width: 240px; min-height: 40px; padding: 0 14px; border-color: transparent; border-radius: var(--r-pill); background: var(--fl-2); }
.lp-bar .search-open > span { flex: 1; text-align: left; }
.search-open .app-icon { width: 16px; height: 16px; }
.lp-me { display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.lp-me:hover { background: var(--fl-2); }
.lp-me .avatar { width: 36px; height: 36px; font-size: 12px; }
.main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; box-sizing: border-box; min-width: 0; padding: 28px 32px 48px; display: flex; flex-direction: column; gap: 24px; }
/* CRM (seit 0.9.0): ganze Breite und eigene Leiste unter der oberen Leiste (Entwurf A „Rollen-Start“). */
.main.is-wide { max-width: none; padding-left: 28px; padding-right: 28px; }
.crm-bar { position: sticky; top: 60px; z-index: 19; display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--fl); border-bottom: 1px solid var(--linie); }
.crm-bar-tabs { display: flex; gap: 2px; flex: 0 1 auto; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.crm-bar-tabs::-webkit-scrollbar { display: none; }
.crm-bar-tabs a { padding: 13px 11px 11px; color: var(--text-3); text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.crm-bar-tabs a:hover { color: var(--text); }
.crm-bar-tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--mint-ink); }
.crm-bar-tabs a:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.crm-bar-more { position: relative; flex: none; }
.crm-bar-more > summary { display: flex; align-items: center; gap: 4px; padding: 13px 10px 11px; color: var(--text-3); font-size: 14px; font-weight: 600; cursor: pointer; list-style: none; border-bottom: 2px solid transparent; white-space: nowrap; }
.crm-bar-more > summary::-webkit-details-marker { display: none; }
.crm-bar-more > summary:hover, .crm-bar-more[open] > summary { color: var(--text); }
.crm-bar-more > summary:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.crm-bar-more > summary svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.crm-bar-more[open] > summary svg { transform: rotate(180deg); }
.crm-bar-more-menu { position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; display: flex; flex-direction: column; min-width: 210px; padding: 6px; border-radius: var(--r-2); background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie), var(--schatten); }
.crm-bar-more-menu a { padding: 9px 12px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 14px; font-weight: 550; }
.crm-bar-more-menu a:hover, .crm-bar-more-menu a:focus-visible { background: var(--fl-2); outline: none; }
@media (prefers-reduced-motion: reduce) { .crm-bar-more > summary svg { transition: none; } }
.crm-bar-end { display: flex; gap: 8px; flex: none; padding: 6px 0; margin-left: auto; }
.crm-bar-end .btn .app-icon { width: 16px; height: 16px; }
@media (max-width: 900px) {
  .main.is-wide { padding-left: 16px; padding-right: 16px; }
  .crm-bar { padding: 0 8px; top: 60px; gap: 4px; }
  .crm-bar-end .btn-secondary { display: none; }
  /* Reiter scrollen seitlich; der Verlauf am Rand zeigt, dass es weitergeht. */
  .crm-bar-more-menu { left: auto; right: 0; max-width: calc(100vw - 32px); }
  .crm-bar-tabs { mask-image: linear-gradient(to right, var(--text) calc(100% - 28px), transparent); -webkit-mask-image: linear-gradient(to right, var(--text) calc(100% - 28px), transparent); padding-right: 20px; }
}
@media (max-width: 600px) {
  .crm-bar-end .crm-bar-label { display: none; }
  .crm-bar-end .btn { padding-left: 10px; padding-right: 10px; }
}

/* Zeichen einer App (components/app-icon) in einem Feld mit dem Ton der App. */
.app-icon { width: 22px; height: 22px; flex: none; }
.lp-icon { display: inline-grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 16px; }
.lp-icon .app-icon { width: 26px; height: 26px; }
.lp-icon-sm { width: 30px; height: 30px; border-radius: 9px; }
.lp-icon-sm .app-icon { width: 17px; height: 17px; }
.lp-icon.tone-mint, .lp-band.tone-mint { background: var(--mint-fl); color: var(--mint-ink); }
.lp-icon.tone-lav, .lp-band.tone-lav { background: var(--lavendel-fl); color: var(--lavendel-ink); }
.lp-icon.tone-kor, .lp-band.tone-kor { background: var(--krit-fl); color: var(--koralle-ink); }
.lp-icon.tone-bern, .lp-band.tone-bern { background: var(--warn-fl); color: var(--bernstein-ink); }
.lp-icon.tone-grau, .lp-band.tone-grau { background: var(--fl-2); color: var(--text-2); }

/* App-Umschalter: Fenster oben links mit allen Apps; Klick daneben schließt (data-light-dismiss). */
dialog.lp-switcher { position: fixed; inset: 66px auto auto 12px; margin: 0; width: min(680px, calc(100vw - 24px)); max-width: none; max-height: calc(100vh - 78px - var(--foot-h)); overflow-y: auto; box-shadow: var(--schatten), 0 30px 70px -30px rgba(7, 11, 20, .35); }
dialog.lp-switcher::backdrop, dialog.lp-menu::backdrop { background: rgba(7, 11, 20, .18); }
.lp-switcher-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 14px 4px 22px; }
.lp-switcher-head h2 { font-family: var(--f-display); font-size: 17px; font-weight: 650; letter-spacing: -0.02em; }
.lp-nav { padding: 6px 14px 18px; gap: 16px; }
.lp-nav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 2px; }
.lp-nav a { min-height: 44px; padding: 0 8px; }
.lp-nav a::after { display: none; }
.lp-nav a[aria-current="page"] { box-shadow: inset 2px 0 0 var(--mint-ink); }
.lp-nav a.lp-feature { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 12px 14px; margin-bottom: 6px; border-radius: var(--r-2); background: var(--lavendel-fl); box-shadow: inset 0 0 0 1px var(--linie-2); color: var(--text); text-decoration: none; }
.lp-nav a.lp-feature:hover { box-shadow: inset 0 0 0 1px var(--lavendel-ink); }
.lp-nav a.lp-feature[aria-current="page"] { box-shadow: inset 0 0 0 2px var(--lavendel-ink); }
.lp-feature-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-feature-text b { font-family: var(--f-display); font-size: 17px; }
/* Hauptkachel CRM auf der Startseite (seit 0.9.0). */
.lp-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr); gap: 20px; padding: 22px; border-radius: var(--r-3); background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); }
.lp-main-head { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.lp-main-head .lp-app-top { display: flex; align-items: center; gap: 12px; }
.lp-main-head h2 { margin: 0; font-family: var(--f-display); font-size: 26px; letter-spacing: -0.03em; }
.lp-main-head a.lp-main-title { color: var(--text); text-decoration: none; }
.lp-main-head a.lp-main-title:hover { text-decoration: underline; }
.lp-main-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.lp-main-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: 12px; }
.lp-main-figures a { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: var(--r-2); background: var(--fl-2); color: var(--text); text-decoration: none; min-width: 0; }
.lp-main-figures a:hover { box-shadow: inset 0 0 0 1px var(--mint-rand); }
.lp-main-figures a:focus-visible, .lp-main-head a:focus-visible { outline: none; box-shadow: var(--ring); }
.lp-main-figures strong { font-family: var(--f-display); font-size: 24px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.lp-main-figures .lbl { font-size: 12.5px; color: var(--text-3); }
.lp-main-figures .is-alert strong { color: var(--bernstein-ink); }
@media (max-width: 900px) { .lp-main { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.lp-nav-label { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.lp-nav .plan-chip { flex: none; }
.lp-nav .nav-locked { color: var(--text-3); }
.lp-nav .nav-locked .lock-icon { flex: none; width: 14px; height: 14px; margin-left: auto; }
.nav { display: flex; flex-direction: column; gap: 14px; font-size: 14px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-group > .label { padding: 6px 10px; }
.nav a { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 0 10px; border-radius: var(--r-1); color: var(--text-2); text-decoration: none; }
.nav a::after { content: ""; width: 6px; height: 6px; margin-left: auto; border-radius: 50%; flex: none; }
.nav a:hover { background: var(--fl-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--fl-2); color: var(--text); font-weight: 600; }
.nav a[aria-current="page"]::after { background: var(--mint-ink); }

/* Konto-Menü oben rechts. */
dialog.lp-menu { position: fixed; inset: 66px 12px auto auto; margin: 0; width: min(320px, calc(100vw - 24px)); max-width: none; box-shadow: var(--schatten), 0 30px 70px -30px rgba(7, 11, 20, .35); }
.lp-menu-body { display: flex; flex-direction: column; gap: 10px; padding: 12px; }
.lp-menu-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 2px 0; }
.lp-menu .linkbutton { color: var(--text-3); font-size: 13px; padding: 0 10px; min-height: 36px; text-decoration: none; }
.lp-menu .linkbutton:hover { color: var(--text); text-decoration: underline; }
.me { display: flex; align-items: center; gap: 10px; margin: 0; padding: 10px; border: 1px solid var(--linie); border-radius: 12px; background: var(--fl); color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 600; }
.me:hover { border-color: var(--linie-2); color: var(--text); }
.me span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.me small { color: var(--text-4); font-size: 12px; font-weight: 400; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-box { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--linie); border-radius: 12px; background: var(--fl); color: var(--text); text-decoration: none; font-size: 13px; }
.ai-box:hover { border-color: var(--mint-rand); color: var(--text); }
.ai-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ai-row .on { display: inline-flex; align-items: center; gap: 7px; color: var(--mint-ink); font-family: var(--f-mono); font-size: 11px; }
.ai-row .on::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--mint-ink); box-shadow: 0 0 0 3px var(--mint-fl); }

@media (max-width: 900px) {
  .lp-bar { gap: 8px; padding: 8px 12px; }
  .lp-ws, .lp-crumb { display: none; }
  .lp-bar .search-open { width: 44px; height: 44px; min-height: 44px; padding: 0; justify-content: center; }
  .lp-bar .search-open > span, .lp-bar .search-open kbd { display: none; }
  .main { padding: 20px 16px 40px; }
  dialog.lp-switcher { inset: 64px 8px auto 8px; width: auto; }
}
@media (max-width: 520px) {
  .lp-here > span:last-child { display: none; }
}

/* ---------- Startseite (Launchpad) ---------- */
.lp-hero { display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 28px 0 8px; text-align: center; }
.lp-title { font-family: var(--f-display); font-size: clamp(30px, 4.4vw, 44px); line-height: 1.06; font-weight: 600; letter-spacing: -0.04em; text-wrap: balance; }
.lp-search { display: flex; align-items: center; gap: 12px; width: 100%; max-width: 680px; min-height: 58px; padding: 0 20px; border: 1px solid var(--linie-2); border-radius: 18px; background: var(--fl); box-shadow: var(--schatten); color: var(--text-4); font: inherit; font-size: 16.5px; text-align: left; cursor: text; }
.lp-search:hover { border-color: var(--mint-rand); color: var(--text-3); }
.lp-search .app-icon { width: 20px; height: 20px; }
.lp-search > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-search kbd { font-size: 11px; }
.lp-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.lp-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; padding: 0 15px; border: 1px solid var(--linie-2); border-radius: var(--r-pill); background: var(--fl); color: var(--text-2); font: inherit; font-size: 13.5px; font-weight: 600; text-decoration: none; cursor: pointer; }
.lp-chip:hover { border-color: var(--mint-ink); color: var(--text); }
.lp-chip .app-icon { width: 16px; height: 16px; color: var(--mint-ink); }

.lp-foryou, .lp-group { display: flex; flex-direction: column; gap: 12px; }
.lp-foryou-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.lp-card { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--r-3); background: var(--fl); color: var(--text); text-decoration: none; }
button.lp-card { width: 100%; font: inherit; text-align: left; cursor: pointer; }
a.lp-card:hover, button.lp-card:hover { color: var(--text); border-color: var(--mint-rand); box-shadow: var(--schatten); }
.lp-card-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lp-card-text b { font-size: 14.5px; font-weight: 650; }
.lp-card-text .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp-count { display: inline-grid; place-items: center; flex: none; min-width: 46px; height: 46px; padding: 0 10px; box-sizing: border-box; border-radius: 14px; background: var(--mint-fl); color: var(--mint-ink); font-family: var(--f-mono); font-size: 19px; }
.lp-count.is-urgent { background: var(--krit-fl); color: var(--koralle-ink); }
.lp-item { font-size: 13.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.lp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.lp-app { display: flex; flex-direction: column; gap: 14px; min-height: 164px; padding: 20px; box-sizing: border-box; border: 1px solid var(--linie); border-radius: 22px; background: var(--fl); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.lp-app:hover { color: var(--text); border-color: var(--mint-rand); box-shadow: var(--schatten); transform: translateY(-1px); }
.lp-app-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.lp-app-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.lp-app-name b { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.lp-about { font-size: 13.5px; line-height: 1.45; color: var(--text-3); }
.lp-app.is-locked { background: var(--seite); }
.lp-app.is-locked .lp-icon { opacity: .7; }
.lp-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); }
.lp-pearl { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 26px; padding: 0 9px; box-sizing: border-box; border-radius: var(--r-pill); font-family: var(--f-mono); font-size: 12px; }
.lp-pearl.is-open { background: var(--mint-fl); color: var(--mint-ink); }
.lp-pearl.is-new { background: var(--lavendel-fl); color: var(--lavendel-ink); }
.lp-pearl.is-urgent { background: var(--krit-fl); color: var(--koralle-ink); }
.lp-mcp { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border: 1px solid var(--mint-rand); border-radius: var(--r-pill); color: var(--mint-ink); font-family: var(--f-mono); font-size: 10.5px; }
.lp-ai { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin: 4px 0 0; }
@media (prefers-reduced-motion: reduce) { .lp-app, .lp-board { transition: none; } .lp-app:hover, .lp-board:hover { transform: none; } }

/* ---------- Boards-Übersicht (Launchpad) ---------- */
.lp-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.lp-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.lp-filter a[aria-current="page"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.lp-system { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); overflow: hidden; border: 1px solid var(--mint-rand); border-radius: 26px; background: var(--bg); color: var(--text); text-decoration: none; }
.lp-system-main { display: flex; flex-direction: column; gap: 16px; padding: 26px 28px; }
.lp-system-main a { color: inherit; text-decoration: none; }
.lp-system-title { display: flex; align-items: center; gap: 12px; }
.lp-system-title b { display: block; font-size: 24px; font-weight: 650; letter-spacing: -0.02em; }
.lp-system .lp-icon { background: var(--mint); color: var(--auf-mint); }
.lp-system-text { max-width: 52ch; margin: 0; font-size: 14.5px; line-height: 1.5; color: var(--text-3); }
.lp-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.lp-stat { display: flex; flex-direction: column; }
.lp-stat b { font-family: var(--f-mono); font-size: 28px; font-weight: 400; }
.lp-stat span { font-size: 12.5px; color: var(--text-3); }
.lp-stat .is-bad { color: var(--koralle-ink); }
.lp-stat .is-mine { color: var(--mint-ink); }
.lp-faces { display: inline-flex; align-items: center; }
.lp-faces .avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--fl); }
.lp-faces .avatar:first-child { margin-left: 0; }
.lp-faces .lp-more { margin-left: 6px; font-family: var(--f-mono); font-size: 11.5px; color: var(--text-4); }
.lp-system .lp-faces .avatar { box-shadow: 0 0 0 2px var(--bg); }
.lp-next { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px; border-left: 1px solid var(--linie); background: var(--fl); }
.lp-next ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lp-next li > a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--fl-2); color: var(--text); text-decoration: none; }
.lp-next li > a:hover { background: var(--fl-3); }
.lp-next > a.small { align-self: flex-start; margin-top: 4px; }
.lp-next .grow { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lp-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.lp-board { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--linie); border-radius: 22px; background: var(--fl); color: var(--text); text-decoration: none; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.lp-board:hover { color: var(--text); border-color: var(--mint-rand); box-shadow: var(--schatten); transform: translateY(-1px); }
.lp-band { position: relative; display: block; height: 60px; }
.lp-band .lp-icon { position: absolute; left: 20px; bottom: -22px; width: 46px; height: 46px; border-radius: 14px; background: var(--fl); color: var(--text); box-shadow: 0 0 0 1px var(--linie); }
.lp-band .app-icon { width: 22px; height: 22px; }
.lp-board-body { display: flex; flex-direction: column; gap: 12px; padding: 32px 20px 18px; flex: 1; }
.lp-board-body b { font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.lp-board-desc { display: block; margin-top: 4px; font-size: 13px; color: var(--text-3); }
.lp-faces-end { margin-left: auto; }
.lp-new-sub { font-weight: 400; }
.lp-board-foot { display: flex; align-items: center; gap: 16px; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--linie); font-size: 13px; color: var(--text-3); }
.lp-board-foot b { font-family: var(--f-mono); font-size: 15px; font-weight: 400; color: var(--text); }
.lp-board-foot .is-bad { color: var(--koralle-ink); }
.lp-board-foot .lp-faces { margin-left: auto; }
.lp-board .ai-tag { position: absolute; top: 12px; right: 12px; }
.lp-new { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 200px; border: 1.5px dashed var(--linie-2); border-radius: 22px; background: none; color: var(--text-3); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }
.lp-new:hover { border-color: var(--mint-ink); color: var(--text); }
.lp-new .app-icon { width: 26px; height: 26px; color: var(--mint-ink); }
@media (max-width: 760px) {
  .lp-system { grid-template-columns: 1fr; }
  .lp-next { border-left: 0; border-top: 1px solid var(--linie); }
}

/* ---------- Darstellung hell/dunkel ---------- */
.theme-switch { display: inline-flex; gap: 2px; margin: 0; padding: 3px; border: 1px solid var(--linie-2); border-radius: var(--r-pill); background: var(--fl); }
.theme-switch button { width: 34px; height: 28px; padding: 0; border: 0; border-radius: var(--r-pill); display: grid; place-items: center; background: transparent; color: var(--text-4); cursor: pointer; }
.theme-switch button:hover { color: var(--text); }
.theme-switch button[aria-pressed="true"] { background: var(--fl-3); color: var(--text); }
.theme-switch svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.theme-choice { border: 0; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); gap: 12px; }
.theme-option { display: flex; flex-direction: column; gap: 10px; padding: 12px; border-radius: var(--r-2); background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie-2); cursor: pointer; }
.theme-option:hover { box-shadow: inset 0 0 0 1px var(--text-4); }
.theme-option:has(input:checked) { box-shadow: inset 0 0 0 2px var(--mint-ink); }
.theme-option-name { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.theme-option-name input { width: 16px; height: 16px; margin: 0; }
.theme-option .hint { font-size: 12.5px; color: var(--text-3); }
.theme-preview { display: flex; height: 88px; border-radius: var(--r-1); overflow: hidden; box-shadow: inset 0 0 0 1px var(--linie-2); }
.theme-preview > span { flex: 1; display: grid; grid-template-columns: 30% 1fr; }
.theme-preview i { background: var(--seite); border-right: 1px solid var(--linie); }
.theme-preview b { display: flex; flex-direction: column; gap: 6px; padding: 10px; }
.theme-preview b span { height: 6px; border-radius: 3px; background: var(--fl-3); }
.theme-preview b span:first-child { width: 60%; background: var(--text-3); }
.theme-preview b span:last-child { width: 38%; height: 12px; border-radius: 6px; margin-top: auto; background: var(--mint); }
.theme-status { font-size: 13px; color: var(--mint-ink); font-weight: 600; min-height: 1.5em; }

/* ---------- Seitenkopf ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.page-head > div:first-child { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.crumb { font-size: 13px; color: var(--text-4); display: flex; gap: 6px; flex-wrap: wrap; }
.crumb a { color: var(--text-3); text-decoration: none; }
.crumb a:hover { color: var(--text); text-decoration: underline; }
.page-title { font-family: var(--f-display); font-weight: 650; font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; }
.page-sub { color: var(--text-3); max-width: 70ch; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
h2.section-title { font-family: var(--f-display); font-weight: 650; font-size: 18px; letter-spacing: -0.02em; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 20px; border: 1px solid var(--mint-kante); border-radius: var(--r-pill); background: var(--mint); color: var(--auf-mint); font: inherit; font-size: 14.5px; font-weight: 650; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color .15s, border-color .15s; }
.btn:hover { background: var(--mint-hover); color: var(--auf-mint); }
.btn-secondary { background: transparent; border-color: var(--linie-2); color: var(--text); }
.btn-secondary:hover { background: var(--fl-2); color: var(--text); }
.btn-dark { background: var(--text); border-color: var(--text); color: var(--bg); }
.btn-dark:hover { background: var(--text-2); border-color: var(--text-2); color: var(--bg); }
.btn-danger { background: transparent; border-color: var(--krit-ink); color: var(--krit-ink); }
.btn-danger:hover { background: var(--krit-fl); color: var(--krit-ink); }
.btn-small { min-height: 34px; padding: 0 14px; font-size: 13.5px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkbutton { background: none; border: 0; padding: 0; font: inherit; color: var(--mint-ink); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.linkbutton:hover { color: var(--text); }
.inline-form { display: inline; }

/* ---------- Formulare ---------- */
.form { display: flex; flex-direction: column; gap: 18px; max-width: 640px; }
.form-wide { max-width: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .field-label { font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 13px; color: var(--text-3); }
.field .error { font-size: 13px; color: var(--krit-ink); font-weight: 600; }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 16px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=search], input[type=url], input[type=tel], input[type=number], input[type=date], input[type=datetime-local], select, textarea {
  width: 100%; min-height: 44px; padding: 0 14px; border: 1px solid var(--linie-2); border-radius: 12px; background: var(--fl); color: var(--text); font: inherit; font-size: 15px;
}
input::placeholder, textarea::placeholder { color: var(--text-4); }
input:disabled, select:disabled, textarea:disabled { background: var(--fl-2); color: var(--text-3); }
textarea { padding: 12px 14px; min-height: 120px; line-height: 1.5; resize: vertical; }
textarea.tall { min-height: 340px; font-family: var(--f-mono); font-size: 13.5px; }
select { appearance: none; background-image: var(--pfeil); background-repeat: no-repeat; background-position: right 14px center; background-size: 14px; padding-right: 38px; }
input:focus, select:focus, textarea:focus { border-color: var(--mint-ink); outline: none; box-shadow: var(--ring); }
input[aria-invalid=true], select[aria-invalid=true], textarea[aria-invalid=true] { border-color: var(--krit-ink); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.code-input { font-family: var(--f-mono) !important; font-size: 22px !important; letter-spacing: .3em; text-align: center; max-width: 240px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.fieldset-box { margin: 0; padding: 16px; border: 1px solid var(--linie); border-radius: 12px; }

.search-short { width: 220px; }

/* ---------- Flächen ---------- */
.panel { background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); padding: 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-dark { background: var(--mint-fl); box-shadow: inset 0 0 0 1px var(--mint-rand); color: var(--text); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); gap: 20px; align-items: start; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; align-items: start; }
/* Breite Tabellen dürfen eine Spalte nicht über den Bildschirm drücken (Grid-Spalten haben sonst min-width: auto). */
.split > * { min-width: 0; }
@media (max-width: 1100px) { .split { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 12px; }
.cluster { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); color: var(--text); text-decoration: none; }
a.tile:hover { box-shadow: inset 0 0 0 1px var(--mint-rand), var(--schatten); color: var(--text); }
.tile-title { font-weight: 650; font-size: 15.5px; line-height: 1.35; }
.kpi { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); }
.kpi-value { font-family: var(--f-display); font-weight: 650; font-size: 28px; line-height: 1.15; letter-spacing: -0.035em; font-variant-numeric: tabular-nums; }
.kpi > .pill, .tile > .pill { align-self: flex-start; }
.empty { padding: 32px 20px; text-align: center; color: var(--text-3); background: var(--fl); border: 1px dashed var(--linie-2); border-radius: var(--r-2); display: flex; flex-direction: column; gap: 12px; align-items: center; }
.empty strong { color: var(--text); font-size: 16px; }

/* ---------- Listen und Tabellen ---------- */
/* position: relative hält versteckte Beschriftungen (.sr-only) im Scrollbereich; sonst wird die Seite auf dem Telefon
   breiter und die feste Fußzeile rutscht aus dem Bild. */
.table-wrap { position: relative; overflow-x: auto; background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); }
table.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); font-weight: 400; padding: 12px 14px; border-bottom: 1px solid var(--linie); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--linie); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table td.num, .table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table td.num { white-space: nowrap; }
.table a { color: var(--text); font-weight: 600; text-decoration: none; }
.table a:hover { color: var(--mint-ink); text-decoration: underline; }
.list { display: flex; flex-direction: column; background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); overflow: hidden; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--linie); color: var(--text); text-decoration: none; min-width: 0; }
.list-item:last-child { border-bottom: 0; }
a.list-item:hover { background: var(--fl-2); color: var(--text); }
.list-item .grow { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.list-item .grow > :first-child { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.feed { display: flex; flex-direction: column; }
.feed-item { display: flex; flex-direction: column; gap: 4px; padding: 12px 0; border-bottom: 1px solid var(--linie); font-size: 14px; }
.feed-item:last-child { border-bottom: 0; }
.feed-item .meta { font-size: 12.5px; color: var(--text-3); }

/* ---------- Kennzeichen ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--fl-3); color: var(--text-2); white-space: nowrap; }
.pill-good { background: var(--mint-fl); color: var(--mint-ink); }
.pill-warn { background: var(--warn-fl); color: var(--bernstein-ink); }
.pill-bad { background: var(--krit-fl); color: var(--krit-ink); }
.pill-info { background: var(--lavendel-fl); color: var(--lavendel-ink); }
.pill-dark { background: var(--text); color: var(--bg); }
.ai-tag { display: inline-flex; align-items: center; gap: 6px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; color: var(--lavendel-ink); text-transform: uppercase; }
.ai-tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--lavendel-ink); }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--mint-fl); box-shadow: inset 0 0 0 1px var(--mint-rand); color: var(--mint-ink); display: inline-flex; align-items: center; justify-content: center; font-family: var(--f-mono); font-size: 10.5px; font-weight: 600; flex: none; letter-spacing: .02em; }
.avatar-lg { width: 40px; height: 40px; font-size: 13px; }
.avatar-sm { width: 22px; height: 22px; font-size: 9px; }
/* Fester Ton je Name (App\Support\Avatar): tone-0 Mint, tone-1 Lavendel, tone-2 Bernstein, tone-3 Koralle. */
.avatar.tone-1 { background: var(--lavendel-fl); box-shadow: inset 0 0 0 1px var(--linie-2); color: var(--lavendel-ink); }
.avatar.tone-2 { background: var(--warn-fl); box-shadow: inset 0 0 0 1px var(--linie-2); color: var(--bernstein-ink); }
.avatar.tone-3 { background: var(--krit-fl); box-shadow: inset 0 0 0 1px var(--linie-2); color: var(--koralle-ink); }
.progress { height: 8px; background: var(--fl-3); border-radius: var(--r-pill); position: relative; overflow: hidden; min-width: 80px; }
.progress > span { position: absolute; inset: 0 auto 0 0; background: var(--text-3); border-radius: inherit; }
.progress.good > span { background: var(--balken-mint); }
.progress.warn > span { background: var(--balken-bernstein); }
.progress.bad > span { background: var(--balken-koralle); }

/* ---------- Meldungen ---------- */
.flash { padding: 12px 16px; border-radius: 12px; font-size: 14.5px; display: flex; gap: 10px; align-items: flex-start; background: var(--mint-fl); color: var(--mint-ink); box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 28%, transparent); font-weight: 600; }
.flash-error { background: var(--krit-fl); color: var(--krit-ink); }
.flash-info { background: var(--lavendel-fl); color: var(--text); font-weight: 500; }
.codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 20px; font-family: var(--f-mono); font-size: 14px; padding: 16px; background: var(--seite); box-shadow: inset 0 0 0 1px var(--linie); border-radius: 12px; }
.secret { font-family: var(--f-mono); font-size: 13px; word-break: break-all; padding: 10px 12px; background: var(--seite); box-shadow: inset 0 0 0 1px var(--linie); border-radius: 12px; }
/* QR-Codes brauchen in beiden Modi einen hellen Grund, sonst lesen Kameras sie schlecht. */
.qr { width: 200px; height: 200px; background: #FFFFFF; padding: 8px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--linie); }
.qr svg { width: 100%; height: 100%; display: block; }

/* ---------- Suche ⌘K (public/js/search.js) ---------- */
.search-open { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; min-height: 36px; padding: 0 10px; border: 1px solid var(--linie); border-radius: var(--r-1); background: var(--fl); color: var(--text-3); font: inherit; font-size: 13.5px; cursor: pointer; }
.search-open:hover { border-color: var(--linie-2); color: var(--text); }
.search-open kbd { font-size: 11px; color: var(--text-4); }
dialog.search-dialog { max-width: min(680px, calc(100vw - 32px)); margin-top: 10vh; }
.search-box { display: flex; flex-direction: column; }
.search-box input[type=search] { border: 0; border-bottom: 1px solid var(--linie); border-radius: var(--r-3) var(--r-3) 0 0; min-height: 56px; font-size: 17px; padding: 0 20px; box-shadow: none; }
.search-list { list-style: none; margin: 0; padding: 6px; max-height: min(60vh, 520px); overflow-y: auto; }
.search-group { padding: 10px 12px 4px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--text-4); }
.search-item { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: var(--r-1); cursor: pointer; }
.search-item.is-active { background: var(--fl-2); }
.search-text { display: flex; flex-direction: column; min-width: 0; }
.search-label { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-pill { flex: none; }
.search-empty { padding: 16px 12px; }
.search-hint { padding: 10px 20px; border-top: 1px solid var(--linie); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--linie); overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--text-3); text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--mint-ink); }

/* ---------- Dialog ---------- */
dialog { border: 1px solid var(--linie); border-radius: var(--r-3); padding: 0; max-width: min(640px, calc(100vw - 32px)); width: 100%; background: var(--fl); color: var(--text); box-shadow: 0 30px 70px -20px rgba(7, 11, 20, .45); }
/* ::backdrop erbt die Tokens nicht überall: fester Schleier, der in beiden Modi trägt. */
dialog::backdrop { background: rgba(7, 11, 20, .55); }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-head h2 { font-family: var(--f-display); font-weight: 650; font-size: 20px; letter-spacing: -0.025em; }
.dialog-close { background: none; border: 0; border-radius: var(--r-pill); font-size: 22px; line-height: 1; cursor: pointer; color: var(--text-3); padding: 4px 10px; }
.dialog-close:hover { background: var(--fl-2); color: var(--text); }

/* Einblendung von rechts (Anleitung, Chat aus der Fußzeile). display nur offen, sonst bliebe sie sichtbar. */
dialog.drawer { margin: 0 0 0 auto; width: 100%; max-width: min(480px, 100vw); height: 100vh; max-height: 100vh; border: 0; border-left: 1px solid var(--linie); border-radius: 0; }
dialog.drawer[open] { display: flex; flex-direction: column; }
dialog.drawer-wide { max-width: min(880px, 100vw); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px 10px 20px; border-bottom: 1px solid var(--linie); }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 24px 32px; }
.drawer-body > .list + p { margin: 16px 0 0; }
.drawer .chat-embedded { flex: 1; height: auto; min-height: 0; }

/* ---------- Fußzeile (in allen Seiten): Was ist neu, Anleitung · Change Request, Aufgabe, Chat, Notiz ---------- */
.app-foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 15; height: var(--foot-h); display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 12px; background: var(--seite); border-top: 1px solid var(--linie); }
.foot-side { display: flex; align-items: center; gap: 2px; min-width: 0; }
.foot-btn { position: relative; display: inline-flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px; border: 0; border-radius: var(--r-1); background: none; color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.foot-btn:hover, .foot-btn[aria-current=page] { background: var(--fl-2); color: var(--text); }
.foot-btn svg { flex: none; width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.release-version { font-family: var(--f-mono); font-size: 12px; color: var(--text-3); }
.foot-btn .release-version { font-weight: 400; }
.foot-release.is-new::after { content: ""; position: absolute; top: 5px; left: 21px; width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 2px var(--seite); }
.foot-badge { min-width: 18px; padding: 0 5px; border-radius: var(--r-pill); background: var(--mint); color: var(--auf-mint); font-family: var(--f-mono); font-size: 11px; font-weight: 400; line-height: 18px; text-align: center; }
.main { padding-bottom: calc(48px + var(--foot-h)); }
@media (max-width: 900px) {
  .app-foot { padding: 0 6px; }
  .main { padding-bottom: calc(40px + var(--foot-h)); }
}
/* Telefon: nur Zeichen, der Name bleibt für Screenreader. */
@media (max-width: 700px) {
  .foot-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .foot-btn { padding: 0 9px; }
}

/* ---------- Anleitungen (/anleitungen und Einblendung) ---------- */
.guide { display: flex; flex-direction: column; gap: 22px; max-width: 72ch; }
.guide-head { display: flex; flex-direction: column; gap: 6px; }
.guide-title { font-family: var(--f-display); font-size: 22px; font-weight: 650; letter-spacing: -0.025em; text-wrap: balance; }
.guide-purpose { color: var(--text-2); font-size: 15.5px; text-wrap: pretty; }
.guide-body h2 { font-size: 16px; margin-top: 8px; }
.guide-auto { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px; border-radius: var(--r-2); background: var(--seite); box-shadow: inset 0 0 0 1px var(--linie); }
.guide-auto-block { display: flex; flex-direction: column; gap: 8px; }
.guide-auto-block h4 { display: inline; font-size: 13.5px; font-weight: 650; }
.guide-auto-block summary { cursor: pointer; }
.guide-auto-block summary h4 .muted { font-weight: 400; }
.guide-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-tools code { padding: 2px 8px; border-radius: var(--r-1); background: var(--fl); font-family: var(--f-mono); font-size: 12px; color: var(--text-2); }
.guide-tools code.guide-tool-write { box-shadow: inset 0 0 0 1px var(--mint-rand); color: var(--text); }
.guide-list { display: flex; flex-direction: column; gap: 4px; margin: 0; padding-left: 18px; font-size: 14px; }
.guide-foot { border-top: 1px solid var(--linie); padding-top: 12px; }
.guide-search input { width: min(360px, 100%); }
.guide-index { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 12px; }
.guide-tile { display: flex; flex-direction: column; gap: 6px; padding: 16px; border-radius: var(--r-2); background: var(--fl); box-shadow: inset 0 0 0 1px var(--linie); color: var(--text); text-decoration: none; }
.guide-tile:hover { box-shadow: inset 0 0 0 1px var(--mint-rand); color: var(--text); }
.guide-tile strong { font-size: 15px; }
.guide-tile span { color: var(--text-3); font-size: 13.5px; line-height: 1.45; }
.guide-tile.is-current { box-shadow: inset 0 0 0 2px var(--mint-ink); }

/* ---------- Kanban (Boards) ---------- */
.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.kanban-col { display: flex; flex-direction: column; gap: 10px; background: var(--seite); box-shadow: inset 0 0 0 1px var(--linie); border-radius: var(--r-2); padding: 12px; min-height: 120px; }
.kanban-col-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.kanban-col-head .count { font-family: var(--f-mono); color: var(--text-4); font-weight: 400; }
.kanban-list { display: flex; flex-direction: column; gap: 10px; min-height: 40px; }
.kanban-card { background: var(--fl); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 10px; box-shadow: inset 0 0 0 1px var(--linie); color: var(--text); text-decoration: none; cursor: grab; }
.kanban-card:hover { box-shadow: inset 0 0 0 1px var(--mint-rand), var(--schatten); color: var(--text); }
.kanban-card.done { background: var(--fl-2); color: var(--text-3); }
.kanban-card .title { font-size: 14.5px; font-weight: 600; line-height: 1.35; }
.kanban-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); }
.kanban-card.dragging { opacity: .45; }
.kanban-list.drop-target { outline: 2px dashed var(--mint-ink); outline-offset: 4px; border-radius: 12px; }
.kanban-link { display: flex; gap: 6px; flex-wrap: wrap; color: var(--text-2); line-height: 1.35; }
.card-link { display: flex; flex-direction: row; gap: 8px; align-items: baseline; flex-wrap: wrap; margin: 0; }

/* Umschalter zwischen Ansichten (z. B. Aufgaben: Board | Liste) */
.segmented { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-1); background: var(--fl-2); }
.segmented a { padding: 6px 12px; border-radius: calc(var(--r-1) - 3px); color: var(--text-3); text-decoration: none; font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.segmented a:hover { color: var(--text); }
.segmented a[aria-current="page"] { background: var(--fl); color: var(--text); box-shadow: inset 0 0 0 1px var(--linie); }
.tasks-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.tasks-others { max-width: 720px; }
.due-over { color: var(--krit-ink); font-weight: 650; }

/* ---------- Text aus Markdown ---------- */
.prose { max-width: 72ch; line-height: 1.65; color: var(--text-2); }
.prose > * + * { margin-top: .9em; }
.prose h1, .prose h2, .prose h3 { font-family: var(--f-display); font-weight: 650; color: var(--text); letter-spacing: -0.025em; margin-top: 1.4em; }
.prose h1 { font-size: 24px; } .prose h2 { font-size: 20px; } .prose h3 { font-size: 17px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose blockquote { margin: 0; padding-left: 14px; border-left: 3px solid var(--linie-2); color: var(--text-3); }
.prose pre { background: var(--seite); color: var(--text); box-shadow: inset 0 0 0 1px var(--linie); border-radius: 12px; padding: 14px; overflow-x: auto; font-size: 13px; }
.prose code { background: var(--fl-2); padding: 1px 5px; border-radius: 6px; }
.prose pre code { background: none; padding: 0; }
.prose table { border-collapse: collapse; } .prose th, .prose td { border: 1px solid var(--linie); padding: 6px 10px; }

/* ---------- Anmeldung (ohne App-Rahmen) ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); background: var(--bg); }
.auth-brand { background: radial-gradient(120% 80% at 20% 0%, color-mix(in srgb, var(--mint) 12%, var(--bg)) 0%, var(--bg) 55%); color: var(--text); border-right: 1px solid var(--linie); padding: 40px 56px; display: flex; flex-direction: column; justify-content: space-between; gap: 40px; }
.auth-brand .wordmark { font-size: 20px; }
.auth-pitch { display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.auth-badge { align-self: flex-start; display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--linie-2); background: var(--fl); font-size: 13px; color: var(--text-2); }
.auth-claim { font-family: var(--f-display); font-weight: 650; font-size: clamp(38px, 4.4vw, 56px); line-height: 1.02; letter-spacing: -0.045em; }
.auth-claim em { font-style: normal; color: var(--mint-ink); }
.auth-lede { font-size: 17px; color: var(--text-3); max-width: 44ch; }
.auth-meta { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--text-4); }
.auth-form { display: flex; flex-direction: column; gap: 16px; padding: 24px 32px; }
.auth-form-head { display: flex; justify-content: flex-end; min-height: 36px; }
.auth-form-body { flex: 1; display: grid; place-items: center; padding: 16px 0; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.auth-card h1 { font-family: var(--f-display); font-weight: 650; font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; }
.auth-card .form { max-width: none; }
.auth-card .btn { width: 100%; }
.auth-foot { font-size: 13.5px; color: var(--text-3); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-legal { text-align: center; font-size: 13px; color: var(--text-4); }
.auth-legal a { color: var(--text-3); }
@media (max-width: 860px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 20px 16px; gap: 16px; border-right: 0; border-bottom: 1px solid var(--linie); }
  .auth-badge, .auth-lede, .auth-meta { display: none; }
  .auth-claim { font-size: 34px; }
  .auth-form { padding: 16px; }
}

/* ---------- Betreiber-Konsole ---------- */
.admin-bar { background: var(--seite); border-bottom: 1px solid var(--linie); color: var(--text); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.admin-bar .wordmark { font-size: 19px; }
.admin-bar nav { display: flex; gap: 2px; font-size: 14px; flex-wrap: wrap; align-items: center; }
.admin-bar nav a { color: var(--text-2); text-decoration: none; padding: 6px 10px; border-radius: var(--r-1); }
.admin-bar nav a:hover { background: var(--fl-2); color: var(--text); }
.admin-bar nav a[aria-current="page"] { background: var(--fl-2); color: var(--text); font-weight: 600; }
.admin-bar .linkbutton { color: var(--text-3); text-decoration: none; padding: 6px 10px; }
.admin-bar .theme-switch { margin-left: 8px; }
.admin-main { max-width: 1200px; margin: 0 auto; padding: 28px 24px 48px; display: flex; flex-direction: column; gap: 22px; }
.admin-badge { font-family: var(--f-mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; background: var(--mint-fl); color: var(--mint-ink); box-shadow: inset 0 0 0 1px var(--mint-rand); padding: 3px 9px; border-radius: var(--r-pill); }
.admin-kpi { color: var(--text); text-decoration: none; }
.admin-kpi:hover { box-shadow: inset 0 0 0 1px var(--mint-rand); color: var(--text); }
.admin-decision > details { border-top: 1px solid var(--linie); padding-top: 12px; }
.admin-decision > details > summary { cursor: pointer; font-weight: 650; }
.admin-decision > details[open] > summary { margin-bottom: 12px; }

/* ---------- Rechtstexte (ohne App-Rahmen) ---------- */
.site-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 40px; border-bottom: 1px solid var(--linie); }
.site-head .wordmark { font-size: 19px; }
.site-main { max-width: 760px; margin: 0 auto; padding: 40px 24px 64px; }
.site-foot { padding: 24px 40px; border-top: 1px solid var(--linie); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13.5px; color: var(--text-3); }
.site-foot a { color: var(--text-3); }
@media (max-width: 860px) {
  .site-head, .site-foot { padding-left: 16px; padding-right: 16px; }
  .site-main { padding: 28px 16px 48px; }
}
