/* =====================================================
   UNIVERSE COCKPIT — Modul-spezifische Styles
   Basiert auf jarvis.css (DYNOS Standard).
   Nur Universe-spezifische Klassen — KEIN Überschreiben
   von jarvis.css Basis-Styles.
   ===================================================== */

/* ── Kleine Input-Variante ── */
.dynos-input-sm {
    font-size: 0.82rem;
    padding: 5px 10px;
}

/* =====================================================
   SIDEBAR-KOPF — Kunden-/Tenant-Identitaets-Block
   Fix Juli 2026: sitzt unterhalb des Universe-System-Logos
   (.sidebar-logo-header/.sidebar-logo-text aus jarvis.css) und
   zeigt das aktive Kunden-/Tenant-Logo. Referenz-Pattern
   fuer alle Module — siehe templates/partials/sidebar.php.
   Update Juli 2026 (Kundenwunsch): Logo steht jetzt gross und
   allein (kein Tenant-Name mehr im Markup) — der Tenant-Name
   ist weiterhin per title-Tooltip auf dem Block erreichbar.
   ===================================================== */
/* Kundenlogo: pur unter dem Universe-Logo, KEIN Badge/Kasten (Kundenwunsch Juli 2026).
   Gleiche visuelle Groesse wie das Universe-Logo darueber. */
.sidebar-tenant-block {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 100%;
    margin-top: 12px;
}

.sidebar-tenant-logo {
    max-width: 100%;
    max-height: 52px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.sidebar-tenant-logo-placeholder {
    color: var(--brand-color);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.1;
    text-align: center;
}

/* Versionsnummer — vom jarvis.css Default (0.55rem, sehr gedimmt) auf
   deutlich lesbare Groesse angehoben. universe.css laedt nach jarvis.css
   (siehe templates/layout.php), daher reicht diese Override ohne !important. */
.sidebar-version {
    font-size: 0.85rem;
    color: rgba(59, 130, 246, 0.65);
    margin-top: 6px;
}

body:not(.dark-mode) .sidebar-version {
    color: rgba(59, 130, 246, 0.75);
}

/* =====================================================
   MODUL-KACHELN (Kunden-Dashboard / Spielekiste)
   ===================================================== */

.module-tile {
    background: var(--glass-bg, rgba(255,255,255,0.05));
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all 0.2s ease;
    position: relative;
    backdrop-filter: blur(8px);
}

.module-tile:hover {
    border-color: var(--brand-color);
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--accent-glow);
    color: inherit;
    text-decoration: none;
}

.module-tile .tile-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
}

.module-tile .tile-name {
    font-weight: 600;
    text-align: center;
    color: var(--text-bright);
}

.module-tile .tile-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-align: center;
}

.module-tile .tile-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 8px;
    background: var(--accent-subtle);
    color: var(--brand-color);
}

/* "Als Kunde öffnen" Button auf der Kachel */
.module-tile.has-customer-btn {
    padding-bottom: 16px;
}

.module-tile .tile-customer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
}

.module-tile .tile-customer-btn:hover {
    color: var(--brand-color);
    border-color: var(--brand-color);
    background: var(--accent-subtle);
}

/* =====================================================
   WIDGET-GRID (Spielekiste — drag & drop)
   ===================================================== */

.widget-grid-area {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    min-height: 200px;
}

.widget-grid-area.drag-over {
    background: var(--accent-subtle);
    border: 2px dashed var(--accent-glow);
    border-radius: 12px;
}

.widget-item {
    position: relative;
}

.widget-drag-handle {
    cursor: grab;
    color: rgba(0,0,0,0.2);
    position: absolute;
    top: 12px;
    right: 40px;
    font-size: 1rem;
    z-index: 2;
}

.widget-drag-handle:hover { color: var(--brand-color); }

.widget-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    padding: 2px 6px;
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.15s, color 0.15s;
    z-index: 2;
}

.widget-item:hover .widget-remove-btn { opacity: 1; }
.widget-remove-btn:hover { color: var(--red); }

/* Spalten-Layouts */
.widget-grid-area.cols-1 { grid-template-columns: 1fr; }
.widget-grid-area.cols-2 { grid-template-columns: repeat(2, 1fr); }
.widget-grid-area.cols-3 { grid-template-columns: repeat(3, 1fr); }
.widget-grid-area.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Widget-Picker Modal */
.widget-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    max-height: 400px;
    overflow-y: auto;
}

