/* ==========================================================================
   Bredex Whiteboard – modernes UI in der BREDEX-Markenwelt
   Petrol (#008971) als Hauptakzent, Indigo (#2b329b) für primäre Aktionen,
   Magenta (#d60648) als Highlight, Verlauf Indigo->Petrol für die Marke.
   ========================================================================== */
:root {
    --topbar-h: 56px;
    --toolbar-w: 52px;
    /* Wie die Hinweisleisten waagerecht liegen: „pill" = zentrierte Pille (Standard),
       „stretch" = von Rand zu Rand (schmale Fenster, siehe Media Query).
       board-banners.js liest das aus, damit die Umbruchbreite NUR hier steht. */
    --bar-mode: pill;

    --accent: #008971;        /* BREDEX-Petrol (Hauptakzent) */
    --accent-dark: #00715d;
    --accent-soft: #e1f1ee;   /* helle Petrol-Tönung */

    --cta: #2b329b;           /* Indigo – primäre Buttons */
    --cta-dark: #222a82;
    --highlight: #d60648;     /* Magenta – Highlights */

    --ink: #2b2f36;
    --muted: #79818f;
    --bg: #f5f6f8;
    --panel: #ffffff;
    --border: #e7e9ee;
    --grid-dot: #d4d8e0;

    --brand-grad: linear-gradient(135deg, #2b329b 0%, #008971 100%);

    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(20, 28, 46, .06), 0 1px 3px rgba(20, 28, 46, .08);
    --shadow-md: 0 6px 18px rgba(20, 28, 46, .12);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    height: 100%;
    overflow: hidden;
    font-family: var(--font);
    background: var(--bg);
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

button { font-family: inherit; }

/* ----------------------------------------------------------- Topbar ------ */
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    background: rgba(255, 255, 255, .85);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--border);
    z-index: 20;
}
.topbar .brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 18px;
    letter-spacing: -.02em;
    color: var(--ink);
}
.topbar .brand::before {
    content: "";
    width: 26px; height: 26px;
    background: url("/img/logo-690d8a7e42a02dc556e0425f7dcebeac.svg") center/contain no-repeat;
}
.topbar .board-id { color: var(--muted); font-size: 14px; }
.topbar .board-id strong { color: var(--ink); font-weight: 600; }
.topbar .hint {
    margin-left: auto;
    color: var(--muted);
    font-size: 12px;
    letter-spacing: .01em;
}
.topbar .back-link {
    color: var(--accent);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background .15s;
}
.topbar .back-link:hover { background: var(--accent-soft); }

/* --------------------------------------------------------- Werkzeuge ----- */
/* Linke Spalte: Werkzeugleiste + Aktionsleiste gestapelt */
.left-rail {
    position: fixed;
    top: calc(var(--topbar-h) + 16px);
    left: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 15;
}
.toolbar {
    width: var(--toolbar-w);
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 6px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
}
.toolbar .tool {
    width: 100%;
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-size: 18px;
    color: var(--ink);
    cursor: pointer;
    transition: background .15s, color .15s, transform .08s;
}
.toolbar .tool svg { width: 18px; height: 18px; display: block; }
.toolbar .tool:hover { background: var(--accent-soft); }
.toolbar .tool:active { transform: scale(.94); }
.toolbar .tool.active {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 137, 113, .35);
}
.toolbar .color-picker {
    width: 26px;
    height: 26px;
    margin: 6px auto 2px;
    display: block;
    padding: 0;
    border: 2px solid var(--border);
    border-radius: 50%;
    cursor: pointer;
    background: none;
    overflow: hidden;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 1px 2px rgba(20, 28, 46, .12);
}
/* den farbigen Innenbereich des nativen Color-Inputs randlos & rund füllen */
.toolbar .color-picker::-webkit-color-swatch-wrapper { padding: 0; }
.toolbar .color-picker::-webkit-color-swatch { border: none; border-radius: 50%; }
.toolbar .color-picker::-moz-color-swatch { border: none; border-radius: 50%; }

/* --------------------------------------------------- Schwebende Leisten -- */
.floating-bar {
    position: fixed;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 5px 7px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    z-index: 18;
}
.action-bar {
    position: static;
    flex-direction: column;
    width: var(--toolbar-w);
    gap: 2px;
    padding: 6px;
}
.action-bar .fmt-btn { width: 100%; }
.text-toolbar { top: 0; left: 0; flex-wrap: nowrap; }
.fmt-sep { width: 1px; align-self: stretch; margin: 2px 3px; background: var(--border); }
.fmt-group { display: inline-flex; gap: 2px; }

/* Reaktionen: Zähler-Chip + Auslöse-Button unten links an der Sticky Note */
.reaction-ui {
    position: fixed; z-index: 18;
    display: inline-flex; align-items: center; gap: 6px;
}
.reaction-count {
    align-items: center;
    padding: 5px 10px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 999px; box-shadow: var(--shadow-md);
    font-size: 13px; line-height: 1; white-space: nowrap;
    color: var(--ink);
}
.reaction-add {
    display: inline-flex; align-items: center; gap: 1px;
    padding: 5px 10px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 999px; box-shadow: var(--shadow-md);
    font-size: 15px; line-height: 1; cursor: pointer;
    transition: background .12s, transform .06s;
}
.reaction-add:hover { background: var(--accent-soft); }
.reaction-add:active { transform: scale(.94); }
.reaction-add .ra-plus { font-size: 12px; font-weight: 700; color: var(--accent-dark); }

/* Emoji-Auswahl (nur sichtbar, wenn über den Button geöffnet) */
.reaction-bar { top: 0; left: 0; gap: 2px; }
.reaction-btn {
    position: relative;
    min-width: 34px; height: 34px;
    border: none; background: transparent; border-radius: 9px;
    font-size: 18px; line-height: 1; cursor: pointer;
    transition: background .12s, transform .06s;
}
.reaction-btn:hover { background: var(--accent-soft); }
.reaction-btn:active { transform: scale(.9); }
.reaction-btn.reacted { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
.reaction-btn[data-count]:not([data-count=""])::after {
    content: attr(data-count);
    position: absolute; top: -3px; right: -3px;
    min-width: 15px; height: 15px; padding: 0 3px; box-sizing: border-box;
    background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
    line-height: 15px; border-radius: 999px; text-align: center;
}

/* Zoom-Steuerung (rechts) */
.zoom-control {
    position: fixed; right: 16px; top: calc(var(--topbar-h) + 16px);
    z-index: 16;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 10px 8px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 14px; box-shadow: var(--shadow-md);
}
.zoom-btn {
    width: 30px; height: 30px; border: 1px solid var(--border);
    background: var(--panel); color: var(--ink); border-radius: 8px;
    font-size: 18px; line-height: 1; cursor: pointer;
    transition: background .12s;
}
.zoom-btn:hover { background: var(--accent-soft); }
.zoom-btn:active { transform: scale(.92); }
/* „Alles zeigen" (Target) – abgesetzt unter der Prozentanzeige */
.zoom-fit {
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--accent); margin-top: 4px;
}
.zoom-fit svg { width: 18px; height: 18px; display: block; }
.zoom-fit:hover { color: var(--accent-dark); }
.zoom-slider {
    writing-mode: vertical-lr; direction: rtl; /* vertikal, oben = mehr Zoom */
    width: 6px; height: 140px; cursor: pointer; accent-color: var(--accent);
}
.zoom-pct { font-size: 11px; font-weight: 600; color: var(--muted); min-width: 34px; text-align: center; }
.floating-bar .align-btn svg, .floating-bar .valign-btn svg {
    width: 15px; height: 15px; display: block; fill: currentColor;
}
.floating-bar #lock-btn svg { width: 16px; height: 16px; display: block; }

