.roster-item {
    display: flex;
    flex-direction: column;
    padding: 0;
    color: var(--brand-primary);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    transition: background 0.3s ease, transform 0.2s ease;
}

.roster-item-banner {
    width: 100%;
    height: auto;
    display: block;
}

.roster-item-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
}

.roster-toggle-btn {
    position: fixed;
    top: 4px;
    left: 250px;
    z-index: 1001;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    font-size: 1.3rem;
    border-radius: 50%;
    color: #ffffff;
    transition: all 0.25s ease;
}

.roster-toggle-btn:hover {
    background: rgba(var(--brand-primary-rgb), 0.9);
}

.roster-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    display: none;
}

.roster-overlay.active {
    display: block !important;
}

.roster-drawer {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    z-index: 999;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border-right: 8px solid rgba(var(--brand-primary-rgb), 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

    transition: left 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.roster-drawer.active {
    left: 0 !important;
}

.roster-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--brand-primary);
    color: #ffffff;
    padding: 14px 16px;
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: sticky;
    top: 0;
    z-index: 2;
}

.roster-close-btn {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

.roster-group {
    width: 100%;
}

.roster-banner {
    background: rgba(var(--brand-primary-rgb), 0.35);
    color: #ffffff;
    font-family: 'Roboto Mono', monospace;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 16px;
    opacity: 0.8;
}

.roster-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.12),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.roster-item:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(2px);
}

.roster-item:hover::before {
    left: 125%;
}

.roster-avatar {
    width: 34px;
    height: 34px;
    border-radius: 0 12px 0 12px;
    object-fit: cover;
    flex-shrink: 0;
}

