/* ==========================================================================
   Silence Team Panel – Designsystem v3 („Konsole“)
   Idee: ruhige, tiefviolette Arbeitsfläche. Struktur entsteht durch Flächenstufen und Haarlinien, nicht durch verschachtelte Kästen.
   Eine Stelle darf laut sein: das Lagebild im Dashboard. Alles andere bleibt zurückhaltend.
   Inhalt: 1 Tokens · 2 Basis & Typografie · 3 Shell · 4 Bausteine · 5 Formulare · 6 Daten (Tabellen, Kanban) · 7 Overlays · 8 Dashboard
          9 Teamstruktur · 10 Sonstiges · 11 Responsive · 12 Barrierefreiheit
   ========================================================================== */

/* 1 · Tokens ------------------------------------------------------------- */
:root {
  /* Flächenstufen (von hinten nach vorn) */
  --canvas: #0a0912; --surface: #100e1a; --raised: #171424; --raised-2: #1e1a2f; --float: #221e37;
  --line: rgba(190, 175, 255, .09); --line-strong: rgba(190, 175, 255, .17); --line-focus: rgba(190, 175, 255, .3);
  /* Text */
  --text: #eeebf8; --text-2: #b6b0cc; --text-3: #8f89aa;
  /* Marke & Signale */
  --violet: #8b5cf6; --violet-hi: #bcabff; --violet-wash: rgba(139, 92, 246, .14);
  /* Theme-Tokens: wechseln mit html[data-theme]; --accent-btn/--on-accent sichern den Kontrast gefüllter Flächen */
  --accent-rgb: 139, 92, 246; --accent-deep-rgb: 106, 62, 224; --accent-btn: #7c4af0; --on-accent: #fff; --logo-1: #9a72fb; --logo-2: #6a3ee0;
  --amber: #f5b84a; --mint: #4fd1a1; --rose: #f2707a; --sky: #6cb4ff;
  /* Rundungen nach Rolle: Chips < Steuerelemente < Flächen < Dialoge */
  --r-chip: 6px; --r-ctl: 10px; --r-panel: 14px; --r-dialog: 20px;
  --shadow-float: 0 18px 50px rgba(0, 0, 0, .5), 0 4px 14px rgba(0, 0, 0, .35);
  --shadow-drag: 0 26px 60px rgba(0, 0, 0, .6);
  --rail: 244px; --topbar: 56px;

  /* Bewegung */
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --spring: cubic-bezier(.23, 1, .32, 1); --spring-dur: 420ms;
  --spring-soft: cubic-bezier(.2, 1.1, .3, 1); --spring-soft-dur: 450ms;
  --dur-press: 70ms; --dur-fast: 140ms; --dur: 220ms;

  /* Kompatible Aliase (werden teils inline in den Ansichten verwendet) */
  --bg: var(--canvas); --bg-2: var(--surface); --panel: var(--surface); --panel-2: var(--raised); --panel-3: var(--raised-2);
  --muted: var(--text-2); --faint: var(--text-3); --accent: var(--violet); --accent-2: var(--violet-hi); --accent-bg: var(--violet-wash);
  --ok: var(--mint); --warn: var(--amber); --danger: var(--rose); --info: var(--sky); --line-2: var(--line-strong); --line-3: var(--line-focus);
  --radius: var(--r-panel); --radius-s: var(--r-ctl); --radius-xs: var(--r-chip);

  font-family: "Segoe UI Variable Text", "Segoe UI Variable Display", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
@supports (transition-timing-function: linear(0, 1)) {
  :root {
    --spring: linear(0, 0.032, 0.1071, 0.2026, 0.3042, 0.4033, 0.4952, 0.5776, 0.6497, 0.7116, 0.7641, 0.8081, 0.8446, 0.8747, 0.8993, 0.9193, 0.9356, 0.9487, 0.9592, 0.9677, 0.9744, 0.9798, 0.9841, 0.9874, 0.9901, 0.9922, 0.9939, 0.9952, 1);
    --spring-soft: linear(0, 0.0305, 0.1054, 0.2048, 0.3143, 0.4241, 0.5279, 0.6219, 0.7042, 0.7743, 0.8325, 0.8796, 0.9169, 0.9458, 0.9676, 0.9835, 0.9947, 1.0023, 1.0071, 1.0097, 1.0109, 1.0111, 1.0105, 1.0096, 1.0084, 1.0072, 1.006, 1.0049, 1);
  }
}

/* 1b · Farbpaletten (pro Benutzer: html[data-theme]; Statusfarben --amber/--mint/--rose/--sky bleiben bewusst in allen Paletten gleich) ---- */
[data-theme='amethyst'] {
  --canvas: #0a0912; --surface: #100e1a; --raised: #171424; --raised-2: #1e1a2f; --float: #221e37;
  --line: rgba(190, 175, 255, .09); --line-strong: rgba(190, 175, 255, .17); --line-focus: rgba(190, 175, 255, .3);
  --text: #eeebf8; --text-2: #b6b0cc; --text-3: #8f89aa;
  --violet: #8b5cf6; --violet-hi: #bcabff; --violet-wash: rgba(139, 92, 246, .14);
  --accent-rgb: 139, 92, 246; --accent-deep-rgb: 106, 62, 224; --accent-btn: #7c4af0; --on-accent: #fff; --logo-1: #9a72fb; --logo-2: #6a3ee0;
}
[data-theme='midnight'] {
  --canvas: #070b14; --surface: #0c1220; --raised: #121a2d; --raised-2: #182238; --float: #1c2842;
  --line: rgba(160, 190, 255, .09); --line-strong: rgba(160, 190, 255, .17); --line-focus: rgba(160, 190, 255, .3);
  --text: #e8eefb; --text-2: #aebbd6; --text-3: #8896b3;
  --violet: #3b82f6; --violet-hi: #8bb4ff; --violet-wash: rgba(59, 130, 246, .14);
  --accent-rgb: 59, 130, 246; --accent-deep-rgb: 37, 99, 235; --accent-btn: #2563eb; --on-accent: #fff; --logo-1: #5b9bff; --logo-2: #2563eb;
}
[data-theme='emerald'] {
  --canvas: #060f0c; --surface: #0a1713; --raised: #10201a; --raised-2: #152a23; --float: #19322a;
  --line: rgba(150, 230, 200, .09); --line-strong: rgba(150, 230, 200, .17); --line-focus: rgba(150, 230, 200, .3);
  --text: #e6f5ee; --text-2: #a9c4b8; --text-3: #84a094;
  --violet: #10b981; --violet-hi: #6ee7b7; --violet-wash: rgba(16, 185, 129, .14);
  --accent-rgb: 16, 185, 129; --accent-deep-rgb: 5, 150, 105; --accent-btn: #10b981; --on-accent: #04251a; --logo-1: #34d399; --logo-2: #059669;
}
[data-theme='crimson'] {
  --canvas: #110708; --surface: #190c0e; --raised: #231216; --raised-2: #2d181d; --float: #351c22;
  --line: rgba(255, 170, 175, .09); --line-strong: rgba(255, 170, 175, .17); --line-focus: rgba(255, 170, 175, .3);
  --text: #f8eaeb; --text-2: #cdaeb1; --text-3: #a58488;
  --violet: #ef4444; --violet-hi: #fca5a5; --violet-wash: rgba(239, 68, 68, .14);
  --accent-rgb: 239, 68, 68; --accent-deep-rgb: 185, 28, 28; --accent-btn: #dc2626; --on-accent: #fff; --logo-1: #f87171; --logo-2: #b91c1c;
}
[data-theme='amber'] {
  --canvas: #100b05; --surface: #181109; --raised: #211910; --raised-2: #2b2116; --float: #33281b;
  --line: rgba(255, 210, 150, .09); --line-strong: rgba(255, 210, 150, .17); --line-focus: rgba(255, 210, 150, .3);
  --text: #f7efe4; --text-2: #cdbfa6; --text-3: #a39478;
  --violet: #f59e0b; --violet-hi: #fcd34d; --violet-wash: rgba(245, 158, 11, .14);
  --accent-rgb: 245, 158, 11; --accent-deep-rgb: 180, 83, 9; --accent-btn: #f59e0b; --on-accent: #261600; --logo-1: #fbbf24; --logo-2: #b45309;
}
[data-theme='arctic'] {
  --canvas: #050f12; --surface: #0a171b; --raised: #102128; --raised-2: #152b33; --float: #19343d;
  --line: rgba(150, 225, 240, .09); --line-strong: rgba(150, 225, 240, .17); --line-focus: rgba(150, 225, 240, .3);
  --text: #e5f4f7; --text-2: #a6c4cb; --text-3: #809fa7;
  --violet: #06b6d4; --violet-hi: #67e8f9; --violet-wash: rgba(6, 182, 212, .14);
  --accent-rgb: 6, 182, 212; --accent-deep-rgb: 14, 116, 144; --accent-btn: #06b6d4; --on-accent: #031d24; --logo-1: #22d3ee; --logo-2: #0e7490;
}
/* Haken in Checklisten: bei hellen Akzentfarben dunkel statt weiß, damit der Kontrast reicht */
html[data-accent-dark] .check-item input[type=checkbox]:checked, [data-theme='emerald'] .check-item input[type=checkbox]:checked, [data-theme='amber'] .check-item input[type=checkbox]:checked, [data-theme='arctic'] .check-item input[type=checkbox]:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23071a14' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }

/* 2 · Basis & Typografie --------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; background: var(--canvas); color: var(--text); font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { min-height: 100vh; background: radial-gradient(1000px 520px at 78% -18%, rgba(var(--accent-rgb), .13), transparent 65%), var(--canvas); background-attachment: fixed; }
a { color: var(--violet-hi); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Hierarchie über Größe und Gewicht: Seitentitel groß, Abschnitte mittel, Details klein und gedämpft */
h1, h2, h3, h4 { margin: 0; text-wrap: balance; }
h1 { font-size: clamp(1.7rem, 1.4rem + 1vw, 2.15rem); line-height: 1.12; letter-spacing: -.028em; font-weight: 650; }
h2 { font-size: 1.07rem; line-height: 1.3; letter-spacing: -.012em; font-weight: 620; }
h3 { font-size: .96rem; line-height: 1.35; letter-spacing: -.006em; font-weight: 600; }
p { margin: 0 0 .6em; text-wrap: pretty; }
button, input, select, textarea { font: inherit; color: inherit; }
.num, .count, td, .tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: .86rem; } .right { margin-left: auto; }
.row { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.grid { display: grid; gap: 1rem; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; border-radius: var(--r-chip); }
::selection { background: rgba(var(--accent-rgb), .45); }
::-webkit-scrollbar { width: 10px; height: 10px; } ::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; } ::-webkit-scrollbar-thumb:hover { background: var(--line-focus); background-clip: padding-box; border: 2px solid transparent; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
kbd { font: inherit; font-size: .74rem; padding: .05rem .38rem; border-radius: 5px; background: var(--raised-2); border: 1px solid var(--line-strong); color: var(--text-2); }

/* 3 · Shell: Navigationsleiste, Kopfzeile, Inhalt ------------------------------------ */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--line); padding: .9rem .7rem; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: .7rem; padding: .35rem .6rem 1.2rem; font-weight: 650; letter-spacing: -.015em; font-size: 1.02rem; }
.brand .logo { width: 32px; height: 32px; border-radius: 9px; background: linear-gradient(150deg, var(--logo-1), var(--logo-2)); display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), 0 4px 14px rgba(var(--accent-deep-rgb), .4); }
.brand small { display: block; color: var(--text-3); font-weight: 500; font-size: .76rem; letter-spacing: 0; }
.nav-label { font-size: .78rem; color: var(--text-3); padding: 1.15rem .7rem .35rem; font-weight: 560; }
.nav { position: relative; display: flex; flex-direction: column; gap: 1px; }
.nav a { position: relative; z-index: 1; display: flex; align-items: center; gap: .7rem; height: 36px; padding: 0 .7rem; border-radius: 9px; color: var(--text-2); font-weight: 500; transition: color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.nav a:active { color: var(--text); background: rgba(255, 255, 255, .05); transition-duration: var(--dur-press); }
.nav a.active { color: var(--text); font-weight: 600; }
.nav a.active svg { color: var(--violet-hi); }
.nav svg, .btn svg { width: 18px; height: 18px; flex: none; }
.nav a > span:first-child { display: inline-flex; }
.nav .nav-ind { position: absolute; z-index: 0; left: 0; top: 0; width: 100%; height: 36px; border-radius: 9px; background: var(--violet-wash); pointer-events: none; opacity: 0; will-change: transform; }
.nav .nav-ind::before { content: ''; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--violet); }
.nav-ind.ready { opacity: 1; transition: transform var(--spring-dur) var(--spring); }
.nav a .count { margin-left: auto; background: var(--accent-btn); color: var(--on-accent); border-radius: 9px; font-size: .72rem; padding: 0 .45rem; font-weight: 650; min-width: 20px; text-align: center; }
.side-user { margin-top: auto; border-top: 1px solid var(--line); padding: .85rem .3rem 0; display: flex; align-items: center; gap: .5rem; }
.side-user .who { min-width: 0; flex: 1; line-height: 1.25; }
.side-user .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .9rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: .75rem; height: var(--topbar); padding: 0 clamp(1rem, 2.4vw, 2rem); background: rgba(10, 9, 18, .88); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.topbar .menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: .5rem; color: var(--text-3); font-size: .9rem; min-width: 0; }
.crumbs strong { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crumbs i { font-style: normal; opacity: .5; }
.search-btn { margin-left: auto; display: flex; align-items: center; gap: .6rem; height: 34px; min-width: 230px; padding: 0 .5rem 0 .75rem; border-radius: var(--r-ctl); background: var(--raised); border: 1px solid var(--line); color: var(--text-3); cursor: pointer; font-size: .88rem; transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.search-btn:active { transform: scale(.98); transition-duration: var(--dur-press); }
.search-btn svg { width: 16px; height: 16px; }
.search-btn kbd { margin-left: auto; }
.content { padding: 1.9rem clamp(1rem, 2.6vw, 2.4rem) 4.5rem; max-width: 1760px; width: 100%; margin-inline: auto; animation: page-in 300ms var(--ease-out) both; }
.content.fluid { max-width: none; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.7rem; }
.page-head .sub { color: var(--text-2); margin-top: .4rem; max-width: 64ch; font-size: .98rem; }
.page-head .actions { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* 4 · Bausteine: Flächen, Buttons, Chips, Avatare --------------------------------------- */
/* Panel: die eine Standardfläche. Kopf + Zeilen mit Haarlinien statt Karten in Karten. */
.panel, .card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.card { padding: 1.15rem 1.25rem; transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out); }
.card > header, .panel-head { display: flex; align-items: center; gap: .6rem; }
.card > header { margin-bottom: .9rem; } .card > header h2 { flex: 1; }
.panel-head { padding: .85rem 1.15rem; border-bottom: 1px solid var(--line); min-height: 52px; } .panel-head h2 { flex: 1; }
.panel-body { padding: 1.1rem 1.15rem; }
.item { display: flex; align-items: center; gap: .75rem; padding: .72rem 1.15rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; transition: background-color var(--dur-fast) var(--ease-out); }
.item:last-child { border-bottom: 0; }
.item.click { cursor: pointer; } .item.click:active { background: var(--violet-wash); transition-duration: var(--dur-press); }
.item .grow { flex: 1; min-width: 160px; }
.item.col { flex-direction: column; align-items: stretch; gap: .3rem; }
/* Innerhalb von Dialogen und Panels keine zweite Kartenebene: Gruppen werden zu eingelassenen Flächen */
.modal .card, .card .card, .panel .card { background: var(--raised); border-color: transparent; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat .num { font-size: 1.9rem; font-weight: 650; letter-spacing: -.035em; line-height: 1.1; }
.stat .lbl { color: var(--text-2); font-size: .86rem; }
.stat.accent .num { color: var(--violet-hi); } .stat.danger .num { color: var(--rose); } .stat.ok .num { color: var(--mint); }
.empty { text-align: center; color: var(--text-3); padding: 1.7rem 1rem; border: 1px dashed var(--line-strong); border-radius: var(--r-panel); text-wrap: balance; }
.panel > .empty, .panel-body > .empty { border: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; min-height: 34px; padding: .35rem .9rem; border-radius: var(--r-ctl); border: 1px solid var(--line-strong); background: var(--raised); cursor: pointer; white-space: nowrap; font-weight: 550;
  touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.btn:active { transform: scale(.965); transition-duration: var(--dur-press); }
.btn.primary { background: var(--accent-btn); border-color: rgba(255, 255, 255, .16); color: var(--on-accent); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 2px 10px rgba(var(--accent-deep-rgb), .35); }
.btn.danger { color: var(--rose); border-color: rgba(242, 112, 122, .35); background: transparent; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn.sm { min-height: 28px; padding: .15rem .6rem; font-size: .86rem; border-radius: 8px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; }
@media (hover: hover) {
  .btn:hover { background: var(--raised-2); border-color: var(--line-focus); }
  .btn.primary:hover { background: var(--accent-hover, #9a70f9); }
  .btn.danger:hover { background: rgba(242, 112, 122, .12); border-color: rgba(242, 112, 122, .6); }
  .btn.ghost:hover { background: rgba(255, 255, 255, .06); color: var(--text); }
  .nav a:hover { color: var(--text); background: rgba(255, 255, 255, .04); text-decoration: none; }
  .search-btn:hover { border-color: var(--line-focus); background: var(--raised-2); }
  .card.hover:hover, .org-card:hover { border-color: var(--line-focus); }
  .item.click:hover, tbody tr:hover { background: rgba(var(--accent-rgb), .06); }
  .tabs button:hover { color: var(--text); }
}

/* Chips: Status und Priorität mit Farbpunkt, Rollen als getönte Schrift. Keine Versalien. */
.badge { display: inline-flex; align-items: center; gap: .38rem; padding: .1rem .55rem; border-radius: var(--r-chip); font-size: .78rem; font-weight: 550; white-space: nowrap; background: rgba(255, 255, 255, .06); color: var(--text-2); }
.badge[class*=' p-']::before, .badge[class*=' s-']::before, .badge[class^='p-']::before, .badge[class^='s-']::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.b-owner { background: rgba(245, 184, 74, .12); color: #f7c565; } .b-admin { background: rgba(242, 112, 122, .12); color: #f59aa1; }
.b-manager { background: var(--violet-wash); color: var(--violet-hi); } .b-moderator { background: rgba(108, 180, 255, .12); color: #94c8ff; } .b-helper { background: rgba(79, 209, 161, .12); color: #7fe0bb; }
.p-low { background: rgba(148, 163, 184, .1); color: #a3afc2; } .p-normal { background: rgba(108, 180, 255, .1); color: #8fc3ff; }
.p-high { background: rgba(245, 184, 74, .12); color: #f7c565; } .p-critical { background: rgba(242, 112, 122, .14); color: #f7969d; }
.s-neutral { background: rgba(148, 163, 184, .1); color: #a9b4c6; } .s-info { background: rgba(108, 180, 255, .11); color: #8fc3ff; }
.s-warn { background: rgba(245, 184, 74, .12); color: #f7c565; } .s-ok { background: rgba(79, 209, 161, .12); color: #7fe0bb; }
.s-danger { background: rgba(242, 112, 122, .13); color: #f7969d; } .s-accent { background: var(--violet-wash); color: var(--violet-hi); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 650; font-size: .85rem; flex: none; background: var(--raised-2); color: var(--violet-hi); }
.avatar.sm { width: 22px; height: 22px; font-size: .68rem; border-radius: 50%; } .avatar.lg { width: 52px; height: 52px; font-size: 1.3rem; border-radius: 50%; }
.avatars { display: flex; } .avatars .avatar { margin-left: -6px; box-shadow: 0 0 0 2px var(--surface); } .avatars .avatar:first-child { margin-left: 0; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); flex: none; }
.dot.ok { background: var(--mint); } .dot.warn { background: var(--amber); } .dot.danger { background: var(--rose); } .dot.info { background: var(--sky); } .dot.accent { background: var(--violet); }

/* 5 · Formulare ----------------------------------------------------------------------- */
.field { display: flex; flex-direction: column; gap: .35rem; margin-bottom: .95rem; }
.field > label { font-size: .86rem; color: var(--text-2); font-weight: 520; }
.field .hint, .hint { font-size: .82rem; color: var(--text-3); }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; min-height: 38px; background: var(--raised); border: 1px solid var(--line-strong); border-radius: var(--r-ctl); padding: .45rem .75rem;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out); }
@media (hover: hover) { input:hover, select:hover, textarea:hover { border-color: var(--line-focus); } }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-wash); background: var(--raised-2); }
input::placeholder, textarea::placeholder { color: var(--text-3); }
textarea { min-height: 112px; resize: vertical; line-height: 1.5; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 2rem; }
/* Aufgaben-Toolbar: eine zusammenhängende Leiste */
.tbar { display: flex; align-items: center; flex-wrap: wrap; gap: .55rem; padding: .55rem; margin-bottom: 1rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.tbar input[type=search] { flex: 1 1 260px; min-width: 200px; width: auto; }
.tbar select { width: auto; min-width: 170px; flex: 0 1 auto; }
.tbar .spacer { flex: 1 1 0; min-width: 0; }
.tbar-count { color: var(--text-3); font-size: .86rem; padding: 0 .35rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.btn[aria-pressed='true'] { background: var(--violet-wash); border-color: var(--violet); color: var(--text); }
.seg button svg { width: 15px; height: 15px; vertical-align: -3px; margin-right: .35rem; }
.toolbar { display: flex; gap: .55rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.toolbar select, .toolbar input[type=search], .toolbar input[type=text] { width: auto; min-width: 150px; }
.toolbar input[type=search] { min-width: 230px; }
.check { display: flex; align-items: center; gap: .55rem; cursor: pointer; }
/* Schalter für Ein/Aus-Einstellungen und die Rechte-Matrix, runde Haken für Checklisten */
label.check > input[type=checkbox], .perm-table input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 38px; height: 22px; min-height: 0; margin: 0; border-radius: 999px; cursor: pointer;
  background-color: rgba(255, 255, 255, .16); background-image: radial-gradient(circle at 11px 11px, #fff 8.5px, transparent 9.5px); background-repeat: no-repeat; background-position: 0 0;
  transition: background-color var(--dur) var(--ease-out), background-position var(--spring-dur) var(--spring); }
label.check > input[type=checkbox]:checked, .perm-table input[type=checkbox]:checked { background-color: var(--violet); background-position: 16px 0; }
label.check > input[type=checkbox]:disabled, .perm-table input[type=checkbox]:disabled { opacity: .45; cursor: not-allowed; }
.check-item input[type=checkbox] { -webkit-appearance: none; appearance: none; flex: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 1.5px solid var(--line-focus); background: transparent center / 12px no-repeat; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.check-item input[type=checkbox]:active:not(:disabled) { transform: scale(.88); }
.check-item input[type=checkbox]:checked { background-color: var(--accent-btn); border-color: var(--accent-btn);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.check-item input[type=checkbox]:disabled { opacity: .5; cursor: not-allowed; }
input[type=checkbox] { accent-color: var(--violet); width: 16px; height: 16px; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip-select label { display: inline-flex; align-items: center; gap: .35rem; min-height: 30px; padding: .15rem .75rem; border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-size: .86rem; user-select: none; color: var(--text-2); touch-action: manipulation;
  transition: background-color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.chip-select label:active { transform: scale(.96); transition-duration: var(--dur-press); }
.chip-select label:has(input:checked) { background: var(--violet-wash); border-color: var(--violet); color: var(--text); }
.chip-select label:has(input:focus-visible) { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.chip-select input { position: absolute; opacity: 0; pointer-events: none; }
/* Umschalter (Ansicht, Statusfilter) */
.seg { display: inline-flex; padding: 2px; border-radius: var(--r-ctl); background: var(--raised); border: 1px solid var(--line); gap: 2px; max-width: 100%; overflow-x: auto; }
.seg button { border: 0; background: transparent; color: var(--text-2); padding: .22rem .75rem; border-radius: 8px; cursor: pointer; font-weight: 550; font-size: .88rem; min-height: 28px; white-space: nowrap; transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.seg button:active { transform: scale(.95); transition-duration: var(--dur-press); }
.seg button.on { background: var(--raised-2); color: var(--text); box-shadow: 0 0 0 1px var(--line-strong); }
.seg button .n { color: var(--text-3); margin-left: .35rem; font-variant-numeric: tabular-nums; }

/* 6 · Daten: Tabellen, Reiter, Kanban ---------------------------------------------------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-panel); background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem 1rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { font-size: .82rem; color: var(--text-3); font-weight: 560; background: var(--surface); white-space: nowrap; padding-top: .8rem; padding-bottom: .8rem; }
tbody tr { transition: background-color var(--dur-fast) var(--ease-out); } tr:last-child td { border-bottom: 0; }
tr.clickable { cursor: pointer; } tr.clickable:active { background: var(--violet-wash); transition-duration: var(--dur-press); }
td strong { font-weight: 600; }

/* Reiter: Unterstreichung gleitet (Position setzt initTabIndicators()) */
.tabs { position: relative; display: flex; gap: .15rem; border-bottom: 1px solid var(--line); margin-bottom: 1.3rem; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { background: none; border: 0; min-height: 40px; padding: .55rem .9rem; color: var(--text-2); cursor: pointer; white-space: nowrap; font-weight: 520; touch-action: manipulation; transition: color var(--dur-fast) var(--ease-out); }
.tabs button:active { color: var(--text); }
.tabs button.active { color: var(--text); font-weight: 620; }
.tabs::after { content: ''; position: absolute; left: 0; bottom: 0; height: 2px; width: 1px; background: var(--violet); border-radius: 2px; transform-origin: 0 0; transform: translateX(var(--ind-x, 0px)) scaleX(var(--ind-w, 0)); }
.tabs.animated::after { transition: transform var(--spring-dur) var(--spring); }

/* Kanban: Spalten sind Bahnen mit Kopf, Karten tragen Priorität als Punkt-Chip */
.board { --n: 5; display: grid; grid-template-columns: repeat(var(--n), minmax(224px, 1fr)); gap: 1rem; align-items: start; overflow-x: auto; padding-bottom: .5rem; overscroll-behavior-x: contain; }
.col { background: rgba(255, 255, 255, .022); border: 1px solid var(--line); border-radius: var(--r-panel); padding: .65rem; min-width: 0; transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.col.over { border-color: var(--violet); background: var(--violet-wash); }
.col > header { display: flex; align-items: center; gap: .55rem; padding: .25rem .4rem .75rem; font-weight: 620; }
.col > header::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.col[data-status='open'] > header::before { background: var(--sky); } .col[data-status='progress'] > header::before { background: var(--violet); } .col[data-status='blocked'] > header::before { background: var(--rose); }
.col[data-status='review'] > header::before { background: var(--amber); } .col[data-status='awaiting_approval'] > header::before { background: var(--violet-hi); } .col[data-status='done'] > header::before { background: var(--mint); }
.col .count { margin-left: auto; min-width: 24px; padding: 0 .5rem; text-align: center; border-radius: 999px; background: var(--raised); color: var(--text-2); font-weight: 600; font-size: .8rem; line-height: 22px; font-variant-numeric: tabular-nums; }
.col .cards { display: flex; flex-direction: column; gap: .6rem; max-height: calc(100vh - 290px); min-height: 96px; overflow-y: auto; overscroll-behavior: contain; padding: 1px 2px 2px 1px; }
.col-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 96px; border: 1px dashed var(--line-strong); border-radius: 11px; color: var(--text-3); font-size: .88rem; text-align: center; padding: .9rem .5rem; }
.col-empty svg { width: 20px; height: 20px; opacity: .6; margin-bottom: .2rem; } .col-empty small { font-size: .76rem; opacity: .7; }
.col.over .col-empty { border-color: var(--violet); color: var(--violet-hi); }
.task { position: relative; background: var(--raised); border: 1px solid var(--line); border-radius: 12px; padding: .8rem .9rem .75rem; display: flex; flex-direction: column; gap: .5rem; min-width: 0; cursor: pointer; user-select: none; touch-action: manipulation;
  transition: border-color var(--dur) var(--ease-out), transform var(--spring-dur) var(--spring), opacity var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out); }
.task:active { transform: scale(.985); transition-duration: var(--dur-press); }
.task[data-drag='true'] { cursor: grab; }
.task .top { display: flex; align-items: center; gap: .5rem; min-height: 22px; } .task .top .spacer { flex: 1; }
.role-chip { font-size: .76rem; font-weight: 600; color: var(--violet-hi); background: var(--violet-wash); border-radius: var(--r-chip); padding: .08rem .5rem; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .t-title { font-weight: 620; font-size: .98rem; line-height: 1.35; letter-spacing: -.008em; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.task .desc { font-size: .84rem; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.task .foot { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin-top: .1rem; }
.mchip { display: inline-flex; align-items: center; gap: .3rem; color: var(--text-2); font-size: .8rem; font-variant-numeric: tabular-nums; } .mchip svg { width: 13px; height: 13px; flex: none; opacity: .85; } .mchip.overdue { color: var(--rose); font-weight: 600; }
.task .who { flex: none; }
.task .meta { display: flex; align-items: center; gap: .3rem .7rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); min-width: 0; }
.task.pr-critical { box-shadow: inset 2px 0 0 var(--rose); } .task.pr-high { box-shadow: inset 2px 0 0 var(--amber); }
@media (hover: hover) { .task:hover { border-color: var(--line-focus); background: var(--raised-2); } }
.task.drag-source { opacity: .3; transform: none; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 300; margin: 0; pointer-events: none; will-change: transform; scale: 1; rotate: 0deg; box-shadow: var(--shadow-drag), 0 0 0 1.5px var(--violet); cursor: grabbing; background: var(--raised-2); transition: scale var(--spring-dur) var(--spring), rotate var(--spring-dur) var(--spring); }
.drag-ghost.lifted { scale: 1.03; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none !important; }
.progress { height: 3px; background: var(--line-strong); border-radius: 3px; overflow: hidden; margin-top: .1rem; } .progress > i { display: block; height: 100%; width: 100%; background: var(--violet); border-radius: 3px; transform-origin: 0 0; transition: transform var(--spring-dur) var(--spring); }
.overdue { color: var(--rose) !important; }

/* 7 · Overlays: Dialoge, Befehlspalette, Toasts, Skeletons ----------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(5, 4, 10, .66); backdrop-filter: blur(4px); display: grid; place-items: center; padding: 1rem; z-index: 100; overflow-y: auto; animation: overlay-in 200ms var(--ease-out) both; }
.overlay.closing { animation: overlay-out 150ms ease-in both; pointer-events: none; }
@keyframes overlay-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes overlay-out { from { opacity: 1; } to { opacity: 0; } }
.modal { background: var(--float); border: 1px solid var(--line-strong); border-radius: var(--r-dialog); width: min(640px, 100%); max-height: calc(100vh - 2rem); display: flex; flex-direction: column; box-shadow: var(--shadow-float);
  transform-origin: var(--ox, 50%) var(--oy, 50%); animation: modal-in var(--spring-dur) var(--spring) both; will-change: transform, opacity; }
.modal.wide { width: min(880px, 100%); }
.modal.no-anim { animation: none; }
.modal:focus { outline: none; }
.overlay.closing .modal { animation: modal-out 150ms ease-in both; }
@keyframes modal-in { from { opacity: 0; transform: scale(.95) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes modal-out { from { opacity: 1; transform: none; } to { opacity: 0; transform: scale(.97) translateY(4px); } }
.modal > header { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.35rem .35rem; }
.modal > header h2 { flex: 1; overflow-wrap: anywhere; font-size: 1.2rem; letter-spacing: -.02em; font-weight: 650; }
.modal .body { padding: .6rem 1.35rem 1.1rem; overflow-y: auto; overscroll-behavior: contain; }
.modal > footer { display: flex; justify-content: flex-end; gap: .5rem; padding: .85rem 1.35rem; border-top: 1px solid var(--line); flex-wrap: wrap; background: rgba(0, 0, 0, .12); border-radius: 0 0 var(--r-dialog) var(--r-dialog); }
.sheet-grip { display: none; }
.palette { width: min(640px, 100%); align-self: start; margin-top: 11vh; background: var(--float); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow-float); overflow: hidden; animation: modal-in var(--spring-dur) var(--spring) both; }
.overlay.closing .palette { animation: modal-out 150ms ease-in both; }
.palette:focus { outline: none; }
.palette input { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; min-height: 54px; padding: 0 1.2rem; font-size: 1.05rem; box-shadow: none; }
.palette input:focus { box-shadow: none; background: transparent; }
.pal-list { max-height: min(52vh, 420px); overflow-y: auto; padding: .4rem; }
.pal-group { padding: .6rem .7rem .25rem; font-size: .78rem; color: var(--text-3); font-weight: 560; }
.pal-item { display: flex; align-items: center; gap: .7rem; width: 100%; padding: .55rem .7rem; border: 0; background: transparent; border-radius: 9px; cursor: pointer; text-align: left; color: var(--text); }
.pal-item svg { width: 18px; height: 18px; color: var(--text-3); flex: none; }
.pal-item .hintr { margin-left: auto; color: var(--text-3); font-size: .8rem; }
.pal-item[aria-selected='true'] { background: var(--violet-wash); } .pal-item[aria-selected='true'] svg { color: var(--violet-hi); }
.pal-foot { display: flex; gap: 1rem; padding: .55rem 1rem; border-top: 1px solid var(--line); color: var(--text-3); font-size: .8rem; }
.error-box { background: rgba(242, 112, 122, .1); border: 1px solid rgba(242, 112, 122, .28); color: #f7a2a8; padding: .6rem .85rem; border-radius: var(--r-ctl); margin-bottom: .9rem; font-size: .9rem; }
.info-box { background: var(--violet-wash); border: 1px solid rgba(var(--accent-rgb), .3); padding: .7rem .9rem; border-radius: var(--r-ctl); margin-bottom: .9rem; font-size: .9rem; }
.copy-box { display: flex; gap: .5rem; } .copy-box input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .8rem; }
#toasts { position: fixed; top: calc(var(--topbar) + 10px); left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: .5rem; z-index: 400; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 2rem); }
.toast { display: flex; align-items: center; gap: .65rem; background: var(--float); border: 1px solid var(--line-strong); padding: .6rem 1rem .6rem .85rem; border-radius: var(--r-ctl); box-shadow: var(--shadow-float); pointer-events: auto; animation: toast-drop var(--spring-soft-dur) var(--spring-soft) both; }
.toast::before { content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--violet); }
.toast.ok::before { background: var(--mint); } .toast.error::before { background: var(--rose); }
.toast.leaving { animation: toast-lift 160ms ease-in both; }
@keyframes toast-drop { from { opacity: 0; transform: translateY(-18px) scale(.95); } to { opacity: 1; transform: none; } }
@keyframes toast-lift { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(-10px) scale(.97); } }
.skeleton { display: grid; gap: .9rem; animation: page-in 240ms var(--ease-out) both; }
.skeleton i { display: block; border-radius: var(--r-panel); background: var(--raised); height: 88px; animation: pulse 1.4s ease-in-out infinite; }
.skeleton i:first-child { height: 36px; width: min(320px, 60%); border-radius: var(--r-ctl); }
.skeleton i:nth-child(3) { animation-delay: .15s; } .skeleton i:nth-child(4) { animation-delay: .3s; }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }

.comment { display: flex; gap: .7rem; padding: .65rem 0; border-bottom: 1px solid var(--line); } .comment:last-child { border-bottom: 0; }
.comment .c-body { flex: 1; min-width: 0; overflow-wrap: anywhere; white-space: pre-wrap; }
.list { display: flex; flex-direction: column; } .list > * { padding: .7rem 0; border-bottom: 1px solid var(--line); } .list > *:last-child { border-bottom: 0; padding-bottom: 0; } .list > *:first-child { padding-top: 0; }
.check-item { display: flex; align-items: center; gap: .6rem; padding: .3rem 0; } .check-item.done span { text-decoration: line-through; color: var(--text-3); }
.md h1, .md h2, .md h3 { margin: 1.1em 0 .4em; } .md h1 { font-size: 1.4rem; } .md h2 { font-size: 1.15rem; } .md h3 { font-size: 1rem; }
.md ul, .md ol { padding-left: 1.4rem; margin: 0 0 .7em; } .md code { background: var(--raised); border: 1px solid var(--line); padding: .05rem .35rem; border-radius: 5px; font-size: .88em; }
.md pre { background: var(--raised); border: 1px solid var(--line); padding: .8rem; border-radius: var(--r-ctl); overflow-x: auto; } .md pre code { border: 0; padding: 0; }
.md blockquote { margin: 0 0 .7em; padding-left: .9rem; border-left: 3px solid var(--violet); color: var(--text-2); }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: .45rem 1rem; } .kv dt { color: var(--text-2); } .kv dd { margin: 0; overflow-wrap: anywhere; }
.perm-table td, .perm-table th { text-align: center; padding: .5rem .6rem; } .perm-table td:first-child, .perm-table th:first-child { text-align: left; }
.perm-table tr.area-head td { background: var(--raised); font-weight: 620; text-align: left; color: var(--violet-hi); }

/* 8 · Dashboard: Kommandozentrale ------------------------------------------------------------ */
/* Raster: Bereiche stehen untereinander, innerhalb eines Bereichs teilen sich gleich hohe Panels die 12 Spalten (3×4, 2×6 oder 8+4). */
.cmd { overflow: hidden; margin-bottom: 1.9rem; background: linear-gradient(125deg, rgba(var(--accent-rgb), .14), transparent 52%), var(--surface); }
.cmd-top { display: flex; align-items: center; gap: 1.2rem 2rem; flex-wrap: wrap; padding: 1.6rem 1.7rem 1.5rem; }
.cmd-top .greet { flex: 1 1 380px; min-width: 0; }
.cmd-top h1 { font-size: clamp(1.6rem, 1.3rem + .9vw, 2.05rem); }
.cmd-top .lead { color: var(--text-2); margin: .45rem 0 0; max-width: 60ch; font-size: 1rem; }
.cmd-top .lead b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.quick { display: flex; gap: .5rem; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0, 1fr)); border-top: 1px solid var(--line); background: rgba(0, 0, 0, .16); }
.kpi { display: flex; flex-direction: column; padding: 1.1rem 1.6rem 1.25rem; border-right: 1px solid var(--line); color: inherit; transition: background-color var(--dur-fast) var(--ease-out); min-width: 0; }
.kpi:last-child { border-right: 0; }
.kpi-top { display: flex; align-items: center; gap: .65rem; color: var(--text-2); font-size: .9rem; font-weight: 520; margin-bottom: .6rem; }
.kpi-ico { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--violet-wash); color: var(--violet-hi); flex: none; }
.kpi-ico svg { width: 16px; height: 16px; }
.kpi.tone-sky .kpi-ico { background: rgba(108, 180, 255, .13); color: #8fc3ff; } .kpi.tone-mint .kpi-ico { background: rgba(79, 209, 161, .13); color: #7fe0bb; }
.kpi.tone-amber .kpi-ico { background: rgba(245, 184, 74, .14); color: #f7c565; } .kpi.tone-danger .kpi-ico { background: rgba(242, 112, 122, .15); color: #f59aa1; }
.kpi .val { font-size: 2.25rem; font-weight: 650; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi .note { color: var(--text-2); font-size: .86rem; margin-top: .55rem; line-height: 1.35; } .kpi .note b { color: var(--text); font-weight: 620; font-variant-numeric: tabular-nums; }
@media (hover: hover) { a.kpi:hover { background: rgba(var(--accent-rgb), .08); text-decoration: none; } }
.sec { margin-bottom: 1.9rem; }
.sec-title { display: flex; align-items: baseline; gap: .8rem; margin: 0 0 .8rem .15rem; flex-wrap: wrap; }
.sec-title h2 { font-size: 1.05rem; } .sec-title span { color: var(--text-3); font-size: .88rem; }
.cols { display: grid; gap: 1.25rem; align-items: stretch; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); }
.cols.s21 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.cols > .panel { display: flex; flex-direction: column; min-width: 0; }
.cols > .panel > .empty { flex: 1; display: grid; place-content: center; margin: 1rem; }
.panel-sub { display: flex; align-items: center; gap: .6rem; padding: .6rem 1.15rem; border-top: 1px solid var(--line); background: rgba(255, 255, 255, .02); color: var(--text-2); font-size: .85rem; font-weight: 600; }
.panel-head + .panel-sub, .panel-head + .scroll { border-top: 0; }
.scroll { overflow-y: auto; max-height: 292px; flex: 1; min-height: 0; overscroll-behavior: contain; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .15rem 0; }
.flow { padding: 1.15rem 1.15rem 1.2rem; }
.flow-top { display: flex; align-items: baseline; gap: .9rem; flex-wrap: wrap; margin-bottom: .85rem; }
.flow-top .total { font-size: 1.9rem; font-weight: 650; letter-spacing: -.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.flow-bar { display: flex; height: 12px; border-radius: 7px; overflow: hidden; gap: 2px; background: var(--raised); }
.flow-bar i { display: block; min-width: 4px; transform-origin: 0 50%; animation: grow 700ms var(--ease-out) both; }
@keyframes grow { from { transform: scaleX(0); } to { transform: none; } }
.flow-legend { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; margin-top: .95rem; }
.flow-legend a { display: inline-flex; align-items: center; gap: .5rem; color: var(--text-2); font-size: .88rem; } .flow-legend b { color: var(--text); font-weight: 650; font-variant-numeric: tabular-nums; }
.load-row { display: grid; grid-template-columns: minmax(140px, 1.1fr) minmax(0, 2.2fr) minmax(0, 1.8fr); gap: .9rem; align-items: center; padding: .55rem 1.15rem; border-top: 1px solid var(--line); color: inherit; }
.panel-sub + .load-row { border-top: 0; }
.load-row .nm { font-weight: 560; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.load-bar { display: flex; height: 8px; border-radius: 5px; background: var(--raised); overflow: hidden; gap: 2px; } .load-bar i { display: block; min-width: 0; border-radius: 3px; }
@media (hover: hover) { .load-row:hover { background: rgba(var(--accent-rgb), .06); text-decoration: none; } }
.feed { padding: .25rem 1.15rem .4rem; }
.feed > div { display: flex; align-items: center; gap: .65rem; padding: .5rem 0; border-bottom: 1px solid var(--line); }
.feed > div:last-child { border-bottom: 0; }
.feed .t { flex: 1; min-width: 0; line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .feed .t b { font-weight: 600; }
.event-date { width: 44px; flex: none; text-align: center; border-radius: 9px; background: var(--raised); padding: .2rem 0; line-height: 1.15; }
.event-date b { display: block; font-size: 1.15rem; font-weight: 650; font-variant-numeric: tabular-nums; } .event-date span { font-size: .72rem; color: var(--text-3); }

/* 9 · Teamstruktur / Organigramm ------------------------------------------------------- */
.org-bar { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem; }
.org-scroll { overflow-x: auto; padding: .75rem .25rem 2rem; border: 1px solid var(--line); border-radius: var(--r-panel); background: radial-gradient(circle at 1px 1px, rgba(190, 175, 255, .07) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); }
.org-tree ul { display: flex; justify-content: center; padding: 30px 0 0; margin: 0; position: relative; list-style: none; width: max-content; min-width: 100%; }
.org-tree ul ul { width: auto; min-width: 0; }
.org-tree > ul { padding-top: 12px; }
.org-tree li { position: relative; padding: 30px 9px 0; display: flex; flex-direction: column; align-items: center; list-style: none; }
.org-tree > ul > li { padding-top: 0; }
.org-tree li::before, .org-tree li::after { content: ''; position: absolute; top: 0; right: 50%; width: 50%; height: 30px; border-top: 1.5px solid rgba(var(--accent-rgb), .38); }
.org-tree li::after { right: auto; left: 50%; border-left: 1.5px solid rgba(var(--accent-rgb), .38); }
.org-tree li:only-child::before, .org-tree li:only-child::after { display: none; }
.org-tree li:first-child::before, .org-tree li:last-child::after { border: 0; }
.org-tree li:last-child::before { border-right: 1.5px solid rgba(var(--accent-rgb), .38); border-radius: 0 10px 0 0; }
.org-tree li:first-child::after { border-radius: 10px 0 0 0; }
.org-tree ul ul::before { content: ''; position: absolute; top: 0; left: 50%; border-left: 1.5px solid rgba(var(--accent-rgb), .38); height: 30px; }
.org-tree > ul > li::before, .org-tree > ul > li::after { display: none; }
.org-tree li.collapsed > ul { display: none; }
.org-node { position: relative; }
.org-card { position: relative; width: 244px; text-align: left; background: var(--raised); border: 1px solid var(--line-strong); border-radius: 13px; padding: .8rem .85rem .75rem; cursor: pointer; display: flex; flex-direction: column; gap: .6rem;
  transition: border-color var(--dur) var(--ease-out), transform var(--spring-dur) var(--spring), background-color var(--dur) var(--ease-out); touch-action: manipulation; }
.org-card:active { transform: scale(.985); transition-duration: var(--dur-press); }
.org-card:focus-visible { border-color: var(--violet); }
.org-card.mine { border-color: var(--violet); box-shadow: 0 0 0 3px var(--violet-wash); }
.org-card.inactive { opacity: .55; border-style: dashed; }
.org-card.vacant { border-style: dashed; border-color: rgba(245, 184, 74, .45); }
.org-head { display: flex; align-items: center; gap: .6rem; }
.org-head strong { flex: 1; min-width: 0; font-weight: 620; line-height: 1.25; overflow-wrap: anywhere; }
.role-tile { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 700; font-size: .9rem; flex: none; }
.role-tile.lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.5rem; }
.org-card .scope { font-size: .82rem; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; line-height: 1.25; }
.org-card .people { display: flex; align-items: center; gap: .5rem; font-size: .84rem; color: var(--text-2); min-height: 22px; }
.org-card .load { display: flex; gap: .35rem; flex-wrap: wrap; }
.org-card .load .badge { font-size: .74rem; padding: .05rem .45rem; }
.tree-toggle { position: absolute; left: 50%; bottom: -11px; margin-left: -11px; z-index: 2; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--float); color: var(--text-2); display: grid; place-items: center; cursor: pointer; font-size: .7rem; font-weight: 650; padding: 0; transition: transform var(--spring-dur) var(--spring), background-color var(--dur-fast) var(--ease-out); }
.tree-toggle:active { transform: scale(.88); transition-duration: var(--dur-press); }
.role-hero { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; margin-bottom: 1.3rem; }
.role-hero h1 { margin-bottom: .25rem; }
.role-facts { display: flex; flex-wrap: wrap; margin-bottom: 1.4rem; background: var(--surface); }
.role-facts > div { padding: .85rem 1.3rem; border-right: 1px solid var(--line); min-width: 130px; }
.role-facts > div:last-child { border-right: 0; }
.role-facts b { display: block; font-size: 1.5rem; font-weight: 650; letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.role-facts span { color: var(--text-2); font-size: .84rem; }
.org-list .item { padding-left: calc(1.15rem + var(--depth, 0) * 1.6rem); }
.level-block { border: 1px solid var(--line); border-radius: var(--r-panel); margin-bottom: .9rem; overflow: hidden; background: var(--surface); }
.level-block > header { padding: .7rem 1.1rem; display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); }
.level-block > header::before { content: ''; width: 9px; height: 9px; border-radius: 50%; background: var(--text-3); order: -1; }
.level-block.l-1 > header::before { background: var(--mint); } .level-block.l-2 > header::before { background: var(--sky); } .level-block.l-3 > header::before { background: var(--amber); } .level-block.l-4 > header::before { background: var(--rose); }
.rule { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; padding: .65rem 1.1rem; border-top: 1px solid var(--line); }
.level-block > header + .rule { border-top: 0; }
.rule .txt { flex: 1; min-width: 200px; }
.decision-card { border-color: rgba(245, 184, 74, .4); }
.notif { padding: .7rem 0; border-bottom: 1px solid var(--line); cursor: pointer; } .notif:last-child { border-bottom: 0; } .notif.unread { box-shadow: inset 3px 0 0 var(--violet); padding-left: .75rem; }
.bell { position: relative; } .bell .dot-count { position: absolute; top: -3px; right: -3px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--rose); color: #fff; font-size: .66rem; display: grid; place-items: center; padding: 0 4px; font-weight: 700; animation: toast-drop var(--spring-soft-dur) var(--spring-soft) both; }
details.fold > summary { cursor: pointer; color: var(--text-2); font-size: .88rem; padding: .35rem 0; border-radius: var(--r-chip); } details.fold[open] > summary { color: var(--text); }
.diff { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .78rem; color: var(--text-2); white-space: pre-wrap; background: var(--raised); border: 1px solid var(--line); border-radius: 6px; padding: .45rem .65rem; margin-top: .3rem; }

/* Routinen */
.rep-ico { display: inline-flex; color: var(--text-3); vertical-align: -3px; flex: none; } .rep-ico svg { width: 14px; height: 14px; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.next-grid > a { display: block; padding: .9rem 1.15rem; color: inherit; border-right: 1px solid var(--line); min-width: 0; }
.next-grid > a:last-child { border-right: 0; }
.next-grid .when { font-weight: 650; font-variant-numeric: tabular-nums; } .next-grid .what { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: .15rem; }
@media (hover: hover) { .next-grid > a:hover { background: rgba(var(--accent-rgb), .07); text-decoration: none; } }
.dlg-h { margin: 1.3rem 0 .7rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .95rem; }
.preview { background: var(--raised); border: 1px solid var(--line); border-radius: var(--r-ctl); padding: .8rem 1rem; }
.preview li { padding: .1rem 0; font-variant-numeric: tabular-nums; }

/* 10 · Kalender & Anmeldung -------------------------------------------------------------- */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.cal .dow { background: var(--surface); padding: .55rem; font-size: .8rem; color: var(--text-3); text-align: center; font-weight: 560; }
.cal .day { background: var(--surface); min-height: 100px; padding: .35rem; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal .day.other { background: var(--canvas); opacity: .6; } .cal .day.today .dn { background: var(--accent-btn); color: var(--on-accent); }
.cal .dn { font-size: .8rem; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; color: var(--text-2); font-variant-numeric: tabular-nums; }
.cal .ev { font-size: .76rem; padding: 2px 6px; border-radius: 5px; background: var(--violet-wash); color: var(--text); border-left: 2px solid var(--violet); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; transition: background-color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.cal .ev:active { transform: scale(.97); transition-duration: var(--dur-press); }
@media (hover: hover) { .cal .ev:hover { background: rgba(var(--accent-rgb), .28); } }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 1rem; background: radial-gradient(900px 480px at 70% -10%, rgba(124, 58, 237, .22), transparent), radial-gradient(700px 400px at 0% 110%, rgba(99, 102, 241, .14), transparent), var(--canvas); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-dialog); padding: 2.1rem; box-shadow: var(--shadow-float); animation: modal-in 520ms var(--spring) both; }
.auth-card .brand { padding-left: 0; font-size: 1.25rem; }

/* 11 · Responsive ----------------------------------------------------------------------------- */
@media (max-width: 1100px) { .cols.s21 { grid-template-columns: minmax(0, 1fr); } .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi:nth-child(2n) { border-right: 0; } .kpi:nth-child(n+3) { border-top: 1px solid var(--line); } }
@media (max-width: 1000px) { .cols { grid-template-columns: minmax(0, 1fr); } .scroll { max-height: 320px; } }
@media (max-width: 520px) { .kpi { padding: .95rem 1rem 1.05rem; } .kpi .val { font-size: 1.8rem; } .kpi-top { font-size: .84rem; gap: .5rem; } .cmd-top { padding: 1.3rem 1.2rem 1.2rem; } .load-row { grid-template-columns: 1fr; gap: .3rem; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; left: 0; top: 0; bottom: 0; width: min(284px, 86vw); transform: translateX(-104%); transition: transform var(--spring-dur) var(--spring), visibility 0s linear var(--spring-dur); box-shadow: var(--shadow-float); visibility: hidden; }
  .sidebar.open { transform: none; visibility: visible; transition-delay: 0s; }
  .topbar .menu-btn { display: inline-flex; }
  .search-btn { min-width: 0; width: 34px; padding: 0; justify-content: center; } .search-btn span, .search-btn kbd { display: none; }
  .scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 40; animation: overlay-in 200ms var(--ease-out) both; }
  .board { scroll-snap-type: x proximity; } .col { scroll-snap-align: start; } .col .cards { max-height: none; }
  .kv { grid-template-columns: 1fr; gap: 0; } .kv dd { margin-bottom: .5rem; }
  .cal .day { min-height: 64px; } .cal .ev { font-size: .68rem; }
  .role-facts > div { min-width: 46%; flex: 1; }
  .org-scroll { overflow-x: visible; padding: .75rem; }
  .org-tree ul, .org-tree ul ul { flex-direction: column; align-items: stretch; width: auto; min-width: 0; padding: 8px 0 0 16px; margin-left: 12px; border-left: 1.5px solid rgba(var(--accent-rgb), .38); justify-content: flex-start; }
  .org-tree > ul { border-left: 0; margin-left: 0; padding-left: 0; }
  .org-tree li { padding: 8px 0 0; align-items: stretch; } .org-tree li::before, .org-tree li::after, .org-tree ul ul::before { display: none; }
  .org-card { width: 100%; } .tree-toggle { left: auto; right: 12px; bottom: auto; top: 12px; margin: 0; }
}
@media (max-width: 700px) {
  .board { grid-template-columns: repeat(var(--n), 84vw); }
  .tbar select, .tbar input[type=search] { flex: 1 1 100%; }
  .overlay { align-items: end; padding: 0; }
  .modal, .modal.wide { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; border-bottom: 0; transform-origin: 50% 100%; animation: sheet-in var(--spring-soft-dur) var(--spring-soft) both; }
  .overlay.closing .modal { animation: sheet-out 180ms ease-in both; }
  .modal.no-anim { animation: none; } .overlay.closing .modal.no-anim { animation: sheet-out 180ms ease-in both; }
  .modal > header { position: relative; padding-top: 1.4rem; touch-action: none; }
  .sheet-grip { display: block; position: absolute; top: 7px; left: 50%; width: 38px; height: 4px; margin-left: -19px; border-radius: 2px; background: var(--line-focus); }
  .modal > footer { padding-bottom: calc(.85rem + env(safe-area-inset-bottom)); border-radius: 0; }
  .overlay:has(.palette) { align-items: start; }
  .palette { margin-top: 0; border-radius: 0 0 16px 16px; }
  .auth-card { padding: 1.5rem; }
  @keyframes sheet-in { from { transform: translateY(100%); } to { transform: none; } }
  @keyframes sheet-out { from { transform: none; } to { transform: translateY(100%); } }
}

/* 12 · Barrierefreiheit ------------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
  .content, .modal, .toast, .auth-card, .skeleton, .palette { animation: overlay-in 160ms ease-out both !important; }
  .overlay.closing .modal, .overlay.closing .palette, .toast.leaving { animation: overlay-out 120ms ease-in both !important; }
  .skeleton i { animation: none !important; opacity: .6; } .nav-ind.ready { transition: none !important; } .flow-bar i { animation: none !important; }
}
@media (prefers-reduced-transparency: reduce) { .overlay, .topbar { backdrop-filter: none; } .overlay { background: rgba(5, 4, 10, .94); } .topbar { background: var(--canvas); } }
@media (prefers-contrast: more) {
  :root { --line: rgba(255, 255, 255, .28); --line-strong: rgba(255, 255, 255, .45); --line-focus: rgba(255, 255, 255, .6); --text-2: #d3cee6; --text-3: #bdb7d2; }
}
@media (forced-colors: active) { .btn, .card, .panel, .task, .org-card, .modal { border: 1px solid CanvasText; } .nav-ind { outline: 2px solid Highlight; } }

/* ---- Update-Zentrale (Deployments) ---- */
.dstats { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.dstat { display: flex; flex-direction: column; gap: .6rem; text-align: left; padding: .85rem 1rem .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); color: inherit; cursor: pointer; min-width: 0;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.dstat:active { transform: scale(.975); transition-duration: var(--dur-press); }
.dstat.on { border-color: var(--violet); background: var(--violet-wash); }
@media (hover: hover) { .dstat:hover { border-color: var(--line-focus); } }
.dstat-top { display: flex; align-items: center; gap: .55rem; color: var(--text-2); font-size: .84rem; font-weight: 520; line-height: 1.25; min-height: 2.1em; }
.dstat .val { font-size: 1.9rem; font-weight: 650; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.dstat .kpi-ico { flex: none; }
.dstat.tone-sky .kpi-ico { background: rgba(108, 180, 255, .13); color: #8fc3ff; } .dstat.tone-mint .kpi-ico { background: rgba(79, 209, 161, .13); color: #7fe0bb; }
.dstat.tone-amber .kpi-ico { background: rgba(245, 184, 74, .14); color: #f7c565; } .dstat.tone-danger .kpi-ico { background: rgba(242, 112, 122, .15); color: #f59aa1; }
.dstat.tone-danger .val { color: var(--rose); }
.dboard { grid-template-columns: repeat(var(--n), minmax(196px, 1fr)); }
.col[data-status='development'] > header::before { background: var(--sky); } .col[data-status='testing'] > header::before { background: var(--amber); }
.col[data-status='ready'] > header::before { background: var(--mint); } .col[data-status='failed'] > header::before { background: var(--rose); }
.dcard { text-decoration: none; color: inherit; user-select: auto; } .dcard:hover { text-decoration: none; }
.dcard .chips { gap: .3rem; } .dcard .meta .badge { font-size: .72rem; padding: .05rem .45rem; } .dcard .top .badge { font-size: .72rem; padding: .05rem .45rem; }
.back { display: inline-block; margin-bottom: .6rem; color: var(--text-2); } .dhead { margin-bottom: 1.1rem; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .45rem; }
.step { display: flex; flex-direction: column; gap: .45rem; font-size: .82rem; color: var(--text-3); font-weight: 550; min-width: 0; }
.step i { display: block; height: 4px; border-radius: 4px; background: var(--line-strong); }
.step.past { color: var(--text-2); } .step.past i { background: var(--mint); }
.step.now { color: var(--text); } .step.now i { background: var(--violet); } .step.now.fail { color: var(--rose); } .step.now.fail i { background: var(--rose); }
.step.skip { opacity: .55; }
.dstack { display: flex; flex-direction: column; gap: 1.25rem; min-width: 0; }
.dstack > .panel .panel-body { padding: 1rem 1.15rem 1.1rem; }
.lrow { display: flex; align-items: center; gap: .6rem; padding: .5rem 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; } .lrow:last-child { border-bottom: 0; }
.lrow .grow { flex: 1; min-width: 150px; overflow-wrap: anywhere; }
.kv-tight { grid-template-columns: 118px 1fr; }
.reasons { margin: .6rem 0; padding-left: 1.1rem; display: grid; gap: .25rem; }
.pick { border: 1px solid var(--line-strong); border-radius: var(--r-ctl); background: var(--raised); min-width: 0; }
.pick > input { border: 0; border-bottom: 1px solid var(--line); border-radius: var(--r-ctl) var(--r-ctl) 0 0; background: transparent; }
.pick-list { max-height: 150px; overflow: auto; padding: .45rem .7rem; display: flex; flex-direction: column; gap: .35rem; }
.timeline { list-style: none; margin: 0; padding: 0; max-height: 560px; overflow: auto; }
.timeline li { display: flex; gap: .7rem; padding: .5rem 0; position: relative; }
.timeline li:not(:last-child)::before { content: ''; position: absolute; left: 11px; top: 32px; bottom: -6px; width: 1px; background: var(--line-strong); }
.tl-dot { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--raised-2); color: var(--violet-hi); } .tl-dot svg { width: 13px; height: 13px; }
.tl-status .tl-dot { background: var(--violet-wash); } .tl-body { min-width: 0; } .tl-text { overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.4; }
@media (max-width: 1500px) { .dstats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: .8rem; } }
@media (max-width: 700px) { .dstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .dstat .val { font-size: 1.6rem; } .dhead .actions { margin-left: 0; width: 100%; } .kv-tight { grid-template-columns: 1fr; gap: .1rem; } .kv-tight dd { margin-bottom: .5rem; } }
.dcard .role-chip { max-width: 100%; }
/* Laptop-Breiten: Spalten umbrechen statt seitlich zu scrollen; Tablet/Handy behalten das Wisch-Board */
@media (min-width: 901px) and (max-width: 1500px) { .dboard { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); overflow-x: visible; } }
@media (max-width: 700px) { .dboard { grid-template-columns: repeat(var(--n), 84vw); } }
/* Handy: Kennzahlen als wischbare Leiste, Filter zweispaltig – das Board soll schnell erreichbar sein */
@media (max-width: 700px) {
  .dstats { display: flex; overflow-x: auto; gap: .6rem; scroll-snap-type: x proximity; margin-inline: calc(-1 * clamp(1rem, 2.6vw, 2.4rem)); padding-inline: clamp(1rem, 2.6vw, 2.4rem); scrollbar-width: none; }
  .dstats::-webkit-scrollbar { display: none; }
  .dstat { flex: 0 0 148px; scroll-snap-align: start; padding: .7rem .8rem .8rem; }
  .dstat-top { font-size: .8rem; min-height: 2.5em; }
  .dtbar select { flex: 1 1 calc(50% - .3rem); min-width: 0; }
}
.dstack .check-item.done span { text-decoration: none; color: var(--text-2); }

/* ---- @Erwähnungen, Benachrichtigungen, Sprung zur Nachricht ---- */
.mention { color: var(--violet-hi); background: var(--violet-wash); border-radius: 5px; padding: 0 .28rem; font-weight: 600; white-space: nowrap; }
.mention.me { background: rgba(var(--accent-rgb), .34); color: #fff; }
.mention-wrap { position: relative; }
.mention-pop { position: absolute; left: 0; top: calc(100% + 4px); z-index: 40; min-width: min(260px, 100%); max-width: 100%; max-height: 236px; overflow-y: auto; padding: .3rem; background: var(--float, var(--raised-2)); border: 1px solid var(--line-strong); border-radius: 12px; box-shadow: 0 14px 40px rgba(0, 0, 0, .5); animation: pop-in 140ms var(--ease-out) both; }
.mention-pop.up { top: auto; bottom: calc(100% + 4px); }
.mention-opt { display: flex; align-items: center; gap: .6rem; padding: .4rem .55rem; border-radius: 8px; cursor: pointer; }
.mention-opt .nm { flex: 1; font-weight: 580; overflow: hidden; text-overflow: ellipsis; } .mention-opt .rl { color: var(--text-3); font-size: .78rem; }
.mention-opt.on { background: var(--violet-wash); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .45); }
@keyframes pop-in { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
.comment { border-radius: 10px; transition: background-color var(--dur) var(--ease-out); }
.comment.flash { animation: cflash 2.6s var(--ease-out) 1; }
@keyframes cflash { 0% { background: rgba(var(--accent-rgb), .34); box-shadow: 0 0 0 2px var(--violet); } 100% { background: transparent; box-shadow: 0 0 0 2px transparent; } }
.c-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.nlist { display: flex; flex-direction: column; margin-top: .8rem; border: 1px solid var(--line); border-radius: var(--r-panel); overflow: hidden; }
.nlist > .empty { border: 0; }
.nitem { display: flex; align-items: flex-start; gap: .75rem; padding: .8rem .95rem; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background-color var(--dur-fast) var(--ease-out); }
.nitem:last-child { border-bottom: 0; }
.nitem.unread { background: rgba(var(--accent-rgb), .09); box-shadow: inset 3px 0 0 var(--violet); }
@media (hover: hover) { .nitem:hover { background: rgba(var(--accent-rgb), .14); } }
.nitem .avatar, .nitem .nico { flex: none; margin-top: .1rem; } .nico { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--raised-2); color: var(--violet-hi); }
.nbody { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.nhead { line-height: 1.35; overflow-wrap: anywhere; } .nsub { color: var(--text-2); font-size: .88rem; overflow-wrap: anywhere; } .nsub b { color: var(--text); font-weight: 600; }
.nquote { color: var(--text-2); font-size: .88rem; border-left: 2px solid var(--line-strong); padding-left: .6rem; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nread { flex: none; opacity: .7; } .nitem:hover .nread { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .comment.flash { animation: none; box-shadow: 0 0 0 2px var(--violet); } .mention-pop { animation: none; } }

/* ---- Plugin-Verwaltung ---- */
.pstats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.srvbar, .catbar { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1rem; }
.catbar { margin: 0 0 1rem; }
.srvchip, .catchip { display: inline-flex; align-items: center; gap: .5rem; padding: .38rem .8rem .38rem .65rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text-2); cursor: pointer; font-weight: 560; font-size: .9rem; white-space: nowrap;
  transition: border-color var(--dur-fast) var(--ease-out), background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--spring-dur) var(--spring); }
.srvchip:active, .catchip:active { transform: scale(.96); transition-duration: var(--dur-press); }
.srvchip svg, .catchip svg { width: 16px; height: 16px; flex: none; }
.srvchip small { color: var(--text-3); font-weight: 500; font-size: .76rem; }
.srvchip b, .catchip b { font-weight: 600; font-size: .78rem; color: var(--text-3); background: var(--raised); border-radius: 999px; padding: 0 .45rem; min-width: 20px; text-align: center; font-variant-numeric: tabular-nums; }
.srvchip.on { background: var(--violet-wash); border-color: var(--violet); color: var(--text); } .srvchip.on b { background: rgba(var(--accent-rgb), .3); color: var(--text); }
.catchip { --c: var(--violet-hi); padding: .3rem .7rem .3rem .55rem; font-size: .86rem; } .catchip svg { color: var(--c); }
.catchip.on { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); color: var(--text); }
@media (hover: hover) { .srvchip:hover, .catchip:hover { border-color: var(--line-focus); color: var(--text); } }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr)); gap: 1rem; align-items: stretch; }
.pcard { --c: #94a3b8; position: relative; display: flex; flex-direction: column; gap: .75rem; padding: 1.05rem 1.1rem .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; color: inherit; text-decoration: none; overflow: hidden; min-width: 0;
  transition: border-color var(--dur) var(--ease-out), transform var(--spring-dur) var(--spring), background-color var(--dur) var(--ease-out); }
.pcard::before { content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--c), transparent 85%); opacity: .85; }
.pcard:active { transform: scale(.985); transition-duration: var(--dur-press); }
@media (hover: hover) { .pcard:hover { border-color: color-mix(in srgb, var(--c) 55%, var(--line-focus)); background: var(--raised); text-decoration: none; transform: translateY(-2px); } }
.pcard.archived, tr.archived { opacity: .6; }
.pc-head { display: flex; align-items: center; gap: .7rem; min-width: 0; } .pc-title { flex: 1; min-width: 0; display: flex; flex-direction: column; } .pc-title strong { font-size: 1.04rem; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-cat { color: var(--c); font-size: .78rem; font-weight: 600; }
.pc-ico { --c: #94a3b8; flex: none; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c) 26%, transparent); }
.pc-ico svg { width: 19px; height: 19px; } .pc-ico.sm { width: 26px; height: 26px; border-radius: 8px; } .pc-ico.sm svg { width: 14px; height: 14px; } .pc-ico.lg { width: 56px; height: 56px; border-radius: 16px; } .pc-ico.lg svg { width: 28px; height: 28px; }
.pc-desc { color: var(--text-2); font-size: .9rem; line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; min-height: 2.6em; }
.pc-ver { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; } .pc-ver small { color: var(--text-3); }
.pc-ok { display: inline-flex; align-items: center; gap: .25rem; color: #7fe0bb; font-size: .78rem; font-weight: 600; margin-left: auto; } .pc-ok svg { width: 13px; height: 13px; }
.pc-un { color: var(--text-3); font-size: .78rem; margin-left: auto; }
code.ver { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .82rem; padding: .08rem .45rem; border-radius: 6px; background: var(--raised); border: 1px solid var(--line-strong); color: var(--text); white-space: nowrap; }
code.ver.plan { color: #8fc3ff; border-style: dashed; }
.pc-srv, .srvdots { display: flex; flex-wrap: wrap; gap: .35rem; }
.srv-chip { --sc: var(--text-3); display: inline-flex; align-items: center; gap: .38rem; padding: .08rem .55rem .08rem .45rem; border-radius: 999px; background: var(--raised); border: 1px solid var(--line); font-size: .78rem; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.srv-chip i { width: 7px; height: 7px; border-radius: 50%; background: var(--sc); flex: none; } .srv-chip.more { padding-inline: .5rem; color: var(--text-3); }
.st-active { --sc: var(--mint); } .st-tested { --sc: var(--sky); } .st-review { --sc: var(--amber); } .st-problematic { --sc: var(--rose); } .st-planned i { background: transparent; box-shadow: inset 0 0 0 1.5px var(--text-3); } .st-retired { --sc: #5b5870; }
.pc-foot { display: flex; align-items: center; gap: .6rem; margin-top: auto; padding-top: .75rem; border-top: 1px solid var(--line); min-height: 44px; }
.ptable table { font-size: .9rem; } .ptable td, .ptable th { padding: .5rem .85rem; white-space: nowrap; } .ptable td:first-child { min-width: 220px; }
.ptable th.sortable button { background: none; border: 0; color: inherit; font: inherit; font-weight: 600; cursor: pointer; padding: 0; display: inline-flex; gap: .3rem; } .ptable .arr { color: var(--violet-hi); }
.ptable tbody tr { transition: background-color var(--dur-fast) var(--ease-out); } @media (hover: hover) { .ptable tbody tr:hover { background: rgba(var(--accent-rgb), .07); } }
.badge[style*='--c'] { background: color-mix(in srgb, var(--c) 16%, transparent); color: var(--c); }
.warn-box { display: flex; gap: .8rem; align-items: flex-start; padding: .8rem 1rem; margin-bottom: 1.1rem; background: rgba(245, 184, 74, .09); border: 1px solid rgba(245, 184, 74, .35); border-radius: var(--r-ctl); color: #f7c565; }
.warn-box svg { width: 20px; height: 20px; flex: none; margin-top: .1rem; } .warn-box ul { margin: .35rem 0 0; padding-left: 1.1rem; color: var(--text-2); display: grid; gap: .2rem; } .warn-box strong { color: #f7c565; } .warn-box a { color: var(--violet-hi); }
.vendor { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; padding: .55rem .75rem; background: var(--raised); border-radius: var(--r-ctl); }
.instlist { display: grid; gap: .8rem; }
.inst { border: 1px solid var(--line); border-left: 3px solid var(--sc, var(--line-strong)); border-radius: 12px; padding: .8rem .95rem; background: rgba(255, 255, 255, .015); }
.inst-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .7rem; } .inst-head svg { width: 16px; height: 16px; color: var(--text-3); }
.inst-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .8rem 1.2rem; }
.inst-grid > div { display: flex; flex-direction: column; gap: .25rem; align-items: flex-start; min-width: 0; } .inst-grid small, .inst-notes small { color: var(--text-3); font-size: .76rem; }
.inst-notes { margin-top: .75rem; padding-top: .65rem; border-top: 1px dashed var(--line-strong); display: flex; flex-direction: column; gap: .2rem; font-size: .88rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.docrows, .mrows { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; } .docrow { display: grid; grid-template-columns: 1fr 2fr auto; gap: .5rem; width: 100%; }
.mrow { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; width: 100%; } .mrow input[type=text], .mrow input:not([type]) { flex: 1 1 160px; min-width: 0; } .mrow select { width: auto; flex: 0 1 140px; } .mrow input[type=color] { width: 42px; height: 34px; padding: 2px; flex: none; }
.mrow.srv input { flex: 1 1 110px; }
.plrows { display: flex; flex-direction: column; gap: .4rem; margin-bottom: .5rem; } .plrow { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; padding: .4rem .7rem; background: var(--raised); border-radius: var(--r-ctl); } .plrow strong { flex: 1; min-width: 120px; }
.plpick { display: flex; gap: .5rem; flex-wrap: wrap; } .plpick select, .plpick input { flex: 1 1 140px; min-width: 0; width: auto; }
@media (max-width: 1100px) { .pstats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 700px) { .dstats.pstats { display: flex; } .docrow { grid-template-columns: 1fr; } .srvbar, .catbar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-inline: calc(-1 * clamp(1rem, 2.6vw, 2.4rem)); padding-inline: clamp(1rem, 2.6vw, 2.4rem); } .srvbar::-webkit-scrollbar, .catbar::-webkit-scrollbar { display: none; } }

/* ---- Online-Status ---- */
.avatar { position: relative; }
.pdot { position: absolute; right: -2px; bottom: -2px; width: 10px; height: 10px; border-radius: 50%; background: #6b6a80; box-shadow: 0 0 0 2px var(--surface); transition: background-color 350ms var(--ease-out), opacity 200ms var(--ease-out), transform 350ms var(--spring); pointer-events: none; }
.pdot:not(.on):not(.off) { display: none; }
.pdot.on { background: var(--mint); }
.pdot.on.inline, .pdot.off.inline { position: static; display: inline-block; flex: none; margin-right: .4rem; vertical-align: 1px; box-shadow: none; }
.pdot.off { opacity: .85; }
.avatar.sm .pdot { width: 7px; height: 7px; right: -1px; bottom: -1px; box-shadow: 0 0 0 1.5px var(--surface); }
.avatar.lg .pdot { width: 14px; height: 14px; right: -3px; bottom: -3px; box-shadow: 0 0 0 3px var(--surface); }
.card .avatar .pdot { box-shadow: 0 0 0 2px var(--surface); }
.pstatus { display: inline-flex; align-items: center; font-size: .9rem; color: var(--text-2); } .pstatus .on { color: #7fe0bb; font-weight: 600; }
@media (prefers-reduced-motion: reduce) { .pdot { transition: none; } }

/* ---- Einstellungen, Animationen reduzieren, kompakte Darstellung ---- */
.setpage { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 2.4rem; align-items: start; max-width: 1080px; }
.setnav { position: sticky; top: calc(var(--topbar) + 1rem); display: flex; flex-direction: column; gap: .2rem; }
.setnav button { display: flex; align-items: center; gap: .65rem; padding: .55rem .8rem; border: 0; border-radius: var(--r-ctl); background: transparent; color: var(--text-2); cursor: pointer; font-weight: 560; text-align: left;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out); }
.setnav button svg { width: 18px; height: 18px; flex: none; }
.setnav button.on { background: var(--violet-wash); color: var(--text); box-shadow: inset 2px 0 0 var(--violet); }
@media (hover: hover) { .setnav button:hover:not(.on) { background: rgba(255, 255, 255, .04); color: var(--text); } }
.setbody { min-width: 0; display: flex; flex-direction: column; gap: 1.4rem; }
.setbody > h2 { font-size: 1.35rem; letter-spacing: -.02em; margin-bottom: -.6rem; }
.sgroup { display: flex; flex-direction: column; } .sgroup > h3 { margin-bottom: .2rem; } .sgroup > p { margin: 0 0 .5rem; max-width: 70ch; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: .85rem 0; border-top: 1px solid var(--line); min-height: 58px; }
.sgroup > .srow:last-child { border-bottom: 1px solid var(--line); }
.srow .stxt { display: flex; flex-direction: column; gap: .15rem; min-width: 0; } .srow .stxt small { color: var(--text-2); font-size: .84rem; line-height: 1.4; max-width: 62ch; }
.srow.check { flex-direction: row-reverse; cursor: pointer; } .srow.off { opacity: .5; } .srow.off, .srow.off * { cursor: not-allowed; }
.sprofile { display: flex; align-items: center; gap: 1.1rem; padding-bottom: .4rem; } .sprofile h2 { font-size: 1.5rem; margin-bottom: .3rem; }
.sform { display: flex; flex-direction: column; max-width: 460px; gap: .1rem; } .sform h3 { margin-bottom: .6rem; }
.themes { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: .9rem; margin-top: .4rem; }
.tcard { position: relative; display: flex; flex-direction: column; gap: .6rem; padding: .6rem .6rem .8rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); cursor: pointer;
  transition: border-color var(--dur) var(--ease-out), transform var(--spring-dur) var(--spring), box-shadow var(--dur) var(--ease-out); }
.tcard > input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.tcard:active { transform: scale(.98); transition-duration: var(--dur-press); }
@media (hover: hover) { .tcard:hover { border-color: var(--line-focus); } }
.tcard:has(input:checked) { border-color: var(--violet); box-shadow: 0 0 0 1px var(--violet), 0 8px 26px rgba(var(--accent-rgb), .18); }
.tcard:has(input:focus-visible) { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.tname { display: flex; flex-direction: column; padding: 0 .3rem; } .tname small { color: var(--text-2); font-size: .8rem; }
.tswatch { position: absolute; right: 1rem; bottom: .95rem; width: 16px; height: 16px; border-radius: 50%; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong); }
.tcheck { position: absolute; top: .95rem; right: .95rem; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-btn); color: var(--on-accent); opacity: 0; transform: scale(.6); transition: opacity var(--dur) var(--ease-out), transform var(--spring-dur) var(--spring); }
.tcheck svg { width: 13px; height: 13px; } .tcard:has(input:checked) .tcheck { opacity: 1; transform: none; }
/* Vorschau: ein Mini-Fenster, das die Tokens der jeweiligen Palette benutzt (data-theme direkt an der Vorschau) */
.tprev { display: grid; grid-template-columns: 22% 1fr; height: 104px; border-radius: 9px; overflow: hidden; background: var(--canvas); border: 1px solid var(--line-strong); }
.tp-side { background: var(--surface); border-right: 1px solid var(--line); box-shadow: inset 0 14px 0 -10px var(--violet-wash); } .tp-main { display: flex; flex-direction: column; gap: 7px; padding: 7px; min-width: 0; }
.tp-bar { height: 8px; border-radius: 4px; background: var(--raised-2); width: 55%; }
.tp-card { flex: 1; display: flex; flex-direction: column; gap: 5px; padding: 8px; border-radius: 7px; background: var(--raised); border: 1px solid var(--line); }
.tp-line { height: 5px; border-radius: 3px; background: var(--text-3); opacity: .55; width: 80%; } .tp-line.s { width: 50%; opacity: .35; }
.tp-row { display: flex; align-items: center; gap: 6px; margin-top: auto; } .tp-btn { width: 34px; height: 12px; border-radius: 5px; background: var(--accent-btn); } .tp-chip { width: 22px; height: 12px; border-radius: 6px; background: var(--violet-wash); box-shadow: inset 0 0 0 1px var(--violet); }
@media (max-width: 900px) {
  .setpage { grid-template-columns: minmax(0, 1fr); gap: 1.2rem; }
  .setnav { position: static; flex-direction: row; overflow-x: auto; gap: .3rem; scrollbar-width: none; padding-bottom: .3rem; border-bottom: 1px solid var(--line); } .setnav::-webkit-scrollbar { display: none; }
  .setnav button { flex: none; } .setnav button.on { box-shadow: inset 0 -2px 0 var(--violet); }
}

/* Animationen reduzieren (persönliche Einstellung) – spiegelt prefers-reduced-motion */
html[data-motion='reduced'] *, html[data-motion='reduced'] *::before, html[data-motion='reduced'] *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
html[data-motion='reduced'] .content, html[data-motion='reduced'] .modal, html[data-motion='reduced'] .toast, html[data-motion='reduced'] .auth-card, html[data-motion='reduced'] .skeleton, html[data-motion='reduced'] .palette { animation: overlay-in 160ms ease-out both !important; }
html[data-motion='reduced'] .overlay.closing .modal, html[data-motion='reduced'] .overlay.closing .palette, html[data-motion='reduced'] .toast.leaving { animation: overlay-out 120ms ease-in both !important; }
html[data-motion='reduced'] .skeleton i { animation: none !important; opacity: .6; } html[data-motion='reduced'] .nav-ind.ready { transition: none !important; } html[data-motion='reduced'] .flow-bar i { animation: none !important; }
html[data-motion='reduced'] .comment.flash { animation: none; box-shadow: 0 0 0 2px var(--violet); } html[data-motion='reduced'] .pdot { transition: none; }

/* Kompakte Darstellung (persönliche Einstellung): kleinere Schrift, engere Abstände */
html[data-density='compact'], html[data-density='compact'] body { font-size: 13.5px; }
html[data-density='compact'] .content { padding-top: 1.2rem; padding-bottom: 3rem; }
html[data-density='compact'] .page-head { margin-bottom: 1.1rem; }
html[data-density='compact'] .panel-head { padding: .55rem 1rem; min-height: 44px; }
html[data-density='compact'] .panel-body { padding: .8rem 1rem; }
html[data-density='compact'] .item { padding: .5rem 1rem; }
html[data-density='compact'] .btn { min-height: 30px; padding: .22rem .75rem; }
html[data-density='compact'] .btn.sm { min-height: 26px; }
html[data-density='compact'] .field { margin-bottom: .65rem; }
html[data-density='compact'] td, html[data-density='compact'] th { padding-top: .38rem; padding-bottom: .38rem; }
html[data-density='compact'] .task, html[data-density='compact'] .pcard { padding: .6rem .7rem; gap: .4rem; }
html[data-density='compact'] .col { padding: .5rem; } html[data-density='compact'] .board, html[data-density='compact'] .pgrid { gap: .7rem; }
html[data-density='compact'] .srow { padding: .55rem 0; min-height: 48px; }
html[data-density='compact'] .nav a { padding-top: .38rem; padding-bottom: .38rem; }
@media (max-width: 700px) { .themes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; } .tprev { height: 82px; } .tname small { display: none; } .tswatch { bottom: .75rem; right: .8rem; } .srow { gap: .8rem; } }

/* Profilbilder: immer rund; Bild liegt über den Initialen, der Präsenzpunkt bleibt oben */
.avatar .av-ini { line-height: 1; user-select: none; }
.avatar .av-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--raised-2); }
.avatar.xl { width: 84px; height: 84px; font-size: 2rem; border-radius: 50%; }
.avatar.xl .pdot { width: 18px; height: 18px; right: 0; bottom: 2px; box-shadow: 0 0 0 3px var(--surface); }
.topav { display: inline-flex; border-radius: 50%; margin-left: auto; } .topav .avatar { width: 32px; height: 32px; font-size: .8rem; }
.topav .avatar.sm { width: 32px; height: 32px; font-size: .8rem; } .topav .avatar.sm .pdot { width: 10px; height: 10px; box-shadow: 0 0 0 2px var(--canvas); }
.topav:hover .avatar, .topav:focus-visible .avatar { box-shadow: 0 0 0 2px rgba(var(--accent-rgb), .7); }
.avbtn { position: relative; background: none; border: 0; padding: 0; border-radius: 50%; cursor: pointer; flex: none; line-height: 0; }
.avbtn .avedit { position: absolute; inset: 0; border-radius: 50%; display: grid; place-items: center; background: rgba(8, 7, 14, .62); color: #fff; opacity: 0; transition: opacity 160ms var(--ease-out); }
.avbtn:hover .avedit, .avbtn:focus-visible .avedit { opacity: 1; }
.avbtn .avedit svg { width: 22px; height: 22px; }

/* Upload- und Zuschneide-Dialog */
.ave-dz { display: grid; justify-items: center; gap: .45rem; text-align: center; padding: 2.6rem 1.2rem; border: 2px dashed var(--line-strong, var(--line)); border-radius: 16px; cursor: pointer; transition: border-color 160ms, background-color 160ms; }
.ave-dz svg { width: 28px; height: 28px; color: var(--violet-hi); }
.ave-dz:hover, .ave-dz:focus-visible, .ave-dz.over { border-color: var(--violet); background: rgba(var(--accent-rgb), .08); outline: none; }
.ave-grid { display: grid; grid-template-columns: auto 1fr; gap: 1.5rem; align-items: start; }
.ave-frame { position: relative; width: min(320px, 78vw); aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: #0c0b14; touch-action: none; }
.ave-stage { width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; outline-offset: -2px; } .ave-stage.grab { cursor: grabbing; }
.ave-mask { position: absolute; inset: 0; pointer-events: none; border-radius: 14px; background: radial-gradient(circle closest-side, transparent 99%, rgba(8, 7, 14, .66) 100%); box-shadow: inset 0 0 0 1px var(--line); }
.ave-ctl { display: flex; align-items: center; gap: .6rem; margin-top: .7rem; } .ave-zoom { flex: 1; accent-color: var(--violet); }
.ave-right { display: grid; gap: .7rem; align-content: start; } .ave-right h3 { font-size: 1rem; }
.ave-previews { display: flex; align-items: flex-end; gap: 1rem; }
.ave-pv { display: inline-flex; border-radius: 50%; overflow: hidden; background: var(--raised-2); } .ave-prev { width: 100%; height: 100%; display: block; }
@media (max-width: 640px) { .ave-grid { grid-template-columns: 1fr; justify-items: center; } .ave-right { justify-items: center; text-align: center; } }

/* Design „Custom“: Farbwähler */
.tswatch.rainbow { background: conic-gradient(#ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444); }
.tprev.empty { background: linear-gradient(135deg, #14121f, #1b1730); } .tprev.empty .tp-btn { background: conic-gradient(#ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ef4444); }
.cpanel { margin-top: 1rem; padding: 1.1rem; border: 1px solid var(--line-strong); border-radius: 14px; background: var(--surface); } .cpanel.hidden { display: none; }
.cpanel-head { display: grid; gap: .2rem; margin-bottom: .9rem; max-width: 62ch; } .cpanel-head small { font-size: .82rem; line-height: 1.45; }
.cp { display: grid; gap: .9rem; max-width: 420px; }
.cp-sv { position: relative; height: 220px; border-radius: 12px; cursor: crosshair; touch-action: none; user-select: none;
  background: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent), hsl(var(--h, 260) 100% 50%); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cp-hue { position: relative; height: 16px; border-radius: 8px; cursor: ew-resize; touch-action: none; user-select: none; box-shadow: inset 0 0 0 1px var(--line-strong);
  background: linear-gradient(to right, #f00 0, #ff0 16.66%, #0f0 33.33%, #0ff 50%, #00f 66.66%, #f0f 83.33%, #f00 100%); }
.cp-knob { position: absolute; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .5); pointer-events: none; transition: transform 120ms var(--ease-out); }
.cp-hue .cp-knob { top: 50%; } .cp-sv.drag .cp-knob, .cp-hue.drag .cp-knob { transform: scale(1.15); }
.cp-sv:focus-visible, .cp-hue:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 3px; }
.cp-foot { display: flex; align-items: center; gap: .7rem; } .cp-swatch { width: 38px; height: 38px; border-radius: 10px; flex: none; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .18); }
.cp-hex { width: 9rem; font-family: ui-monospace, Consolas, monospace; letter-spacing: .04em; } .cp-err { color: var(--rose); }
@media (prefers-reduced-motion: reduce) { .cp-knob { transition: none; } }

/* Klickbare Namen und Profilbilder */
.ulink { cursor: pointer; border-radius: 4px; transition: color var(--dur-fast, 120ms) var(--ease-out, ease); }
@media (hover: hover) { .ulink:hover { color: var(--violet-hi); text-decoration: underline; text-underline-offset: 3px; } }
.ulink:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.mention.ulink { cursor: pointer; }
.avatar[data-pres] { cursor: pointer; } .avbtn .avatar, .topav .avatar, .side-user .avatar, .pf-head .avatar, .mention-opt .avatar { cursor: inherit; }
@media (hover: hover) { .avatar[data-pres]:hover { filter: brightness(1.12); } .avbtn .avatar:hover, .topav .avatar:hover, .side-user .avatar:hover, .pf-head .avatar:hover { filter: none; } }
.avatar.xxl { width: 104px; height: 104px; font-size: 2.4rem; border-radius: 50%; }
.avatar.xxl .pdot { width: 22px; height: 22px; right: 4px; bottom: 6px; box-shadow: 0 0 0 4px var(--float); }

/* Emoji-Reaktionen */
.rx { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .4rem; }
.rx-b { display: inline-flex; align-items: center; gap: .3rem; height: 26px; padding: 0 .55rem 0 .45rem; border-radius: 13px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text-2); font: inherit; font-size: .82rem; cursor: pointer; line-height: 1;
  transition: background-color 140ms var(--ease-out), border-color 140ms var(--ease-out), transform var(--spring-dur, 300ms) var(--spring, ease-out); animation: rx-pop 260ms var(--ease-out) both; }
.rx-e { font-size: 1rem; line-height: 1; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; } .rx-n { font-variant-numeric: tabular-nums; font-weight: 600; }
@media (hover: hover) { .rx-b:hover { border-color: var(--line-focus); background: var(--raised-2); } }
.rx-b:active { transform: scale(.94); transition-duration: 60ms; }
.rx-b.mine { background: rgba(var(--accent-rgb), .18); border-color: rgba(var(--accent-rgb), .6); color: var(--text); }
.rx-b.mine .rx-n { color: var(--violet-hi); }
.rx-b:focus-visible, .rx-add:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.rx-add { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 26px; width: 30px; padding: 0; border-radius: 13px; border: 1px dashed var(--line-strong); background: transparent; color: var(--text-3); cursor: pointer; transition: opacity 140ms, color 140ms, border-color 140ms, background-color 140ms; }
.rx-add svg { width: 15px; height: 15px; } .rx-plus { position: absolute; right: 3px; top: 0; font-size: .7rem; font-weight: 700; line-height: 1; }
@media (hover: hover) { .rx-add:hover { color: var(--violet-hi); border-color: var(--violet); background: var(--violet-wash); } }
@media (hover: hover) and (min-width: 700px) { .rx.norx .rx-add { opacity: 0; } .comment:hover .rx.norx .rx-add, .comment:focus-within .rx.norx .rx-add, .rx.norx .rx-add:focus-visible { opacity: 1; } }
@keyframes rx-pop { from { transform: scale(.7); opacity: 0; } to { transform: none; opacity: 1; } }
.rx-tip { position: fixed; z-index: 450; max-width: min(300px, 86vw); display: flex; align-items: center; gap: .55rem; padding: .5rem .7rem; border-radius: 10px; background: var(--float); border: 1px solid var(--line-strong); box-shadow: 0 10px 30px rgba(0, 0, 0, .45); font-size: .8rem; color: var(--text); pointer-events: none; animation: rx-pop 140ms var(--ease-out) both; }
.rx-tip-e { font-size: 1.5rem; line-height: 1; }

/* Emoji-Picker */
.epick { position: fixed; z-index: 400; width: 344px; max-width: calc(100vw - 16px); height: 392px; max-height: calc(100vh - 16px); display: flex; flex-direction: column; border-radius: 14px; background: var(--float); border: 1px solid var(--line-strong); box-shadow: 0 18px 50px rgba(0, 0, 0, .55); overflow: hidden; transform-origin: top left; animation: ep-in 160ms var(--ease-out) both; }
.epick.from-below { transform-origin: bottom left; }
@keyframes ep-in { from { opacity: 0; transform: translateY(-6px) scale(.97); } to { opacity: 1; transform: none; } }
.ep-search { margin: .6rem .6rem .3rem; width: auto; }
.ep-tabs { display: flex; gap: .1rem; padding: 0 .45rem .3rem; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; } .ep-tabs::-webkit-scrollbar { display: none; }
.ep-tab { flex: none; width: 34px; height: 30px; border: 0; border-radius: 8px; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1; opacity: .7; transition: opacity 120ms, background-color 120ms; }
.ep-tab:hover, .ep-tab:focus-visible { opacity: 1; background: var(--raised-2); outline: none; }
.ep-body { flex: 1; overflow-y: auto; padding: .2rem .6rem .7rem; overscroll-behavior: contain; }
.ep-h { position: sticky; top: 0; z-index: 1; padding: .5rem 0 .25rem; font-size: .72rem; font-weight: 600; color: var(--text-3); background: var(--float); }
.ep-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.ep-e { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; font-size: 1.35rem; line-height: 1; cursor: pointer; padding: 0; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; transition: background-color 100ms, transform 120ms var(--ease-out); }
.ep-e:hover, .ep-e:focus-visible { background: var(--raised-2); transform: scale(1.18); outline: none; } .ep-e:focus-visible { box-shadow: 0 0 0 2px var(--violet-hi); }
.ep-none { display: grid; gap: .3rem; padding: 2rem 1rem; text-align: center; color: var(--text-2); } .ep-none small { color: var(--text-3); }
.ep-backdrop { position: fixed; inset: 0; z-index: 399; background: rgba(0, 0, 0, .5); }
.epick.sheet { left: 0; right: 0; bottom: 0; top: auto; width: auto; max-width: none; height: min(62vh, 440px); border-radius: 18px 18px 0 0; transform-origin: bottom center; animation: ep-up 220ms var(--ease-out) both; }
@keyframes ep-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.epick.sheet .ep-grid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); } .epick.sheet .ep-e { font-size: 1.5rem; }

/* Emoji-Knopf im Textfeld */
.mention-wrap.has-emoji { position: relative; } .mention-wrap.has-emoji textarea { padding-right: 2.6rem; }
.emo-slot { position: absolute; right: .35rem; bottom: .35rem; } .emo-btn { height: 30px; width: 30px; padding: 0; justify-content: center; color: var(--text-3); } .emo-btn:hover { color: var(--violet-hi); }

/* Profil */
.pf { display: grid; gap: 1.1rem; }
.pf-head { position: relative; }
.pf-banner { height: 92px; border-radius: 12px; background: radial-gradient(120% 140% at 85% -20%, rgba(var(--accent-rgb), .55), transparent 60%), linear-gradient(135deg, rgba(var(--accent-rgb), .28), rgba(var(--accent-deep-rgb), .12) 55%, var(--raised)); box-shadow: inset 0 0 0 1px var(--line); }
.pf-id { display: flex; align-items: flex-end; gap: 1rem; padding: 0 1.1rem; margin-top: -48px; position: relative; }
.pf-av { flex: none; padding: 4px; border-radius: 50%; background: var(--float); } .pf-av .avatar { box-shadow: 0 0 0 1px var(--line-strong); }
.pf-name { display: grid; gap: .45rem; padding-bottom: .15rem; min-width: 0; } .pf-name h2 { font-size: 1.55rem; margin: 0; overflow-wrap: anywhere; }
.pf-chips { display: flex; flex-wrap: wrap; gap: .3rem; }
.pf-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: .6rem .9rem; margin: 0; padding: .85rem 1rem; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.pf-fact dt { font-size: .72rem; color: var(--text-3); margin-bottom: .1rem; } .pf-fact dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.pf-bio { margin: 0; padding: .1rem 0 .1rem 1rem; border-left: 3px solid rgba(var(--accent-rgb), .6); color: var(--text-2); font-size: .95rem; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-block h3, .pf-sec h3 { font-size: .95rem; margin: 0 0 .55rem; }
.pf-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .6rem; }
.pf-stat { position: relative; display: grid; gap: .1rem; padding: .8rem .9rem; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); }
.pf-stat b { font-size: 1.7rem; line-height: 1.1; font-variant-numeric: tabular-nums; } .pf-stat > span:last-child { font-size: .8rem; color: var(--text-2); }
.pf-sico { position: absolute; top: .7rem; right: .75rem; color: var(--violet-hi); opacity: .8; } .pf-sico svg { width: 16px; height: 16px; }
.pf-act { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.pf-act a, .pf-arow { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 10px; color: inherit; text-decoration: none; }
@media (hover: hover) { .pf-act a:hover { background: rgba(var(--accent-rgb), .08); text-decoration: none; } }
.pf-aico { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: var(--violet-wash); color: var(--violet-hi); } .pf-aico svg { width: 15px; height: 15px; }
.pf-atxt { display: grid; min-width: 0; flex: 1; } .pf-atxt b { font-weight: 600; font-size: .88rem; } .pf-atxt small { color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pf-act time { flex: none; font-size: .75rem; }
.pf-more { border-top: 1px solid var(--line); padding-top: .8rem; } .pf-more summary { cursor: pointer; font-weight: 600; font-size: .92rem; margin-bottom: .6rem; } .pf-sec { margin-bottom: .9rem; } .pf-text { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
@media (max-width: 640px) { .pf-id { flex-direction: column; align-items: flex-start; margin-top: -40px; padding: 0 .8rem; } .avatar.xxl { width: 88px; height: 88px; font-size: 2rem; } .pf-stats { grid-template-columns: repeat(2, 1fr); } .pf-act time { display: none; } }

/* Einstellungen: Profiltexte */
.pref-wrap { display: grid; gap: .5rem; justify-items: end; width: min(340px, 100%); } .pref-text { width: 100%; resize: vertical; }
@media (max-width: 700px) { .pref-wrap { width: 100%; justify-items: stretch; } }
html[data-motion='reduced'] .rx-b, html[data-motion='reduced'] .rx-tip, html[data-motion='reduced'] .epick { animation: none; } html[data-motion='reduced'] .ep-e, html[data-motion='reduced'] .rx-b { transition: none; }
@media (prefers-reduced-motion: reduce) { .rx-b, .rx-tip, .epick, .epick.sheet { animation: none; } }

/* Reaktionen: schlanke Chips statt Kästen */
.rx { gap: .25rem; margin-top: .3rem; }
.rx-b { height: 22px; gap: .25rem; padding: 0 .5rem 0 .4rem; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .06); color: var(--text-2); font-size: .72rem; box-shadow: none; }
.rx-e { font-size: .85rem; } .rx-n { font-weight: 600; font-size: .72rem; }
@media (hover: hover) { .rx-b:hover { background: rgba(255, 255, 255, .12); border: 0; } }
.rx-b.mine { background: rgba(var(--accent-rgb), .22); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .55); color: var(--text); }
.rx-add { height: 22px; width: 22px; border: 0; border-radius: 50%; background: transparent; color: var(--text-3); opacity: .7; }
.rx-add svg { width: 14px; height: 14px; } .rx-plus { display: none; }
@media (hover: hover) { .rx-add:hover { background: rgba(255, 255, 255, .1); color: var(--violet-hi); border: 0; opacity: 1; } }
@media (hover: hover) and (min-width: 700px) { .rx.norx .rx-add { opacity: .45; } .comment:hover .rx.norx .rx-add, .comment:focus-within .rx.norx .rx-add, .rx.norx .rx-add:hover { opacity: 1; } }

/* Popup-Benachrichtigungen (unten rechts) */
#ntoasts { position: fixed; right: 1rem; bottom: 1rem; z-index: 500; display: flex; flex-direction: column; gap: .55rem; width: min(368px, calc(100vw - 2rem)); pointer-events: none; }
.ntoast { --nt: var(--violet); position: relative; pointer-events: auto; display: flex; align-items: flex-start; overflow: hidden; border-radius: 14px; background: var(--float); border: 1px solid var(--line-strong); box-shadow: 0 14px 40px rgba(0, 0, 0, .5), 0 0 0 1px rgba(0, 0, 0, .2);
  animation: nt-in 320ms var(--ease-out, ease) both; }
.ntoast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--nt); }
.ntoast.leaving { animation: nt-out 240ms var(--ease-out, ease) both; }
.nt-assignment { --nt: var(--violet-hi); } .nt-due { --nt: var(--amber); } .nt-routine { --nt: var(--sky); } .nt-mention { --nt: var(--violet-hi); } .nt-comment { --nt: var(--sky); } .nt-bug { --nt: var(--rose); } .nt-status { --nt: var(--mint); } .nt-summary { --nt: var(--violet-hi); }
.nt-main { flex: 1; min-width: 0; display: flex; gap: .75rem; align-items: flex-start; padding: .75rem .4rem .85rem .95rem; text-align: left; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; }
.nt-main:focus-visible, .nt-x:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: -2px; border-radius: 12px; }
.nt-ico { flex: none; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: var(--nt); background: color-mix(in srgb, var(--nt) 16%, transparent); } .nt-ico svg { width: 17px; height: 17px; }
.nt-body { display: grid; gap: .12rem; min-width: 0; }
.nt-title { font-size: .85rem; font-weight: 650; color: var(--text); }
.nt-text { font-size: .8rem; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.nt-time { font-size: .7rem; color: var(--text-3); }
.nt-x { flex: none; width: 28px; height: 28px; margin: .45rem .45rem 0 0; display: grid; place-items: center; border: 0; border-radius: 8px; background: none; color: var(--text-3); cursor: pointer; transition: background-color 120ms, color 120ms; } .nt-x svg { width: 14px; height: 14px; }
@media (hover: hover) { .nt-x:hover { background: rgba(255, 255, 255, .08); color: var(--text); } .ntoast:hover { border-color: var(--line-focus); } }
.nt-bar { position: absolute; left: 3px; right: 0; bottom: 0; height: 2px; background: var(--nt); opacity: .55; transform-origin: left; animation: nt-bar var(--nt-ms, 6s) linear forwards; }
.ntoast.paused .nt-bar { animation-play-state: paused; }
@keyframes nt-in { from { opacity: 0; transform: translateX(28px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes nt-out { to { opacity: 0; transform: translateX(20px) scale(.98); } }
@keyframes nt-bar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (max-width: 640px) { #ntoasts { left: .75rem; right: .75rem; width: auto; bottom: calc(.75rem + env(safe-area-inset-bottom, 0px)); } .ntoast { animation-name: nt-in-up; } @keyframes nt-in-up { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } } }
html[data-motion='reduced'] .ntoast, html[data-motion='reduced'] .ntoast.leaving { animation: none; } html[data-motion='reduced'] .nt-bar { display: none; }
@media (prefers-reduced-motion: reduce) { .ntoast, .ntoast.leaving { animation: none; } .nt-bar { display: none; } }

/* Einstellungen: Töne und Popups */
.snd-top { display: grid; gap: .2rem; }
.vol { display: flex; align-items: center; gap: .8rem; width: min(360px, 100%); } .vol input[type=range] { flex: 1; accent-color: var(--violet); height: 22px; } .vol output { min-width: 3.2ch; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); font-size: .85rem; }
.sndgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .6rem; margin-top: .4rem; }
.sndcard { position: relative; display: flex; align-items: center; gap: .65rem; padding: .65rem .7rem; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); cursor: pointer; transition: border-color 140ms, background-color 140ms; }
.sndcard > input { position: absolute; opacity: 0; inset: 0; margin: 0; width: 100%; height: 100%; cursor: pointer; }
.sndcard:has(input:checked) { border-color: var(--violet); background: var(--violet-wash); box-shadow: 0 0 0 1px var(--violet); } .sndcard:has(input:focus-visible) { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.sndcard .snm { display: grid; min-width: 0; flex: 1; } .sndcard .snm strong { font-size: .88rem; } .sndcard .snm small { color: var(--text-3); font-size: .74rem; }
.snd-play { position: relative; z-index: 1; flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--raised); color: var(--violet-hi); cursor: pointer; transition: background-color 120ms, transform 120ms; }
.snd-play:hover { background: var(--raised-2); } .snd-play:active { transform: scale(.92); } .snd-play:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; } .snd-play svg { width: 13px; height: 13px; }
.snd-play:disabled { opacity: .4; cursor: default; }
.evtable { display: grid; gap: 0; margin-top: .4rem; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.evrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: .7rem; padding: .65rem .85rem; border-top: 1px solid var(--line); } .evrow:first-child { border-top: 0; }
.evrow .evn { display: grid; min-width: 0; } .evrow .evn strong { font-size: .88rem; } .evrow .evn small { color: var(--text-3); font-size: .75rem; }
.evrow select { min-width: 9.5rem; }
.evrow label.evpop { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--text-2); cursor: pointer; }
.audio-hint { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; }
@media (max-width: 700px) { .evrow { grid-template-columns: 1fr auto; } .evrow select { grid-column: 1; min-width: 0; width: 100%; } .evrow .snd-play { grid-column: 2; grid-row: 2; } .evrow label.evpop { grid-column: 1 / -1; } }

/* ===== Chat (Teamchat und private Nachrichten) ===== */
.avatar.md { width: 36px; height: 36px; font-size: .95rem; border-radius: 50%; } .avatar.md .pdot { width: 10px; height: 10px; }
.chat { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.cm-notice { display: flex; align-items: center; gap: .5rem; padding: .45rem .9rem; font-size: .74rem; color: var(--text-3); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); } .cm-notice svg { width: 13px; height: 13px; flex: none; }
.cm-body { position: relative; flex: 1; min-height: 0; }
.cm-scroll { position: absolute; inset: 0; overflow-y: auto; padding: .6rem .6rem .4rem; overscroll-behavior: contain; scrollbar-width: thin; }
.cm-more { display: block; margin: .2rem auto .6rem; padding: .3rem .8rem; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--text-2); font: inherit; font-size: .76rem; cursor: pointer; } .cm-more:hover { background: var(--raised-2); }
.cm-day { display: flex; align-items: center; gap: .7rem; margin: .8rem 0 .4rem; color: var(--text-3); font-size: .7rem; font-weight: 600; } .cm-day::before, .cm-day::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.cm-empty { display: grid; gap: .2rem; justify-items: center; padding: 2.5rem 1rem; text-align: center; color: var(--text-2); font-size: .85rem; } .cm-empty span { color: var(--text-3); }
.cm { position: relative; display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: .65rem; padding: .32rem .5rem; border-radius: 10px; transition: background-color 120ms; }
@media (hover: hover) { .cm:hover { background: rgba(255, 255, 255, .035); } }
.cm.own { background: rgba(var(--accent-rgb), .055); } @media (hover: hover) { .cm.own:hover { background: rgba(var(--accent-rgb), .09); } }
.cm.flash { animation: cm-flash 1.6s ease; } @keyframes cm-flash { 0%, 40% { background: rgba(var(--accent-rgb), .3); } 100% { background: transparent; } }
.cm.grouped { padding-top: 0; padding-bottom: .1rem; }
.cm-side { align-self: start; padding-top: .28rem; text-align: right; font-size: .62rem; color: var(--text-3); opacity: 0; transition: opacity 120ms; } .cm:hover .cm-side { opacity: 1; }
.cm .avatar { margin-top: .1rem; }
.cm-main { min-width: 0; }
.cm-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .5rem; } .cm-name { font-weight: 650; font-size: .88rem; } .cm-time { font-size: .7rem; color: var(--text-3); } .cm-edited { font-size: .68rem; color: var(--text-3); }
.cm-text { font-size: .9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.cm-del { font-size: .82rem; font-style: italic; color: var(--text-3); padding: .15rem 0; } .cm.deleted { opacity: .7; }
.cm-content { display: grid; gap: .3rem; justify-items: start; }
.cm-gifbox { max-width: min(320px, 100%); min-height: 60px; border-radius: 12px; overflow: hidden; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); line-height: 0; }
.cm-gif { display: block; max-width: 100%; max-height: 240px; width: auto; height: auto; }
.cm-reply { display: flex; align-items: center; gap: .4rem; max-width: 100%; padding: .2rem .55rem; border: 0; border-left: 2px solid rgba(var(--accent-rgb), .7); border-radius: 0 8px 8px 0; background: rgba(255, 255, 255, .04); color: var(--text-2); font: inherit; font-size: .76rem; text-align: left; cursor: pointer; }
.cm-reply svg { width: 12px; height: 12px; flex: none; color: var(--text-3); } .cm-reply b { flex: none; font-weight: 600; color: var(--text); } .cm-reply span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cm-reply.gone { opacity: .6; font-style: italic; }
.cm-actions { position: absolute; top: -13px; right: 10px; z-index: 2; display: none; gap: 1px; padding: 2px; border-radius: 9px; background: var(--float); border: 1px solid var(--line-strong); box-shadow: 0 6px 18px rgba(0, 0, 0, .35); }
.cm:hover .cm-actions, .cm:focus-within .cm-actions { display: flex; }
.cm-act { width: 26px; height: 26px; display: grid; place-items: center; border: 0; border-radius: 7px; background: none; color: var(--text-2); cursor: pointer; } .cm-act svg { width: 14px; height: 14px; } .cm-act:hover { background: var(--raised-2); color: var(--text); } .cm-act.del:hover { color: var(--rose); }
@media (hover: none) { .cm-actions { display: flex; position: static; grid-column: 2; justify-self: start; background: none; border: 0; box-shadow: none; opacity: .75; } }
.cm-editbox { display: grid; gap: .4rem; width: 100%; } .cm-edit { width: 100%; resize: vertical; min-height: 56px; }
.cm-jump { position: absolute; left: 50%; bottom: .7rem; transform: translateX(-50%); display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .8rem; border-radius: 999px; border: 0; background: var(--accent-btn); color: var(--on-accent); font: inherit; font-size: .78rem; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .4); cursor: pointer; animation: rx-pop 200ms var(--ease-out) both; } .cm-jump svg { width: 14px; height: 14px; }
.cm-foot { padding: .55rem .7rem .7rem; border-top: 1px solid var(--line); display: grid; gap: .4rem; background: rgba(255, 255, 255, .015); }
.cm-composer { display: flex; align-items: flex-end; gap: .35rem; } .cm-composer .mention-wrap { flex: 1; min-width: 0; }
.cm-input { min-height: 40px; max-height: 150px; resize: none; border-radius: 12px; padding-top: .6rem; padding-bottom: .55rem; line-height: 1.4; overflow-y: auto; }
.cm-tool { height: 40px; min-width: 40px; padding: 0 .55rem; font-weight: 700; font-size: .74rem; letter-spacing: .02em; color: var(--text-2); justify-content: center; } .cm-tool svg { width: 17px; height: 17px; }
.cm-send { height: 40px; width: 42px; padding: 0; justify-content: center; border-radius: 12px; } .cm-send svg { width: 17px; height: 17px; }
.cm-composer.recording { display: none; }
.cm-replybar { display: flex; align-items: center; gap: .5rem; padding: .3rem .4rem .3rem .7rem; border-radius: 10px; background: var(--raised); border-left: 3px solid var(--violet); font-size: .78rem; color: var(--text-2); } .cm-replybar > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .cm-replybar svg { width: 14px; height: 14px; flex: none; }
.chat.compact .cm { grid-template-columns: 30px minmax(0, 1fr); gap: .5rem; } .chat.compact .avatar.md { width: 30px; height: 30px; font-size: .8rem; } .chat.compact .cm-text { font-size: .86rem; }
.chat.compact .cm-foot { padding: .45rem .6rem .55rem; }

/* Sprachnachrichten: Aufnahme und Player */
.rec { display: flex; align-items: center; gap: .6rem; min-height: 46px; padding: .35rem .6rem; border-radius: 12px; background: var(--raised); border: 1px solid var(--line-strong); } .rec.hidden { display: none; }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--rose); animation: rec-pulse 1.1s ease-in-out infinite; flex: none; } @keyframes rec-pulse { 50% { opacity: .35; transform: scale(.8); } }
.rec-label { font-size: .8rem; color: var(--text-2); } .rec-time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: .85rem; } .rec-lim { font-size: .75rem; color: var(--text-3); margin-right: auto; }
.rec-wave { display: inline-flex; align-items: center; gap: 3px; height: 18px; } .rec-wave i { width: 3px; height: 100%; border-radius: 2px; background: var(--violet-hi); animation: rec-wave 900ms ease-in-out infinite; transform-origin: center; } .rec-wave i:nth-child(2) { animation-delay: -.2s; } .rec-wave i:nth-child(3) { animation-delay: -.4s; } .rec-wave i:nth-child(4) { animation-delay: -.6s; } .rec-wave i:nth-child(5) { animation-delay: -.8s; } @keyframes rec-wave { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(1); } }
.rec-btn { width: 34px; height: 34px; flex: none; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--raised-2); color: var(--text-2); cursor: pointer; } .rec-btn:hover { color: var(--text); } .rec-btn svg { width: 16px; height: 16px; } .rec-btn.stop { background: var(--rose); } .rec-sq { width: 12px; height: 12px; border-radius: 3px; background: #fff; }
.rec .vp { flex: 1; } .rec-send svg { width: 14px; height: 14px; }
.vp { display: inline-flex; align-items: center; gap: .6rem; width: min(290px, 100%); padding: .3rem .55rem .3rem .35rem; border-radius: 999px; background: var(--raised-2); box-shadow: inset 0 0 0 1px var(--line); }
.vp-play { flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--accent-btn); color: var(--on-accent); cursor: pointer; } .vp-play svg { width: 13px; height: 13px; } .vp-play:focus-visible, .vp-speed:focus-visible, .vp-bar:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: 2px; }
.vp-mid { flex: 1; min-width: 0; display: grid; gap: .25rem; }
.vp-bar { position: relative; height: 4px; margin: 5px 0; border-radius: 2px; background: var(--line-strong); cursor: pointer; touch-action: none; } .vp-bar::before { content: ''; position: absolute; inset: -8px 0; }
.vp-fill { position: absolute; inset: 0; border-radius: 2px; background: var(--violet); transform: scaleX(0); transform-origin: left; }
.vp-knob { position: absolute; top: 50%; left: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; background: var(--violet-hi); opacity: 0; transition: opacity 120ms; } .vp.on .vp-knob, .vp-bar:hover .vp-knob, .vp-bar:focus-visible .vp-knob { opacity: 1; }
.vp-time { font-size: .68rem; font-variant-numeric: tabular-nums; color: var(--text-3); } .vp.failed .vp-time { color: var(--rose); }
.vp-speed { flex: none; min-width: 34px; height: 22px; padding: 0 .35rem; border: 0; border-radius: 11px; background: rgba(255, 255, 255, .07); color: var(--text-2); font: inherit; font-size: .68rem; font-weight: 700; cursor: pointer; } .vp-speed:hover { color: var(--text); }

/* GIF-Picker */
.gifpick { width: 360px; height: 420px; transform-origin: bottom right; }
.gp-body { padding-top: .3rem; } .gp-grid { columns: 2; column-gap: 6px; }
.gp-tile { display: block; width: 100%; margin: 0 0 6px; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--raised-2); cursor: pointer; break-inside: avoid; line-height: 0; transition: transform 120ms var(--ease-out), box-shadow 120ms; } .gp-tile img { display: block; width: 100%; height: 100%; object-fit: cover; }
.gp-tile:hover, .gp-tile:focus-visible { transform: scale(1.02); box-shadow: 0 0 0 2px var(--violet); outline: none; }
.gp-attr { padding: .5rem 0 .2rem; text-align: center; font-size: .68rem; color: var(--text-3); } .gp-manual { display: grid; gap: .6rem; padding: .8rem .4rem; } .gp-manual .ep-search { margin: 0; }
.gp-grid .ep-none { column-span: all; }

/* Dashboard-Teamchat */
.chatcard { min-height: 0; } .chatcard > .chat { height: 440px; } .chat-sub { display: inline-flex; align-items: center; gap: .3rem; } .chat-sub svg { width: 12px; height: 12px; }
.chatcard .panel-head h2 { flex: 0 1 auto; } .chatcard .panel-head .right { margin-left: auto; }
@media (max-width: 900px) { .chatcard > .chat { height: 400px; } }

/* Nachrichten-Seite */
.msgs { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: calc(100dvh - var(--topbar, 60px) - 3.2rem); min-height: 480px; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-strong); }
.msgs-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: rgba(255, 255, 255, .015); }
.msgs-head { padding: 1rem 1.1rem .4rem; display: grid; gap: .1rem; } .msgs-head h1 { font-size: 1.15rem; margin: 0; }
.msgs-searchbox { position: relative; margin: .4rem .8rem .6rem; } .msgs-searchbox svg { position: absolute; left: .7rem; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--text-3); pointer-events: none; } .msgs-search { width: 100%; padding-left: 2.1rem; }
.msgs-list { flex: 1; overflow-y: auto; padding: 0 .5rem .6rem; scrollbar-width: thin; }
.msgs-label { padding: .8rem .6rem .3rem; font-size: .7rem; font-weight: 600; color: var(--text-3); } .msgs-hint { padding: .8rem .7rem; font-size: .8rem; color: var(--text-3); }
.msgs-item { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; align-items: center; gap: .65rem; width: 100%; padding: .55rem .6rem; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; text-decoration: none; cursor: pointer; transition: background-color 120ms; }
@media (hover: hover) { .msgs-item:hover { background: rgba(255, 255, 255, .05); text-decoration: none; } }
.msgs-item.on { background: var(--violet-wash); box-shadow: inset 0 0 0 1px rgba(var(--accent-rgb), .35); } .msgs-item:focus-visible { outline: 2px solid var(--violet-hi); outline-offset: -2px; }
.msgs-txt { display: grid; min-width: 0; } .msgs-txt strong { font-size: .88rem; font-weight: 600; } .msgs-txt small { color: var(--text-3); font-size: .76rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msgs-item.has-unread .msgs-txt strong { color: #fff; } .msgs-item.has-unread .msgs-txt small { color: var(--text-2); }
.msgs-meta { display: grid; justify-items: end; gap: .25rem; font-size: .68rem; color: var(--text-3); }
.msgs-unread { min-width: 20px; height: 20px; padding: 0 .4rem; display: grid; place-items: center; border-radius: 10px; background: var(--accent-btn); color: var(--on-accent); font-size: .7rem; font-weight: 700; }
.msgs-tile { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: linear-gradient(140deg, rgba(var(--accent-rgb), .45), rgba(var(--accent-deep-rgb), .3)); color: var(--violet-hi); } .msgs-tile svg { width: 17px; height: 17px; } .msgs-tile.lg { width: 44px; height: 44px; }
.msgs-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.msgs-top { display: flex; align-items: center; gap: .8rem; padding: .7rem 1rem; border-bottom: 1px solid var(--line); min-height: 64px; }
.msgs-title { display: flex; align-items: center; gap: .75rem; flex: 1; min-width: 0; } .msgs-title > div { display: grid; min-width: 0; } .msgs-title strong { font-size: 1rem; } .msgs-title .pstatus { font-size: .75rem; }
.msgs-main > .chat { flex: 1; }
.msgs-none { display: grid; align-content: center; justify-items: center; gap: .35rem; height: 100%; padding: 2rem; text-align: center; color: var(--text-2); } .msgs-none svg { width: 36px; height: 36px; color: var(--violet-hi); opacity: .8; } .msgs-none span { color: var(--text-3); font-size: .85rem; }
.msgs-back { display: none; } .msgs-back svg { transform: rotate(90deg); }
@media (max-width: 900px) {
  .msgs { grid-template-columns: minmax(0, 1fr); height: calc(100dvh - var(--topbar, 60px) - 2rem); border-radius: 12px; }
  .msgs:not(.has-conv) .msgs-main { display: none; } .msgs.has-conv .msgs-side { display: none; } .msgs-side { border-right: 0; }
  .msgs-back { display: inline-flex; } .msgs-top { padding: .55rem .7rem; }
}
html[data-motion='reduced'] .rec-dot, html[data-motion='reduced'] .rec-wave i, html[data-motion='reduced'] .cm.flash, html[data-motion='reduced'] .cm-jump { animation: none; }
@media (prefers-reduced-motion: reduce) { .rec-dot, .rec-wave i, .cm.flash, .cm-jump { animation: none; } }

/* Feinschliff Chat */
.msgs-searchbox .msgs-search { padding-left: 2.2rem; }
.cm .rx.norx .rx-add { opacity: 0; }
.cm:hover .rx.norx .rx-add, .cm:focus-within .rx.norx .rx-add, .cm .rx.norx .rx-add:focus-visible { opacity: 1; }
@media (hover: none) { .cm .rx.norx .rx-add { opacity: .55; } }
.cm-input::placeholder { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 900px) { .msgs { height: calc(100dvh - var(--topbar, 60px) - 3rem); } .cm-input { font-size: .9rem; } .cm-tool { min-width: 34px; padding: 0 .35rem; } .cm-composer { gap: .25rem; } }