.mind-bar { z-index: 20; padding: 4px; }
/* Anordnen-Leiste (Mehrfachauswahl konsolidieren) */
/* Anordnen-Leiste: Anzahl · „Sortieren nach:" · Icon-Buttons im Stil der übrigen Leisten */
.arrange-bar { z-index: 20; padding: 5px 8px; gap: 6px; align-items: center; }
.arrange-count, .arrange-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.arrange-bar .arrange-btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 10px;
    border: 1px solid var(--border); background: var(--panel); border-radius: 8px;
    font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.arrange-bar .arrange-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.arrange-bar .arrange-btn:active { background: var(--accent); border-color: var(--accent); color: #fff; }
.arrange-bar .arrange-btn svg { width: 15px; height: 15px; display: block; flex: none; }
.mind-bar .mind-btn {
    height: 30px; padding: 0 12px;
    border: none; background: var(--accent, #2b329b); color: #fff; border-radius: 8px;
    font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap;
    transition: filter .15s;
}
.mind-bar .mind-btn:hover { filter: brightness(1.1); }
.table-bar { gap: 4px; z-index: 20; flex-wrap: wrap; max-width: 96vw; justify-content: center; }
.table-bar .color-swatch { width: 30px; height: 28px; }
.table-bar #tbl-font-size { width: 46px; }
.table-bar .tbl-btn {
    height: 30px; padding: 0 10px;
    border: 1px solid var(--border); background: var(--panel); border-radius: 8px;
    font-size: 13px; color: var(--ink); cursor: pointer; white-space: nowrap;
    transition: background .15s, border-color .15s;
}
.table-bar .tbl-btn:hover { background: var(--accent-soft); border-color: var(--accent); }

.floating-bar .fmt-btn {
    min-width: 32px; height: 32px;
    border: none; background: transparent; border-radius: 8px;
    font-size: 16px; color: var(--ink); cursor: pointer;
    transition: background .15s, color .15s;
}
.floating-bar .fmt-btn:hover { background: var(--accent-soft); }
.floating-bar .fmt-btn.active { background: var(--accent); color: #fff; }
.floating-bar .fmt-field { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--muted); padding: 0 4px; }
.floating-bar .fmt-field input[type="number"] {
    width: 50px; padding: 5px 6px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; color: var(--ink);
}
.floating-bar .fmt-field input[type="number"]:focus { outline: none; border-color: var(--accent); }
.floating-bar .fmt-field input[type="color"] {
    width: 30px; height: 28px; padding: 0; border: 1px solid var(--border);
    border-radius: 8px; background: none; cursor: pointer;
}

/* Eigener Farbwähler (ersetzt <input type=color>): Farbfeld + Popup mit Fläche, Regenbogen,
   Hex und integrierter Pipette. */
.color-swatch {
    width: 30px; height: 28px; padding: 0; border: 1px solid var(--border);
    border-radius: 8px; cursor: pointer; background: #ffd966;
}
/* „Füllung entfernen" – nur bei Frames sichtbar, deshalb direkt neben dem Farbfeld und
   kleiner als die übrigen Knöpfe: es ist eine Rücknahme, keine eigene Funktion. */
.fill-clear { margin-left: 2px; font-size: 12px; color: var(--muted); }
.fill-clear:hover { color: var(--highlight); }

/* Emoji-Palette (Werkzeug „Emoji"): steht neben der Werkzeugleiste und bleibt offen,
   solange das Werkzeug aktiv ist – man setzt meist mehrere hintereinander. */
.emoji-bar { flex-direction: column; align-items: stretch; gap: 8px; max-width: 272px; }
.emoji-hint { font-size: 12px; color: var(--muted); }
.emoji-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; }
.emoji-choice {
    min-width: 30px; height: 30px; padding: 0; font-size: 19px; line-height: 1;
    border: 1px solid transparent; border-radius: 8px; background: none; cursor: pointer;
}
.emoji-choice:hover { background: var(--accent-soft); }
.emoji-choice.active { background: var(--accent-soft); border-color: var(--accent); }
.cp-popup {
    position: fixed; z-index: 200; display: none; width: 220px; padding: 10px;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-md); user-select: none;
}
.cp-area { position: relative; width: 100%; height: 130px; border-radius: 8px; cursor: crosshair; touch-action: none; }
.cp-area-cursor {
    position: absolute; width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); transform: translate(-50%, -50%); pointer-events: none;
}
.cp-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.cp-eyedrop {
    width: 30px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 8px;
    background: var(--panel); color: var(--ink); cursor: pointer;
    display: flex; align-items: center; justify-content: center; flex: none;
}
.cp-eyedrop:hover { background: var(--accent-soft); }
.cp-eyedrop svg { width: 16px; height: 16px; display: block; }
.cp-preview { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--border); flex: none; }
.cp-hue {
    position: relative; flex: 1; height: 14px; border-radius: 7px; cursor: pointer; touch-action: none;
    background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);
}
.cp-hue-cursor {
    position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); transform: translate(-50%, -50%); pointer-events: none;
}
.cp-presets { display: grid; grid-template-columns: repeat(10, 1fr); gap: 5px; margin-top: 10px; }
.cp-preset {
    width: 100%; height: 18px; padding: 0; border-radius: 5px;
    border: 1px solid rgba(0, 0, 0, .18); cursor: pointer; transition: transform .08s ease;
}
.cp-preset:hover { transform: scale(1.15); }
.cp-hexrow { display: flex; align-items: center; gap: 4px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.cp-hex {
    flex: 1; padding: 5px 6px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 13px; color: var(--ink); text-transform: uppercase;
}
.cp-hex:focus { outline: none; border-color: var(--accent); }
.cp-hidden-eyedrop { display: none !important; }

/* ----------------------------------------------------------- Canvas ------ */
#board-container {
    position: fixed;
    top: var(--topbar-h);
    left: 0; right: 0; bottom: 0;
    touch-action: none; /* Touch-Gesten an Konva geben (nicht an den Browser-Scroll/Zoom) */
    background:
        radial-gradient(circle at 18% 0%, rgba(0, 137, 113, .05), transparent 42%),
        var(--bg);
}

/* Rich-Text-Overlays: liegen über der Konva-Leinwand, werden per Transform mit der
   Stage mitgezoomt/-verschoben (siehe syncRichRoot). pointer-events:none lässt Klicks/
   Ziehen zur Leinwand durch – nur Links sind anklickbar. */
#rich-root {
    position: absolute; left: 0; top: 0; width: 0; height: 0;
    transform-origin: 0 0; pointer-events: none; z-index: 1;
}
.rich-overlay {
    position: absolute; box-sizing: border-box; overflow: hidden;
    display: flex; flex-direction: column;
    pointer-events: none;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif;
    line-height: 1.2; color: #1b1f26;
}
.rich-overlay .rich-inner {
    width: 100%;
    white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word;
    outline: none;
}
.rich-overlay a { color: #2d6cdf; text-decoration: underline; pointer-events: auto; cursor: pointer; }
/* Beim Bearbeiten Klicks/Karet zulassen und Überlauf sichtbar lassen. */
.rich-overlay.editing { overflow: visible; pointer-events: auto; }
.rich-overlay.editing .rich-inner { pointer-events: auto; }

.marquee {
    position: absolute;
    border: 1.5px solid var(--accent);
    background: rgba(0, 137, 113, .10);
    border-radius: 3px;
    pointer-events: none;
    z-index: 5;
}

/* Overlay-Editor (textarea): horizontal zentriert, vertikal per JS-Padding */
.text-editor {
    position: absolute;
    margin: 0;
    border: none;
    padding: 0 8px;
    background: transparent;
    outline: none;
    overflow: hidden;
    resize: none;
    box-sizing: border-box;
    text-align: center;
    line-height: 1.25;
    font-family: var(--font);
    z-index: 30;
}

/* Rich-Text-Editor (contenteditable): wie .text-editor, aber mit sichtbarem Überlauf-Scroll
   und Umbruch für formatierten Inhalt/Links. */
.rich-editor {
    position: absolute;
    margin: 0;
    border: none;
    padding: 0 8px;
    background: transparent;
    outline: none;
    overflow: auto;
    box-sizing: border-box;
    line-height: 1.2;
    font-family: var(--font);
    white-space: pre-wrap;
    overflow-wrap: break-word;
    word-break: break-word;
    z-index: 30;
}
.rich-editor a { color: #2d6cdf; text-decoration: underline; }

/* -------------------------------------------------- Radial-Werkzeugmenü -------
   Mittlere Maustaste öffnet einen kreisrunden Werkzeug-Wähler um den Zeiger. */
.radial-overlay { position: fixed; inset: 0; z-index: 150; background: transparent; }
.radial-menu {
    position: absolute; width: 0; height: 0;
    animation: radial-pop .12s ease-out;
}
@keyframes radial-pop { from { transform: scale(.6); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.radial-center {
    position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: var(--panel); color: var(--muted); border: 1px solid var(--border);
    font-size: 15px; box-shadow: var(--shadow-sm); pointer-events: none;
}
.radial-item {
    position: absolute; transform: translate(-50%, -50%);
    width: 62px; height: 62px; border-radius: 50%; padding: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
    background: var(--panel); border: 1px solid var(--border); color: var(--ink);
    box-shadow: var(--shadow-md); cursor: pointer; font-family: inherit;
    transition: transform .08s ease, background .08s ease, color .08s ease;
}
.radial-item .ri-ic { font-size: 20px; line-height: 1; }
.radial-item .ri-label { font-size: 9.5px; color: var(--muted); }
.radial-item.current { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-md); }
.radial-item.hover, .radial-item:hover {
    background: var(--accent); border-color: var(--accent); color: #fff;
    transform: translate(-50%, -50%) scale(1.14); z-index: 1;
}
.radial-item.hover .ri-label, .radial-item:hover .ri-label { color: rgba(255, 255, 255, .92); }

/* -------------------------------------------------- Nutzer / Teilen ------ */
/* Rechte Seite der Topbar: Board-Werkzeuge und – klar abgesetzt – die Konto-Gruppe.
   Beide bekommen `margin-left: auto`; sind BEIDE da, klebt die Konto-Gruppe an den
   Werkzeugen (Regel darunter), sodass nur EINE Lücke entsteht. */
.topbar .user,
.topbar .board-actions,
.topbar .account {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
}
/* Nur die Werkzeuge tragen den automatischen Abstand, damit sie und das Konto als EIN Block
   rechts stehen und sich der freie Raum nicht zwischen beide verteilt. */
.topbar .board-actions + .account { margin-left: 14px; }
.topbar .account { position: relative; }
/* Rechter Block = Präsenz · Werkzeuge · Konto. Den automatischen Abstand trägt allein der
   Präsenz-Rahmen (ganz links im Block); die beiden Nachbarn bekommen feste Abstände. Deshalb
   wächst die Avatar-Gruppe nach links in den freien Raum, statt etwas zu verschieben.
   Der Rahmen steht auch leer in der Leiste (Breite 0) – sonst hinge die Ausrichtung daran,
   ob gerade jemand angezeigt wird. */
.topbar .presence-slot { margin-left: auto; display: inline-flex; align-items: center; }
.topbar .presence-slot + .board-actions { margin-left: 10px; }
/* Startseite/Admin haben nur Name + Abmelden – dort etwas luftiger, kein Menü. */
.topbar .user { gap: 12px; }
.topbar .user .logout {
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--ink);
    border-radius: 8px;
    padding: 5px 10px;
    font-size: 13px;
    cursor: pointer;
}
.topbar .user .logout:hover { background: var(--accent-soft); }

/* ---- Konto-Gruppe: Avatar + Name + Zahnrad (Office-Muster) --------------- */
/* EIN Feld: Avatar, Name und Zahnrad sitzen in einem einzigen Knopf – sie tun dasselbe,
   also gibt es auch nur eine Schaltfläche (siehe Template). */
.account-btn {
    display: inline-flex; align-items: center; gap: 8px;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--panel); padding: 3px 6px 3px 3px;
    font-family: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
    max-width: 240px;
}
.account-btn:hover { background: var(--accent-soft); }
.account-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.account-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.account-avatar {
    width: 28px; height: 28px; border-radius: 50%; flex: none; overflow: hidden;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--brand-grad); color: #fff; font-size: 11px; font-weight: 700;
}
.account-avatar.lg { width: 40px; height: 40px; font-size: 14px; }
.account-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Zahnrad: nur das Zeichen für „hier öffnet sich ein Menü", kein eigener Klickbereich. */
.account-gear {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: none; color: var(--muted);
}
.account-btn[aria-expanded="true"] .account-gear { color: var(--accent-dark); }
.account-gear svg { width: 17px; height: 17px; display: block; }