/* Rollen-Randfarben: UNVERÄNDERT, funktionale Kennzeichnung, keine Marken-Farbe */
.roster-item-admin .roster-avatar { border-color: #ff751f; }
.roster-item-mod .roster-avatar { border-color: #5b8da1; }
.roster-item-musiker .roster-avatar { border-color: #a06bd8; }

.roster-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.roster-avatar-wrap {
    position: relative;
    flex-shrink: 0;
}

/* Status-Farben: UNVERÄNDERT, funktionale Presence-Anzeige */
.status-online     { background: #2ecc71; }
.status-away        { background: #f1c40f; }
.status-offline     { background: #6b7280; }
.status-dnd         { background: #e74c3c; }
.status-sleeping    { background: #4a90d9; }
.status-unterwegs   { background: #8ea3ad; }

.status-text-online     { color: #2ecc71; }
.status-text-away        { color: #f1c40f; }
.status-text-offline     { color: #6b7280; }
.status-text-dnd         { color: #e74c3c; }
.status-text-sleeping    { color: #4a90d9; }
.status-text-unterwegs   { color: #8ea3ad; }

.roster-name-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
}

.roster-status-text {
    font-size: 0.7rem;
    font-family: 'Roboto Mono', monospace;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0.85;
}

.status-select-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    min-width: 28px;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-select-toggle .status-dot {
    position: static;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    pointer-events: none;
}

.status-select-menu {
    display: none;
    top: calc(100% + 8px);
    right: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 32px rgba(var(--brand-primary-rgb), 0.2);
    padding: 8px;
    border-radius: 0 12px 0 12px;
    z-index: 1005;
    min-width: 220px;
}

.status-select-menu.open {
    display: block;
}

.status-select-header {
    font-family: 'Roboto Mono', monospace;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(var(--brand-primary-rgb), 0.6);
    padding: 4px 10px 8px;
}

.status-select-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--brand-primary);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.status-select-item:hover {
    background: rgba(var(--brand-primary-rgb), 0.1);
}

.status-select-item .status-dot {
    position: static;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
}

@media screen and (max-width: 1000px) {
    .roster-drawer {
        width: 85vw !important;
        max-width: 300px !important;
        left: -100vw !important;
        box-sizing: border-box;
    }
}

@media screen and (max-width: 480px) {
    .roster-drawer {
        width: 100vw !important;
        max-width: none !important;
    }
}

/* ==========================================================================
    [04] NAVIGATION & DRAWER (SLIDE-LOGIK ERHALTEN)
    ========================================================================== */
    
#menu-overlay {
    position: fixed;
    top: 0; 
    left: 0;
    width: 100%; 
    height: 100%;
    z-index: 998;
    display: none;
}

#menu-overlay.active { 
    display: block !important; 
}

.burger-icon {
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 10px;
    z-index: 1001;
}

.burger-icon span { 
    width: 25px; 
    height: 3px; 
    background: #ffffff; 
    transition: none;
}

.nav-menu {
    position: fixed;
    top: 0; 
    right: -320px;
    width: 300px; 
    height: 100vh;
    z-index: 999;

    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-left: 8px solid rgba(var(--brand-primary-rgb), 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.nav-menu.open,
.nav-menu.active {
    right: 0 !important;
}

.drawer-close-btn {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1001;
    background: rgba(var(--brand-primary-rgb), 0.8);
    color: #ffffff;
    border: none;
    width: 40px;
    height: 40px;
    font-size: 1.6rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.drawer-close-btn.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

@media screen and (min-width: 1001px) {
    .drawer-close-btn {
        display: none;
    }
}

.nav-menu.active ~ .drawer-close-btn,
#nav-links.active ~ .drawer-close-btn {
    right: 300px;
}

.menu-status-label {
    background: var(--brand-primary);
    color: #ffffff;
    padding: 10px;
    font-size: 1.8rem;
    text-align: center;
    text-transform: uppercase;
}

.user-header-widget {
    position: relative;
    display: flex !important;
    align-items: center;
    gap: 10px;
    background: rgb(255, 255, 255);
    backdrop-filter: blur(10px) saturate(150%);
    -webkit-backdrop-filter: blur(10px) saturate(150%);
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 6px 16px;
    border-radius: 0 10px 0 10px;
    color: var(--brand-primary);
    font-size: 1rem;
    font-family: 'Roboto Mono', monospace;
    transition: all 0.25s ease;
}

.user-header-widget:hover {
    background: rgb(221, 221, 221);
}

.user-header-widget img {
    width: 32px !important;
    height: 32px !important;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 2px 4px;
    transition: transform 0.25s ease;
}

.dropdown-toggle:hover {
    transform: translateY(2px);
}

.user-dropdown-menu {
    display: none;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px) saturate(160%);
    -webkit-backdrop-filter: blur(16px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 12px 32px rgba(var(--brand-primary-rgb), 0.2);
    padding: 8px;
    border-radius: 0 12px 0 12px;
    z-index: 1005;
    min-width: 160px;
}

.user-dropdown-menu.open {
    display: block;
}

.user-dropdown-menu a {
    display: block;
    text-decoration: none;
    color: var(--brand-primary);
    font-family: 'Roboto Mono', monospace;
    font-size: 0.9rem;
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.user-dropdown-menu a:hover {
    background: rgba(var(--brand-primary-rgb), 0.1);
    color: var(--brand-primary);
}

.nav-section {
    width: 100%;
    border-bottom: 4px solid #e8e8e8;
}

.section-header-img {
    width: 100%;
    height: auto;
    display: block;
}

.account-banner {
    width: 100%;
    height: 90px;
    object-fit: cover;
    object-position: center;
    display: block;
    border-bottom: 3px solid var(--brand-primary);
}

.nav-button {
    color: #000000 !important;
    background: transparent !important;
    padding: 15px 20px !important;
    text-decoration: none !important;
    display: block !important;
    text-transform: uppercase !important;
    font-weight: 700 !important;
    position: relative;
    overflow: hidden;
    transition: color 0.5s ease, 
                background 0.5s ease, 
                border-left-color 0.5s ease,
                letter-spacing 0.5s ease,
                transform 0.4s ease;
}

.nav-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.15),
        transparent
    );
    transform: skewX(-20deg);
    transition: left 0.8s ease;
}

.nav-button:hover {
    background: var(--brand-primary) !important;
    color: #ffffff !important;
    border-left-color: var(--brand-primary);
    letter-spacing: 0.5px;
    transform: translateX(0px);
}

.nav-button:hover::before {
    left: 125%;
}

@media screen and (max-width: 1000px) {

    .nav-menu {
        width: 85vw !important;
        max-width: 300px !important;
        right: -100vw !important;
        display: flex !important;
        flex-direction: column !important;
        box-sizing: border-box;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.open,
    .nav-menu.active {
        right: 0 !important;
    }

    .burger-icon {
        padding: 8px;
    }

    .burger-icon span {
        width: 22px;
    }

    .menu-status-label {
        font-size: 1.3rem;
        padding: 8px;
    }

    .account-banner {
        height: 70px;
    }

    .nav-button {
        padding: 13px 16px !important;
        font-size: 0.95rem;
    }

    .nav-menu .nav-section {
        flex-shrink: 0;
    }

    .desktop-only-widget {
        display: none !important;
    }

    .user-header-widget {
        padding: 4px 10px;
        gap: 6px;
        font-size: 0.85rem;
    }

    .user-header-widget img {
        width: 24px !important;
        height: 24px !important;
    }

    .user-dropdown-menu {
        min-width: 140px;
        padding: 8px;
    }

    .user-dropdown-menu a {
        font-size: 0.9rem;
        padding: 8px 4px;
    }

    .mobile-only-widget-container {
        display: block !important;
        background: var(--brand-primary);
        padding: 15px;
        border-bottom: 2px solid #5b8da1;
    }

    .mobile-widget-styled {
        display: flex !important;
        align-items: center;
        gap: 12px;
        background: rgba(255, 255, 255, 0.1) !important;
        padding: 10px !important;
        border-radius: 4px;
    }

    .mobile-user-links {
        display: flex;
        flex-direction: column;
        gap: 2px;
        margin-top: 10px;
    }

    .mobile-user-links a {
        color: #76b7d1 !important;
        text-decoration: none;
        font-family: 'Roboto Mono', monospace;
        font-size: 0.9rem;
        padding: 8px 5px;
        border-radius: 4px;
        transition: 0.1s;
    }

    .mobile-user-links a:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #ffffff !important;
    }
}

@media screen and (max-width: 480px) {
    .nav-menu {
        width: 100vw !important;
        max-width: none !important;
    }

    .menu-status-label {
        font-size: 1.1rem;
    }

    .account-banner {
        height: 60px;
    }

    .nav-button {
        padding: 12px 14px !important;
        font-size: 0.9rem;
    }

    .mobile-only-widget-container {
        padding: 12px;
    }

    .mobile-user-links a {
        font-size: 0.85rem;
        padding: 7px 4px;
    }
}

.drawer-close-btn {
    display: none;
}

@media screen and (max-width: 480px) {
    .drawer-close-btn {
        display: block;
        position: sticky;
        top: 0;
        margin-left: auto;
        background: rgba(var(--brand-primary-rgb), 0.6);
        color: #ffffff;
        border: none;
        width: 40px;
        height: 40px;
        font-size: 1.6rem;
        line-height: 1;
        cursor: pointer;
        z-index: 10;
    }
}