/* ════════════════════════════════════════════════════════════════
   Globale, seitenweit einheitliche Komponenten
   Vorlagen: Auftragsbuch-Inhaltsverzeichnis (Filter + Listen) und
   Verbindungen/connections-edit (Tabellen). Nur hier zentral pflegen –
   keine Inline-Styles, keine Einzelseiten-Designs.
   ════════════════════════════════════════════════════════════════ */

/* ── Aufklappbarer Filterbereich ───────────────────────────────── */
.filter-box {
    margin-bottom: 1.5rem;
    border: none;
    background: rgba(0,0,0,.35);   /* identisch zu den Übersichts-Karten (.dash-card/.crud-ov-card); Inputs heben sich über --input-bg-color ab */
}
.filter-box > summary {
    cursor: pointer;
    padding: .6rem .9rem;
    font-weight: 600;
    list-style: none;
    display: flex;
    align-items: center;
    gap: .5rem;
    user-select: none;
}
.filter-box > summary::-webkit-details-marker { display: none; }
.filter-box > summary::after { content: '\25B8'; margin-left: auto; transition: transform .15s; }
.filter-box[open] > summary::after { transform: rotate(90deg); }
.filter-box > form { padding: 0 .9rem .9rem; }

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: .6rem 1rem;
    align-items: end;
}
.filter-grid .filter-wide { grid-column: 1 / -1; }
.filter-grid label { display: block; font-size: .75rem; color: var(--main-color, #aaa); margin-bottom: .25rem; }
.filter-grid input, .filter-grid select {
    width: 100%;
    box-sizing: border-box;
    height: 2.5rem;
    padding: .5rem;
    background-color: var(--input-bg-color) !important;
    color: #fff !important;
    border: none !important;
    color-scheme: dark;
}
/* MANI-Konvention: „Anwenden" + „Zurücksetzen" IMMER rechtsbündig. */
.filter-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: .5rem; flex-wrap: wrap; }

/* ── Mehrspaltige, kategoriensortierte Listen ──────────────────── */
.list-grid { column-width: 400px; column-gap: 2.5rem; }
.list-group {
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    margin: 0 0 1.6rem;
}
.list-group h3 { margin: 0 0 .3rem; border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.list-group ul { list-style: none; padding: 0; margin: 0; }
.list-group li {
    padding: .35rem .4rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.list-group li:hover { background: rgba(255,255,255,.07); }
.list-group li > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }

/* ── Tabellen als CSS-Grid: responsiv, mit Zeilen-Hover ────────── */
.data-grid { display: flex; flex-direction: column; width: 100%; }
.data-grid-row {
    display: grid;
    grid-template-columns: var(--dg-cols, repeat(auto-fit, minmax(120px, 1fr)));
    gap: .4rem 1rem;
    align-items: start;
    padding: .5rem .6rem;
    border-bottom: 1px solid rgba(255,255,255,.10);
}
.data-grid-head { font-weight: bold; border-bottom: 2px solid rgba(255,255,255,.25); }
.data-grid-row:not(.data-grid-head):hover { background: rgba(255,255,255,.07); }
/* Normale Zelle: Inline-Inhalt (z. B. „Name: Status") bleibt in einer Zeile/fließt natürlich.
   WICHTIG: --dg-cols pro Tabelle NUR mit fr/festen Einheiten definieren (kein `auto`),
   sonst sizen die Spalten je Zeile unterschiedlich und nichts ist bündig. */
.data-grid-cell { min-width: 0; overflow-wrap: anywhere; text-align: left; }
@media (max-width: 700px) {
    .data-grid-row { grid-template-columns: 1fr; gap: .15rem; }
    .data-grid-head { display: none; }
    .data-grid-row { padding: .6rem .6rem; }
}

/* Spaltenvorlagen je Tabelle (global, nicht inline) */
.dg-connections { --dg-cols: 1fr 1.3fr 1.4fr 1.4fr 13rem; }
.dg-reports     { --dg-cols: 3fr .6fr .7fr 1.2fr 1.1fr 1.2fr; }
.dg-otherfely   { --dg-cols: 3fr 1fr 1.3fr 1fr 11rem; }
.dg-sem-comp    { --dg-cols: 1.8fr 1.8fr 1fr .6fr 11rem; }
.dg-sem-part    { --dg-cols: 2fr 1fr 14rem 3rem; }

/* Teilnehmer-/Abschluss-Status (Wiederverwendung in Liste + Detail) */
.sem-status-done { color: #5ddb8c; font-weight: 600; }
.sem-status-open { color: #9aa; }
.sem-part-add    { display: flex; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; align-items: flex-end; }
.sem-block-title { border-bottom: 1px dashed grey; padding-bottom: .3rem; margin-top: 2rem; }

/* Abschluss-Status als Toggle-Button (Status IST der Button) */
.sem-toggle      { width: 100%; text-align: center; }
.sem-toggle-done { background: #0a3a1a !important; color: #5ddb8c !important; border: 1px solid #1c6b3a !important; }
.sem-toggle-open { background: transparent !important; color: #cfc9c0 !important; border: 1px dotted var(--main-color) !important; }
.sem-toggle-done:hover { background: #0d4d22 !important; }
.sem-toggle-open:hover { background: rgba(255,255,255,.08) !important; }

/* Modul-Kurzbeschreibung unter dem Seitenkopf (MANI §5.2) */
.crud-desc { color: #9aa; margin: .2rem 0 1.2rem; max-width: 70ch; }

/* Seitenkopf: Modul-Titel (h2) und Page-Titel (h3) in EINER Zeile: „h2 - h3" */
.crud-head { display: flex; align-items: baseline; gap: .5rem; flex-wrap: wrap; margin: 0 0 .2rem; }
.crud-head h2, .crud-head h3 { margin: 0; }
.crud-head-sep { color: #9aa; }

/* ── Einheitlicher „Neu/Erstellen"-Button (in der Listenleiste) ── */
.btn-create { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; flex: 0 0 auto; }
.btn-create i { font-size: .9em; }
/* Einheitliche obere Aktionsleiste: ALLE entscheidenden Buttons (Neu/Speichern/
   Abbrechen/Bearbeiten) ganz oben in der Main Area, rechtsbündig. „Zurück" links. */
.page-actions { display: flex; justify-content: flex-end; align-items: center; gap: .6rem; flex-wrap: wrap; margin: 0 0 1.2rem; }
.page-actions .pa-back { margin-right: auto; }

/* ── Generische Spaltenvorlagen (N Inhaltsspalten; *-a = mit Aktionsspalte) ── */
.dg-n1 { --dg-cols: minmax(0,1fr); }
.dg-n2 { --dg-cols: repeat(2, minmax(0,1fr)); }
.dg-n3 { --dg-cols: repeat(3, minmax(0,1fr)); }
.dg-n4 { --dg-cols: repeat(4, minmax(0,1fr)); }
.dg-n5 { --dg-cols: repeat(5, minmax(0,1fr)); }
.dg-n6 { --dg-cols: repeat(6, minmax(0,1fr)); }
.dg-n7 { --dg-cols: repeat(7, minmax(0,1fr)); }
.dg-n8 { --dg-cols: repeat(8, minmax(0,1fr)); }
.dg-a1 { --dg-cols: minmax(0,1fr) 6rem; }
.dg-a2 { --dg-cols: repeat(2, minmax(0,1fr)) 6rem; }
.dg-a3 { --dg-cols: repeat(3, minmax(0,1fr)) 6rem; }
.dg-a4 { --dg-cols: repeat(4, minmax(0,1fr)) 6rem; }
.dg-a5 { --dg-cols: repeat(5, minmax(0,1fr)) 6rem; }
.dg-a6 { --dg-cols: repeat(6, minmax(0,1fr)) 6rem; }
.dg-a7 { --dg-cols: repeat(7, minmax(0,1fr)) 6rem; }
.dg-a8 { --dg-cols: repeat(8, minmax(0,1fr)) 6rem; }

/* Zeilen-Aktionen (Bearbeiten/Löschen) als Icons ganz rechts */
.dg-rowactions { display: flex; gap: .5rem; align-items: center; justify-content: flex-end; }
.dg-rowactions form { margin: 0; }
.dg-inline-form { margin: 0; }
.dg-icon { background: transparent; border: none; color: var(--main-color, #aaa); cursor: pointer; font-size: 1rem; padding: .2rem .35rem; text-decoration: none; line-height: 1; }
.dg-icon:hover { color: #fff; background: rgba(255,255,255,.12); }
.dg-icon-del:hover { color: #fff; background: rgba(192,57,43,.6); }

/* DetailView: Label/Wert untereinander */
.crud-detail { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 1rem 0; }
.crud-detail dt { color: var(--main-color, #aaa); font-size: .85rem; }
.crud-detail dd { margin: 0; }

/* Übersichtsseite: Statistik-Karten + neueste Einträge */
.crud-ov-cards { display: flex; flex-wrap: wrap; gap: 1rem; margin: 1rem 0 2rem; }
.crud-ov-card { flex: 1 1 180px; background: rgba(0,0,0,.35); border: none; padding: 1rem 1.1rem; display: flex; align-items: center; gap: .9rem; }
.crud-ov-card .crud-ov-ic { font-size: 1.8rem; color: var(--main-color); flex: 0 0 auto; }
.crud-ov-card .num { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.crud-ov-card .lbl { font-size: .8rem; color: var(--main-color, #aaa); }
.crud-ov-recent h3 { border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.crud-ov-list { list-style: none; padding: 0; margin: 0 0 1rem; }
.crud-ov-list li { padding: .4rem .4rem; border-bottom: 1px solid rgba(255,255,255,.08); }
.crud-ov-list li:hover { background: rgba(255,255,255,.07); }
.crud-ov-list li a { text-decoration: none; }

/* Generischer Status-Toggle in MANI-Listenansichten (an ⇄ aus) */
.crud-toggle-form { margin: 0; }
.crud-toggle { display: inline-flex; align-items: center; gap: .4rem; padding: .3rem .7rem; border: 1px dotted var(--main-color); background: rgba(0,0,0,.3); color: #fff; cursor: pointer; font-size: .85rem; white-space: nowrap; }
.crud-toggle:hover { background: rgba(255,255,255,.1); }
.crud-toggle-on { border-style: solid; border-color: #3fae6a; color: #8fe0a8; }
.crud-toggle-off { color: #d7b36a; }
.crud-toggle-static { display: inline-flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--main-color, #aaa); }

/* ── MANI-Dashboard: allgemeines Übersichtslayout für MANI-Module ──────────
   Kennzahlen-Kacheln (.dash-cards) + kategorisierte Einträge-Sektionen
   (.dash-cols / .dash-section / .dash-list). Wird vom Auftragsbuch-Dashboard
   (tasks/dashboard.php) und von MANI-Custom-Übersichten gemeinsam genutzt. */
.dash-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.dash-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin: 1.2rem 0 2rem; }
.dash-card { background: rgba(0,0,0,.35); border: none; padding: 1rem 1.1rem; display: flex; align-items: center; gap: .9rem; }
.dash-card-ic { font-size: 1.8rem; color: var(--main-color); flex: 0 0 auto; }
.dash-card-body { min-width: 0; flex: 1 1 auto; }
.dash-card .num { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.dash-card .lbl { font-size: .8rem; color: var(--main-color, #aaa); margin-top: .3rem; overflow-wrap: anywhere; }
/* Feste Spaltenzahl per Media-Query (viewport-basiert) statt auto-fit (inhaltsbreiten-
   abhängig) → in JEDEM Browser dieselbe Spaltenzahl bei gleicher Fensterbreite. */
.dash-cols { display: grid; grid-template-columns: 1fr; gap: 1.5rem; margin-bottom: 2rem; }
@media (min-width: 820px) { .dash-cols { grid-template-columns: 1fr 1fr; } }   /* Desktop = 2 Spalten */
.dash-list { list-style: none; padding: 0; margin: .5rem 0 0; }
.dash-list li { padding: .45rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.dash-list li a.privateItem { color: #dd3333; }
.dash-list .empty { color: #888; font-style: italic; }
.dash-section h3 { margin: 0; border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.dash-section .btn { display: inline-block; margin-top: .5rem; }

/* ── Kopfkarte: Tortendiagramm „Verteilung der aktiven Aufträge" ──────────
   Donut (SVG, stroke-dasharray) links + Legende rechts. Gleiche Karten-
   Optik wie .dash-card (rgba(0,0,0,.35)). Farben = validierte kategoriale
   Dark-Palette; Identität nie über Farbe allein (Legende trägt Name+Zahl). */
.dash-dist { background: rgba(0,0,0,.35); padding: 1.1rem 1.2rem; margin: 1.2rem 0 2rem; }
.dash-dist-title { margin: 0 0 .9rem; font-size: 1.15rem; font-weight: 600; }
.dash-dist-empty { color: #888; font-style: italic; margin: .4rem 0 .2rem; }
.dash-dist-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 1.6rem 2.4rem; }
.dash-dist-chart { flex: 0 0 auto; width: 200px; max-width: 44vw; }
.dash-dist-svg { display: block; width: 100%; height: auto; transform: rotate(0deg); }
.dash-dist-track { fill: none; stroke: rgba(255,255,255,.09); stroke-width: 3.6; }
.dash-dist-seg { fill: none; stroke-width: 3.6; stroke-linecap: butt;
    transition: stroke-width .15s ease; }
.dash-dist-seg:hover { stroke-width: 4.6; }
.dash-dist-num { fill: #fff; font-size: 6.2px; font-weight: 700; text-anchor: middle;
    font-variant-numeric: tabular-nums; }
.dash-dist-sub { fill: var(--main-color, #aaa); font-size: 2.4px; text-anchor: middle; }

.dash-dist-side { flex: 1 1 260px; min-width: 240px; }
.dash-dist-legend { list-style: none; margin: 0; padding: 0; }
.dash-dist-li { display: flex; align-items: center; gap: .6rem; padding: .5rem .4rem;
    border-bottom: 1px solid rgba(255,255,255,.08); border-radius: 3px; }
.dash-dist-li:hover { background: rgba(255,255,255,.05); }
.dash-dist-dot { flex: 0 0 auto; width: 13px; height: 13px; border-radius: 3px;
    box-shadow: 0 0 0 2px rgba(0,0,0,.35); }
.dash-dist-lbl { flex: 1 1 auto; overflow-wrap: anywhere; }
.dash-dist-val { flex: 0 0 auto; display: flex; align-items: baseline; gap: .5rem;
    font-variant-numeric: tabular-nums; }
.dash-dist-val strong { font-size: 1.05rem; }
.dash-dist-cnt { color: var(--main-color, #aaa); font-size: .82rem; min-width: 1.4rem;
    text-align: right; }
.dash-dist-note { margin: .9rem 0 0; font-size: .82rem; color: var(--main-color, #aaa); }
.dash-dist-note i { opacity: .8; margin-right: .25rem; }

/* ── Widgets ─────────────────────────────────────────────────────────────
   Basis-Container für ALLE Widgets (Home-/Seitenleisten-Kacheln). Jedes
   Widget wird in .widget gebaut. Hintergrund + Transparenz identisch zu den
   MANI-Statistik-Karten (.dash-card: rgba(0,0,0,.35)). Die Widget-Überschrift
   ist KEIN <h…>, sondern .widget-title (eigene Klasse, feste Größe 1.2rem). */
.widget { background: rgba(0,0,0,.35); padding: 1rem 1.1rem; margin-bottom: 1.6rem; }
.widget-title { font-size: 1.2rem; font-weight: 600; line-height: 1.3; margin: 0 0 .7rem 0; }

/* Bugtracker: Export-Zeile („Bugdatei schreiben") direkt unter den Kennzahl-Karten.
   Eine Flex-Zeile: Statusmeldung linksbündig, Export-Button rechtsbündig. */
.bugt-export-bar { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: -.8rem 0 2rem; }
.bugt-export-btn { margin-left: auto; flex: 0 0 auto; }
.bugt-export-msg { font-size: .85rem; line-height: 1.35; overflow-wrap: anywhere; }
.bugt-export-msg.ok  { color: #5ddb8c; }
.bugt-export-msg.err { color: #db5d5d; }

/* other_felysien: Status-Pillen (Liste/Übersicht) + Detail-Aktionen (oben rechts) */
.of-pill { display: inline-block; padding: .15rem .6rem; font-size: .78rem; font-weight: 600; border: 1px solid; white-space: nowrap; }
.of-pill-pending  { color: #d7b36a; border-color: #d7b36a; }
.of-pill-joined   { color: #8fe0a8; border-color: #3fae6a; }
.of-pill-declined { color: #e0a0a0; border-color: #b05050; }
.of-pill-done     { color: #9ab8e0; border-color: #4a6fa5; }
.of-pill-sent     { color: #c9b3e0; border-color: #8a6db0; }
/* „kein Eintrag / keine Aktion" (von mir vergeben · Ganz-Felythera-Aushang) */
.of-pill-none { color: var(--main-color, #888); opacity: .55; }
/* Status-Aktion (Liste): EIN Umschalt-Knopf bzw. (beim ersten Mal) ein Auswahl-
   Dropdown – immer rechtsbündig in der schmal gehaltenen Status-Spalte. */
.of-stform { margin: 0; display: flex; justify-content: flex-end; }
.of-stbtn {
    display: inline-flex; align-items: center; gap: .35rem;
    padding: .28rem .55rem; font-size: .8rem; white-space: nowrap; cursor: pointer;
    border: 1px solid var(--main-color, #777); background: rgba(0,0,0,.25); color: #cfcfcf;
}
.of-stbtn:hover { background: rgba(255,255,255,.1); color: #fff; }
/* Auswahl-Dropdown: identische Optik wie die übrigen Filter-Dropdowns – rahmenlos,
   dunkle Fläche (--input-bg-color), helle Schrift, color-scheme:dark (auch das
   aufgeklappte Menü). Überschreibt die globale weiße select-Regel (layout.css). */
.of-stselect {
    width: auto; display: inline-block; cursor: pointer;
    padding: .3rem 1.4rem .3rem .55rem; font-size: .8rem; white-space: nowrap;
    background-color: var(--input-bg-color, #302e39) !important; color: #fff !important;
    border: none !important; color-scheme: dark;
}
.of-stselect option { background-color: var(--input-bg-color, #302e39); color: #fff; }
.of-stbtn-accept { border-color: #3fae6a; background: rgba(63,174,106,.18); color: #8fe0a8; font-weight: 600; }
.of-stbtn-accept:hover { background: rgba(63,174,106,.32); color: #d4f5e0; }
.of-stbtn-reject { border-color: #b05050; background: rgba(176,80,80,.18); color: #e0a0a0; font-weight: 600; }
.of-stbtn-reject:hover { background: rgba(176,80,80,.32); color: #f3d6d6; }
/* Status-Spalte: Inhalt (Knopf · Dropdown · „—" · Pille) rechtsbündig. */
.dg-otherfely .data-grid-cell:last-child { display: flex; justify-content: flex-end; align-items: center; text-align: right; }
.dg-otherfely .data-grid-row { align-items: center; }
/* Beteiligungs-Zähler an Sammelaufträgen (Pille mit Personen-Icon) */
.coll-count { display: inline-block; padding: .02rem .45rem; font-size: .72rem; font-weight: 600; border: 1px solid #3fae6a; color: #8fe0a8; white-space: nowrap; vertical-align: middle; }
.coll-count i { font-size: .68rem; margin-right: .15rem; }
.of-detail-actions { display: inline-flex; gap: .5rem; margin: 0; flex-wrap: wrap; align-items: center; }
.of-detail-form { margin: 0; display: inline; }
/* Beteiligungs-Status im Detail (gespiegelt wie in der Liste): grün = beteiligt, gelb = abgelehnt */
.of-detail-state { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .6rem; font-size: .85rem; font-weight: 600; border: 1px solid var(--main-color, #777); white-space: nowrap; }
.of-detail-state-on  { border-color: #3fae6a; background: rgba(63,174,106,.18); color: #8fe0a8; }
.of-detail-state-off { border-color: #b0a050; background: rgba(176,160,80,.18); color: #e0d0a0; }

/* other_felysien: Journal eines öffentlichen Auftrags (Sammel-/Netzwerk) im Detail */
.of-journal { margin-top: 1.5rem; }
.of-journal > h3 { border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.of-jentry { padding: .7rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.of-jhead { display: flex; gap: .8rem; flex-wrap: wrap; align-items: baseline; }
.of-jnum { font-weight: 700; color: var(--main-color); }
.of-jtitle { font-weight: 600; }
.of-jtype { font-size: .85rem; color: var(--main-color, #aaa); }
.of-jmeta { font-size: .8rem; color: var(--main-color, #aaa); margin: .2rem 0; }
.of-jstars { color: #f5a623; letter-spacing: .1rem; }
.of-jbody { margin-top: .3rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Edit/Create-Formular */
.crud-form { margin-top: 1rem; }                                   /* volle Breite → Aktionsleiste ganz rechts */
/* Desktop-App: volle verfügbare Breite. Felder fließen mehrspaltig über die
   ganze Breite; Textareas (crud-field-full) spannen die komplette Zeile. */
.crud-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem 1.5rem; align-items: start; width: 100%; }
.crud-field { display: grid; gap: .3rem; }
.crud-field-full { grid-column: 1 / -1; }
.crud-field-full textarea { min-height: 11rem; resize: vertical; }
.crud-field label { font-size: .85rem; color: var(--main-color, #aaa); }
.crud-field input[type=text], .crud-field input[type=number], .crud-field textarea, .crud-field select {
    padding: .5rem; background-color: var(--input-bg-color) !important; color: #fff !important; border: none !important; width: 100%;
}
.crud-form-actions { display: flex; gap: .6rem; align-items: center; }

/* ── „Schnell einfügen"-Toolbar über einer Textarea (Feld-Toolbar) ── */
.crud-insert-bar { display: flex; flex-direction: column; gap: .35rem; margin: .1rem 0 .2rem; }
.crud-insert-label { font-size: .8rem; color: var(--main-color, #aaa); }
.crud-insert-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.crud-insert-bar .insert-btn {
    padding: .2rem .6rem; font-size: .8rem; cursor: pointer;
    background: transparent; color: var(--main-color); border: 1px solid var(--main-color);
    line-height: 1.4; white-space: nowrap;
}
.crud-insert-bar .insert-btn:hover { background: var(--main-color); color: var(--main-bg-color); }
.crud-insert-bar .insert-btn-role { opacity: .9; }

/* ── Sortierbare Spaltenköpfe + Pagination ─────────────────────── */
.dg-sort { text-decoration: none; }
.dg-sort:hover { text-decoration: underline; }
.dg-pagination { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; margin: 1rem 0; }
.dg-pagination .btn { padding: .3rem .6rem; text-decoration: none; }
.dg-showing { font-size: .8rem; color: #aaa; padding: .2rem .6rem; }

/* ── Aktions-Buttons in Tabellen (z. B. Verbindungen) ──────────── */
.tbl-actions { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: 0; }
.btn-accept  { background:#2a9d5c; color:#fff; border:none; padding:.3rem .7rem; cursor:pointer; }
.btn-decline { background:#c0392b; color:#fff; border:none; padding:.3rem .7rem; cursor:pointer; }
.btn-cancel  { background:#e6a817; color:#111; border:none; padding:.3rem .7rem; cursor:pointer; }
.btn-remove  { background:#555;    color:#fff; border:none; padding:.3rem .7rem; cursor:pointer; }

/* ════════════════════════════════════════════════════════════════
   MANI-Multiview: obere Pagination-Leiste, View-Umschalter,
   Einträge-pro-Seite, Gruppen-Überschriften, Card- und Gallery-View.
   ════════════════════════════════════════════════════════════════ */

/* Obere Pagination-Leiste: links Anzahl + Einträge/Seite, mittig Seitenzahlen, rechts View-Icons */
.dg-pagination-top { flex-direction: column; align-items: stretch; gap: .6rem; }
.dg-pag-bar   { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; }
.dg-pag-info  { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }
.dg-pag-pages { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.dg-pag-views { display: flex; align-items: center; }
.dg-pp { display: inline-flex; align-items: center; gap: .4rem; font-size: .8rem; color: #aaa; white-space: nowrap; }
.dg-pp span { white-space: nowrap; }
.dg-pp select {
    padding: .25rem .4rem; background-color: var(--input-bg-color) !important; color: #fff !important;
    border: 1px dotted var(--main-color) !important; color-scheme: dark;
}

/* View-Umschalter (List / Card / Gallery) */
.dg-viewswitch { display: inline-flex; gap: .25rem; }
.dg-vbtn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 2rem; height: 2rem; text-decoration: none;
    color: var(--main-color, #aaa); border: 1px dotted var(--main-color);
    background: rgba(0,0,0,.25);
}
.dg-vbtn:hover { color: #fff; background: rgba(255,255,255,.12); }
.dg-vbtn.active { color: #fff; background: rgba(255,255,255,.18); border-style: solid; }

/* Gruppen-Überschrift (GroupView) */
.dg-group-header { margin: 1.6rem 0 .5rem; padding-bottom: .3rem; border-bottom: 1px dashed grey; font-size: 1.1rem; }
.dg-group-header:first-of-type { margin-top: .6rem; }

/* CardView */
.crud-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1rem 0; }
.crud-card {
    position: relative; display: flex; flex-direction: column; gap: .4rem;
    background: rgba(0,0,0,.35); border: 1px dotted var(--main-color); padding: 1rem 1.1rem;
}
.crud-card:hover { background: rgba(255,255,255,.05); }
.crud-card-act { position: absolute; top: .4rem; right: .4rem; display: flex; gap: .3rem; }
.crud-card-img { display: block; margin: -1rem -1.1rem .2rem; }
.crud-card-img img { width: 100%; height: 160px; object-fit: cover; display: block; }
.crud-card-title { font-weight: 700; font-size: 1.05rem; text-decoration: none; padding-right: 3rem; }
.crud-card-title:hover { text-decoration: underline; }
.crud-card-sub { color: var(--main-color, #aaa); font-size: .9rem; }
.crud-card-meta { display: grid; grid-template-columns: max-content 1fr; gap: .2rem .8rem; margin: .4rem 0 0; font-size: .8rem; }
.crud-card-meta dt { color: var(--main-color, #aaa); }
.crud-card-meta dd { margin: 0; overflow-wrap: anywhere; }

/* GalleryView (mit Medienanzeige) */
.crud-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .8rem; margin: 1rem 0; }
.crud-gallery-item { position: relative; margin: 0; background: rgba(0,0,0,.35); border: 1px dotted var(--main-color); }
.crud-gallery-media { display: block; aspect-ratio: 1 / 1; overflow: hidden; }
.crud-gallery-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.crud-gallery-ph { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; font-size: 2.6rem; color: var(--main-color); }
.crud-gallery-item figcaption { padding: .45rem .5rem; font-size: .85rem; text-align: center; overflow-wrap: anywhere; }
.crud-gallery-item figcaption a { text-decoration: none; }
.crud-gallery-item figcaption a:hover { text-decoration: underline; }
.crud-gallery .crud-card-act { top: .3rem; right: .3rem; }

/* ── System-Rückmeldung (Toast) ──────────────────────────────── */
#mani-toasts { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; max-width: 360px; }
.mani-toast {
    padding: .7rem 1rem; border: 1px solid #2a9d5c; background: rgba(0,0,0,.92); color: #fff;
    font-size: .9rem; opacity: 0; transform: translateX(24px); transition: opacity .25s, transform .25s;
}
.mani-toast.show { opacity: 1; transform: none; }
.mani-toast.is-ok    { border-color: #2a9d5c; }
.mani-toast.is-error { border-color: #c0392b; }

/* ── Checkbox-Dropdown (Mehrfachauswahl, z. B. filing-Filter) ──── */
.cb-dropdown { position: relative; }
.cb-dropdown > summary {
    list-style: none; cursor: pointer; box-sizing: border-box; height: 2.5rem; display: flex; align-items: center;
    padding: .5rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    background-color: var(--input-bg-color); color: #fff; border: none; color-scheme: dark;
}
.cb-dropdown > summary::-webkit-details-marker { display: none; }
.cb-dropdown > summary::after { content: '\25BE'; float: right; margin-left: .5rem; }
.cb-dropdown[open] > summary::after { content: '\25B4'; }
.cb-dropdown .cb-list {
    position: absolute; z-index: 50; left: 0; right: 0; display: flex; flex-direction: column; gap: .35rem;
    background: var(--input-bg-color); border: none; padding: .5rem .6rem;
}
.cb-item { display: flex; align-items: center; gap: .45rem; font-size: .85rem; color: #fff; cursor: pointer; }
.cb-item input { width: auto !important; height: auto !important; }

/* ── Funktions-Box mit beschrifteten Bereichen (Suchen/Filtern/Sortieren/Gruppieren) ── */
.filter-secs { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; align-items: start; }
.filter-secs .filter-actions { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; }
.filter-sec { border: none; margin: 0; padding: .3rem .8rem .8rem; min-width: 0; }
.filter-sec > legend { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: var(--main-color); padding: 0 .4rem; font-weight: 600; }
.filter-sec-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem .8rem; align-items: end; }
.filter-sec-grid > div { min-width: 0; }   /* Selects schrumpfen statt Spalte zu sprengen (Firefox) */
.filter-sec-grid .filter-wide { grid-column: 1 / -1; }
.filter-secs label { display: block; font-size: .75rem; color: var(--main-color, #aaa); margin-bottom: .25rem; }
.filter-secs input, .filter-secs select {
    width: 100%; box-sizing: border-box; height: 2.5rem; padding: .5rem;
    background-color: var(--input-bg-color) !important; color: #fff !important;
    border: none !important; color-scheme: dark;
}
.filter-secs .cb-item input { width: auto !important; height: auto !important; }

/* ── Comboboxen (Dropdowns) ohne Rahmen ───────────────────────── */
.filter-secs select, .filter-grid select, .dg-pp select, .crud-field select, .crud-fields select { border: none !important; }
.cb-dropdown > summary { border: none; }
.filter-secs .filter-wide input { border: none !important; }
.filter-secs .filter-actions { justify-content: flex-end; }

/* ══════════════════════════════════════════════════════════════════════════
   RECHTLICHES: Footer-Links · Cookie-Banner · Rechtsseiten (Impressum etc.)
   ══════════════════════════════════════════════════════════════════════════ */

/* ── Footer-Rechtslinks (App/Login/Register/Rechtsseiten) ─────────────────── */
.legal-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .35rem .5rem;
    font-size: .85rem;
    line-height: 1.6;
}
.legal-links a {
    color: var(--topline-a-color, #cfc7e6);
    text-decoration: none;
    opacity: .85;
}
.legal-links a:hover { opacity: 1; text-decoration: underline; }
.legal-links span { opacity: .4; }

/* ── Cookie-Consent-Banner ───────────────────────────────────────────────── */
.cc-banner {
    position: fixed;
    left: 50%;
    bottom: 1.2rem;
    transform: translate(-50%, 140%);
    z-index: 9999;
    width: min(960px, calc(100% - 2rem));
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.1rem 1.4rem;
    background: var(--top-bg-color, #1b1730);
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .10);
    opacity: 0;
    transition: transform .3s ease, opacity .3s ease;
}
.cc-banner.cc-in { transform: translate(-50%, 0); opacity: 1; }
.cc-banner.cc-hide { transform: translate(-50%, 140%); opacity: 0; }
.cc-body { flex: 1 1 auto; min-width: 0; }
.cc-title { font-weight: 700; font-size: 1.02rem; margin-bottom: .3rem; }
.cc-text { margin: 0; font-size: .88rem; line-height: 1.5; opacity: .92; }
.cc-more { color: var(--main-color, #b9a7ff); text-decoration: underline; white-space: nowrap; }
.cc-actions { flex: 0 0 auto; display: flex; gap: .6rem; flex-wrap: wrap; }
.cc-btn {
    cursor: pointer;
    padding: .55rem 1.1rem;
    font-size: .9rem;
    border: 1px solid currentColor;
    background: transparent;
    color: #fff;
    white-space: nowrap;
}
.cc-btn-reject { opacity: .8; }
.cc-btn-reject:hover { opacity: 1; }
.cc-btn-accept {
    background: var(--languages-bg, #6a53c9);
    border-color: var(--languages-bg, #6a53c9);
    font-weight: 600;
}
.cc-btn-accept:hover { filter: brightness(1.12); }
@media (max-width: 640px) {
    .cc-banner { flex-direction: column; align-items: stretch; gap: .9rem; }
    .cc-actions { justify-content: flex-end; }
}

/* ── Rechtsseiten (Impressum, Datenschutz, Cookies) ──────────────────────── */
.legal-page { max-width: 62rem; margin: 0 auto; padding: 1rem 0 3rem; line-height: 1.65; }
.legal-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1.5rem; border-bottom: 1px solid rgba(255,255,255,.14); }
.legal-tab {
    padding: .5rem 1rem;
    text-decoration: none;
    color: var(--main-color, #b9a7ff);
    opacity: .7;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.legal-tab:hover { opacity: 1; }
.legal-tab.is-active { opacity: 1; font-weight: 600; border-bottom-color: var(--main-color, #6a53c9); }
.legal-page h1 { margin-top: 0; }
.legal-page h2 { margin: 2rem 0 .6rem; font-size: 1.25rem; }
.legal-page h3 { margin: 1.4rem 0 .4rem; font-size: 1.05rem; }
.legal-page p, .legal-page ul { margin: .5rem 0; }
.legal-page ul { padding-left: 1.4rem; }
.legal-page li { margin: .25rem 0; }
.legal-page a { color: var(--main-color, #b9a7ff); }
.legal-page .legal-note {
    font-size: .85rem;
    opacity: .75;
    font-style: italic;
    border-left: 3px solid var(--main-color, #6a53c9);
    padding-left: .8rem;
}
.legal-page .legal-updated { margin-top: 2rem; font-size: .82rem; opacity: .6; }
.legal-table { width: 100%; border-collapse: collapse; margin: .6rem 0 1rem; font-size: .9rem; }
.legal-table th, .legal-table td {
    text-align: left;
    padding: .5rem .7rem;
    border: 1px solid rgba(255, 255, 255, .14);
    vertical-align: top;
}
.legal-table th { background: rgba(255, 255, 255, .06); font-weight: 600; }
.legal-back { display: inline-block; margin-bottom: 1rem; color: var(--main-color, #b9a7ff); text-decoration: none; }
.legal-back:hover { text-decoration: underline; }

/* Cookie-Einstellungen im Profil */
.cookie-prefs { margin-top: 1.5rem; }
.cookie-prefs label { display: flex; align-items: flex-start; gap: .55rem; margin: .5rem 0; cursor: pointer; }
.cookie-prefs .cookie-radio input, .cookie-prefs input[type="checkbox"] { width: auto; margin-top: .2rem; }
.cookie-prefs .cookie-hint { font-size: .8rem; opacity: .7; margin: .2rem 0 .8rem 1.7rem; line-height: 1.5; }

/* ════════ „Problem melden"-Button (seitenweit, neben Textgröße) + Popup ════════ */
.report-btn {
    display: inline-flex; align-items: center; gap: .4rem;
    vertical-align: middle; margin-right: .85rem;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .18);
    color: inherit; cursor: pointer;
    font: inherit; font-size: .82rem; line-height: 1;
    padding: .34rem .7rem; border-radius: 1rem;
    transition: background .12s, border-color .12s, color .12s;
}
.report-btn:hover { background: rgba(255, 215, 0, .14); border-color: #ffd700; color: #ffd700; }
.report-btn i { font-size: .95em; }
/* WICHTIG: display:inline-flex oben würde das [hidden]-Attribut überschreiben →
   ein per JS ausgeblendeter Knopf (Update-Hinweis) bliebe sonst sichtbar. */
.report-btn[hidden] { display: none !important; }
/* Nur-Icon-Variante: kompakter, quadratischer Knopf mit Tooltip (title). */
.report-btn-icon { padding: .34rem; width: 1.9rem; height: 1.9rem; justify-content: center; border-radius: 50%; }

/* „Neue Version"-Knopf: auffällig grün + dezentes Pulsieren, damit er sofort auffällt.
   Erscheint nur, wenn eine neuere Version bereitsteht (JS entfernt das hidden-Attribut). */
.update-btn {
    background: rgba(47, 158, 90, .22);
    border-color: #2f9e5a;
    color: #7fe0a6;
    animation: updatePulse 1.8s ease-in-out infinite;
}
.update-btn:hover { background: rgba(47, 158, 90, .38); border-color: #47c47e; color: #d6ffe7; }
.update-btn .update-btn-lbl { font-weight: 600; }
@keyframes updatePulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(47, 158, 90, .0); }
    50%      { box-shadow: 0 0 10px 1px rgba(47, 158, 90, .55); }
}
@media (prefers-reduced-motion: reduce) { .update-btn { animation: none; } }

.report-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(0, 0, 0, .62);
    display: flex; align-items: center; justify-content: center;
    padding: 1.2rem;
}
/* hidden-Attribut MUSS die display:flex-Regel schlagen (sonst offen beim Laden). */
.report-overlay[hidden] { display: none; }
body.report-open { overflow: hidden; }
.report-modal {
    position: relative; width: 100%; max-width: 560px;
    max-height: 90vh; overflow: auto;
    background: #17141f; color: #eee;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: .6rem; box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
    padding: 1.4rem 1.5rem;
}
.report-modal h3 { margin: 0 0 .4rem; display: flex; align-items: center; gap: .5rem; }
.report-close {
    position: absolute; top: .5rem; right: .7rem;
    background: none; border: none; color: #aaa;
    font-size: 1.6rem; line-height: 1; cursor: pointer;
}
.report-close:hover { color: #fff; }
.report-intro { opacity: .8; font-size: .9rem; margin: 0 0 1rem; }
.report-field { margin-bottom: .9rem; }
.report-field label { display: block; font-size: .85rem; opacity: .8; margin-bottom: .3rem; }
.report-field input, .report-field textarea {
    width: 100%; box-sizing: border-box;
    /* !important, weil die globale input:not(...)-Regel in layout.css sehr hohe Spezifität hat */
    background-color: var(--input-bg-color, #302e39) !important; color: #fff !important;
    border: 1px solid rgba(255, 255, 255, .18) !important; border-radius: .35rem;
    padding: .55rem .7rem; font: inherit; resize: vertical; color-scheme: dark;
}
.report-field input:focus, .report-field textarea:focus { outline: none; border-color: #ffd700 !important; }
.report-legal { font-size: .78rem; opacity: .65; margin: 0 0 1rem; line-height: 1.5; }
.report-details { margin: .2rem 0 1rem; font-size: .82rem; }
.report-details summary { cursor: pointer; opacity: .7; }
.report-details pre {
    margin: .5rem 0 0; padding: .7rem .8rem; max-height: 200px; overflow: auto;
    background: #0d0d14; color: #cfe; border-radius: .35rem;
    font-size: .78rem; white-space: pre-wrap; word-break: break-word;
}
.report-msg { padding: .55rem .7rem; border-radius: .35rem; margin-bottom: .9rem; font-size: .9rem; }
.report-msg.ok  { background: rgba(47, 158, 90, .2);  border: 1px solid #2f9e5a; }
.report-msg.err { background: rgba(190, 60, 60, .2);  border: 1px solid #be3c3c; }
.report-actions { display: flex; justify-content: flex-end; gap: .6rem; }

/* Bestätigung nach erfolgreichem Absenden – ersetzt das Formular vollständig. */
.report-success { text-align: center; padding: 1.5rem .5rem .5rem; }
.report-success-icon { font-size: 3rem; color: #2f9e5a; margin-bottom: .8rem; }
.report-success-text { font-size: 1rem; margin: 0 0 1.4rem; }
.report-success .report-actions { justify-content: center; }

/* ════════════════ Admin-Bugtracker (Übersicht · Liste · Detail) ════════════════ */
/* Lesbare Schrift statt der dekorativen Seiten-Schrift, damit der Bugtracker klar bleibt. */
.bugt-wrap, .bugt-wrap p, .bugt-wrap li, .bugt-wrap td, .bugt-wrap a,
.bugt-wrap label, .bugt-wrap input, .bugt-wrap textarea, .bugt-wrap select,
.bugt-h, .bugt-title {
    font-family: 'Open Sans', system-ui, sans-serif;
}
.bugt-h { font-size: 1.4rem; margin: .2rem 0 1rem; }
.bugt-wrap h3 { font-family: 'Open Sans', system-ui, sans-serif; font-size: 1.05rem; }

/* Kopf der Detailseite */
.bugt-detailhead { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.bugt-detailhead-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.bugt-titlebar { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin: .4rem 0 1rem; }
.bugt-id { font-family: 'Open Sans', system-ui, sans-serif; font-weight: 700; opacity: .5; font-size: 1.2rem; }
.bugt-title { font-size: 1.35rem; font-weight: 700; margin: 0; }

/* Meta-Raster (Label über Wert, klare Trennung) */
.bugt-meta { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .7rem 1.2rem; background: rgba(0,0,0,.3); padding: 1rem 1.1rem; margin: 0 0 1.2rem; }
.bugt-meta-cell { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.bugt-meta .lbl { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; opacity: .55; }
.bugt-meta .val { word-break: break-word; }
.bugt-meta-ua { grid-column: 1 / -1; }
.bugt-meta-ua .val { font-size: .85rem; }

.bugt-desc { background: rgba(0,0,0,.22); padding: 1rem 1.1rem; white-space: pre-wrap; margin: 0 0 1.2rem; }
.bugt-diag { margin: 0 0 1.4rem; }
.bugt-diag summary { cursor: pointer; opacity: .8; }
.bugt-diag pre { background: #0d0d14; color: #cfe; padding: 1rem; overflow: auto; max-height: 340px; font-size: .82rem; white-space: pre-wrap; word-break: break-word; margin: .5rem 0 0; }

/* Status-Schnellwahl */
.bugt-statusbar { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin: 0 0 1.6rem; }
.bugt-statusbar .lbl { opacity: .7; }

/* Journal */
.bugt-journal-form { background: rgba(0,0,0,.22); padding: 1rem 1.1rem; margin-bottom: 1.4rem; }
.bugt-entry { background: rgba(0,0,0,.3); padding: .8rem 1rem; margin-bottom: .8rem; }
.bugt-entry-head { display: flex; align-items: center; gap: .7rem; font-size: .85rem; margin-bottom: .4rem; }
.bugt-entry-date { opacity: .6; }
.bugt-entry-author { font-weight: 600; }
.bugt-entry-text { white-space: pre-wrap; }
.bugt-empty { opacity: .6; font-style: italic; }
.crud-detail .bugt-ua { word-break: break-all; font-size: .85rem; opacity: .85; }
/* DB-Mitschnitt-Tabelle im Detail */
.bugt-db-table { width: 100%; border-collapse: collapse; font-size: .8rem; margin: .5rem 0 0; }
.bugt-db-table th, .bugt-db-table td { text-align: left; padding: .35rem .5rem; border: 1px solid rgba(255,255,255,.12); vertical-align: top; }
.bugt-db-table th { background: rgba(255,255,255,.06); font-weight: 600; }
.bugt-db-table td code { color: #cfe; word-break: break-word; overflow-wrap: anywhere; }
.bugt-db-table td:nth-child(3) { min-width: 320px; }
.bugt-db-note { font-size: .78rem; opacity: .6; margin: .5rem 0 0; }
.bugt-db-req { font-size: .74rem; opacity: .7; word-break: break-all; max-width: 220px; }

/* MANI-Liste (einspaltig) + Card-Ansicht */
.bugt-group { margin: 0 0 1.6rem; }
.bugt-group > h3 { display: flex; align-items: center; gap: .5rem; margin: 0 0 .4rem; border-bottom: 1px dashed rgba(255,255,255,.2); padding-bottom: .3rem; }
.bugt-group-count { opacity: .5; font-size: .9rem; }
.bugt-list ul { list-style: none; padding: 0; margin: 0; }
.bugt-list li { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.bugt-li-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.bugt-li-meta { flex: 0 0 auto; font-size: .78rem; opacity: .6; }
/* Card-Ansicht: Kacheln statt Zeilen */
.bugt-list-card ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .7rem; }
.bugt-list-card li { flex-direction: column; align-items: flex-start; gap: .4rem; background: rgba(0,0,0,.28); padding: .7rem .8rem; border-bottom: none; }
.bugt-list-card .bugt-li-title { white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Status-Badges (überall). !important schlägt den globalen grünen Button-Stil. */
.bug-badge { display: inline-block; padding: .12rem .6rem; border-radius: 1rem; font-size: .78rem; font-weight: 600; line-height: 1.6; color: #fff !important; white-space: nowrap; border: 0; }
button.bug-badge { cursor: pointer; opacity: .55; }
button.bug-badge.active, button.bug-badge:hover { opacity: 1; }
.bug-badge-neu         { background: #3b6fd4 !important; }
.bug-badge-inbearb     { background: #c98a15 !important; }
.bug-badge-gefixt      { background: #2f9e5a !important; }
.bug-badge-bestaetigt  { background: #1f7a46 !important; }   /* Fix vom Melder bestätigt (dunkleres Grün) */
.bug-badge-geschlossen { background: #5a5a66 !important; }
.bug-badge-keinfehler  { background: #8a3d3d !important; }
.bugt-li-meta + .bug-badge, .bugt-list .bug-badge { flex: 0 0 auto; }
.btn-sm { padding: .2rem .5rem !important; font-size: .8rem !important; }
.dash-list .bugt-li-meta { display: inline; }

/* ══ Admin-Bugtracker: Sichtbarkeit von Journaleinträgen + Melder-Antworten ══ */
.bug-badge-reporter { background: #6a4ca8 !important; }   /* Antwort des Melders */
.bug-badge-shared   { background: #2f9e5a !important; }   /* für Melder sichtbar */
.bug-badge-internal { background: #5a5a66 !important; }   /* intern */
.bugt-visible-check { display: flex; align-items: center; gap: .5rem; font-size: .9rem; cursor: pointer; }
.bugt-visible-check input { width: auto !important; height: auto !important; }
.bugt-visible-hint  { display: block; color: var(--main-color, #aaa); font-size: .78rem; margin-top: .2rem; }
.bugt-entry-reporter { border-left: 3px solid #6a4ca8; padding-left: .7rem; }

/* ══ Melder-Bugtracker (Usereinstellungen) ══ */
/* Menü-Zähler + Neuigkeiten-Banner + „Neu"-Marker */
.ubug-badge { display: inline-block; min-width: 1.3rem; padding: 0 .35rem; border-radius: 1rem; background: #c0392b; color: #fff; font-size: .72rem; font-weight: 700; text-align: center; line-height: 1.35rem; }
.ubug-banner { display: flex; align-items: center; gap: .6rem; margin: 0 0 1rem; background: rgba(59,111,212,.15); border-left: 3px solid #3b6fd4; color: inherit; }
.ubug-banner a { margin-left: .3rem; font-weight: 600; }
/* Sicherheitsnetz: im Schaubild-Vollbild (Maximieren/Fullscreen setzt body.ft-max) NIEMALS
   einblenden – der Banner wird dort ohnehin schon serverseitig unterdrückt. */
body.ft-max .ubug-banner { display: none !important; }
.ubug-new { flex: 0 0 auto; background: #c0392b; color: #fff; font-size: .68rem; font-weight: 700; padding: .06rem .45rem; border-radius: 1rem; text-transform: uppercase; letter-spacing: .03em; }

/* Liste (einspaltig, nach Status gruppiert) — analog Auftrags-Inhaltsverzeichnis */
.ubug-groups { display: block; }
.ubug-group { margin: 0 0 1.6rem; }
.ubug-group h3 { margin: 0 0 .3rem; border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.ubug-group ul { list-style: none; padding: 0; margin: 0; }
.ubug-group li { padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: .5rem; }
.ubug-group li > a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.ubug-date { flex: 0 0 auto; font-size: .75rem; color: var(--main-color, #aaa); opacity: .8; }
/* Card-Ansicht: Kachel-Grid derselben Einträge */
.ubug-view-card .ubug-group ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .6rem; }
.ubug-view-card .ubug-group li { background: rgba(0,0,0,.25); padding: .6rem .75rem; flex-direction: column; align-items: flex-start; gap: .35rem; }
.ubug-view-card .ubug-group li > a { width: 100%; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }

/* Detail: Überschriften + Beschreibung */
.ubug-h { margin: 1.4rem 0 .5rem; border-bottom: 1px dashed grey; padding-bottom: .3rem; }
.ubug-desc { background: rgba(0,0,0,.2); padding: .7rem .9rem; white-space: normal; overflow-wrap: anywhere; }

/* Detail: Gesprächsfaden (Chat-Look; eigene Nachrichten rechts eingerückt) */
.ubug-thread { display: flex; flex-direction: column; gap: .6rem; margin: .4rem 0 1.4rem; }
.ubug-msg { padding: .55rem .8rem; border-radius: .5rem; background: rgba(255,255,255,.05); max-width: 80%; }
.ubug-msg-team { align-self: flex-start; border-left: 3px solid var(--main-color, #888); }
.ubug-msg-me { align-self: flex-end; background: rgba(106,76,168,.22); border-right: 3px solid #6a4ca8; }
.ubug-msg-head { display: flex; align-items: center; gap: .6rem; margin-bottom: .25rem; font-size: .78rem; }
.ubug-msg-who { font-weight: 600; }
.ubug-msg-date { color: var(--main-color, #aaa); opacity: .8; }
.ubug-msg-text { white-space: normal; overflow-wrap: anywhere; }
.ubug-msg-statusonly { font-style: italic; opacity: .85; }

/* Detail: Antwortformular + Filterbox-/Reply-Inputs dunkel (MANI §5) */
/* „Fix bestätigt": deutlich abgesetzter Abnahme-Block über dem Antwortformular */
.ubug-confirm { margin-top: 1.2rem; padding: .9rem 1rem; border: 1px solid #2f9e5a; background: rgba(47,158,90,.12); border-radius: .4rem; }
.ubug-confirm-hint { margin: 0 0 .6rem; color: #cfe8d8; }
.ubug-confirm-form { margin: 0; }
.ubug-confirm-btn { background: #2f9e5a !important; color: #fff !important; border: 0 !important; font-weight: 600; }
.ubug-confirm-btn:hover { background: #38b569 !important; }

.ubug-reply { margin-top: .6rem; }
.ubug-reply textarea,
.filter-secs input[type="text"], .filter-secs select {
    background-color: var(--input-bg-color) !important; color: #fff !important;
    border: none !important; color-scheme: dark;
}
.ubug-reply textarea { width: 100%; padding: .55rem; }

/* ── Personen-Typ-Kennzeichen: Prelysium (früheres Leben) / Anderswelt ── */
.user-type-ic            { font-size: .85em; opacity: .9; }
.user-type-prelysium     { color: #c9a86a; }   /* warmes Gold: Vergangenheit */
.user-type-otherworld    { color: #7fb4d9; }   /* kühles Blau: andere Welt   */

/* ── Levels (MANI, Admin): Zuordnungs-Häkchenraster + Zweispalter ── */
.lvadm-check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .3rem .8rem; max-height: 280px; overflow: auto; border: 1px dotted var(--main-color); padding: .6rem .8rem; }
.lvadm-check { display: flex; align-items: center; gap: .5rem; font-weight: 400; margin: 0; }
.lvadm-check input[type=checkbox] { width: auto; }
.lvadm-hint { color: #9aa; font-size: .8rem; font-weight: 400; }
.lvadm-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.lvadm-block { margin-bottom: 1rem; }

/* ── Aktionen (z. B. „+ Neu") rechtsbündig in der Überschriftzeile (.crud-head) ── */
.crud-head-act { margin-left: auto; display: flex; align-items: center; gap: .5rem; }

/* Dashboard-Kacheln als Links (MANI §2: Kacheln dürfen auf Listen verlinken) */
a.dash-card { text-decoration: none; color: inherit; }
a.dash-card:hover { background: rgba(255,255,255,.06); }
