/* Modern Premium Design - Nemesis Kassensystem */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #13131a;
    --bg-tertiary: #1c1c26;
    --bg-glass: rgba(19, 19, 26, 0.7);
    --text-primary: #f0f0ff;
    --text-secondary: #8888aa;
    --text-muted: #55556a;
    --accent: #4dd4ac;
    --accent-hover: #6eedc8;
    --accent-dim: rgba(77, 212, 172, 0.12);
    --accent-glow: rgba(77, 212, 172, 0.25);
    --accent-glow-strong: rgba(77, 212, 172, 0.45);
    --border: rgba(255, 255, 255, 0.07);
    --border-hover: rgba(77, 212, 172, 0.35);
    --success: #10b981;
    --error: #ef4444;
    --purple: #9d6cf7;
    --blue: #5b9ef7;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 4px 24px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);
    --shadow-accent: 0 4px 24px rgba(77, 212, 172, 0.15);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: rgba(77, 212, 172, 0.2);
    border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(77, 212, 172, 0.4);
}

/* === LOGIN SCREEN === */
.login-screen {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 2rem 5%;
    gap: 2rem;
}

/* Hintergrund als eigenes Layer – wird per JS leicht mit Maus verschoben */
#login-bg {
    position: absolute;
    inset: -50px;
    background: linear-gradient(rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.85)), url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Alle direkten Kinder über dem Hintergrund */
.login-screen > *:not(#login-bg) {
    position: relative;
    z-index: 1;
}

/* === LOGIN LEFT: Rangliste === */
.login-left {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
    animation: loginFadeLeft 0.7s ease both;
    width: 340px;
    flex-shrink: 0;
}

@keyframes loginFadeLeft {
    from { opacity: 0; transform: translateX(-24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.login-ranks-title {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.25rem;
}

.login-ranks-title span {
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    color: var(--text-muted);
    text-transform: uppercase;
    white-space: nowrap;
}

.login-ranks-title-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--border), transparent);
}

.login-rank-group {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.login-rank-group-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    margin-bottom: 0.25rem;
    padding-left: 0.25rem;
}

.login-rank-group-label.leadership {
    color: #d4af37;
}

.login-rank-group-label.council {
    color: var(--accent);
}

.login-rank-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.75rem 1rem;
    background: rgba(19, 19, 26, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.login-rank-item::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 50%);
    pointer-events: none;
}

.login-rank-item:hover {
    transform: translateX(6px);
    border-color: rgba(255, 255, 255, 0.12);
}

.login-rank-item.rank-gold {
    border-left: 3px solid #d4af37;
    background: rgba(212, 175, 55, 0.06);
}
.login-rank-item.rank-gold:hover { border-color: rgba(212, 175, 55, 0.5); }

.login-rank-item.rank-silver {
    border-left: 3px solid #a8a8b8;
    background: rgba(168, 168, 184, 0.05);
}
.login-rank-item.rank-silver:hover { border-color: rgba(168, 168, 184, 0.4); }

.login-rank-item.rank-bronze {
    border-left: 3px solid #b87333;
    background: rgba(184, 115, 51, 0.05);
}
.login-rank-item.rank-bronze:hover { border-color: rgba(184, 115, 51, 0.4); }

.login-rank-item.rank-accent {
    border-left: 3px solid rgba(77, 212, 172, 0.5);
    background: rgba(77, 212, 172, 0.04);
}
.login-rank-item.rank-accent:hover { border-color: rgba(77, 212, 172, 0.4); }

.login-rank-number {
    font-size: 1.1rem;
    font-weight: 900;
    min-width: 24px;
    text-align: center;
    line-height: 1;
}

.rank-gold .login-rank-number    { color: #d4af37; text-shadow: 0 0 12px rgba(212, 175, 55, 0.4); }
.rank-silver .login-rank-number  { color: #c0c0d0; text-shadow: 0 0 10px rgba(192, 192, 210, 0.3); }
.rank-bronze .login-rank-number  { color: #cd8c56; text-shadow: 0 0 10px rgba(205, 140, 86, 0.3); }
.rank-accent .login-rank-number  { color: var(--accent); text-shadow: 0 0 10px rgba(77, 212, 172, 0.3); }

/* Avatar container – flex row für mehrere gestapelte Avatare */
.login-rank-avatars {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-width: 46px;
    position: relative;
}

/* Avatar in rank rows */
.login-rank-avatar-wrap {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
    /* Trennring zwischen gestapelten Avataren — opaker Hintergrundton */
    box-shadow: 0 0 0 2.5px #12121a;
}

.login-rank-avatar-skeleton {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%);
    background-size: 200% 100%;
    animation: skeletonShimmer 1.6s infinite;
}

@keyframes skeletonShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.login-rank-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.rank-gold .login-rank-avatar    { border: 2px solid rgba(212, 175, 55, 0.6); box-shadow: 0 0 10px rgba(212,175,55,0.3); }
.rank-silver .login-rank-avatar  { border: 2px solid rgba(192, 192, 210, 0.5); }
.rank-bronze .login-rank-avatar  { border: 2px solid rgba(205, 140, 86, 0.5); }
.rank-accent .login-rank-avatar  { border: 2px solid rgba(77, 212, 172, 0.4); box-shadow: 0 0 10px rgba(77,212,172,0.2); }

.login-rank-info {
    flex: 1;
}

/* login-rank-name und login-rank-desc sind weiter unten definiert (überschreiben) */

.login-rank-crown {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* === LOGIN CENTER SPACER === */
.login-center-spacer {
    display: none;
}

/* === LOGIN RIGHT: Login-Box === */
.login-right {
    display: flex;
    justify-content: flex-end;
    animation: loginFadeRight 0.7s ease both;
    width: 400px;
    flex-shrink: 0;
}

@keyframes loginFadeRight {
    from { opacity: 0; transform: translateX(24px); }
    to   { opacity: 1; transform: translateX(0); }
}

.login-box {
    text-align: center;
    background: rgba(19, 19, 26, 0.8);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(77, 212, 172, 0.15);
    border-radius: 24px;
    padding: 3.5rem 3rem;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.04), var(--shadow-lg), 0 0 80px rgba(77, 212, 172, 0.06);
    position: relative;
    overflow: hidden;
}

.login-box::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(77, 212, 172, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.login-logo {
    width: 96px;
    height: 96px;
    margin: 0 auto 1.5rem auto;
    display: block;
    object-fit: contain;
    filter: drop-shadow(0 0 20px rgba(77, 212, 172, 0.5)) drop-shadow(0 0 40px rgba(77, 212, 172, 0.2));
    animation: logoPulse 3s ease-in-out infinite;
}

@keyframes logoPulse {
    0%, 100% { filter: drop-shadow(0 0 20px rgba(77, 212, 172, 0.5)) drop-shadow(0 0 40px rgba(77, 212, 172, 0.2)); }
    50%       { filter: drop-shadow(0 0 28px rgba(77, 212, 172, 0.75)) drop-shadow(0 0 56px rgba(77, 212, 172, 0.35)); }
}

.login-box h1 {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: 0.35em;
    margin-bottom: 0.5rem;
    font-family: 'Inter', sans-serif;
    overflow: visible;
    white-space: nowrap;
}

/* Shine text – works on both h1 span and h2 span */
.shine-text {
    display: inline-block;
    color: transparent;
    background: linear-gradient(
        90deg,
        var(--text-primary) 0%,
        var(--text-primary) 30%,
        #ffffff 45%,
        var(--accent) 50%,
        #ffffff 55%,
        var(--text-primary) 70%,
        var(--text-primary) 100%
    );
    background-size: 300% 100%;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: textShine 3.5s ease-in-out infinite;
    /* Extra padding so the last letter's spacing isn't clipped */
    padding-right: 0.4em;
}

@keyframes textShine {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

.login-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 3rem;
    letter-spacing: 0.1em;
}

.discord-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    width: 100%;
    background: #5865F2;
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 4px 20px rgba(88, 101, 242, 0.35);
}

.discord-btn:hover {
    background: #4752C4;
    transform: translateY(-3px);
    box-shadow: 0 8px 28px rgba(88, 101, 242, 0.5);
}

/* === MAIN APP LAYOUT === */
.main-app {
    display: flex;
    min-height: 100vh;
    position: relative;
    overflow-x: clip;
    overflow-y: visible;
}

/* Geblurrter Hintergrund im Hauptmenü mit leichter Parallaxe */
#main-bg {
    position: fixed;
    inset: -40px;
    background: url('background.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(6px) brightness(0.35);
    z-index: 0;
    will-change: transform;
    pointer-events: none;
}

/* === SIDEBAR === */
.sidebar {
    width: 260px;
    background: rgba(13, 13, 20, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    box-shadow: 4px 0 32px rgba(0, 0, 0, 0.4);
    z-index: 100;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: visible;
}

/* === SIDEBAR COLLAPSED === */
.sidebar.collapsed {
    width: 72px;
}

/* Alle Texte/Labels in der Sidebar per max-width + opacity ausblenden */
.sidebar .sidebar-header h2,
.sidebar .nav-item span:not(.nav-badge),
.sidebar .user-details,
.sidebar .online-count {
    max-width: 200px;
    overflow: hidden;
    white-space: nowrap;
    transition: max-width 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity   0.2s ease,
                padding   0.3s ease;
}

.sidebar.collapsed .sidebar-header h2,
.sidebar.collapsed .nav-item span:not(.nav-badge),
.sidebar.collapsed .user-details,
.sidebar.collapsed .online-count {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    padding: 0;
}

.sidebar.collapsed .online-players-widget {
    display: none;
}

.sidebar.collapsed .sidebar-header {
    padding: 1.5rem 0;
    justify-content: center;
    gap: 0;
}

.sidebar.collapsed .sidebar-logo {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-nav {
    padding: 1.25rem 0.5rem;
    align-items: center;
}

.sidebar.collapsed .nav-item {
    padding: 0.8rem;
    justify-content: center;
    gap: 0;
    width: 100%;
}

.sidebar.collapsed .nav-item svg {
    flex-shrink: 0;
}

.sidebar.collapsed .sidebar-footer {
    padding: 0.75rem 0.5rem;
    align-items: center;
}

.sidebar.collapsed .sidebar-footer-row {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.sidebar.collapsed .user-info {
    justify-content: center;
    flex: none;
}

.sidebar.collapsed .nav-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 16px;
    height: 16px;
    font-size: 0.6rem;
    padding: 0 3px;
}

/* Tooltip für collapsed Sidebar */
.sidebar.collapsed .nav-item {
    position: relative;
}

.sidebar.collapsed .nav-item::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 5px 10px;
    border-radius: 7px;
    border: 1px solid var(--border);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 200;
    box-shadow: var(--shadow-md);
}

.sidebar.collapsed .nav-item:hover::after {
    opacity: 1;
}

.sidebar::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(77, 212, 172, 0.15) 40%, rgba(77, 212, 172, 0.08) 70%, transparent);
    pointer-events: none;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    background: rgba(77, 212, 172, 0.03);
}

.sidebar-logo {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(77, 212, 172, 0.5)) drop-shadow(0 0 20px rgba(77, 212, 172, 0.2));
    transition: filter 0.3s ease;
}