/* ---- Glocke (nur Startseite) -------------------------------------------- */
.notify-btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; flex: none;
    border: 1px solid var(--border); border-radius: 999px;
    background: var(--panel); color: var(--muted); cursor: pointer;
}
.notify-btn:hover { background: var(--accent-soft); color: var(--accent-dark); }
.notify-btn[aria-expanded="true"] { border-color: var(--accent); background: var(--accent-soft); }
.notify-btn svg { width: 17px; height: 17px; display: block; }
/* Zähler als kleine Plakette – Magenta, damit sie im sonst petrol-grünen Kopf auffällt. */
.notify-dot {
    position: absolute; top: -4px; right: -4px; min-width: 16px; height: 16px;
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0 4px; border-radius: 999px; box-sizing: border-box;
    background: var(--highlight); color: #fff; font-size: 10px; font-weight: 700;
    border: 2px solid var(--panel);
}
.notify-panel { width: 340px; max-width: calc(100vw - 24px); }
.notify-empty { margin: 4px 8px 8px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.notify-item {
    display: flex; flex-direction: column; gap: 2px;
    padding: 9px 10px; border-radius: 8px; text-decoration: none; color: var(--ink);
}
.notify-item:hover { background: var(--accent-soft); }
/* Ungelesen: kleiner Punkt am linken Rand statt Fettschrift – bleibt ruhig, sticht aber ins Auge. */
.notify-item.unread { position: relative; padding-left: 20px; }
.notify-item.unread::before {
    content: ""; position: absolute; left: 8px; top: 15px;
    width: 6px; height: 6px; border-radius: 50%; background: var(--highlight);
}
.notify-title { font-size: 13px; font-weight: 600; }
.notify-detail { font-size: 12px; color: var(--muted); }
.notify-meta { display: flex; gap: 8px; font-size: 11px; color: var(--muted); }

/* ---- Aufklappmenü ------------------------------------------------------- */
.account-menu {
    position: absolute; top: calc(100% + 8px); right: 0; z-index: 70;
    min-width: 262px; max-width: calc(100vw - 24px);
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-lg); padding: 8px;
    max-height: calc(100vh - var(--topbar-h) - 16px); overflow-y: auto;
}
.account-menu[hidden] { display: none; }
.am-head { display: flex; align-items: center; gap: 10px; padding: 6px 8px 10px; }
.am-who { display: flex; flex-direction: column; min-width: 0; }
.am-who strong { color: var(--ink); font-size: 14px; }
.am-mail { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.am-group { display: flex; flex-direction: column; margin: 0; }
.am-label {
    padding: 6px 8px 4px; font-size: 11px; font-weight: 700; letter-spacing: .04em;
    text-transform: uppercase; color: var(--muted);
}
.am-item {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 9px 10px; border: none; border-radius: 8px;
    background: transparent; color: var(--ink); text-align: left; text-decoration: none;
    font-family: inherit; font-size: 14px; font-weight: 500; cursor: pointer;
}
.am-item:hover { background: var(--accent-soft); color: var(--accent-dark); }
.am-ico { width: 17px; height: 17px; flex: none; color: var(--muted); }
.am-item:hover .am-ico { color: var(--accent); }
.am-sep { border: none; border-top: 1px solid var(--border); margin: 6px 4px; }
/* Tastenkürzel im Menü: rechtsbündig und dezent – es soll den Eintrag nicht überstrahlen. */
.am-key {
    margin-left: auto; padding: 1px 6px; border-radius: 5px;
    background: var(--bg); border: 1px solid var(--border);
    font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap;
}
.am-item:hover .am-key { border-color: var(--accent); color: var(--accent-dark); }
.presence { display: inline-flex; align-items: center; cursor: default; }
.presence-avatar {
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 700;
    border: 2px solid var(--panel); margin-left: -7px;
    box-shadow: 0 1px 2px rgba(0,0,0,.15);
    overflow: hidden;
}
.presence-photo { width: 100%; height: 100%; object-fit: cover; display: block; }
.presence-avatar:first-child { margin-left: 0; }
.presence-more {
    margin-left: 4px; font-size: 12px; color: var(--muted); font-weight: 600;
    /* Feste Breite, damit die Angabe von "+1" auf "+99" nichts verschiebt. */
    min-width: 24px; text-align: right;
}

.share-add { max-width: 560px; }
/* Autovervollständigung Nutzer */
.ac-wrap { position: relative; flex: 1; }
.ac-wrap input { width: 100%; }
.ac-list {
    position: absolute; left: 0; right: 0; top: calc(100% + 4px);
    margin: 0; padding: 4px; list-style: none;
    background: var(--panel); border: 1px solid var(--border);
    border-radius: 10px; box-shadow: var(--shadow-md);
    z-index: 30; max-height: 260px; overflow: auto;
}
.ac-item {
    display: flex; flex-direction: column; gap: 1px;
    padding: 7px 10px; border-radius: 8px; cursor: pointer;
}
.ac-item:hover { background: var(--accent-soft); }
.ac-name { font-weight: 600; font-size: 14px; color: var(--ink); }
.ac-mail { font-size: 12px; color: var(--muted); }
.share-list { list-style: none; padding: 0; margin: 18px 0 0; max-width: 560px; }
.share-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; background: var(--panel);
    border: 1px solid var(--border); border-radius: 10px; margin-bottom: 8px;
}
.share-row .share-email { flex: 1; font-weight: 600; font-size: 14px; }
.share-row .share-level {
    font-size: 12px; color: var(--accent); background: var(--accent-soft);
    padding: 3px 8px; border-radius: 999px;
}
.share-remove {
    border: none; background: transparent; color: var(--muted);
    cursor: pointer; font-size: 13px; padding: 4px 6px; border-radius: 6px;
}
.share-remove:hover { background: #fde3ea; color: var(--highlight); }
.share-subhead { font-size: 16px; font-weight: 700; margin: 28px 0 4px; }
.share-row.inherited { background: #f5f6f8; border-style: dashed; }
.share-row.inherited .share-email { color: var(--muted); font-weight: 500; }
.inherited-tag { font-size: 12px; color: var(--muted); }

.card-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
/* Alle drei Aktionen (Link + Buttons) mit identischer Box, damit sie exakt auf einer Linie
   sitzen – gleiche Schrift/Zeilenhöhe und inline-flex zentriert (kein inline-block-Versatz). */
.card-actions a,
.card-actions .rename-card-btn,
.card-actions .delete-board-btn {
    display: inline-flex; align-items: center;
    font-size: 13px; font-weight: 500; line-height: 1;
    font-family: inherit; text-decoration: none; cursor: pointer;
    padding: 0; border: none; background: none;
}
.card-actions a, .card-actions .rename-card-btn { color: var(--accent); }
.card-actions .delete-board-btn { color: #d92020; } /* „Löschen": schlicht, aber rot (destruktiv) */
.delete-board-form { display: none; } /* nur Träger fürs Absenden (Button ist per form-Attribut verknüpft) */
.card-actions a:hover,
.card-actions .rename-card-btn:hover,
.card-actions .delete-board-btn:hover { text-decoration: underline; background: none; }
.folder-share { margin-left: 4px; color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 500; }
.folder-share:hover { text-decoration: underline; }

/* ------------------------------------------------------------- Login ----- */
.auth-page {
    height: 100%;
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 20px;
    position: relative;
    background:
        radial-gradient(900px 500px at 12% -8%, rgba(43, 50, 155, .16), transparent 60%),
        radial-gradient(900px 520px at 108% 112%, rgba(0, 137, 113, .18), transparent 58%),
        var(--bg);
}
.auth-page::before {                 /* dezentes Logo-Wasserzeichen */
    content: "";
    position: absolute; inset: 0;
    background: url("/img/logo-690d8a7e42a02dc556e0425f7dcebeac.svg") no-repeat right -90px bottom -90px;
    background-size: 440px;
    opacity: .05;
    pointer-events: none;
}
.auth-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 400px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    padding: 36px 32px;
    text-align: center;
}
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth-brand img { width: 42px; height: 42px; }
.auth-brand span { font-size: 23px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); }
.auth-title { font-size: 22px; font-weight: 800; margin: 24px 0 6px; }
.auth-sub { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 22px; }
.auth-form { display: flex; flex-direction: column; gap: 12px; }
.auth-form input[type="email"] {
    padding: 13px 15px; border: 1px solid var(--border); border-radius: 11px;
    font-size: 15px; background: #fbfbfd; transition: border-color .15s, box-shadow .15s;
}
.auth-form input[type="email"]:focus {
    outline: none; border-color: var(--cta); background: #fff;
    box-shadow: 0 0 0 3px rgba(43, 50, 155, .12);
}
.auth-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    padding: 13px 18px; border: none; border-radius: 11px; cursor: pointer;
    background: var(--cta); color: #fff; font-size: 15px; font-weight: 600;
    text-decoration: none; transition: background .15s, transform .08s;
}
.auth-btn:hover { background: var(--cta-dark); }
.auth-btn:active { transform: scale(.985); }
.auth-btn .ms-logo { background: #fff; border-radius: 3px; padding: 2px; flex: none; }
.auth-msg { font-size: 14px; border-radius: 10px; padding: 9px 12px; margin-bottom: 16px; }
.auth-msg.error { color: var(--highlight); background: #fde3ea; }
.auth-msg.info { color: var(--accent-dark); background: var(--accent-soft); }
.auth-features {
    display: flex; gap: 10px 16px; justify-content: center; flex-wrap: wrap;
    margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border);
}
.auth-feature { font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.auth-feature::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.auth-foot { position: relative; z-index: 1; margin-top: 22px; font-size: 12px; color: var(--muted); }

/* ------------------------------------------------------------- Fehlerseite --- */
.error-status {
    font-size: 64px; font-weight: 800; line-height: 1; letter-spacing: -.03em;
    margin: 20px 0 4px;
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.error-code-box {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    margin: 20px 0 22px; padding: 14px 16px;
    background: #fbfbfd; border: 1px solid var(--border); border-radius: 12px;
}
.error-code-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.error-code {
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: .02em;
    user-select: all; /* Ein-Klick-Auswahl zum Kopieren */
}
.error-code-hint { font-size: 12px; color: var(--muted); line-height: 1.4; }

/* Flash-Meldung im Admin-Bereich */
.login-error { color: var(--highlight); font-size: 14px; margin-top: 10px; }
.login-info { color: var(--accent); font-size: 14px; margin-top: 10px; }

/* ------------------------------------------------------ Board-Übersicht -- */
/* Der BODY ist hier der Scroll-Container. Ohne reservierten Platz für die Scrollleiste
   springt der zentrierte Inhalt seitlich, sobald sie beim Ein-/Ausklappen erscheint oder
   verschwindet (scrollbar-gutter hält die Rinne immer frei). */
.boards-page { overflow: auto; scrollbar-gutter: stable; background: var(--bg); }
.boards-main {
    max-width: 920px;
    margin: 0 auto;
    padding: calc(var(--topbar-h) + 48px) 24px 64px;
}
.boards-main h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -.03em;
    margin: 0 0 6px;
}
.boards-main .subtitle {
    color: var(--muted);
    font-size: 15px;
    margin: 0 0 28px;
}

/* Kopfzeile: Titel links, Erstell-Buttons rechts */
.boards-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 26px;
}
.boards-header .boards-intro h1 { margin: 0; }
.boards-header .subtitle { margin: 6px 0 0; }
.boards-actions { display: flex; gap: 10px; flex: none; }
.hbtn {
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s, transform .08s;
}
.hbtn.primary { background: var(--cta); color: #fff; }
.hbtn.primary:hover { background: var(--cta-dark); }
.hbtn.ghost { background: var(--panel); color: var(--accent-dark); border-color: var(--border); }
.hbtn.ghost:hover { background: var(--accent-soft); border-color: var(--accent-soft); }
.hbtn:active { transform: scale(.97); }
.hbtn.active { background: var(--accent-soft); color: var(--accent-dark); border-color: var(--accent); }

/* Board-Suche (Startseite): filtert die Übersicht live */
.board-search-wrap { margin-bottom: 20px; }
/* Weg von der Namens- zur Inhaltssuche. Erscheint erst mit einer Eingabe, damit die
   Startseite nicht mit einem Angebot beginnt, das noch nichts tun kann. */
.content-search-link { display: inline-block; margin-top: 6px; font-size: 13px;
    color: #2b329b; text-decoration: none; font-weight: 600; }
.content-search-link:hover { text-decoration: underline; }
.content-search-link[hidden] { display: none; }
/* Trefferliste der Inhaltssuche */
.search-count { color: #5b6472; font-size: 13px; margin: 4px 0 18px; }
.search-group { margin-bottom: 22px; }
.search-hits { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 6px; }
.search-hits a { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px;
    background: #fff; border: 1px solid #e3e6ec; border-radius: 8px; text-decoration: none;
    color: #1b1f26; }
.search-hits a:hover { border-color: #2b329b; }
.search-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .4px;
    color: #5b6472; flex: 0 0 auto; }
.search-snippet { font-size: 14px; }
.board-search {
    width: 100%; max-width: 440px;
    padding: 11px 15px;
    border: 1px solid var(--border); border-radius: 12px;
    font-size: 14px; color: var(--ink);
    background: var(--panel);
    box-shadow: var(--shadow-sm);
    transition: border-color .15s, box-shadow .15s;
}
.board-search:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 137, 113, .12);
}
.search-empty { color: var(--muted); font-size: 14px; margin: 0 0 24px; }

/* Erstell-Panel (nur sichtbar, wenn ausgeklappt) – kein display im Grundzustand,
   damit das hidden-Attribut greift */
.create-panel {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 14px;
    margin-bottom: 28px;
}
.new-board, .new-folder { display: flex; gap: 10px; }
.new-board { flex: 1 1 440px; }
.new-board input, .new-folder input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 15px;
    background: var(--panel);
    transition: border-color .15s, box-shadow .15s;
}
.new-board input:focus, .new-folder input:focus {
    outline: none;
    border-color: var(--cta);
    box-shadow: 0 0 0 3px rgba(43, 50, 155, .12);
}
.folder-select {
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--panel);
    font-size: 14px;
    color: var(--ink);
    cursor: pointer;
}
.new-board button, .new-folder button {
    padding: 12px 22px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, transform .08s;
}
.new-board button { background: var(--cta); }
.new-board button:hover { background: var(--cta-dark); }
.new-folder button { background: var(--accent); }
.new-folder button:hover { background: var(--accent-dark); }
.new-board button:active, .new-folder button:active { transform: scale(.97); }

/* Ordner-Abschnitte */
.folder-section { margin-bottom: 34px; }
.folder-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.folder-ico {
    width: 22px; height: 17px; border-radius: 4px;
    background: var(--brand-grad);
    position: relative; flex: none;
}
.folder-ico::before {
    content: ""; position: absolute; top: -4px; left: 0;
    width: 10px; height: 5px; border-radius: 3px 3px 0 0;
    background: inherit;
}
.folder-ico.ungrouped { background: #c9ced8; }
.folder-ico.shared { background: linear-gradient(135deg, #d60648, #ff7aa6); }
.folder-ico.public { background: linear-gradient(135deg, #1e88e5, #64b5f6); }
.public-tag { margin-left: 8px; font-size: 11px; font-weight: 600; color: #1565c0; white-space: nowrap; }
.readonly-badge {
    font-size: 12px; color: var(--highlight);
    background: #fde3ea; border-radius: 999px; padding: 3px 10px;
}
.public-badge {
    font-size: 12px; font-weight: 700; color: #fff;
    background: #d92020; border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.folder-head h2 { font-size: 18px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.folder-count { color: var(--muted); font-size: 13px; }
.delete-folder { margin-left: 8px; }
.delete-folder button {
    border: none; background: transparent; color: var(--muted);
    width: 26px; height: 26px; border-radius: 6px; cursor: pointer; font-size: 13px;
    transition: background .15s, color .15s;
}
.delete-folder button:hover { background: #fde3ea; color: var(--highlight); }

/* Board-Karten */
.board-list {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}
.board-card {
    position: relative;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-sm);
    padding: 16px;
    transition: transform .12s, box-shadow .12s, border-color .12s;
}
.board-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: #d8dbe2;
}
.board-open {
    display: block;
    color: var(--ink);
    text-decoration: none;
    font-weight: 600;
    font-size: 16px;
}
.board-open::before {
    content: "";
    display: block;
    width: 38px; height: 38px;
    margin-bottom: 12px;
    border-radius: 10px;
    background: var(--brand-grad);
    opacity: .9;
}
.board-open::after {
    content: "Board öffnen →";
    display: block;
    margin-top: 6px;
    font-size: 13px;
    font-weight: 500;
    color: var(--accent);
}
/* Inline-Umbenennen: Eingabefeld ersetzt den Titel direkt auf der Karte */
.rename-inline {
    width: 100%; box-sizing: border-box;
    font-weight: 600; font-size: 16px; color: var(--ink);
    padding: 4px 8px;
    border: 1px solid var(--accent); border-radius: 8px;
    outline: none;
}
.rename-inline:focus { box-shadow: 0 0 0 3px var(--accent-soft); }

.move-form { margin-top: 12px; }
.move-form select {
    width: 100%;
    padding: 7px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 13px;
    color: var(--muted);
    background: #fafbfc;
    cursor: pointer;
}
.move-form select:focus { outline: none; border-color: var(--accent); }

.board-list li.empty {
    grid-column: 1 / -1;
    color: var(--muted);
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    font-size: 14px;
}

/* ---------------------------------------------------------------- Admin -- */
.admin-section { margin-top: 36px; }
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-top: 12px;
}
.stat-card {
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    padding: 20px 16px;
    text-align: center;
}
.stat-num { display: block; font-size: 32px; font-weight: 800; letter-spacing: -.02em; color: var(--cta); }
.stat-label { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

.export-btn {
    display: inline-block;
    margin-top: 12px;
    padding: 12px 18px;
    background: var(--cta);
    color: #fff;
    text-decoration: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
}
.export-btn:hover { background: var(--cta-dark); }

.link-btn {
    background: none;
    border: 1px solid var(--cta);
    color: var(--cta);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.link-btn:hover { background: var(--accent-soft); }

/* ------------------------------------------------------ Board-Historie -- */
.topbar-btn {
    border: 1px solid var(--border);
    background: var(--panel);
    color: var(--ink);
    border-radius: 8px;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap; /* mehrwortige Beschriftungen (z. B. „Alles zeigen") nicht umbrechen */
    cursor: pointer;
    transition: background .15s;
}
.topbar-btn:hover { background: var(--accent-soft); }
.topbar-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }

/* hidden-Attribut muss gegen das display der Klasse gewinnen (höhere Spezifität) */
.history-panel[hidden], .preview-banner[hidden] { display: none; }
.history-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    right: 80px; /* links neben der Zoom-Steuerung (16 + 52 + 12), damit die bedienbar bleibt */
    width: 320px;
    max-height: calc(100vh - var(--topbar-h) - 28px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    z-index: 30;
    overflow: hidden;
}
.history-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.history-head strong { font-size: 15px; }
.icon-btn {
    border: none; background: transparent; color: var(--muted);
    width: 28px; height: 28px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.icon-btn:hover { background: var(--accent-soft); color: var(--ink); }
.history-save {
    margin: 12px 16px 4px;
    padding: 9px 12px;
    border: none; border-radius: 9px;
    background: var(--cta); color: #fff;
    font-size: 13px; font-weight: 600; cursor: pointer;
}
.history-save:hover { background: var(--cta-dark); }
.history-save:disabled { opacity: .6; cursor: default; }
.history-hint { margin: 4px 16px 8px; color: var(--muted); font-size: 12px; }

/* --- Aufgaben: Panel (nach Personen) + Zuweis-Popover ------------------- */
.tasks-panel[hidden] { display: none; }
.tasks-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    right: 80px; /* links neben der Zoom-Steuerung (16 + 52 + 12), damit die bedienbar bleibt */
    width: 340px;
    max-height: calc(100vh - var(--topbar-h) - 28px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    z-index: 30;
    overflow: hidden;
}
.tasks-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.tasks-head strong { font-size: 15px; }
.tasks-summary { margin: 10px 16px 4px; color: var(--muted); font-size: 12px; }
.tasks-list { overflow-y: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 12px; }
.tasks-empty { color: var(--muted); font-size: 13px; padding: 8px 4px; }
.tasks-group { border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.tasks-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.tasks-avatar {
    flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%;
    background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
    display: inline-flex; align-items: center; justify-content: center;
}
.tasks-person { font-size: 14px; font-weight: 600; color: var(--ink); flex: 1 1 auto; }
.tasks-count { font-size: 11px; color: var(--muted); white-space: nowrap; }
.tasks-row { display: flex; align-items: center; gap: 8px; padding: 3px 2px; }
.tasks-row input[type="checkbox"] { flex: 0 0 auto; }
.tasks-link {
    border: none; background: transparent; text-align: left; cursor: pointer;
    font-size: 13px; color: var(--ink); padding: 2px 0; flex: 1 1 auto;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tasks-link:hover { color: var(--accent); text-decoration: underline; }
.tasks-row.done .tasks-link { color: var(--muted); text-decoration: line-through; }

.task-popover[hidden] { display: none; }
.task-popover {
    position: fixed;
    min-width: 200px; max-width: 260px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 10px 12px;
    z-index: 60;
}
.task-pop-head { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.task-pop-empty { font-size: 12px; color: var(--muted); margin: 0; }
.task-pop-members { display: flex; flex-direction: column; gap: 4px; max-height: 220px; overflow-y: auto; }
.task-pop-member { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); cursor: pointer; }
.task-pop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-pop-foot { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.task-pop-done { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; }
.history-list {
    list-style: none; margin: 0; padding: 4px 10px 12px;
    overflow-y: auto; display: flex; flex-direction: column; gap: 4px;
}
.history-empty { color: var(--muted); font-size: 13px; padding: 12px 6px; }
.history-item {
    display: flex; align-items: stretch; gap: 4px;
    border-radius: 10px;
}
.history-item:hover { background: var(--accent-soft); }
.history-open {
    flex: 1; text-align: left; border: none; background: transparent; cursor: pointer;
    display: flex; flex-direction: column; gap: 2px; padding: 9px 10px; border-radius: 10px;
}
.history-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.history-meta { font-size: 12px; color: var(--muted); }
.history-sub { font-size: 11px; color: var(--muted); }
.history-del {
    border: none; background: transparent; color: var(--muted);
    width: 30px; border-radius: 8px; cursor: pointer; font-size: 12px; flex: none;
}
.history-del:hover { background: #fde3ea; color: var(--highlight); }

.preview-banner {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px 8px 14px;
    background: #2b2f36; color: #fff;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    z-index: 40;
    font-size: 13px;
}
.preview-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #ffb020; box-shadow: 0 0 0 3px rgba(255,176,32,.25); flex: none;
}
.preview-exit {
    border: none; border-radius: 999px; cursor: pointer;
    background: #fff; color: #2b2f36; font-size: 12px; font-weight: 600; padding: 6px 12px;
}
.preview-exit:hover { background: #e9ebf0; }

/* ---------------------------------------------------- Objekt-Kommentare -- */
.comment-panel[hidden] { display: none; }
.comment-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    right: 80px; /* links neben der Zoom-Steuerung (16 + 52 + 12), damit die bedienbar bleibt */
    width: 320px;
    max-height: calc(100vh - var(--topbar-h) - 28px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    z-index: 31;
    overflow: hidden;
}
.comment-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
}
.comment-head strong { font-size: 15px; }
.comment-threads { overflow-y: auto; padding: 10px 12px; display: flex; flex-direction: column; gap: 12px; }
.comment-empty { color: var(--muted); font-size: 13px; padding: 8px 4px; }
.comment-thread {
    border: 1px solid var(--border); border-radius: 12px; padding: 10px;
    display: flex; flex-direction: column; gap: 8px;
}
.comment-thread.resolved { background: #f5f6f8; opacity: .85; }
.comment { display: flex; flex-direction: column; gap: 2px; }
.comment.reply { margin-left: 14px; padding-left: 8px; border-left: 2px solid var(--border); }
.comment-by { font-size: 12px; color: var(--muted); font-weight: 600; }
.comment-text { font-size: 14px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.comment-actions { display: flex; gap: 10px; margin-top: 2px; }
.comment-link {
    border: none; background: none; cursor: pointer; padding: 0;
    font-size: 12px; color: var(--accent); font-weight: 600;
}
.comment-link:hover { text-decoration: underline; }
.comment-link.danger { color: var(--muted); }
.comment-link.danger:hover { color: var(--highlight); }
.comment-resolved-tag {
    margin-left: 6px; font-size: 11px; color: #fff; background: #7a8194;
    border-radius: 999px; padding: 1px 7px;
}
.comment-reply { display: flex; gap: 6px; }
.comment-reply input {
    flex: 1; padding: 6px 9px; border: 1px solid var(--border); border-radius: 8px; font-size: 13px;
}
.comment-reply button {
    border: 1px solid var(--border); background: var(--panel); border-radius: 8px;
    padding: 0 10px; cursor: pointer; font-size: 14px;
}
.comment-compose {
    border-top: 1px solid var(--border); padding: 10px 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.comment-compose textarea {
    border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px;
    font-size: 14px; font-family: inherit; resize: vertical;
}
.comment-compose button {
    align-self: flex-end; border: none; border-radius: 8px;
    background: var(--cta); color: #fff; font-size: 13px; font-weight: 600;
    padding: 7px 16px; cursor: pointer;
}
.comment-compose button:hover { background: var(--cta-dark); }

/* Erwähnungen: Auswahlliste über dem Eingabefeld, Hervorhebung im gelesenen Kommentar.
   Die Liste sitzt absolut im Panel (relative Eltern: .comment-compose / .comment-reply) und
   öffnet nach OBEN – unter dem Eingabefeld ist im Panel kein Platz mehr. */
.comment-compose, .comment-reply { position: relative; }
.mention-pop {
    position: absolute; left: 12px; right: 12px; bottom: calc(100% - 2px);
    margin: 0; padding: 4px; list-style: none; z-index: 5;
    background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
    box-shadow: var(--shadow-md); max-height: 190px; overflow-y: auto;
}
.mention-pop[hidden] { display: none; }
.mention-item {
    padding: 6px 8px; border-radius: 7px; font-size: 13px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mention-item:hover, .mention-item.active { background: var(--accent-soft); }
.mention { color: var(--accent); font-weight: 600; }

/* -------------------------------------------- Aktionsleisten (Voting/Präs.) -- */
.action-banner[hidden] { display: none; }
.action-banner {
    position: fixed;
    top: calc(var(--topbar-h) + 12px);
    left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 12px;
    padding: 8px 10px 8px 14px;
    background: #2b2f36; color: #fff;
    border-radius: 999px;
    box-shadow: var(--shadow-md);
    z-index: 40; font-size: 13px;
    max-width: 92vw;
}
/* Position setzt board-banners.js (Stapelung) – hier nur noch die Optik. */
.action-banner.present { background: #1f2733; }
/* Verbindungshinweis: warnend, aber nicht alarmierend – liegt über den anderen Bannern. */
.action-banner.offline {
    background: #8a5300; padding: 8px 14px; z-index: 41; font-size: 13px; font-weight: 600;
}
/* Abgelaufene Sitzung: deutlicher als ein Verbindungsproblem – hier muss man handeln. */
.action-banner.offline.expired { background: #7a0a24; }
/* Wartende Änderungen: kein Fehler, sondern eine offene Entscheidung – deshalb ruhiges Blau
   statt Warnfarbe. */
.action-banner.outbox { background: #1f3a5f; padding: 8px 14px; z-index: 41; font-size: 13px; font-weight: 600; }
.action-banner.outbox .ab-dot { background: #8ab4f8; box-shadow: 0 0 0 3px rgba(138,180,248,.25); }
.action-banner.offline.expired .ab-dot { background: #ffd0dc; }

/* Moderations-Timer (Position: siehe board-banners.js) */

.action-banner.timer { background: #1f2733; }
.action-banner.timer .ab-dot { background: #4cc38a; box-shadow: 0 0 0 3px rgba(76,195,138,.25); }
.action-banner.timer .timer-time { font-size: 17px; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.action-banner.timer .timer-by { font-size: 12px; opacity: .75; max-width: 180px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Letzte 30 Sekunden */
.action-banner.timer.warn { background: #8a5300; }
.action-banner.timer.warn .ab-dot { background: #ffb020; box-shadow: 0 0 0 3px rgba(255,176,32,.25); }
/* Zeit um */
.action-banner.timer.over { background: #8f1d3a; }
.action-banner.timer.over .ab-dot { background: #ff6b8a; box-shadow: 0 0 0 3px rgba(255,107,138,.28); }
.action-banner .ab-dot {
    width: 9px; height: 9px; border-radius: 50%; flex: none;
    background: #d6336c; box-shadow: 0 0 0 3px rgba(214,51,108,.25);
}
.action-banner.present .ab-dot { background: #ffb020; box-shadow: 0 0 0 3px rgba(255,176,32,.25); }
.action-banner .ab-btn {
    border: none; border-radius: 999px; cursor: pointer;
    background: #fff; color: #2b2f36; font-size: 12px; font-weight: 600; padding: 6px 12px;
}
.action-banner .ab-btn:hover { background: #e9ebf0; }
.action-banner .ab-btn.ghost {
    background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4);
}
.action-banner .ab-btn.ghost:hover { background: rgba(255,255,255,.12); }
/* Deaktiviert: gedämpft, aber lesbar. Wichtig: beim Hovern NICHT transparent werden –
   die dunkle Schrift stünde sonst unsichtbar auf der dunklen Leiste. */
.action-banner .ab-btn:disabled { background: #fff; color: #2b2f36; opacity: .55; cursor: default; }
.action-banner .ab-btn:disabled:hover { background: #fff; }
.action-banner .ab-btn.ghost:disabled { background: transparent; color: #fff; }
.action-banner .ab-btn.ghost:disabled:hover { background: transparent; }

/* ---- Suche auf dem Board ------------------------------------------------ */
/* Helle Leiste (kein dunkles action-banner): man tippt darin, das soll wie ein Eingabefeld
   aussehen und nicht wie eine Statusmeldung. `top` kommt von board-banners.js. */
.find-bar {
    position: fixed; left: 50%; transform: translateX(-50%); z-index: 32;
    display: flex; align-items: center; gap: 6px;
    padding: 6px 8px; border-radius: 999px;
    background: var(--panel); border: 1px solid var(--border); box-shadow: var(--shadow-md);
    max-width: calc(100vw - 24px);
}
.find-bar[hidden] { display: none; }
.find-ico { width: 16px; height: 16px; flex: none; color: var(--muted); margin-left: 4px; }
.find-bar input {
    border: none; outline: none; background: transparent; font-family: inherit; font-size: 14px;
    color: var(--ink); width: 240px; min-width: 120px; padding: 2px 0;
}
.find-count {
    font-size: 12px; color: var(--muted); font-weight: 600; white-space: nowrap;
    min-width: 62px; text-align: right;
}
.find-count.none { color: var(--highlight); }
.find-nav {
    display: inline-flex; align-items: center; justify-content: center;
    width: 26px; height: 26px; flex: none; border: none; border-radius: 6px;
    background: transparent; color: var(--muted); cursor: pointer;
}
.find-nav:hover { background: var(--accent-soft); color: var(--accent-dark); }
.find-nav svg { width: 15px; height: 15px; display: block; }

/* Slide-Steuerung (Frames als Präsentations-Slides) */
.action-banner .ab-slide-count {
    font-size: 12px; font-weight: 600; white-space: nowrap; min-width: 74px; text-align: center;
}
.action-banner .ab-chips { display: flex; gap: 6px; overflow-x: auto; max-width: 46vw; }
.action-banner .ab-chip {
    border: 1px solid rgba(255,255,255,.28); border-radius: 999px; cursor: pointer;
    background: transparent; color: #fff; font-size: 12px; padding: 5px 10px;
    white-space: nowrap; max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.action-banner .ab-chip:hover { background: rgba(255,255,255,.12); }
.action-banner .ab-chip.on { background: #fff; color: #1f2733; border-color: #fff; }
/* Bei vielen Slides trägt der Zähler den Titel (die Chips entfallen dann) */
.action-banner .ab-slide-count.wide {
    min-width: 0; max-width: 260px; font-weight: 400;
    overflow: hidden; text-overflow: ellipsis;
}

/* --- Slide-Liste (Präsentation): sortieren, ausnehmen, springen --------- */
.slides-panel[hidden] { display: none; }
.slides-panel {
    position: fixed;
    top: calc(var(--topbar-h) + 108px); /* unter der Präsentationsleiste */
    /* Links NEBEN der Zoom-Steuerung (die ist 52 px breit und sitzt bei right:16px):
       16 + 52 + 12 Abstand. Anders als die übrigen Panels beginnt dieses Panel erst
       unterhalb der Präsentationsleiste – bündig rechts würde es den Zoom-Regler
       halb verdecken, statt ihn wie die anderen Panels ganz zu überlagern. */
    right: 80px;
    width: 300px;
    max-height: calc(100vh - var(--topbar-h) - 128px);
    display: flex;
    flex-direction: column;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-md);
    z-index: 31;
    overflow: hidden;
}
.slides-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-bottom: 1px solid var(--border);
}
.slides-head strong { font-size: 15px; }
.slides-hint { margin: 8px 14px 6px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.slides-list { overflow-y: auto; padding: 0 8px 10px; }
.slide-row {
    display: flex; align-items: center; gap: 6px;
    padding: 5px 6px; border-radius: 8px; cursor: default;
}
.slide-row:hover { background: var(--accent-soft); }
.slide-row.current { background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.slide-row.dragging { opacity: .5; }
.slide-row.skipped .slide-title { color: var(--muted); text-decoration: line-through; }
.slide-grip { color: var(--muted); cursor: grab; font-size: 13px; line-height: 1; padding: 0 2px; }
.slide-no {
    flex: 0 0 auto; min-width: 20px; text-align: right;
    font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.slide-title {
    flex: 1 1 auto; border: none; background: transparent; cursor: pointer;
    text-align: left; font-size: 13px; color: var(--ink); padding: 2px 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.slide-title:hover { color: var(--accent); text-decoration: underline; }
.slide-eye {
    flex: 0 0 auto; border: none; background: transparent; cursor: pointer;
    font-size: 12px; line-height: 1; padding: 3px 4px; border-radius: 6px; opacity: .55;
}
.slide-eye:hover { background: var(--panel); opacity: 1; }
.slide-eye.off { opacity: .9; }

/* ------------------------------------------------ Support: Board-Suche -- */
.support-list { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.support-card {
    background: var(--panel); border: 1px solid var(--border); border-radius: 12px;
    box-shadow: var(--shadow-sm); padding: 14px 16px;
}
.support-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.support-head strong { font-size: 15px; }
.support-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; padding: 3px 0; }
.support-key {
    display: inline-block; min-width: 140px; color: var(--muted); font-weight: 600;
}
.support-tag {
    font-size: 11px; color: #fff; background: #7a8194; border-radius: 999px; padding: 1px 8px;
}
.support-card .muted { color: var(--muted); }
.share-chip {
    font-size: 12px; background: var(--accent-soft); color: var(--accent-dark);
    border-radius: 999px; padding: 2px 10px;
}
.share-chip.owner { background: rgba(43,50,155,.10); color: var(--cta); font-weight: 600; }

/* ------------------------------------------------------- Admin: Tabs ------ */
.admin-tabs { display: flex; gap: 6px; margin: 4px 0 26px; border-bottom: 1px solid var(--border); }
.admin-tab {
    padding: 9px 16px; font-size: 14px; font-weight: 600;
    color: var(--muted); text-decoration: none;
    border: 1px solid transparent; border-bottom: none;
    border-radius: 10px 10px 0 0; margin-bottom: -1px;
}
.admin-tab:hover { color: var(--ink); background: var(--accent-soft); }
.admin-tab.active {
    color: var(--ink); background: var(--panel);
    border-color: var(--border); border-bottom: 1px solid var(--panel);
}

/* --------------------------------------- Admin: Ordner-&-Boards-Übersicht -- */
.inventory-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.lock-toggle {
    border: 1px solid var(--border); background: var(--panel); color: var(--ink);
    border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.lock-toggle:hover { background: var(--accent-soft); }
.lock-toggle.unlocked { background: #ffe2e0; border-color: #d92020; color: #b71c1c; }
.danger-hint { color: #b71c1c; }
/* Lösch-Buttons erst nach dem Öffnen des Schlosses sichtbar */
.board-delete { display: none; margin: 0; }
.delete-unlocked .board-delete { display: inline-flex; }
.delete-board-btn {
    border: none; background: #d92020; color: #fff;
    font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 8px;
    cursor: pointer; white-space: nowrap; transition: background .15s;
}
.delete-board-btn:hover { background: #b71c1c; }
/* Öffentlichen Zugriff beenden (immer sichtbar – reversibel, mit Bestätigungsdialog) */
.public-end { display: inline-flex; margin: 0; }
.public-end-btn {
    border: 1px solid #90caf9; background: #e3f2fd; color: #1565c0;
    font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 999px;
    cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.public-end-btn:hover { background: #ffe2e0; border-color: #d92020; color: #b71c1c; }

.admin-folder-meta { display: inline-flex; align-items: center; gap: 12px; font-size: 13px; }
.admin-board-list {
    list-style: none; margin: 8px 0 0; padding: 0;
    border-top: 1px solid var(--border);
}
.admin-board-row {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 2px; font-size: 13px;
    border-bottom: 1px solid var(--border);
}
.admin-board-list > li:last-child { border-bottom: none; }
.admin-board-list > li.muted { padding: 8px 2px; font-size: 13px; }
.admin-board-name {
    font-weight: 600; color: var(--ink); text-decoration: none;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.admin-board-name:hover { color: var(--accent-dark); text-decoration: underline; }
.admin-board-meta { margin-left: auto; white-space: nowrap; }
.export-link {
    font-size: 12px; font-weight: 600; color: var(--cta); text-decoration: none;
    white-space: nowrap; padding: 2px 8px; border: 1px solid var(--border); border-radius: 8px;
    transition: background .15s;
}
.export-link:hover { background: var(--accent-soft); }

/* ============================================================ Mobil ===== */
@media (max-width: 680px) {
    /* Hier spannen die Hinweisleisten über die ganze Breite – zwischen Werkzeugleiste und
       Zoom-Regler bliebe zu wenig übrig (gemessen: 238 px, die Voting-Leiste bräuchte dann
       neun Zeilen). Die Stapelung richtet sich danach. */
    :root { --bar-mode: stretch; }

    /* Topbar einzeilig, kompakt und bei Bedarf horizontal scrollbar
       (Höhe bleibt fix, damit die Canvas-Position stimmt) */
    .topbar {
        gap: 8px;
        padding: 0 10px;
        overflow-x: auto;
        overflow-y: hidden;
    }
    .topbar .brand { font-size: 0; gap: 0; flex: none; }   /* nur das Logo-Icon */
    .topbar .board-id { display: none; }                    /* Board-Name steht im Tab-Titel */
    .topbar .back-link { margin: 0; padding: 5px 8px; font-size: 12px; white-space: nowrap; }
    .topbar .user { gap: 6px; margin-left: auto; flex: none; }
    .topbar .user > span:not(.presence) { display: none; }  /* Anzeigename ausblenden */
    .topbar .user .logout,
    .topbar .folder-share { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
    .topbar .account { gap: 4px; flex: none; }
    .topbar .account-name { display: none; }   /* nur Avatar + Zahnrad */
    .topbar .account-btn { padding: 3px; }
    .topbar .topbar-btn { padding: 5px 9px; font-size: 12px; white-space: nowrap; }
    /* Menü an den Bildschirm binden statt an die (schmale) Gruppe. */
    .account-menu { right: 6px; left: auto; min-width: 240px; }

    /* Floating-Panels über die volle Breite */
    .history-panel, .comment-panel, .tasks-panel {
        left: 12px; right: 12px; width: auto;
        max-height: calc(100vh - var(--topbar-h) - 24px);
    }
    .slides-panel { left: 12px; right: 12px; width: auto; }
    .action-banner { left: 12px; right: 12px; transform: none; max-width: none; }
    .find-bar { left: 12px; right: 12px; transform: none; max-width: none; }
    .find-bar input { width: auto; flex: 1; }


    /* Board-Übersicht: Kopfzeile stapeln, Erstell-Felder umbrechen, eine Spalte */
    .boards-main { padding: calc(var(--topbar-h) + 24px) 16px 48px; }
    .boards-header { flex-direction: column; align-items: stretch; }
    .boards-actions { justify-content: flex-start; }
    .new-board, .new-folder { flex-wrap: wrap; }
    .new-board input, .new-board .folder-select, .new-board button,
    .new-folder input, .new-folder button { flex: 1 1 100%; }
    .board-list { grid-template-columns: 1fr; }

    /* Support-Suche: Schlüssel-Spalte nicht erzwingen */
    .support-key { min-width: 0; width: 100%; }
}

/* ------------------------------------------------- Gefahrenzone (öffentlich) --- */
.danger-zone {
    margin-top: 40px;
    padding: 16px 18px;
    border: 2px solid #ff4d4f;
    border-radius: 12px;
    background: #fff1f0;
}
.danger-zone.danger-active {
    background: #ffe2e0;
    border-color: #d92020;
    box-shadow: 0 0 0 3px rgba(217, 32, 32, 0.15);
}
.danger-title { margin: 0 0 8px; color: #b71c1c; font-size: 15px; font-weight: 800; }
.danger-text { margin: 0 0 12px; color: #7a1113; font-size: 13px; line-height: 1.5; }
.danger-strong { font-weight: 600; }
.danger-label { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; color: #7a1113; font-size: 13px; }
.danger-btn {
    border: none;
    background: #d92020;
    color: #fff;
    font-weight: 700;
    padding: 9px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .05s;
}
.danger-btn:hover { background: #b71c1c; }
.danger-btn:active { transform: scale(.97); }

/* Zugriffszahl-Abzeichen oben rechts auf der Board-Karte (Personen mit Zugriff) */
.board-access {
    position: absolute; top: 14px; right: 14px;
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 9px 3px 7px;
    background: var(--accent-soft); color: var(--accent-dark);
    border-radius: 999px; font-size: 12px; font-weight: 700;
    line-height: 1.4; cursor: default;
}
.board-access::before { content: "👥"; font-size: 12px; font-weight: 400; }

/* Öffentlich-Abzeichen oben rechts auf der Board-Karte (Weltkugel + 👓/✏️) – bewusst in
   einem Warnton, damit man den öffentlichen Zustand sofort sieht. */
.board-public {
    position: absolute; top: 14px; right: 14px;
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 999px;
    font-size: 13px; line-height: 1.4; cursor: default;
    background: #fff3d6; color: #8a5a00;              /* öffentlich · ansehen */
}
.board-public.edit { background: #ffe0e0; color: #b3261e; } /* öffentlich · bearbeiten */

/* Kennzeichen „anonym per Link geteilt (ohne Login)" – kleine, anklickbare Pille unter dem
   Board-Namen (öffnet die öffentliche Ansicht in neuem Tab). */
.board-linkbadge {
    display: inline-flex; align-items: center;
    margin-top: 8px; padding: 3px 10px; border-radius: 999px;
    font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer;
    text-decoration: none;
    background: rgba(43, 50, 155, .10); color: var(--cta);   /* Link · bearbeiten (Indigo) */
    transition: filter .12s;
}
.board-linkbadge.view { background: var(--accent-soft); color: var(--accent-dark); } /* Link · ansehen (Petrol) */
.board-linkbadge:hover { filter: brightness(.96); text-decoration: underline; }

/* Zugriffszahl-Abzeichen im Ordner-Kopf (inline neben der Board-Anzahl) */
.folder-access {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 2px 9px 2px 7px;
    background: var(--accent-soft); color: var(--accent-dark);
    border-radius: 999px; font-size: 12px; font-weight: 700;
    line-height: 1.4; cursor: default;
}
.folder-access::before { content: "👥"; font-size: 12px; font-weight: 400; }

/* ==========================================================================
   Gestylte Dialoge (bxConfirm/bxAlert) – ersetzen native confirm/alert
   ========================================================================== */
.bx-modal-overlay {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
    padding: 20px;
    background: rgba(20, 28, 46, .45);
    -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px);
    animation: bx-fade .12s ease-out;
}
.bx-modal-overlay[hidden] { display: none; }
@keyframes bx-fade { from { opacity: 0; } to { opacity: 1; } }
.bx-modal {
    width: 100%; max-width: 420px;
    background: var(--panel);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 22px 22px 18px;
    animation: bx-pop .14s ease-out;
}
@keyframes bx-pop { from { transform: translateY(8px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.bx-modal-title {
    margin: 0 0 8px; font-size: 17px; font-weight: 700; color: var(--ink);
}
.bx-modal-msg {
    margin: 0 0 20px; font-size: 14px; line-height: 1.5; color: var(--muted);
    white-space: pre-line; /* respektiert \n aus den Meldungstexten */
}
.bx-modal-input {
    width: 100%; box-sizing: border-box; margin: 0 0 20px;
    padding: 10px 12px; font-size: 15px; font-family: inherit; color: var(--ink);
    border: 1px solid var(--border); border-radius: 9px; outline: none;
    transition: border-color .12s, box-shadow .12s;
}
.bx-modal-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.bx-modal-input[hidden] { display: none; }
/* flex-wrap als Sicherheitsnetz: Schaltflächen dürfen nie aus dem Dialog laufen. */
.bx-modal-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
/* Viele Auswahlmöglichkeiten (bxChoose ab 4 Optionen): als Liste statt in einer Reihe –
   liest sich wie ein Menü und passt immer. „Abbrechen" steht dann unten. */
.bx-modal-actions.stack { flex-direction: column; align-items: stretch; gap: 8px; }
.bx-modal-actions.stack button { width: 100%; }
.bx-modal-actions.stack .bx-modal-cancel { margin-top: 4px; }
.bx-modal-actions button {
    border: none; border-radius: 9px; padding: 9px 18px;
    font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
    transition: background .12s, transform .05s, box-shadow .12s;
}
.bx-modal-actions button:active { transform: scale(.97); }
.bx-modal-cancel {
    background: var(--panel); color: var(--ink);
    box-shadow: inset 0 0 0 1px var(--border);
}
.bx-modal-cancel:hover { background: var(--bg); }
.bx-modal-ok { background: var(--cta); color: #fff; }
.bx-modal-ok:hover { background: var(--cta-dark); }
.bx-modal-ok.danger { background: #d92020; }
.bx-modal-ok.danger:hover { background: #b71c1c; }

/* ---- Board-Vorlagen: Auswahl im „Neues Board"-Panel ---------------------- */
.new-board.with-templates { flex-direction: column; align-items: stretch; gap: 12px; }
.new-board.with-templates .nb-row { display: flex; gap: 10px; flex-wrap: wrap; }
.new-board.with-templates .nb-row input[type="text"] { flex: 1 1 260px; }
.tpl-picklabel { font-size: 12px; font-weight: 600; color: var(--muted);
    text-transform: uppercase; letter-spacing: .04em; margin-top: 2px; }
.tpl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.tpl-card { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer;
    border: 2px solid var(--border); border-radius: 12px; background: var(--panel); padding: 8px; transition: .15s; }
.tpl-card:hover { border-color: color-mix(in srgb, var(--cta) 40%, var(--border)); transform: translateY(-1px); }
.tpl-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.tpl-card:has(input:checked) { border-color: var(--cta);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cta) 18%, transparent); }
.tpl-thumb { height: 66px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border);
    display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tpl-thumb svg { width: 90%; height: 80%; }
.tpl-name { font-size: 13px; font-weight: 600; color: var(--ink); }
.tpl-desc { font-size: 11px; color: var(--muted); line-height: 1.3; }
.tpl-tag { position: absolute; top: 6px; left: 6px; font-size: 9px; font-weight: 700; color: #fff;
    background: var(--accent); border-radius: 999px; padding: 2px 6px; letter-spacing: .02em; }
.tpl-tag.personal { background: var(--cta); }
.tpl-del { position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; line-height: 1;
    border: none; border-radius: 6px; background: rgba(217,32,32,.10); color: #d92020;
    cursor: pointer; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.tpl-del:hover { background: #d92020; color: #fff; }
.new-board.with-templates .nb-submit { align-self: flex-start; }
/* Eigene, gestylte Pflichtfeld-Meldung (ersetzt die native Browser-Sprechblase) */
.new-board .input-error { border-color: #d92020 !important;
    box-shadow: 0 0 0 3px rgba(217, 32, 32, .15); }
.new-board .field-error { color: #d92020; font-size: 12px; margin: -4px 0 2px; }

/* ---- Topbar-Überlaufmenü „⋯" -------------------------------------------- */
/* Die Aktionsleiste ist inline ~1160px breit; darunter würden rechts Buttons abgeschnitten.
   Bis 1200px klappen wir die Board-Werkzeuge daher in ein Menü „⋯". */
.topbar-more { display: none; } /* breite Ansicht: aus, Leiste bleibt inline */
@media (max-width: 1200px) {
    /* Wichtig: die Topbar darf das Dropdown NICHT beschneiden (sonst klippt overflow:auto,
       das fürs horizontale Scrollen gesetzt ist, das nach unten aufklappende Menü weg). */
    .topbar { overflow: visible; }
    .topbar-more { display: inline-flex; align-items: center; justify-content: center;
        margin-left: auto; width: 40px; height: 34px; font-size: 20px; line-height: 1;
        border: 1px solid var(--border); border-radius: 8px; background: var(--panel);
        color: var(--ink); cursor: pointer; }
    /* Board-Werkzeuge werden zum Dropdown unter der Schaltfläche „⋯".
       Die Konto-Gruppe bleibt daneben stehen – sie ist mit Avatar + Zahnrad schmal genug. */
    .topbar .board-actions {
        position: absolute; top: var(--topbar-h); right: 6px; z-index: 60;
        display: none; flex-direction: column; align-items: stretch; gap: 6px;
        background: var(--panel); border: 1px solid var(--border); border-radius: 10px;
        box-shadow: var(--shadow-md); padding: 8px;
        min-width: 210px; max-width: calc(100vw - 12px);
        /* Querformat/niedrige Höhe: Menü auf sichtbare Höhe begrenzen und intern scrollen. */
        max-height: calc(100vh - var(--topbar-h) - 12px); overflow-y: auto;
    }
    .topbar .board-actions.open { display: flex; }
    .topbar .board-actions > * { width: 100%; text-align: left; }
    /* Hier trägt der „⋯"-Knopf den automatischen Abstand -> Präsenz und Konto folgen dicht.
       NUR auf der Board-Seite (dort gibt es den Präsenz-Platz): auf Start- und Admin-Seite
       ist das Konto-Feld das einzige rechte Element und BRAUCHT den automatischen Abstand,
       sonst klebt es plötzlich an der Wortmarke. */
    .topbar .presence-slot { margin-left: 0; }
    .topbar .presence-slot ~ .account { margin-left: 8px; }
}
/* Echtes Handy: zusätzlich Brand ausblenden und langen Board-Namen kürzen. */
@media (max-width: 768px) {
    .topbar .brand { display: none; }
    .topbar .board-id { font-size: 13px; min-width: 0; overflow: hidden;
        text-overflow: ellipsis; white-space: nowrap; }

    /* Zoom-Regler kompakter: der lange vertikale Schieber entfällt (auf Touch zoomt man per
       Pinch-Geste); +/−, Prozent und „Alles zeigen" bleiben, fingerfreundlich vergrößert. */
    .zoom-control { top: calc(var(--topbar-h) + 8px); right: 8px; gap: 4px; }
    .zoom-slider { display: none; }
    .zoom-btn { width: 34px; height: 34px; font-size: 19px; }
    .zoom-fit { margin-top: 2px; }
}

/* Rückmeldung auf der Übersicht (z. B. nach „Board verlassen"). */
.boards-flash {
    margin: 0 0 16px; padding: 10px 14px; border-radius: 10px;
    background: var(--accent-soft); color: var(--accent-dark);
    font-size: 14px; font-weight: 600;
}

/* ---- Papierkorb (Übersicht) --------------------------------------------- */
.folder-ico.trash { background: linear-gradient(135deg, #7a8194, #aab1c2); }
.trash-section .board-card { opacity: .92; }
.trash-hint { font-size: 12px; color: var(--muted); margin-left: auto; }

.trash-meta { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
/* Frist im Papierkorb; die letzten Tage in Magenta (sparsames Highlight des Design-Kits). */
.trash-deadline { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.trash-deadline.urgent { color: var(--highlight, #d60648); font-weight: 600; }

/* ---- Zugriffsprotokoll (Teilen-Seite) ----------------------------------- */
.access-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 12px; }
.access-table th, .access-table td { text-align: left; padding: 4px 8px 4px 0; }
.access-table th { color: var(--muted); font-weight: 600; }
.access-table tr + tr td { border-top: 1px solid var(--border); }
.access-note { font-size: 12px; color: var(--muted); }

/* ---- Meine Aufgaben (Startseite) ---------------------------------------- */
.folder-ico.mytasks { background: linear-gradient(135deg, #1f9d55, #63d2a0); }
/* EINE Aufgabe pro Zeile. In zwei Spalten blieben neben dem beschrifteten Knopf nur rund
   180 px für den Text – zu wenig für einen Satz wie „Ergebnisse der Retro durchsprechen". */
.mytask-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px;
    grid-template-columns: 1fr; }
/* Die KARTE ist das <li>: darin Status-Punkt, Link auf das Objekt und die Aktion. Vorher trug
   der Link die Karte und das Kontrollkästchen stand daneben – das sah losgelöst aus und war
   unbeschriftet. */
.mytask {
    display: flex; align-items: center; gap: 12px; min-width: 0;
    padding: 12px 14px; background: var(--panel); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-sm);
    transition: border-color .12s, box-shadow .12s;
}
.mytask:hover { border-color: var(--accent); box-shadow: var(--shadow-md); }
.mytask > .mytask-link {
    display: flex; align-items: center; gap: 12px; flex: 1 1 auto; min-width: 0;
    text-decoration: none; transition: transform .06s;
}
.mytask > .mytask-link:active { transform: translateY(1px); }
/* Offener Kreis: hier steht was aus. Steht an JEDER Zeile, auch ohne Bearbeitungsrecht. */
.mytask-mark {
    flex: none; width: 16px; height: 16px; border-radius: 50%;
    border: 2px solid var(--accent); opacity: .65;
}
.mytask:hover .mytask-mark { opacity: 1; }
/* Die Aktion: beschriftet statt bloßes Kästchen. Sie bleibt zurückhaltend, bis man die Karte
   berührt – der Aufgabentext ist die Hauptsache. */
.mytask-done {
    flex: none; display: inline-flex; align-items: center; gap: 6px;
    border: 1px solid var(--border); background: var(--panel); border-radius: 999px;
    padding: 5px 11px 5px 9px; font-size: 12px; font-family: inherit; color: var(--muted);
    white-space: nowrap; cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.mytask-done svg { width: 14px; height: 14px; flex: none; }
.mytask-done:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent);
    color: var(--accent); }
.mytask-done:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.mytask-done:disabled { cursor: default; opacity: .6; }
/* Sehr schmale Karten: nur der Haken, die Beschriftung bleibt für Vorlesen/Tooltip erhalten. */
@media (max-width: 560px) {
    .mytask-done-text { position: absolute; width: 1px; height: 1px; overflow: hidden;
        clip: rect(0 0 0 0); white-space: nowrap; }
    .mytask-done { padding: 6px; }
}
/* Zeile, die gerade abgehakt wurde: erst durchgestrichen, dann verschwindet sie. */
.mytask.done .mytask-text { text-decoration: line-through; color: var(--muted); }
.mytask.leaving { opacity: 0; transition: opacity .25s ease; }
.mytask-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
/* Der beschriftete Knopf nimmt Platz weg, den vorher der Text hatte. Deshalb darf der Text
   jetzt auf ZWEI Zeilen umbrechen, statt schon nach der halben Karte abzuschneiden – eine
   Aufgabe wie „Ergebnisse der Retro mit dem Team durchsprechen" ist sonst nicht lesbar. */
.mytask-text { color: var(--ink); font-size: 14px; line-height: 1.35;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; }
.mytask-board { display: inline-flex; align-items: center; gap: 5px;
    color: var(--muted); font-size: 12px; min-width: 0; }
.mytask-board svg { width: 13px; height: 13px; flex: none; }
.mytask-board span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mytask-go { flex: none; color: var(--accent); font-size: 15px; opacity: 0; transition: opacity .12s; }
.mytask-link:hover .mytask-go { opacity: 1; }

/* ---- Aufgaben: Fälligkeit + Priorität ----------------------------------- */
.task-pop-row { display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.task-pop-rowlabel { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink); }
.task-pop-date { border: 1px solid var(--border); border-radius: 7px; padding: 4px 6px;
    font-size: 12px; font-family: inherit; color: var(--ink); background: var(--panel); }
.task-prio-group { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.task-prio { border: none; background: transparent; cursor: pointer; font-size: 12px;
    padding: 4px 8px; color: var(--muted); font-family: inherit; }
.task-prio + .task-prio { border-left: 1px solid var(--border); }
.task-prio:hover { background: var(--accent-soft); }
.task-prio.on { color: #fff; background: var(--accent); }
.task-prio.on.p-high { background: #d92020; }
.task-prio.on.p-low { background: #7a8194; }
/* Panel „Aufgaben nach Personen" */
.tasks-prio { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; flex: none; }
.tasks-prio.p-high { background: #ffe0e0; color: #b71c1c; }
.tasks-prio.p-low { background: var(--bg); color: var(--muted); }
.tasks-due { font-size: 11px; color: var(--muted); white-space: nowrap; flex: none; }
.tasks-due.late { color: #d92020; font-weight: 600; }
.tasks-row.overdue .tasks-link { color: #d92020; }
/* Startseite: Fälligkeit + Priorität an der Aufgaben-Karte */
.mytask-prio { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; flex: none; }
.mytask-prio.p-high { background: #ffe0e0; color: #b71c1c; }
.mytask-prio.p-low { background: var(--bg); color: var(--muted); }
.mytask-due { font-size: 11px; white-space: nowrap; flex: none; }
.mytask-due.late { color: #d92020; font-weight: 600; }

/* ---- Aufgaben-Filter (Startseite) --------------------------------------- */
.task-filter { display: inline-flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.task-filter-btn {
    display: inline-flex; align-items: center; gap: 5px;
    border: 1px solid var(--border); background: var(--panel); border-radius: 999px;
    padding: 4px 10px; font-size: 12px; font-family: inherit; color: var(--ink); cursor: pointer;
    transition: background .12s, border-color .12s, color .12s;
}
.task-filter-btn:hover:not(:disabled) { background: var(--accent-soft); border-color: var(--accent); }
.task-filter-btn.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.task-filter-btn:disabled { opacity: .45; cursor: default; }
.task-filter-num {
    font-size: 10px; font-weight: 600; min-width: 16px; text-align: center;
    padding: 0 4px; border-radius: 999px; background: var(--bg); color: var(--muted);
}
.task-filter-btn.on .task-filter-num { background: rgba(255,255,255,.25); color: #fff; }
.mytask-empty { margin: 10px 2px 0; font-size: 13px; color: var(--muted); }

/* ---- Ordner ein-/ausklappen (Startseite) -------------------------------- */
.folder-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; flex: none; margin-right: 2px;
    border: none; background: transparent; border-radius: 6px;
    color: var(--muted); cursor: pointer; transition: background .12s, transform .15s;
}
.folder-toggle:hover { background: var(--accent-soft); color: var(--accent); }
.folder-toggle svg { width: 15px; height: 15px; display: block; }
/* Eingeklappt: Pfeil zeigt nach rechts, die Board-Liste verschwindet */
.folder-section.collapsed .folder-toggle svg { transform: rotate(-90deg); }
.folder-section.collapsed .board-list { display: none; }
/* Während einer Suche werden eingeklappte Ordner aufgeklappt, sonst wären Treffer versteckt */
.folder-section.collapsed.search-open .board-list { display: grid; }
.folder-section.collapsed.search-open .folder-toggle svg { transform: none; }
/* Eingeklappter Aufgaben-Bereich: Liste UND Filter verschwinden (Filter wären dort nutzlos) */
.tasks-section.collapsed .mytask-list,
.tasks-section.collapsed .task-filter,
.tasks-section.collapsed .mytask-empty { display: none; }
/* Während einer Suche mit Treffern wieder zeigen */
.tasks-section.collapsed.search-open .mytask-list { display: grid; }
.tasks-section.collapsed.search-open .task-filter { display: inline-flex; }
/* Papierkorb: Name ohne „Board öffnen"-Aufforderung (gelöschte Boards sind nicht offenbar),
   mit demselben Vorschau-Kachelbild wie normale Karten. */
.trash-name { display: block; color: var(--muted); font-weight: 600; font-size: 16px; }
.trash-name::before {
    content: ""; display: block; width: 38px; height: 38px; margin-bottom: 12px;
    border-radius: 10px; background: var(--brand-grad); opacity: .35;
}

/* Papierkorb-Karten: eigene Knöpfe (nicht die Umbenennen-/Löschen-Klassen der Board-Karten,
   sonst greift das Umbenennen-Skript auf ein nicht vorhandenes Formular zu) */
/* „Verlassen" an fremden Boards: gedämpft, es ist keine zerstörende Aktion. */
.card-actions .leave-card-btn {
    border: none; background: transparent; color: var(--muted);
    font-family: inherit; font-size: 13px; cursor: pointer; padding: 0;
}
.card-actions .leave-card-btn:hover { color: var(--highlight); text-decoration: underline; }
.leave-board-form { display: none; }
.card-actions .trash-restore-btn,
.card-actions .trash-purge-btn {
    border: none; background: none; padding: 0; font: inherit; font-size: 13px;
    font-weight: 600; cursor: pointer;
}
.card-actions .trash-restore-btn { color: var(--accent); }
.card-actions .trash-purge-btn { color: #d92020; }
.card-actions .trash-restore-btn:hover,
.card-actions .trash-purge-btn:hover { text-decoration: underline; }