.widget-picker-item {
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: all 0.15s;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.widget-picker-item:hover {
    border-color: var(--brand-color);
    background: var(--accent-subtle);
}

.widget-picker-item.already-added {
    opacity: 0.4;
    cursor: default;
}

.widget-picker-icon {
    font-size: 1.4rem;
    color: var(--brand-color);
    flex-shrink: 0;
    line-height: 1.2;
}

.widget-picker-name {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text);
}

.widget-picker-desc {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* Responsive */
@media (max-width: 768px) {
    .widget-grid-area { grid-template-columns: 1fr; }
    .widget-grid-area.cols-2,
    .widget-grid-area.cols-3,
    .widget-grid-area.cols-4 { grid-template-columns: 1fr; }
}

/* =====================================================
   HEADER-BUTTONS (Dark Mode Toggle + Notification Bell)
   ===================================================== */

.dark-mode-toggle {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 5px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-family: inherit;
    transition: border-color 0.15s, color 0.15s;
}

.dark-mode-toggle:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.notif-bell-wrap {
    position: relative;
}

.notif-bell-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    background: none;
    cursor: pointer;
    font-size: 0.95rem;
    transition: border-color 0.15s, color 0.15s;
}

.notif-bell-btn:hover {
    border-color: var(--brand-color);
    color: var(--brand-color);
}

.notif-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: #fff;
    border-radius: 10px;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    pointer-events: none;
}

.notif-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 320px;
    background: var(--glass-bg, rgba(15,25,50,0.97));
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    backdrop-filter: blur(12px);
    z-index: 9999;
    overflow: hidden;
}

.notif-dropdown-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    transition: background 0.12s;
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.notif-item:hover {
    background: var(--accent-subtle);
}

.notif-item:last-child {
    border-bottom: none;
}

.notif-unread {
    background: rgba(59,130,246,0.06);
}

/* =====================================================
   BENACHRICHTIGUNGEN (Notification Flyout)
   ===================================================== */

.notif-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--accent-subtle);
    color: var(--brand-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}

.notif-content { flex: 1; min-width: 0; }

.notif-title {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.notif-meta {
    display: flex;
    margin-top: 2px;
    font-size: 0.68rem;
    color: var(--text-secondary);
}

.notif-module { text-transform: capitalize; }

.notif-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-color);
    margin-top: 4px;
}

.notif-empty {
    padding: 24px 16px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.8rem;
}

/* =====================================================
   UNIVERSE MODULES BAR
   Fixe Leiste über dem App-Header für SuperAdmins.
   Zeigt alle Module als Quick-Navigation.
   ===================================================== */

.universe-modules-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9997;
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 5px 12px;
    background: linear-gradient(90deg, rgba(10,15,30,0.97), rgba(15,25,50,0.97));
    border-bottom: 1px solid var(--accent-glow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    /* Fix Juli 2026 — Die Bar selbst clippt nicht mehr (overflow:visible); nur die Modul-Rail
       (.universe-modules-bar-nav) scrollt horizontal. So bleiben Breadcrumb-Dropdowns (in
       .universe-modules-bar-fixed) und die Master-Gruppen-Dropdown (per JS aus der Rail geloest,
       siehe templates/partials/header.php) voll sichtbar statt vertikal abgeschnitten zu werden. */
    overflow: visible;
}

/* Nur die Modul-Icon-Liste scrollt horizontal — Brand + Breadcrumb (.universe-modules-bar-fixed)
   bleiben fix und ausserhalb dieses Clip-Containers (Fix Juli 2026). */
.universe-modules-bar-nav {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    flex: 1 1 auto;
    min-width: 0;
}

.universe-modules-bar-nav::-webkit-scrollbar { display: none; }

.universe-modules-bar-brand {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    padding-right: 12px;
    margin-right: 8px;
    border-right: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
    white-space: nowrap;
    background: linear-gradient(135deg, var(--brand-color), #818cf8, var(--orange));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShift 6s ease-in-out infinite;
}

.universe-modules-bar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.universe-modules-bar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 14px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: rgba(255,255,255,0.78);
    text-decoration: none;
    border: 1px solid transparent;
    transition: color 0.15s, background 0.15s, border-color 0.15s;
    white-space: nowrap;
    flex-shrink: 0;
}

.universe-modules-bar-link:hover {
    color: var(--brand-color);
    border-color: var(--accent-glow);
    background: var(--accent-subtle);
    text-decoration: none;
}