.sidebar-header:hover .sidebar-logo {
    filter: drop-shadow(0 0 14px rgba(77, 212, 172, 0.7)) drop-shadow(0 0 28px rgba(77, 212, 172, 0.35));
}

.sidebar-header h2 {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.22em;
    font-family: 'Inter', sans-serif;
    overflow: visible;
    white-space: nowrap;
}

.sidebar-header h2 .shine-text {
    animation-duration: 4s;
}

/* Sidebar Collapse Button – rund, mittig auf dem rechten Rand */
.sidebar-collapse-btn {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-hover);
    border-radius: 50%;
    color: var(--accent);
    cursor: pointer;
    z-index: 110;
    box-shadow: 2px 0 12px rgba(0, 0, 0, 0.5);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-collapse-btn:hover {
    background: rgba(77, 212, 172, 0.15);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.2), 2px 0 12px rgba(0, 0, 0, 0.5);
}

/* Im collapsed Zustand: Pfeil drehen */
.sidebar.collapsed .sidebar-collapse-btn {
    position: absolute;
    right: -14px;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
}

.sidebar-nav {
    flex: 1;
    padding: 1.25rem 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    overflow-y: auto;
    overflow-x: hidden;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: all 0.2s ease;
    font-weight: 500;
    position: relative;
    font-size: 0.9rem;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.nav-item.active {
    background: linear-gradient(135deg, var(--accent) 0%, #3cbf98 100%);
    color: #000000;
    font-weight: 700;
    box-shadow: 0 2px 16px rgba(77, 212, 172, 0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}

.nav-item.active svg {
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.3));
}

.nav-item.active:hover {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #4dd4ac 100%);
    box-shadow: 0 4px 20px rgba(77, 212, 172, 0.4);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    background: rgba(0, 0, 0, 0.2);
}

/* Online Players Widget */
.online-players-widget {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 0.55rem 0.65rem;
    background: rgba(77, 212, 172, 0.05);
    border: 1px solid rgba(77, 212, 172, 0.12);
    border-radius: 10px;
}

.online-avatars {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.online-avatar-wrap {
    position: relative;
    width: 30px;
    height: 30px;
    flex-shrink: 0;
}

.online-avatar-wrap img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(77, 212, 172, 0.4);
    display: block;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.online-avatar-wrap img:hover {
    transform: scale(1.15);
    border-color: var(--accent);
    z-index: 5;
}

.online-avatar-wrap .online-dot {
    position: absolute;
    bottom: 0px;
    right: 0px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent);
    border: 1.5px solid var(--bg-secondary);
    box-shadow: 0 0 5px var(--accent);
}

.online-avatar-wrap .online-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
    padding: 3px 7px;
    border-radius: 5px;
    border: 1px solid var(--border);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
}

.online-avatar-wrap:hover .online-tooltip {
    opacity: 1;
}

.online-count {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.02em;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.online-count::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 5px var(--accent);
    display: inline-block;
    flex-shrink: 0;
}

.online-avatar-extra {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: 2px solid rgba(77, 212, 172, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
}

/* Footer row: user-info + logout side by side */
.sidebar-footer-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(77, 212, 172, 0.3);
    box-shadow: 0 0 10px rgba(77, 212, 172, 0.15);
}

.user-details {
    flex: 1;
    overflow: hidden;
}

.user-name {
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-status {
    font-size: 0.75rem;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.user-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 6px var(--accent);
    display: inline-block;
    flex-shrink: 0;
}

.logout-btn {
    padding: 0.5rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logout-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.4);
    color: var(--error);
}

/* === MAIN CONTENT === */
.main-content {
    margin-left: 260px; /* Default: Sidebar ausgeklappt */
    flex: 1;
    min-width: 0; /* verhindert Overflow in Flex-Container beim Sidebar-Expand */
    padding: 2.5rem;
    background: transparent;
    min-height: 100vh;
    position: relative;
    z-index: 1;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sidebar eingeklappt: via Klasse auf <html> – sofort beim Laden gesetzt */
html.sidebar-collapsed .main-content {
    margin-left: 72px;
}
html.sidebar-collapsed .sidebar {
    width: 72px;
}
html.sidebar-collapsed .sidebar .sidebar-header h2,
html.sidebar-collapsed .sidebar .nav-item span:not(.nav-badge),
html.sidebar-collapsed .sidebar .user-details,
html.sidebar-collapsed .sidebar .online-count {
    max-width: 0;
    opacity: 0;
    pointer-events: none;
    padding: 0;
}
html.sidebar-collapsed .sidebar .online-players-widget { display: none; }
html.sidebar-collapsed .sidebar .sidebar-header { padding: 1.5rem 0; justify-content: center; gap: 0; }
html.sidebar-collapsed .sidebar .sidebar-logo { margin: 0 auto; }
html.sidebar-collapsed .sidebar .sidebar-nav { padding: 1.25rem 0.5rem; align-items: center; }
html.sidebar-collapsed .sidebar .nav-item { padding: 0.8rem; justify-content: center; gap: 0; width: 100%; }
html.sidebar-collapsed .sidebar .sidebar-footer { padding: 0.75rem 0.5rem; align-items: center; }
html.sidebar-collapsed .sidebar .sidebar-footer-row { flex-direction: column; gap: 0.5rem; align-items: center; }
html.sidebar-collapsed .sidebar .user-info { justify-content: center; flex: none; }
html.sidebar-collapsed .sidebar .nav-badge { position: absolute; top: 4px; right: 4px; min-width: 16px; height: 16px; font-size: 0.6rem; padding: 0 3px; }
html.sidebar-collapsed .sidebar .sidebar-collapse-btn { transform: translateY(-50%) rotate(180deg); }

/* Transition-Flash beim Laden verhindern */
.no-transition,
.no-transition *,
html.no-transition *  {
    transition: none !important;
}

.page {
    display: none;
    animation: pageFadeIn 0.3s ease;
}

@keyframes pageFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.page.active {
    display: block;
}

.page-header {
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-primary) 50%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* === STATS GRID === */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.stat-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-md), var(--shadow-accent);
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.15);
}

.stat-icon.purple {
    background: rgba(157, 108, 247, 0.12);
    color: var(--purple);
    box-shadow: 0 0 20px rgba(157, 108, 247, 0.15);
}

.stat-icon.blue {
    background: rgba(91, 158, 247, 0.12);
    color: var(--blue);
    box-shadow: 0 0 20px rgba(91, 158, 247, 0.15);
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
}

.stat-value {
    font-size: 1.875rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    letter-spacing: -0.02em;
}

.stat-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* === RECENT ACTIVITY === */
.recent-activity {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 2rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

.view-all {
    color: var(--accent);
    text-decoration: none;
    font-size: 0.8rem;
    font-weight: 600;
    transition: color 0.2s ease;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.view-all:hover {
    color: var(--accent-hover);
    text-shadow: 0 0 8px var(--accent-glow);
}

.transaction-list {
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.transaction-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border-radius: 12px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.transaction-item:hover {
    background: rgba(255, 255, 255, 0.04);
    border-color: var(--border);
}

.transaction-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.transaction-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.transaction-icon.green {
    background: rgba(16, 185, 129, 0.12);
    box-shadow: 0 0 12px rgba(16, 185, 129, 0.1);
}

.transaction-icon.purple {
    background: rgba(157, 108, 247, 0.12);
    box-shadow: 0 0 12px rgba(157, 108, 247, 0.1);
}

.transaction-details {
    display: flex;
    flex-direction: column;
}

.transaction-user {
    font-weight: 600;
    font-size: 0.875rem;
}

.transaction-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.transaction-amount {
    font-weight: 700;
    font-size: 1rem;
}

.transaction-amount.positive {
    color: var(--success);
    text-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}

.transaction-amount.negative {
    color: var(--error);
    text-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
}

/* === FORM === */
.form-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    max-width: 600px;
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

input,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all 0.2s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent);
    background: rgba(28, 28, 38, 0.9);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.12), 0 0 16px rgba(77, 212, 172, 0.05);
}

input::placeholder {
    color: var(--text-muted);
}

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent) 0%, #3cbf98 100%);
    color: #000000;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    box-shadow: 0 4px 16px rgba(77, 212, 172, 0.25);
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(77, 212, 172, 0.4);
    filter: brightness(1.08);
}

/* === TABLE === */
.table-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow-x: auto;
    overflow-y: visible;
    box-shadow: var(--shadow-sm);
}

table {
    width: 100%;
    min-width: 800px;
    border-collapse: collapse;
}

thead {
    background: var(--bg-tertiary);
}

th {
    padding: 1rem 1.5rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    white-space: nowrap;
}

td {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

tbody tr {
    transition: background 0.15s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge-gruen {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-schwarz {
    background: rgba(157, 108, 247, 0.12);
    color: var(--purple);
    border: 1px solid rgba(157, 108, 247, 0.2);
}

.badge-einzahlung {
    background: rgba(16, 185, 129, 0.12);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.badge-entnahme {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

/* === ADMIN PANEL === */
.admin-tab-btn {
    padding: 0.55rem 1.1rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
    margin-bottom: -1px;
}
.admin-tab-btn:hover {
    color: var(--text-primary);
}
.admin-tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

.admin-container {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.admin-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.2s;
}

.admin-section:hover {
    border-color: rgba(77, 212, 172, 0.12);
}

.admin-section h2 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 700;
}

.permission-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
}

.permission-form label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.25rem;
}

.permission-form input[type="text"] {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.permission-form input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.12);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--accent);
}

.permissions-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.2s;
}

.permission-item:hover {
    border-color: rgba(77, 212, 172, 0.2);
}

.permission-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.permission-user-id {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-muted);
    font-family: monospace;
}

.permission-display-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text-primary);
}

.perm-user-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.perm-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.perm-avatar-placeholder {
    background: var(--bg-secondary);
}

.perm-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.permission-badges {
    display: flex;
    gap: 0.5rem;
}

.permission-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(77, 212, 172, 0.08);
    border: 1px solid rgba(77, 212, 172, 0.3);
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.03em;
}

.btn-danger {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    color: var(--error);
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.15);
}

#admin-transaktionen-body tr {
    cursor: default;
}

#admin-transaktionen-body .delete-btn {
    padding: 0.5rem 1rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid var(--error);
    border-radius: 6px;
    color: var(--error);
    font-weight: 600;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

#admin-transaktionen-body .delete-btn:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* === TOAST === */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255,255,255,0.04);
    transform: translateX(420px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1000;
    min-width: 300px;
    font-weight: 500;
    backdrop-filter: blur(12px);
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    border-left: 3px solid var(--success);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(16, 185, 129, 0.12);
}

.toast.error {
    border-left: 3px solid var(--error);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 24px rgba(239, 68, 68, 0.12);
}