.universe-modules-bar-link--locked {
    opacity: 0.4;
    cursor: default;
    pointer-events: none;
    position: relative;
}

.universe-modules-bar-lock {
    font-size: 0.55rem;
    opacity: 0.7;
    margin-left: 1px;
    flex-shrink: 0;
}

.universe-modules-bar-icon {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    object-fit: cover;
    flex-shrink: 0;
}

.universe-modules-bar-icon-bi {
    font-size: 1rem;
    flex-shrink: 0;
    line-height: 1;
    background: linear-gradient(135deg, var(--brand-color), #818cf8, var(--orange));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: logoShift 6s ease-in-out infinite;
}

.universe-modules-bar-avatar {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    background: var(--accent-subtle);
    color: var(--brand-color);
    font-size: 0.55rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Body-Offset wenn Bar aktiv — 42px (Fix Juli 2026: Bar von 32px auf 42px erhoeht, siehe
   .universe-modules-bar padding oben, damit die Breadcrumb-Pills nicht an Ober-/Unterkante kleben) */
/* app-sidebar: margin-top (wie CRM jarvis.css) — konsistent, sidebar bleibt sauber unter der Bar */
body.has-modules-bar .app-sidebar {
    margin-top: 42px;
    height: calc(100vh - 42px);
    height: calc(100dvh - 42px);
}

/* app-header: margin-top schiebt Header aus Flow-Null raus, top = Sticky-Klebe-Punkt */
body.has-modules-bar .app-header {
    margin-top: 42px;
    top: 42px;
}

/* app-main: min-height um modules bar reduzieren damit kein Overflow entsteht */
body.has-modules-bar .app-main {
    min-height: calc(100vh - 42px);
}

/* Light-Mode Overrides für Modules Bar */
body:not(.dark-mode) .universe-modules-bar {
    background: linear-gradient(90deg, rgba(240,245,255,0.97), rgba(230,240,255,0.97));
    border-bottom-color: var(--accent-glow);
}

body:not(.dark-mode) .universe-modules-bar-brand {
    background: linear-gradient(135deg, var(--brand-color), #6366f1, #f97316);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body:not(.dark-mode) .universe-modules-bar-link {
    color: rgba(20,30,50,0.75);
}

body:not(.dark-mode) .universe-modules-bar-link:hover {
    color: var(--brand-color);
    background: var(--accent-subtle);
    border-color: var(--accent-glow);
}

/* Brand als anklickbarer Link */
a.universe-modules-bar-brand {
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

a.universe-modules-bar-brand:hover {
    opacity: 0.8;
    text-decoration: none;
}

/* ── Modul-Entry: Pill dehnt sich beim Hover aus und nimmt Buttons auf ── */
.universe-module-entry {
    display: inline-flex;
    align-items: center;
    border-radius: 14px;
    border: 1px solid transparent;
    overflow: hidden;
    transition: background 0.18s, border-color 0.18s;
}

.universe-module-entry:hover {
    background: var(--accent-subtle);
    border-color: var(--accent-glow);
}

/* Link innerhalb Entry: Pill-Styling kommt vom Entry, nicht vom Link selbst */
.universe-module-entry .universe-modules-bar-link {
    border-color: transparent;
    background: transparent;
}

.universe-module-entry:hover .universe-modules-bar-link {
    color: var(--brand-color);
    border-color: transparent;
    background: transparent;
}

/* Buttons: versteckt, fahren beim Hover innerhalb der Pill raus */
.universe-module-btns {
    display: flex;
    align-items: center;
    gap: 2px;
    overflow: hidden;
    max-width: 0;
    opacity: 0;
    transition: max-width 0.2s ease, opacity 0.15s ease;
    padding-right: 0;
}

.universe-module-entry:hover .universe-module-btns {
    max-width: 54px;
    opacity: 1;
    padding-right: 6px;
}

.universe-module-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: background 0.12s, color 0.12s;
}

.universe-module-btn:hover {
    background: rgba(99,102,241,0.4);
    color: #fff;
    text-decoration: none;
}

body:not(.dark-mode) .universe-module-btn {
    color: rgba(20,30,50,0.5);
}

body:not(.dark-mode) .universe-module-btn:hover {
    background: rgba(59,130,246,0.15);
    color: var(--brand-color);
}

/* =====================================================
   UNIVERSE MODULES BAR — Breadcrumb, Workspace-Switcher, Modul-Gruppen
   Von templates/partials/header.php zentralisiert für Modul-Rollout
   (Module laden universe.css remote — diese Klassen müssen dort liegen,
   damit die Quick-Nav in allen Modulen identisch aussieht).
   Reine Verschiebung, kein Redesign — Cockpit-Optik bleibt unverändert.
   ===================================================== */

/* Fix Juli 2026 — Bar in zwei Bereiche geteilt: fixer Bereich (Brand + Breadcrumb, kein Overflow-Clip)
   und scrollende Modul-Rail (.universe-modules-bar-nav). Die overflow-x:auto Regel fuer die Rail sitzt
   bereits weiter oben (.universe-modules-bar-nav); hier nur der Wrapper fuer den fixen Bereich. */
.universe-modules-bar-fixed{display:flex;align-items:center;flex-shrink:0;min-width:0;}

/* Workspace/Projekt-Breadcrumb — Light Mode (Default) */
.universe-breadcrumb{display:flex;align-items:center;gap:4px;padding-right:12px;margin-right:8px;border-right:1px solid rgba(255,255,255,0.08);flex-shrink:0;}
.universe-breadcrumb-sep{display:inline-flex;align-items:center;font-size:0.55rem;opacity:0.4;flex-shrink:0;}
.universe-breadcrumb-crumb.ws-switcher-wrap{position:relative;}
.universe-breadcrumb .ws-switcher-btn{padding:3px 8px;font-size:0.72rem;max-width:160px;background:rgba(255,255,255,0.06);border-color:rgba(255,255,255,0.12);color:rgba(255,255,255,0.8);}
.universe-breadcrumb .ws-switcher-btn:hover{background:rgba(255,255,255,0.11);border-color:rgba(255,255,255,0.2);}
.universe-breadcrumb .ws-switcher-label{max-width:110px;}
body:not(.dark-mode) .universe-breadcrumb .ws-switcher-btn{background:rgba(0,0,0,0.06);border-color:rgba(0,0,0,0.15);color:rgba(0,0,0,0.72);}
body:not(.dark-mode) .universe-breadcrumb .ws-switcher-btn:hover{background:rgba(0,0,0,0.1);border-color:rgba(0,0,0,0.25);}

/* Workspace Switcher — Light Mode (Default) */
.ws-switcher-wrap{position:relative;}
.ws-switcher-btn{display:flex;align-items:center;gap:5px;background:rgba(0,0,0,0.06);border:1px solid rgba(0,0,0,0.15);color:rgba(0,0,0,0.72);padding:5px 10px;border-radius:6px;font-size:0.78rem;cursor:pointer;transition:background .15s,border-color .15s;max-width:200px;}
.ws-switcher-btn:hover{background:rgba(0,0,0,0.1);border-color:rgba(0,0,0,0.25);}
.ws-switcher-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:140px;}
.ws-switcher-dd{position:absolute;top:calc(100% + 6px);left:0;min-width:240px;max-height:360px;overflow-y:auto;background:#ffffff;border:1px solid rgba(0,0,0,0.12);border-radius:8px;box-shadow:0 8px 32px rgba(0,0,0,.18);z-index:1200;}
.ws-switcher-dd-title{padding:8px 12px 6px;font-size:.68rem;color:rgba(0,0,0,.4);text-transform:uppercase;letter-spacing:.06em;border-bottom:1px solid rgba(0,0,0,.08);}
.ws-switcher-tenant{display:flex;align-items:center;gap:8px;padding:7px 12px 5px;font-size:.7rem;font-weight:600;text-transform:uppercase;letter-spacing:.07em;color:rgba(0,0,0,.4);cursor:pointer;margin-top:4px;}
.ws-switcher-tenant:hover{color:rgba(0,0,0,.75);}
.ws-switcher-tenant.is-active{color:var(--brand-color,#00d4ff);}
.ws-switcher-ws{display:flex;align-items:center;gap:8px;padding:7px 12px 7px 24px;font-size:.82rem;color:rgba(0,0,0,.68);cursor:pointer;transition:background .1s;}
.ws-switcher-ws:hover{background:rgba(0,0,0,.04);color:rgba(0,0,0,.9);}
.ws-switcher-ws.is-active{background:rgba(0,212,255,.08);color:rgba(0,0,0,.9);}
.ws-dot{width:8px;height:8px;border-radius:50%;flex-shrink:0;display:inline-block;}
.ws-switcher-footer{border-top:1px solid rgba(0,0,0,.08);padding:4px 8px;}
.ws-switcher-manage-link{display:block;width:100%;text-align:left;background:none;border:none;padding:6px 8px;font-size:.75rem;color:rgba(0,0,0,.38);cursor:pointer;transition:color .15s;}
.ws-switcher-manage-link:hover{color:var(--brand-color,#00d4ff);}

/* Workspace Switcher — Dark Mode */
body.dark-mode .ws-switcher-btn{background:rgba(255,255,255,.06);border-color:rgba(255,255,255,.12);color:rgba(255,255,255,.8);}
body.dark-mode .ws-switcher-btn:hover{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.2);}
body.dark-mode .ws-switcher-dd{background:#1a1f2e;border-color:rgba(255,255,255,.1);box-shadow:0 8px 32px rgba(0,0,0,.45);}
body.dark-mode .ws-switcher-dd-title{color:rgba(255,255,255,.35);border-bottom-color:rgba(255,255,255,.07);}
body.dark-mode .ws-switcher-tenant{color:rgba(255,255,255,.4);}
body.dark-mode .ws-switcher-tenant:hover{color:rgba(255,255,255,.8);}
body.dark-mode .ws-switcher-ws{color:rgba(255,255,255,.72);}
body.dark-mode .ws-switcher-ws:hover{background:rgba(255,255,255,.06);color:#fff;}
body.dark-mode .ws-switcher-ws.is-active{background:rgba(0,212,255,.07);color:#fff;}
body.dark-mode .ws-switcher-footer{border-top-color:rgba(255,255,255,.07);}
body.dark-mode .ws-switcher-manage-link{color:rgba(255,255,255,.35);}

/* F3.4 — Modul-Gruppen (aufklappbarer Eltern-Eintrag, z.B. "Master") */
.universe-module-group{position:relative;flex-shrink:0;}
.universe-module-group-toggle{background:transparent;border:1px solid transparent;cursor:pointer;}
.universe-module-group-caret{font-size:0.5rem;opacity:0.5;margin-left:1px;flex-shrink:0;}
.universe-module-group-badge{display:inline-flex;align-items:center;justify-content:center;min-width:15px;height:15px;padding:0 4px;border-radius:8px;background:rgba(59,130,246,0.18);color:var(--brand-color,#00d4ff);font-size:0.58rem;font-weight:700;flex-shrink:0;}
.universe-module-group-dd{position:absolute;top:calc(100% + 6px);left:0;min-width:220px;max-height:360px;overflow-y:auto;background:#1a1f2e;border:1px solid rgba(255,255,255,.1);border-radius:8px;box-shadow:0 8px 32px rgba(0,0,0,.45);z-index:1200;padding:6px;}
body:not(.dark-mode) .universe-module-group-dd{background:#ffffff;border-color:rgba(0,0,0,.12);box-shadow:0 8px 32px rgba(0,0,0,.18);}
/* Fix Juli 2026 — Waehrend die Master-Gruppe (in der scrollenden Modul-Rail) offen ist, wird ihr Dropdown
   per JS an document.body umgehaengt und auf position:fixed umgeschaltet (siehe toggleUniModuleGroup).
   Das entzieht es dem overflow-x:auto Clip der Rail komplett; hoher z-index haelt es ueber allem. */
.universe-module-group-dd--floating{position:fixed !important;z-index:10000;}
.universe-module-group-admin-link{display:flex;align-items:center;gap:6px;padding:7px 8px;margin-bottom:4px;border-radius:6px;font-size:0.78rem;font-weight:600;color:#f87171;background:rgba(239,68,68,0.1);text-decoration:none;border:1px solid rgba(239,68,68,0.25);}
.universe-module-group-admin-link:hover{background:rgba(239,68,68,0.18);color:#f87171;text-decoration:none;}
.universe-module-group-item{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:6px;font-size:0.8rem;color:rgba(255,255,255,.78);text-decoration:none;transition:background .12s,color .12s;}
.universe-module-group-item:hover{background:var(--accent-subtle);color:var(--brand-color);text-decoration:none;}
.universe-module-group-item--locked{opacity:0.45;cursor:default;pointer-events:none;}
.universe-module-group-item-icon{width:16px;height:16px;border-radius:4px;object-fit:cover;flex-shrink:0;}
.universe-module-group-item-text{display:flex;flex-direction:column;gap:1px;min-width:0;}
.universe-module-group-item-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.universe-module-group-item-desc{font-size:0.66rem;line-height:1.2;opacity:0.55;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
body:not(.dark-mode) .universe-module-group-item{color:rgba(20,30,50,.75);}