/* === MODAL === */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.modal.show {
    display: flex;
    animation: modalFadeIn 0.2s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.modal-content {
    background: var(--bg-secondary);
    border: 1px solid rgba(77, 212, 172, 0.15);
    border-radius: 20px;
    padding: 2rem;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(77, 212, 172, 0.05);
    animation: modalSlideIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalSlideIn {
    from { transform: translateY(20px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
}

.modal-header h2 {
    font-size: 1.4rem;
    color: var(--text-primary);
    font-weight: 700;
}

.modal-close {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 1.25rem;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: rgba(77, 212, 172, 0.08);
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2rem;
}

@keyframes loginBarSlide {
    0%   { left: -40%; }
    100% { left: 140%; }
}

.form-group textarea {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    resize: vertical;
    min-height: 100px;
    transition: all 0.2s;
    line-height: 1.6;
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.12);
    background: rgba(28, 28, 38, 0.9);
}

.form-group textarea::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.form-group select {
    padding: 0.75rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg width="12" height="8" viewBox="0 0 12 8" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L6 6L11 1" stroke="%234dd4ac" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-group select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.12);
}

.form-group select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5rem;
}

/* === BUTTONS === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    text-transform: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent) 0%, #3cbf98 100%);
    color: #000000;
    border: 1px solid var(--accent);
    box-shadow: 0 2px 12px rgba(77, 212, 172, 0.25);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(77, 212, 172, 0.4);
    filter: brightness(1.08);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(77, 212, 172, 0.2);
}

.btn-secondary {
    padding: 0.75rem 1.5rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-cancel {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-cancel:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text-primary);
    border-color: rgba(255,255,255,0.12);
}

/* === FAMILIEN PAGE === */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-header .btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.kategorie-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.3rem 0.875rem;
    border-radius: 8px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.kategorie-badge.badge-mafia {
    background: rgba(157, 108, 247, 0.12);
    color: var(--purple);
    border: 1px solid rgba(157, 108, 247, 0.25);
}

.kategorie-badge.badge-gang {
    background: rgba(239, 68, 68, 0.12);
    color: var(--error);
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.kategorie-badge.badge-biker {
    background: rgba(91, 158, 247, 0.12);
    color: var(--blue);
    border: 1px solid rgba(91, 158, 247, 0.25);
}

.kategorie-header td {
    cursor: default !important;
}

.table-card table th:last-child,
.table-card table td:last-child {
    text-align: center;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.btn-icon {
    padding: 0.5rem;
    background: rgba(77, 212, 172, 0.1);
    border: 1px solid var(--accent);
    border-radius: 6px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon:hover {
    background: rgba(77, 212, 172, 0.2);
}

.btn-icon.delete {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.btn-icon.delete:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* === RESPONSIVE === */
@media (max-width: 1100px) {
    .login-screen {
        flex-direction: column;
        justify-content: center;
        padding: 3rem 1.5rem;
        gap: 2rem;
    }
    .login-left {
        width: 100%;
        max-width: 420px;
        order: 2;
    }
    .login-center-spacer { display: none; }
    .login-right {
        order: 1;
        width: 100%;
        justify-content: center;
    }
}

/* === MOBILE HEADER (nur mobil sichtbar) === */
.mobile-header {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.sidebar-close-btn {
    display: none;
}

/* === MOBILE: 768px === */
@media (max-width: 768px) {

    /* --- Mobile Header Bar --- */
    .mobile-header {
        display: flex;
        align-items: center;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 56px;
        background: rgba(13, 13, 20, 0.92);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--border);
        z-index: 200;
        padding: 0 1rem;
        gap: 0.75rem;
        box-shadow: 0 2px 16px rgba(0,0,0,0.4);
    }

    .hamburger-btn {
        width: 38px;
        height: 38px;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: 9px;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        padding: 0;
        flex-shrink: 0;
        transition: border-color 0.2s ease, background 0.2s ease;
    }

    .hamburger-btn:hover {
        border-color: var(--accent);
        background: rgba(77, 212, 172, 0.08);
    }

    .hamburger-btn span {
        display: block;
        width: 18px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 2px;
        transition: all 0.3s ease;
    }

    /* X-Animation wenn geöffnet */
    .hamburger-btn.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    .hamburger-btn.open span:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    .hamburger-btn.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .mobile-header-brand {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
    }

    .mobile-header-logo {
        width: 28px;
        height: 28px;
        object-fit: contain;
        filter: drop-shadow(0 0 6px rgba(77, 212, 172, 0.5));
    }

    .mobile-header-brand .shine-text {
        font-size: 1rem;
        font-weight: 800;
        letter-spacing: 0.2em;
        font-family: 'Inter', sans-serif;
    }

    .mobile-header-page-name {
        flex: 1;
        text-align: right;
        font-size: 0.82rem;
        font-weight: 600;
        color: var(--text-secondary);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* --- Sidebar Overlay --- */
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(3px);
        -webkit-backdrop-filter: blur(3px);
        z-index: 149;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s ease;
    }

    .sidebar-overlay.active {
        opacity: 1;
        pointer-events: all;
    }

    /* --- Sidebar als Slide-in-Drawer --- */
    .sidebar {
        position: fixed;
        left: 0;
        top: 0;
        width: 280px;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 150;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .sidebar-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        background: transparent;
        border: 1px solid var(--border);
        border-radius: 8px;
        color: var(--text-secondary);
        cursor: pointer;
        transition: all 0.2s ease;
        flex-shrink: 0;
        margin-left: auto;
        padding: 0;
    }

    .sidebar-close-btn:hover {
        border-color: var(--accent);
        color: var(--accent);
        background: rgba(77, 212, 172, 0.08);
    }

    /* --- Main Content: unter mobile header --- */
    .main-app {
        flex-direction: column;
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.25rem 0.875rem;
        padding-top: calc(56px + 1.25rem); /* mobile header height */
    }

    /* Collapse-Button auf Mobile komplett ausblenden */
    .sidebar-collapse-btn {
        display: none !important;
    }

    /* Sidebar-Texte auf Mobile immer sichtbar (kein collapsed-Modus) */
    .sidebar.collapsed .sidebar-header h2,
    .sidebar.collapsed .nav-item span:not(.nav-badge),
    .sidebar.collapsed .user-details,
    .sidebar.collapsed .online-count {
        max-width: 200px;
        opacity: 1;
        pointer-events: auto;
    }

    .sidebar.collapsed .online-players-widget {
        display: flex;
    }

    .sidebar.collapsed .sidebar-header {
        padding: 1.5rem;
        justify-content: flex-start;
        gap: 1rem;
    }

    .sidebar.collapsed .sidebar-nav {
        padding: 1.25rem 0.875rem;
        align-items: stretch;
    }

    .sidebar.collapsed .nav-item {
        padding: 0.8rem 1rem;
        justify-content: flex-start;
        gap: 0.75rem;
    }

    .sidebar.collapsed .sidebar-footer {
        padding: 1rem;
        align-items: stretch;
    }

    .sidebar.collapsed .sidebar-footer-row {
        flex-direction: row;
        gap: 0;
        align-items: center;
    }

    .sidebar.collapsed .user-info {
        justify-content: flex-start;
        flex: 1;
    }

    /* --- Grids auf 1 Spalte --- */
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .kassen-grid {
        grid-template-columns: 1fr;
    }

    /* --- Seitenheader kompakter --- */
    .page-header {
        margin-bottom: 1.25rem;
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .page-header h1 {
        font-size: 1.4rem;
    }

    /* --- Buttons im Header kleiner --- */
    .page-header .btn {
        padding: 0.55rem 0.875rem;
        font-size: 0.82rem;
    }

    /* --- Stat Cards kompakter --- */
    .stat-card {
        padding: 1.25rem;
    }

    /* --- Tabellen: horizontal scrollbar --- */
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 500px;
    }

    /* --- Management Member Rows mobil --- */
    .management-member-row {
        padding: 0.6rem 1rem;
        gap: 0.6rem;
    }

    /* --- Modal: nahezu fullscreen auf Mobile --- */
    .modal-content {
        width: 96%;
        max-width: 96%;
        margin: 0 auto;
        padding: 1.5rem 1.25rem;
        border-radius: 16px;
        max-height: 88vh;
    }

    .modal-actions {
        flex-direction: column-reverse;
        gap: 0.625rem;
    }

    .modal-actions .btn {
        width: 100%;
        justify-content: center;
    }

    /* --- Kasse kompakter --- */
    .kasse-card {
        padding: 1.5rem;
    }

    .kasse-header {
        gap: 1rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }

    .kasse-icon {
        width: 52px;
        height: 52px;
    }

    /* --- Rank-Select in Sanktionen-Formular --- */
    .rank-select, select {
        min-width: 0;
        width: 100%;
    }

    /* --- Online Widget im Sidebar-Footer kleiner --- */
    .online-avatar-wrap {
        width: 26px;
        height: 26px;
    }
    .online-avatar-wrap img {
        width: 26px;
        height: 26px;
    }
    .online-avatar-extra {
        width: 26px;
        height: 26px;
        font-size: 0.6rem;
    }

    /* --- Map / Routen Page --- */
    #map-container {
        height: 65vw;
        min-height: 260px;
    }
}

/* === MOBILE XS: 480px === */
@media (max-width: 480px) {
    .login-box {
        padding: 2.5rem 1.5rem;
        border-radius: 18px;
    }

    .login-box h1 {
        font-size: 2rem;
        letter-spacing: 0.2em;
    }

    .login-subtitle {
        font-size: 0.85rem;
    }

    .mobile-header {
        height: 52px;
    }

    .main-content {
        padding: 0.875rem 0.75rem;
        padding-top: calc(52px + 0.875rem);
        margin-left: 0 !important;
    }

    .page-header h1 {
        font-size: 1.2rem;
    }

    .stat-value {
        font-size: 1.5rem;
    }

    /* Management Avatar noch kleiner */
    .management-member-row .member-avatar-small {
        width: 30px;
        height: 30px;
        min-width: 30px;
    }

    .rank-group-header {
        padding: 0.5rem 0.875rem;
        font-size: 0.78rem;
    }

    .modal-content {
        padding: 1.25rem 1rem;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }
}


/* === KASSEN PAGE === */
.kassen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 2rem;
}

.kasse-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.kasse-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(255,255,255,0.02) 0%, transparent 50%);
    pointer-events: none;
}

.kasse-card.green {
    border-top: 2px solid var(--success);
    box-shadow: var(--shadow-sm), 0 -1px 0 var(--success), 0 0 30px rgba(16, 185, 129, 0.05);
}

.kasse-card.purple {
    border-top: 2px solid var(--purple);
    box-shadow: var(--shadow-sm), 0 -1px 0 var(--purple), 0 0 30px rgba(157, 108, 247, 0.05);
}

.kasse-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md);
}

.kasse-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.kasse-icon {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.kasse-card.green .kasse-icon {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    box-shadow: 0 0 24px rgba(16, 185, 129, 0.15);
}

.kasse-card.purple .kasse-icon {
    background: rgba(157, 108, 247, 0.1);
    color: var(--purple);
    box-shadow: 0 0 24px rgba(157, 108, 247, 0.15);
}

.kasse-info {
    flex: 1;
}

.kasse-info h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.kasse-betrag {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.kasse-form {
    margin-top: 1.5rem;
}

.kasse-form-inner .form-group {
    margin-bottom: 1.25rem;
}

.button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.btn-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-action.einzahlen {
    background: linear-gradient(135deg, var(--success) 0%, #0ea773 100%);
    color: #000000;
}

.btn-action.einzahlen:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
    filter: brightness(1.08);
}

.btn-action.auszahlen {
    background: linear-gradient(135deg, var(--error) 0%, #dc2626 100%);
    color: #ffffff;
}

.btn-action.auszahlen:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
    filter: brightness(1.08);
}

/* === ADMIN MITGLIEDER === */
.admin-members-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.member-search-input {
    padding: 0.625rem 1rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.875rem;
    width: 260px;
    transition: all 0.2s;
}

.member-search-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(77, 212, 172, 0.12);
}

.members-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

.members-table thead th {
    padding: 0.875rem 1rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    white-space: nowrap;
}

.members-table tbody td {
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

.members-table tbody tr:hover {
    background: var(--bg-tertiary);
}

.member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.member-avatar-small {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
    transition: border-color 0.2s;
}

.members-table tbody tr:hover .member-avatar-small {
    border-color: rgba(77, 212, 172, 0.4);
}

.member-display-name {
    font-weight: 600;
    font-size: 0.875rem;
}

.member-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 5px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.member-badge.admin {
    background: rgba(139, 92, 246, 0.15);
    color: var(--purple);
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.member-badge.kassen {
    background: rgba(77, 212, 172, 0.15);
    color: var(--accent);
    border: 1px solid rgba(77, 212, 172, 0.3);
}

.member-badge.explicit {
    background: rgba(59, 130, 246, 0.15);
    color: var(--blue);
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.member-badge.member {
    background: rgba(160, 160, 160, 0.1);
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.member-badge.none {
    background: rgba(102, 102, 102, 0.08);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.small-btn {
    padding: 0.375rem 0.875rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid;
}

.btn-grant {
    background: rgba(77, 212, 172, 0.1);
    border-color: var(--accent);
    color: var(--accent);
}

.btn-grant:hover {
    background: rgba(77, 212, 172, 0.2);
}

.btn-revoke {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--error);
    color: var(--error);
}

.btn-revoke:hover {
    background: rgba(239, 68, 68, 0.2);
}

/* === MANAGEMENT PAGE === */
.rank-group-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
    border-left: 3px solid transparent;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.75rem;
}

.rank-group-header.rank-top {
    color: #f5c842;
    border-left-color: #f5c842;
    background: rgba(245, 200, 66, 0.06);
}

.rank-group-header.rank-mint {
    color: var(--accent);
    border-left-color: var(--accent);
    background: rgba(77, 212, 172, 0.05);
}

.rank-group-header .rank-name {
    flex: 1;
    font-weight: 700;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.rank-number {
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--text-muted);
    min-width: 28px;
}

.management-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.75rem 1.5rem 0.75rem 1.65rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
    transition: background 0.2s;
}

.management-member-row:hover {
    background: rgba(77, 212, 172, 0.025);
}

.management-member-row .member-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
    flex: 1;
}

.management-member-row .member-avatar-small {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    border: 2px solid var(--border);
}

.management-member-row .member-text {
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.management-member-row .member-display-name {
    font-weight: 600;
    font-size: 0.875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.management-member-row .member-username {
    font-size: 0.75rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.management-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-shrink: 0;
}

/* === PROFILE CARD === */
.profile-brett-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
    align-items: start;
}

@media (max-width: 900px) {
    .profile-brett-row {
        grid-template-columns: 1fr;
    }
}

.profile-brett-row .profile-card {
    margin-top: 0;
    margin-bottom: 0;
    height: 100%;
}

.profile-brett-row .brett-section {
    margin-bottom: 0;
    height: 100%;
}

.profile-card {
    margin-top: 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: border-color 0.3s;
}

.profile-card:hover {
    border-color: rgba(77, 212, 172, 0.2);
}

.profile-card-loading {
    padding: 2rem;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.profile-card-content {
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    flex-wrap: wrap;
    position: relative;
}

.profile-card-left {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.profile-avatar-large {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    border: 3px solid var(--accent);
    object-fit: cover;
    box-shadow: 0 0 0 4px rgba(77, 212, 172, 0.12), 0 0 24px rgba(77, 212, 172, 0.25);
}

.profile-rank-badge {
    display: none;
    padding: 0.35rem 1rem;
    background: rgba(77, 212, 172, 0.1);
    border: 1px solid rgba(77, 212, 172, 0.4);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    white-space: nowrap;
    box-shadow: 0 0 12px rgba(77, 212, 172, 0.12);
}

.profile-punkte-badge {
    display: none;
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}
.profile-punkte-badge.pos {
    background: rgba(74, 222, 128, 0.12);
    border: 1px solid rgba(74, 222, 128, 0.45);
    color: #4ade80;
    box-shadow: 0 0 10px rgba(74, 222, 128, 0.12);
}
.profile-punkte-badge.neg {
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.45);
    color: #f87171;
    box-shadow: 0 0 10px rgba(248, 113, 113, 0.12);
}
.profile-punkte-badge.zero {
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.3);
    color: var(--text-secondary);
}

.profile-card-right {
    flex: 1;
    min-width: 220px;
}

.profile-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.profile-detail-row {
    display: flex;
    gap: 0.75rem;
    align-items: baseline;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border);
}

.profile-detail-row:last-child {
    border-bottom: none;
}

.profile-detail-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 130px;
    flex-shrink: 0;
}

.profile-detail-value {
    font-size: 0.875rem;
    color: var(--text-primary);
    font-weight: 500;
    word-break: break-all;
}

/* Wochenabgabe Banner im Profil */
.profile-abgabe-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.7rem 0.9rem;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 0.5rem;
    border: 1px solid transparent;
}

.profile-abgabe-banner svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.profile-abgabe-banner.abgabe-ok {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.3);
    color: #10b981;
}

.profile-abgabe-banner.abgabe-missing {
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.3);
    color: #f87171;
}

.profile-abgabe-banner.abgabe-missing strong {
    color: #fca5a5;
}

.profile-abgabe-banner.abgabe-warn {
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.35);
    color: #fbbf24;
}

.profile-abgabe-banner.abgabe-warn strong {
    color: #fde68a;
}

.profile-abgabe-banner.abgabe-none {
    background: rgba(136, 136, 170, 0.07);
    border-color: rgba(136, 136, 170, 0.2);
    color: var(--text-secondary);
}
.profile-abgabe-banner.abgabe-freigestellt {
    background: rgba(245, 158, 11, 0.07);
    border-color: rgba(245, 158, 11, 0.3);
    color: #f59e0b;
}
.profile-abgabe-banner.abgabe-freigestellt svg {
    color: #f59e0b;
    flex-shrink: 0;
}

/* === LAGER PAGE === */
.lager-filter-bar {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.lager-filter-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter', sans-serif;
}

.lager-filter-btn:hover {
    border-color: rgba(77, 212, 172, 0.4);
    color: var(--accent);
    background: var(--accent-dim);
}

.lager-filter-btn.active {
    background: rgba(77, 212, 172, 0.1);
    border-color: rgba(77, 212, 172, 0.4);
    color: var(--accent);
    box-shadow: 0 0 12px rgba(77, 212, 172, 0.08);
}

.lager-group {
    margin-bottom: 1.5rem;
}

.lager-group-header {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    padding: 0.75rem 0 0.5rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

.lager-items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}

.lager-item-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.lager-item-card:hover {
    border-color: var(--border-hover);
    box-shadow: var(--shadow-md), 0 0 20px rgba(77, 212, 172, 0.06);
    transform: translateY(-2px);
}

.lager-item-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.lager-item-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    flex: 1;
}

.lager-item-actions {
    display: flex;
    gap: 0.25rem;
}

.lager-icon-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 0.2rem;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s, background 0.2s;
}

.lager-icon-btn:hover {
    opacity: 1;
    background: var(--bg-tertiary);
}

.lager-icon-btn.danger:hover {
    background: rgba(239, 68, 68, 0.12);
}

.lager-item-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.lager-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
}

.lager-menge {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.lager-menge-num {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
}

.lager-menge-unit {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.lager-menge.lager-menge-ok .lager-menge-num { color: var(--accent); }
.lager-menge.lager-menge-low .lager-menge-num { color: var(--warning, #f59e0b); }
.lager-menge.lager-menge-empty .lager-menge-num { color: var(--error); }

.lager-menge-btn {
    padding: 0.4rem 0.6rem;
    border-radius: 7px;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s, opacity 0.15s;
    line-height: 1;
}

.lager-menge-btn:hover { transform: scale(1.12); opacity: 0.85; }

.lager-menge-btn.btn-in {
    background: rgba(77, 212, 172, 0.12);
}

.lager-menge-btn.btn-out {
    background: rgba(239, 68, 68, 0.1);
}

/* === RANK SELECT DROPDOWN (Management) === */
.rank-select {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    padding: 0.4rem 0.7rem;
    cursor: pointer;
    min-width: 170px;
    max-width: 220px;
    transition: border-color 0.2s;
}
.rank-select:hover { border-color: var(--accent); }
.rank-select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px rgba(77,212,172,0.15); }
.rank-select:disabled { opacity: 0.45; cursor: not-allowed; }

/* === WOCHENABGABEN === */
.abgabe-members-list {
    display: flex;
    flex-direction: column;
}
.abgabe-member-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
    border-left: 3px solid transparent;
}
.abgabe-member-row:last-child { border-bottom: none; }
.abgabe-row-green {
    border-left-color: var(--accent);
    background: rgba(77, 212, 172, 0.035);
}
.abgabe-row-green:hover { background: rgba(77, 212, 172, 0.07); }
.abgabe-row-red {
    border-left-color: var(--error);
    background: rgba(239, 68, 68, 0.03);
}
.abgabe-row-red:hover { background: rgba(239, 68, 68, 0.07); }
.abgabe-row-freigestellt {
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.04);
    opacity: 0.85;
}
.abgabe-row-freigestellt:hover { background: rgba(245, 158, 11, 0.08); opacity: 1; }

/* ===========================
   NAV BADGE
   =========================== */
.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--error);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 99px;
    margin-left: auto;
    line-height: 1;
}

.nav-separator {
    height: 1px;
    background: var(--border);
    margin: 0.5rem 0.75rem;
    opacity: 0.5;
}

/* Offene Sanktion Badge in Profilkarte */
.profile-sanktion-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #ef4444;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.3rem 0.75rem;
    border-radius: 99px;
    animation: sanktionPulse 1.8s ease-in-out infinite;
    z-index: 2;
}

@keyframes sanktionPulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(239,68,68,0.3); }
    50%       { opacity: 0.7; box-shadow: 0 0 0 5px rgba(239,68,68,0); }
}

/* ===========================
   KASSEN CHART
   =========================== */
.chart-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.chart-container {
    position: relative;
    height: 240px;
    width: 100%;
}

/* ===========================
   SCHWARZES BRETT
   =========================== */
.brett-section {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.75rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}
.brett-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}
.brett-post {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 1rem 1.25rem;
    transition: border-color 0.2s;
}
.brett-post.pinned {
    border-color: var(--accent);
    background: rgba(77, 212, 172, 0.04);
}
.brett-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.brett-post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.brett-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
}
.brett-author {
    font-weight: 700;
    font-size: 0.88rem;
}
.brett-pin-badge {
    font-size: 0.72rem;
    background: rgba(77,212,172,0.15);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 99px;
    font-weight: 600;
}
.brett-date {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.brett-post-title {
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}
.brett-post-content {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
}
.brett-post-actions {
    margin-top: 0.75rem;
    display: flex;
    gap: 0.5rem;
}
.btn-sm {
    font-size: 0.8rem;
    padding: 0.3rem 0.75rem;
}
.btn-danger {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    color: var(--error);
}
.btn-danger:hover {
    background: rgba(239,68,68,0.25);
}

/* ===========================
   KALENDER
   =========================== */
.kalender-nav-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.kalender-grid-wrapper {
    margin-bottom: 1rem;
}
.kalender-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 4px;
}
.kalender-weekdays span {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-muted);
    padding: 4px 0;
}
.kalender-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.kalender-cell {
    min-height: 72px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 7px;
    padding: 5px 6px;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow: hidden;
}
.kalender-cell:hover {
    border-color: var(--accent);
    background: rgba(77,212,172,0.05);
}
.kalender-cell.empty {
    background: transparent;
    border-color: transparent;
    cursor: default;
    pointer-events: none;
}
.kalender-cell.today {
    border-color: var(--accent);
    background: rgba(77,212,172,0.08);
}
.kalender-cell.has-termine .kalender-day-num {
    color: var(--text-primary);
}
.kalender-day-num {
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
}
.kalender-chips {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 2px;
}
.kalender-chip {
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(77,212,172,0.15);
    color: var(--accent);
    border-left: 2px solid var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.kalender-chip.wichtig {
    background: rgba(239,68,68,0.15);
    color: #f87171;
    border-left-color: var(--error);
}
.kalender-chip.chip-restricted {
    border-left-color: #a855f7;
    background: rgba(168,85,247,0.12);
    color: #c084fc;
}
.kalender-chip.chip-geburtstag {
    background: rgba(251,113,133,0.18);
    color: #fb7185;
    border-left-color: #f43f5e;
}
.kalender-chip.chip-urlaub {
    background: rgba(77,212,172,0.13);
    color: var(--accent);
    border-left-color: var(--accent);
}
.kalender-chip.chip-abmeldung {
    background: rgba(245,158,11,0.13);
    color: #f59e0b;
    border-left-color: #f59e0b;
}
.chip-zielgruppe {
    display: inline-block;
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0.8;
    margin-left: 2px;
}
/* Alte dot-Klassen beibehalten für Kompatibilität */
.kalender-dots { display: flex; flex-wrap: wrap; gap: 2px; margin-top: 2px; }
.kalender-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--blue); }
.kalender-dot.wichtig { background: var(--error); }
.kalender-termin-item {
    padding: 0.6rem 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}
.kalender-termin-item.wichtig {
    border-color: rgba(239,68,68,0.5);
    background: rgba(239,68,68,0.04);
}
.kalender-urlaub-list, .kalender-upcoming-list {
    font-size: 0.85rem;
}

/* Tages-Termine Modal */
.day-termin-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 0.75rem 1rem;
}
.day-termin-entry.wichtig {
    border-left-color: var(--error);
    background: rgba(239,68,68,0.04);
}
.day-termin-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}
.day-termin-icon { font-size: 1rem; }
.day-termin-title {
    font-weight: 700;
    font-size: 0.95rem;
    flex: 1;
}
.day-termin-time {
    font-size: 0.8rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 12px;
}
.day-termin-desc {
    margin-top: 0.4rem;
    font-size: 0.83rem;
    color: var(--text-secondary);
    line-height: 1.4;
}
.day-termin-zielgruppe {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: var(--text-muted);
    display: inline-block;
    background: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 12px;
}
.day-termin-actions {
    margin-top: 0.5rem;
    display: flex;
    gap: 0.4rem;
}

/* ===========================
   DEALS
   =========================== */
.deals-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 1.25rem;
}
@media (max-width: 600px) {
    .deals-grid { grid-template-columns: 1fr; }
}

/* ===========================
   KARTE / ROUTEN
   =========================== */
#gta-map-container {
    position: relative;
    width: 100%;
    height: auto;
    background: #1a1a2e;
    cursor: crosshair;
    user-select: none;
    overflow: hidden;
}
@keyframes pulse {
    0%, 100% { box-shadow: 0 0 6px 0 rgba(245,158,11,0.8); }
    50% { box-shadow: 0 0 14px 6px rgba(245,158,11,0.4); }
}
@keyframes spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
@keyframes markerPing {
    0%   { transform: scale(1);   opacity: 1; }
    80%  { transform: scale(2.8); opacity: 0.2; }
    100% { transform: scale(3.2); opacity: 0; }
}

@keyframes markerEditPulse {
    0%, 100% { transform: scale(1);    box-shadow: 0 0 8px currentColor; }
    50%       { transform: scale(1.25); box-shadow: 0 0 18px currentColor, 0 0 0 5px rgba(245,158,11,0.25); }
}

/* === MARKER TOOLTIP === */
.marker-tooltip {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    white-space: nowrap;
    background: rgba(8, 8, 18, 0.96);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 0.45rem 0.75rem;
    z-index: 999;
    box-shadow: 0 4px 20px rgba(0,0,0,0.75);
    /* kein transition auf opacity/visibility → sofort sichtbar, nur leichtes Slide */
    transition: transform 0.12s ease;
    will-change: transform;
}
.marker-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(8, 8, 18, 0.96);
}
.marker-tooltip.visible {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.marker-tooltip-title {
    font-size: 0.75rem;
    font-weight: 600;
    color: #f0f0ff;
    letter-spacing: 0.02em;
    line-height: 1.3;
}
.marker-tooltip-del {
    margin-top: 0.3rem;
    display: flex;
}

/* ===========================
   LOG
   =========================== */
#log-body tr:hover {
    background: rgba(255,255,255,0.03);
}

/* ===========================
   KANBAN BOARD
   =========================== */
.kanban-board {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    align-items: start;
    margin-top: 0.5rem;
}
@media (max-width: 768px) {
    .kanban-board { grid-template-columns: 1fr; }
}
.kanban-column {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}
.kanban-column-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border);
}
.kanban-column-header.kanban-offen         { background: rgba(99,102,241,0.12); color: #818cf8; }
.kanban-column-header.kanban-in_bearbeitung{ background: rgba(245,158,11,0.12); color: #fbbf24; }
.kanban-column-header.kanban-erledigt      { background: rgba(34,197,94,0.12);  color: #4ade80; }
.kanban-count {
    background: rgba(255,255,255,0.1);
    border-radius: 99px;
    padding: 1px 8px;
    font-size: 0.78rem;
}
.kanban-cards {
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    min-height: 80px;
}
.kanban-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.75rem;
    border-left: 3px solid transparent;
}
.kanban-card.prio-hoch    { border-left-color: var(--error); }
.kanban-card.prio-normal  { border-left-color: #fbbf24; }
.kanban-card.prio-niedrig { border-left-color: var(--accent); }
.kanban-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}
.kanban-card-desc {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
    line-height: 1.4;
}
.kanban-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.3rem;
    flex-wrap: wrap;
}
.kanban-prio-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 99px;
    background: rgba(255,255,255,0.07);
}
.kanban-card-assigned {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-bottom: 0.4rem;
}
.kanban-assigned-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.25);
    border-radius: 99px;
    padding: 2px 8px 2px 6px;
}
.kanban-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.4rem;
    flex-wrap: wrap;
    gap: 0.3rem;
}

/* ===========================
   MITGLIEDER-NOTIZEN
   =========================== */
.notiz-entry {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 8px;
    padding: 0.65rem 0.85rem;
}
.notiz-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.35rem;
    flex-wrap: wrap;
}
.notiz-author {
    font-weight: 700;
    font-size: 0.82rem;
    color: var(--accent);
}
.notiz-date {
    font-size: 0.75rem;
    color: var(--text-muted);
    flex: 1;
}
.notiz-inhalt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
}

/* ===========================
   DISCORD SYNC
   =========================== */
.sync-stat-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.85rem 1.25rem;
    text-align: center;
    min-width: 120px;
}
.sync-stat-box.sync-stat-warn {
    border-color: rgba(239,68,68,0.4);
    background: rgba(239,68,68,0.06);
}
.sync-member-card {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
}

/* ===========================
   PRELOADER
   =========================== */
#preloader {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary, #080812);
}
#preloader-bg {
    position: absolute;
    inset: 0;
    background: url('background.png') center/cover no-repeat;
    filter: brightness(0.18) blur(6px);
    transform: scale(1.05);
}
.preloader-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    animation: preloaderFadeIn 0.5s ease both;
}
@keyframes preloaderFadeIn {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.preloader-ring {
    position: relative;
    width: 120px;
    height: 120px;
}
.preloader-ring svg {
    width: 120px;
    height: 120px;
    animation: preloaderSpin 1.6s linear infinite;
    transform-origin: center;
}
@keyframes preloaderSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.preloader-track {
    stroke: rgba(255,255,255,0.07);
}
.preloader-arc {
    stroke: var(--accent, #f59e0b);
    filter: drop-shadow(0 0 8px var(--accent, #f59e0b));
    animation: preloaderSpin 1.6s linear infinite, preloaderArcPulse 1.6s ease-in-out infinite;
}
@keyframes preloaderArcPulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0.6; }
}
.preloader-logo {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    object-fit: contain;
    filter: drop-shadow(0 0 10px rgba(245,158,11,0.5));
    animation: logoPulse 2s ease-in-out infinite;
}
.preloader-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.preloader-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}
.preloader-status {
    font-size: 0.85rem;
    color: var(--text-muted, #888);
    letter-spacing: 0.04em;
    transition: opacity 0.3s;
}
.preloader-steps {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
    min-width: 200px;
    max-width: 280px;
}
.preloader-step {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: var(--text-muted, #888);
    opacity: 0.5;
    transition: opacity 0.3s, color 0.3s;
}
.preloader-step.done {
    opacity: 1;
    color: var(--text-secondary, #ccc);
}
.preloader-step.active {
    opacity: 1;
    color: var(--accent, #f59e0b);
}
.preloader-step-icon {
    width: 16px;
    height: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.preloader-step.done  .preloader-step-icon::before { content: '✓'; font-size: 0.75rem; color: #4ade80; }
.preloader-step.active .preloader-step-icon::before { content: ''; display: block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #f59e0b); animation: preloaderDotPulse 0.8s ease-in-out infinite; }
.preloader-step:not(.done):not(.active) .preloader-step-icon::before { content: '○'; font-size: 0.7rem; }
@keyframes preloaderDotPulse {
    0%, 100% { transform: scale(1);   opacity: 1; }
    50%       { transform: scale(1.4); opacity: 0.6; }
}
/* Fade-out Animation */
#preloader.fade-out {
    animation: preloaderFadeOut 0.5s ease forwards;
}
@keyframes preloaderFadeOut {
    from { opacity: 1; }
    to   { opacity: 0; pointer-events: none; }
}

/* ===========================
   ASSIGN-PICKER (Multi-Select)
   =========================== */
.assign-picker {
    position: relative;
}
.assign-chips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    min-height: 42px;
    padding: 0.4rem 0.6rem;
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: text;
    transition: border-color 0.2s;
}
.assign-chips:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(245,158,11,0.15);
}
.assign-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(77, 212, 172, 0.12);
    border: 1px solid rgba(77, 212, 172, 0.3);
    border-radius: 99px;
    padding: 2px 6px 2px 8px;
    white-space: nowrap;
}
.assign-chip-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    cursor: pointer;
    font-size: 0.7rem;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.15s;
}
.assign-chip-remove:hover {
    background: rgba(239,68,68,0.35);
}
.assign-search {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 0.85rem;
    outline: none;
    min-width: 120px;
    flex: 1;
    padding: 2px 0;
}
.assign-search::placeholder {
    color: var(--text-muted);
}
.assign-dropdown {
    display: none;
    position: fixed;
    background: #1c1c26;
    border: 1px solid rgba(77, 212, 172, 0.2);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.8);
    z-index: 9999;
    max-height: 200px;
    overflow-y: auto;
}
.assign-dropdown.open {
    display: block;
}
.assign-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s;
    color: var(--text-primary);
}
.assign-option:hover,
.assign-option.focused {
    background: rgba(77, 212, 172, 0.1);
}
.assign-option.selected {
    color: var(--accent);
}
.assign-option-check {
    width: 14px;
    font-size: 0.75rem;
    flex-shrink: 0;
    color: var(--accent);
}
.assign-empty {
    padding: 0.75rem;
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

/* Führungsstruktur – Namen stärker hervorheben */
.login-rank-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}
.rank-gold   .login-rank-name { color: #e8c84a; }
.rank-silver .login-rank-name { color: #d4d4e8; }
.rank-bronze .login-rank-name { color: #dba06a; }
.rank-accent .login-rank-name { color: #7ee8cc; }

.login-rank-desc {
    font-size: 0.82rem;
    font-weight: 500;
    color: rgba(255,255,255,0.75);
    margin-top: 0.25rem;
    line-height: 1.5;
    white-space: pre-line;
}

/* ===========================
   MITGLIEDER-BEREICH
   =========================== */
.mitglieder-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* ---- Toolbar ---- */
.mitglieder-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.mitglieder-search-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    flex: 1;
    min-width: 160px;
    max-width: 320px;
    color: var(--text-muted);
}
.mitglieder-search-wrap input {
    background: none;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 0.85rem;
    width: 100%;
}
.mitglieder-filter-select {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    color: var(--text-primary);
    font-size: 0.82rem;
    cursor: pointer;
    outline: none;
}
.mitglieder-view-toggle {
    display: flex;
    gap: 2px;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 3px;
}
.view-toggle-btn {
    background: none;
    border: none;
    border-radius: 7px;
    padding: 0.35rem 0.6rem;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
}
.view-toggle-btn.active {
    background: var(--accent);
    color: #0d1117;
}
.mitglieder-count-badge {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

/* ---- Grid View ---- */
#mitglieder-grid.view-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.85rem;
}
.mitglied-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 1.1rem 1rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    cursor: pointer;
    transition: background 0.18s, transform 0.15s, border-color 0.18s, box-shadow 0.18s;
    position: relative;
    overflow: hidden;
}
.mitglied-card:hover {
    background: rgba(255,255,255,0.07);
    border-color: rgba(77,212,172,0.35);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(77,212,172,0.08);
}
.mitglied-card.abwesend {
    border-color: rgba(251,191,36,0.3);
    opacity: 0.8;
}
.mitglied-card-top {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.mitglied-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
}
.mitglied-info {
    flex: 1;
    min-width: 0;
}
.mitglied-name {
    font-weight: 700;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-primary);
}
.mitglied-rang {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 1px;
}
.mitglied-punkte-inline {
    font-size: 0.72rem;
    font-weight: 700;
    margin-left: auto;
    flex-shrink: 0;
    padding: 2px 8px;
    border-radius: 20px;
}
.mitglied-punkte-inline.pos { color: #4ade80; background: rgba(74,222,128,0.1); border: 1px solid rgba(74,222,128,0.25); }
.mitglied-punkte-inline.neg { color: #f87171; background: rgba(248,113,113,0.1); border: 1px solid rgba(248,113,113,0.25); }
.mitglied-punkte-inline.zero { color: var(--text-muted); background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.2); }
.mitglied-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}
.mitglied-badge {
    font-size: 0.67rem;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 600;
}
.mitglied-badge.abwesend-badge {
    background: rgba(251,191,36,0.15);
    color: #fbbf24;
    border: 1px solid rgba(251,191,36,0.3);
}
.mitglied-badge.score-badge {
    background: rgba(77,212,172,0.12);
    color: var(--accent);
    border: 1px solid rgba(77,212,172,0.25);
}
.mitglied-badge.task-badge {
    background: rgba(167,139,250,0.12);
    color: #a78bfa;
    border: 1px solid rgba(167,139,250,0.25);
}
.mitglied-badge.geburtstag-badge {
    background: rgba(251,113,133,0.15);
    color: #f43f5e;
    border: 1px solid rgba(251,113,133,0.3);
    animation: pulse-badge 2s infinite;
}
@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.mitglied-score-bar {
    height: 3px;
    border-radius: 2px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
}
.mitglied-score-fill {
    height: 100%;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), #7ee8cc);
    transition: width 0.4s ease;
}

/* ---- List View ---- */
#mitglieder-grid.view-list {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
#mitglieder-grid.view-list .mitglied-card {
    flex-direction: row;
    align-items: center;
    padding: 0.65rem 1rem;
    gap: 0.85rem;
    border-radius: 10px;
}
#mitglieder-grid.view-list .mitglied-card:hover {
    transform: none;
}
#mitglieder-grid.view-list .mitglied-card-top {
    flex: 1;
    min-width: 0;
}
#mitglieder-grid.view-list .mitglied-score-bar { display: none; }
#mitglieder-grid.view-list .mitglied-badges { flex-wrap: nowrap; overflow: hidden; }

/* ---- Rangliste View ---- */
#mitglieder-grid.view-rangliste {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.rangliste-podium {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: end;
}
.podium-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 0.75rem 1.25rem;
    border-radius: 14px;
    cursor: pointer;
    transition: transform 0.15s;
    position: relative;
}
.podium-item:hover { transform: translateY(-3px); }
.podium-item.p1 { background: linear-gradient(160deg, rgba(232,200,74,0.15), rgba(232,200,74,0.05)); border: 1px solid rgba(232,200,74,0.4); order: 2; padding-bottom: 1.75rem; }
.podium-item.p2 { background: linear-gradient(160deg, rgba(212,212,232,0.1), rgba(212,212,232,0.04)); border: 1px solid rgba(212,212,232,0.3); order: 1; }
.podium-item.p3 { background: linear-gradient(160deg, rgba(219,160,106,0.1), rgba(219,160,106,0.04)); border: 1px solid rgba(219,160,106,0.3); order: 3; }
.podium-crown {
    font-size: 1.4rem;
    line-height: 1;
}
.podium-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,0.15);
}
.podium-item.p1 .podium-avatar { width: 68px; height: 68px; border-color: rgba(232,200,74,0.6); box-shadow: 0 0 20px rgba(232,200,74,0.3); }
.podium-item.p2 .podium-avatar { border-color: rgba(212,212,232,0.5); }
.podium-item.p3 .podium-avatar { border-color: rgba(219,160,106,0.5); }
.podium-name { font-size: 0.82rem; font-weight: 700; color: var(--text-primary); text-align: center; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.podium-punkte { font-size: 0.78rem; font-weight: 800; }
.podium-item.p1 .podium-punkte { color: #e8c84a; }
.podium-item.p2 .podium-punkte { color: #d4d4e8; }
.podium-item.p3 .podium-punkte { color: #dba06a; }
.podium-rang-label { font-size: 0.68rem; color: var(--text-muted); text-align: center; }
.rangliste-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.6rem 0.75rem;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.15s;
}
.rangliste-row:hover { background: rgba(255,255,255,0.05); }
.rangliste-row + .rangliste-row { border-top: 1px solid rgba(255,255,255,0.04); }
.rangliste-pos { font-size: 0.78rem; font-weight: 700; color: var(--text-muted); min-width: 24px; text-align: right; }
.rangliste-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.rangliste-info { flex: 1; min-width: 0; }
.rangliste-name { font-size: 0.85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rangliste-sub { font-size: 0.71rem; color: var(--text-muted); }
.rangliste-pts { font-size: 0.8rem; font-weight: 800; margin-left: auto; }
.rangliste-pts.pos { color: #4ade80; }
.rangliste-pts.neg { color: #f87171; }
.rangliste-pts.zero { color: var(--text-muted); }

.geburtstags-banner-inner {
    background: linear-gradient(135deg, rgba(251,113,133,0.15), rgba(251,191,36,0.12));
    border: 1px solid rgba(251,113,133,0.3);
    border-radius: 12px;
    padding: 0.85rem 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.score-tier-gold   { color: #e8c84a; }
.score-tier-silver { color: #d4d4e8; }
.score-tier-bronze { color: #dba06a; }
.score-tier-basic  { color: var(--accent); }

/* ===========================
   KASSEN-ERWEITERUNGEN
   =========================== */

/* Kategorie Badge */
.badge-kategorie {
    background: rgba(245,158,11,0.15);
    color: #f59e0b;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Chart Tabs */
.kassen-chart-tab {
    padding: 0.35rem 0.75rem !important;
    font-size: 0.8rem !important;
    border-radius: 6px !important;
    transition: all 0.2s ease;
}
.kassen-chart-tab.active {
    background: var(--accent) !important;
    color: var(--bg-primary) !important;
    border-color: var(--accent) !important;
}

/* Chart Container */
.chart-container-kasse {
    position: relative;
    min-height: 280px;
}
.chart-container-kasse canvas {
    max-height: 320px;
}

/* Kasse Kategorie Select in Form */
.kassen-kategorie-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.85rem;
}
.kassen-kategorie-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(77,212,172,0.15);
}

@media (max-width: 768px) {
    .chart-container-kasse canvas {
        max-height: 220px;
    }
}
