/* CSS Variables - Dark Space Design */
:root {
    --primary-color: #ef4444;
    --primary-dark: #dc2626;
    --primary-light: #f87171;
    --secondary-color: #ffffff;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --light-color: rgba(255, 255, 255, 0.05);
    --dark-color: #0a0a0f;
    --border-color: rgba(255, 255, 255, 0.1);
    --text-muted: rgba(255, 255, 255, 0.6);
    
    /* Background */
    --bg-main: #0a0a0f;
    --bg-card: rgba(255, 255, 255, 0.05);
    --bg-input: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    --gradient-dark: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    --gradient-fire: linear-gradient(135deg, #ef4444 0%, #f97316 100%);
    
    /* Glass Effect */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6);
    --shadow-glow: 0 0 30px rgba(239, 68, 68, 0.3);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius: 16px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    
    /* Transitions */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Animated Stars Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at top, #1a1a2e 0%, transparent 50%),
        radial-gradient(ellipse at bottom right, rgba(239, 68, 68, 0.1) 0%, transparent 40%),
        radial-gradient(ellipse at bottom left, rgba(99, 102, 241, 0.1) 0%, transparent 40%);
    pointer-events: none;
    z-index: -2;
}

body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        radial-gradient(2px 2px at 20px 30px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 200px 50px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 250px 160px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 300px 100px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 350px 200px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 400px 60px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 450px 180px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 500px 140px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 550px 90px, rgba(255,255,255,0.5), transparent),
        radial-gradient(2px 2px at 600px 220px, rgba(255,255,255,0.2), transparent),
        radial-gradient(1px 1px at 650px 40px, rgba(255,255,255,0.4), transparent),
        radial-gradient(2px 2px at 700px 170px, rgba(255,255,255,0.3), transparent),
        radial-gradient(1px 1px at 750px 110px, rgba(255,255,255,0.2), transparent),
        radial-gradient(2px 2px at 800px 250px, rgba(255,255,255,0.4), transparent),
        radial-gradient(1px 1px at 850px 70px, rgba(255,255,255,0.3), transparent),
        radial-gradient(2px 2px at 900px 190px, rgba(255,255,255,0.2), transparent);
    background-size: 1000px 300px;
    animation: twinkle 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: -1;
}

@keyframes twinkle {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    background: var(--gradient-primary);
    border-radius: 50%;
    top: -200px;
    right: -200px;
    opacity: 0.3;
    filter: blur(60px);
}

.login-page::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    background: var(--gradient-fire);
    border-radius: 50%;
    bottom: -150px;
    left: -150px;
    opacity: 0.2;
    filter: blur(60px);
}

.login-container {
    width: 100%;
    max-width: 420px;
    padding: 20px;
    position: relative;
    z-index: 1;
}

.login-box {
    background: rgba(20, 20, 30, 0.8);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header {
    background: transparent;
    color: white;
    padding: 40px 30px;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.login-header h1 {
    font-size: 1.5rem;
    margin-bottom: 5px;
}

.login-header p {
    opacity: 0.7;
    font-size: 0.9rem;
}

.login-form {
    padding: 30px;
}

.login-form .form-group label {
    color: rgba(255, 255, 255, 0.8);
}

.login-form input {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
}

.login-form input:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--primary-color);
}

.login-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.login-footer {
    padding: 0 30px 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
}

.login-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
}

.login-footer a:hover {
    text-decoration: underline;
}

/* =====================================================
   SIDEBAR NAVIGATION
   ===================================================== */

/* Sidebar Toggle Button (Mobile) */
.sidebar-toggle {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    width: 45px;
    height: 45px;
    background: var(--gradient-primary);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    box-shadow: var(--shadow);
}

.sidebar-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: var(--transition);
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 260px;
    height: 100vh;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(20px);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    box-shadow: var(--shadow-xl);
    transition: transform 0.3s ease;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-header {
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-icon {
    font-size: 2rem;
}

.sidebar-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 0;
    min-height: 0;
}

/* Scrollbar für Sidebar */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.3);
}

.nav-section {
    padding: 0 12px;
    margin-bottom: 8px;
}

.nav-section-title {
    display: block;
    padding: 8px 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
}

/* Sidebar Links */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
    font-weight: 500;
    margin: 2px 0;
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-link.active {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--shadow);
}

.sidebar-link-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

/* Dropdown */
.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: var(--radius);
    transition: var(--transition);
    text-align: left;
}

.nav-dropdown-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.dropdown-arrow {
    margin-left: auto;
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.nav-dropdown-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding-left: 20px;
}

.nav-dropdown.open .nav-dropdown-menu {
    max-height: 500px;
}

.nav-dropdown-menu .sidebar-link {
    padding: 10px 16px;
    font-size: 0.85rem;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sidebar-footer .sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius);
    transition: var(--transition);
    font-size: 0.9rem;
    background: transparent;
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
}

.sidebar-footer .sidebar-link:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.sidebar-footer .notification-link {
    position: relative;
}

.sidebar-footer .notification-badge {
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
}

.sidebar-user .sidebar-link-icon {
    font-size: 1.2rem;
}

.sidebar-username {
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
}

.sidebar-logout {
    color: rgba(255, 255, 255, 0.5);
}

.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.2) !important;
    color: #ef4444 !important;
}

/* Container - mit Sidebar-Offset */
.container {
    max-width: 1400px;
    margin: 0 auto;
    margin-left: 260px;
    padding: 30px;
    transition: margin-left 0.3s ease;
}

/* Responsive Sidebar */
@media (max-width: 1024px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .container {
        margin-left: 0;
        padding-top: 70px;
    }
}

/* Page Header */
.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    color: #fff;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-header .text-muted {
    color: rgba(255, 255, 255, 0.6);
}

/* Toolbar */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.search-form input,
.search-form select {
    padding: 10px 15px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.search-form input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.search-form select option {
    background: #1a1a2e;
    color: #fff;
}

.search-form input {
    min-width: 200px;
}

.search-form select {
    min-width: 180px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 41, 59, 0.4);
}

.btn-danger {
    background: var(--gradient-fire);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(239, 68, 68, 0.5);
}

.btn-outline {
    background: white;
    border: 2px solid var(--border-color);
    color: var(--dark-color);
}

.btn-outline:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.btn-block {
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.8rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.badge-warning {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-secondary {
    background: linear-gradient(135deg, #64748b, #475569);
    color: white;
}

.badge-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.badge-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.badge-info {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Table - Glass Design */
.table-container {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 16px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff;
}

.data-table th {
    background: rgba(255, 255, 255, 0.05);
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.05);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table .actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

/* Forms */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.form-group select option {
    background: #1a1a2e;
    color: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
    background: rgba(255, 255, 255, 0.12);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
}

/* Alerts */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* Modal - Glass Design */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: rgba(20, 20, 35, 0.95);
    backdrop-filter: blur(20px);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 550px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header h2 {
    color: #fff;
    font-size: 1.3rem;
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 20px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* WICHTIG: Alle Labels im Modal im Dark Mode */
[data-theme="dark"] .modal-content label,
[data-theme="dark"] .modal-body label,
[data-theme="dark"] .modal-content .form-group label,
[data-theme="dark"] .modal-content .form-row label {
    color: #f1f5f9 !important;
}

/* Divider im Modal */
[data-theme="dark"] .modal-content .divider,
[data-theme="dark"] .modal-content hr {
    border-color: #334155;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--border-color);
}

.modal-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
}

.modal-close {
    background: var(--light-color);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: var(--danger-color);
    color: white;
}

.modal-body {
    padding: 28px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 28px;
    border-top: 1px solid var(--border-color);
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

[data-theme="dark"] .modal-footer {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    border-color: #334155;
}

/* Details View */
.detail-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: var(--secondary-color);
    width: 140px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--dark-color);
}

/* Utilities */
.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

[data-theme="dark"] .text-muted {
    color: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input,
    .search-form select {
        min-width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .data-table {
        font-size: 0.9rem;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px;
    }
    
    .data-table .actions {
        flex-direction: column;
    }
    
    .container {
        padding: 15px;
    }
}

/* =====================================================
   GRUPPEN-STYLES
   ===================================================== */

/* Gruppen-Grid */
.groups-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 24px;
    margin-top: 24px;
}

/* Gruppen-Karte */
.group-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.group-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: var(--transition);
}

.group-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.group-card:hover::before {
    opacity: 1;
}

.group-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.group-card-header h3 {
    margin: 0;
    font-size: 1.2rem;
    color: var(--secondary-color);
}

.group-description {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.group-stats {
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 15px;
}

.group-invite-code {
    background: var(--light-color);
    padding: 10px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.group-invite-code small {
    color: var(--text-muted);
}

.group-invite-code code {
    background: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.group-actions {
    display: flex;
    gap: 10px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.empty-state p {
    margin: 5px 0;
}

/* Badge Varianten */
.badge-primary {
    background: var(--primary-color);
    color: white;
}

.badge-warning {
    background: #fff3cd;
    color: #856404;
}

[data-theme="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

.badge-secondary {
    background: #e9ecef;
    color: #495057;
}

[data-theme="dark"] .badge-secondary {
    background: #334155;
    color: #94a3b8;
}

/* Breadcrumb */
.breadcrumb {
    margin-bottom: 20px;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* Page Header mit Stats */
.page-header-content {
    flex: 1;
}

.page-header-stats {
    display: flex;
    gap: 20px;
}

.page-header-stats .stat {
    background: white;
    padding: 10px 15px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    font-size: 0.9rem;
}

/* Mitglieder-Sektion - Modern Design */
.members-section {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 100%);
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 24px;
    margin-top: 30px;
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.members-section h3 {
    margin: 0 0 20px 0;
    color: #fff;
    font-size: 1.1rem;
}

.members-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.members-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.members-list li:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.members-list li:last-child {
    margin-bottom: 0;
}

.member-name {
    font-weight: 500;
    color: #fff;
}

/* Verwaltungs-Grid */
.manage-grid {
    display: grid;
    gap: 20px;
}

.manage-card {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 25px;
}

.manage-card h3 {
    margin: 0 0 20px 0;
    color: var(--secondary-color);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: var(--secondary-color);
    min-width: 120px;
}

.invite-code-large {
    background: var(--light-color);
    padding: 8px 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 1.1rem;
    font-weight: bold;
    letter-spacing: 2px;
}

.role-select {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.9rem;
}

/* Gefahrenzone */
.danger-zone {
    border: 2px solid var(--danger-color);
}

.danger-zone h3 {
    color: var(--danger-color);
}

/* Alert Success */
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px;
    border-radius: var(--radius);
    margin-bottom: 20px;
}

/* Responsive Gruppen */
@media (max-width: 768px) {
    .groups-grid {
        grid-template-columns: 1fr;
    }
    
    .group-actions {
        flex-direction: column;
    }
    
    .page-header-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .info-row {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =====================================================
   RUFNAMEN-GENERATOR STYLES
   ===================================================== */

.modal-large {
    max-width: 700px;
}

.generator-section {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
}

.generator-section h3 {
    margin: 0 0 15px 0;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.generator-section label,
.generator-section .form-group label,
.generator-section .form-row label {
    color: rgba(255, 255, 255, 0.9);
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Generator small/muted text */
.generator-section small,
.generator-section .text-muted {
    color: rgba(255, 255, 255, 0.5);
}

[data-theme="dark"] .generator-section small,
[data-theme="dark"] .generator-section .text-muted {
    color: #94a3b8 !important;
}

.generated-rufname {
    background: rgba(255, 255, 255, 0.08);
    border: 2px solid var(--primary-color);
    border-radius: var(--radius);
    padding: 15px;
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.generated-rufname label {
    font-weight: 500;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

.rufname-display {
    background: var(--gradient-primary);
    color: white;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    flex: 1;
    text-align: center;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.divider {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 20px 0;
}

/* Select Styling für Generator */
.generator-section select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.generator-section select option {
    background: #1a1a2e;
    color: #fff;
}

.generator-section select:disabled {
    background: rgba(255, 255, 255, 0.03);
    cursor: not-allowed;
    opacity: 0.6;
}

/* Generator Input Styling */
.generator-section input {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.generator-section input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

/* =====================================================
   ADMIN DASHBOARD
   ===================================================== */

/* Statistik-Karten */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: var(--gradient-primary);
    opacity: 0.1;
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.08);
}

.stat-icon {
    font-size: 2.8rem;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(239, 68, 68, 0.15);
    border-radius: var(--radius);
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.stat-label {
    font-size: 0.9rem;
    color: #fff;
    font-weight: 600;
    margin-top: 5px;
}

.stat-detail {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 3px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
    background: rgba(255, 255, 255, 0.08);
}

.card-header {
    padding: 18px 24px;
    background: rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
}

.card-body {
    padding: 20px 24px;
}

/* Simple Table */
.simple-table {
    width: 100%;
    border-collapse: collapse;
}

.simple-table th,
.simple-table td {
    padding: 10px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
}

.simple-table th {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
}

.simple-table tbody tr:last-child td {
    border-bottom: none;
}

/* Activity List */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    padding: 10px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-user {
    font-weight: 600;
    color: var(--primary-color);
}

.activity-action {
    background: var(--light-color);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.activity-details {
    color: var(--text-muted);
    flex: 1;
}

.activity-time {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-left: auto;
}

/* Quick Actions */
.quick-actions {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 28px;
    border: 1px solid var(--border-color);
}

.quick-actions h3 {
    margin: 0 0 20px 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-color);
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 28px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: var(--radius);
    text-decoration: none;
    color: var(--dark-color);
    transition: var(--transition);
    min-width: 130px;
    border: 1px solid var(--border-color);
}

.action-btn:hover {
    background: var(--gradient-primary);
    color: white;
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.action-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

/* Filter Form */
.filter-form {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-form input,
.filter-form select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.9rem;
}

.filter-form input {
    min-width: 200px;
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .action-buttons {
        justify-content: center;
    }
}

.generator-section select optgroup {
    font-weight: 600;
    color: var(--secondary-color);
}

/* Small text helper */
small.text-muted {
    display: block;
    margin-top: 5px;
    font-size: 0.8rem;
}

/* Responsive Generator */
@media (max-width: 768px) {
    .generated-rufname {
        flex-direction: column;
        text-align: center;
    }
    
    .rufname-display {
        width: 100%;
    }
}

/* =====================================================
   STATISTIK-SEITE
   ===================================================== */

.stats-details {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 30px;
}

.stats-card {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .stats-card {
    background: var(--bg-card);
}

.stats-card h3 {
    margin: 0 0 20px 0;
    font-size: 1.1rem;
    color: var(--dark-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

[data-theme="dark"] .stats-card h3 {
    color: #f1f5f9;
}

/* Balkendiagramme */
.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.chart-bar-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.chart-bar-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--dark-color);
}

[data-theme="dark"] .chart-bar-label {
    color: #e2e8f0;
}

.chart-bar-value {
    font-weight: 600;
    color: var(--primary-color);
}

.chart-bar-track {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

[data-theme="dark"] .chart-bar-track {
    background: #334155;
}

.chart-bar-fill {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

/* Zuletzt hinzugefügt Liste */
.recent-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.recent-item {
    padding: 12px;
    background: #f8fafc;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

[data-theme="dark"] .recent-item {
    background: #334155;
}

.recent-main {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.recent-main strong {
    font-size: 0.95rem;
}

.recent-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Export-Bereich */
.export-section {
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    border-radius: var(--radius-lg);
    border: 1px solid #bae6fd;
    text-align: center;
}

[data-theme="dark"] .export-section {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    border-color: rgba(99, 102, 241, 0.3);
}

.export-section h3 {
    margin: 0 0 8px 0;
    color: var(--dark-color);
}

[data-theme="dark"] .export-section h3 {
    color: #f1f5f9;
}

.export-section p {
    margin: 0 0 20px 0;
    color: var(--text-muted);
}

.export-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Gruppen-Statistiken - Modern Dark Design */
.group-stats-section {
    margin-top: 30px;
    padding: 28px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 60px rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.group-stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #8b5cf6, #06b6d4, #8b5cf6);
}

.group-stats-section h3 {
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    font-size: 1.2rem;
}

.group-stats-section h4 {
    color: #e2e8f0;
    margin: 24px 0 16px 0;
}

.group-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.group-stat-item {
    text-align: center;
    padding: 24px 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.group-stat-item:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.2);
}

.group-stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.group-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Top Contributors */
.contributors-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contributor-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.contributor-item:hover {
    background: rgba(255, 255, 255, 0.12);
}

.contributor-rank {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    color: white;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 12px;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.contributor-name {
    flex: 1;
    font-weight: 500;
    color: #fff;
}

.contributor-count {
    font-weight: 600;
    color: #06b6d4;
    background: rgba(6, 182, 212, 0.15);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Export Section in Stats */
.group-stats-section .export-section {
    margin-top: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.group-stats-section .export-section h4 {
    margin: 0 0 16px 0;
    color: #e2e8f0;
}

.group-stats-section .export-section .btn {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    border: none;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

.group-stats-section .export-section .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

/* Responsive Statistiken */
@media (max-width: 768px) {
    .stats-details {
        grid-template-columns: 1fr;
    }
    
    .group-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   GRUPPEN-CHAT
   ===================================================== */

.chat-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 200px);
    min-height: 500px;
    border: 2px solid var(--primary-color);
}

.chat-header {
    padding: 20px;
    color: white;
    display: flex;
    align-items: center;
    gap: 15px;
}

.chat-logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255,255,255,0.3);
}

.chat-header h2 {
    margin: 0;
    flex: 1;
}

.chat-subtitle {
    opacity: 0.8;
    font-size: 0.9rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #f8fafc;
}

.chat-empty {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
}

.chat-message {
    max-width: 70%;
    padding: 12px 16px;
    background: white;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chat-message.own {
    align-self: flex-end;
    background: var(--primary-color);
    color: white;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 4px;
}

.message-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 4px;
    font-size: 0.75rem;
}

.message-author {
    font-weight: 600;
}

.chat-message.own .message-author {
    color: rgba(255,255,255,0.9);
}

.message-time {
    color: var(--text-muted);
}

.chat-message.own .message-time {
    color: rgba(255,255,255,0.7);
}

.message-content {
    word-wrap: break-word;
    line-height: 1.4;
}

.chat-input {
    display: flex;
    gap: 10px;
    padding: 15px 20px;
    background: white;
    border-top: 1px solid var(--border-color);
}

.chat-input textarea {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border-color);
    border-radius: 24px;
    resize: none;
    font-family: inherit;
    font-size: 0.95rem;
    max-height: 100px;
}

.chat-input textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

.chat-input .btn {
    border-radius: 24px;
    padding: 12px 24px;
}

/* =====================================================
   GRUPPEN-EINSTELLUNGEN
   ===================================================== */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.settings-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.settings-card-wide {
    grid-column: 1 / -1;
}

.settings-form .form-group {
    margin-bottom: 16px;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.color-picker-row input[type="color"] {
    width: 50px;
    height: 40px;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
}

#colorValue {
    font-family: monospace;
    color: var(--text-muted);
}

.logo-section {
    display: flex;
    flex-direction: column;
    gap: 15px;
    align-items: flex-start;
}

.current-logo {
    width: 120px;
    height: 120px;
    border-radius: var(--radius);
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.current-logo img,
.logo-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-logo {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.invite-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.invite-code-display {
    display: flex;
    align-items: center;
    gap: 10px;
}

.invite-code-display code {
    font-size: 1.5rem;
    font-weight: 600;
    padding: 10px 20px;
    background: #f1f5f9;
    border-radius: var(--radius);
    letter-spacing: 2px;
}

.role-select {
    padding: 6px 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 0.85rem;
}

/* Gruppen-Header Logo */
.group-header-logo {
    width: 60px;
    height: 60px;
    border-radius: var(--radius);
    object-fit: cover;
    margin-right: 15px;
}

.page-header-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

/* Responsive */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .chat-message {
        max-width: 85%;
    }
    
    .chat-container {
        height: calc(100vh - 150px);
    }
    
    .page-header-actions {
        flex-wrap: wrap;
    }
}

/* =====================================================
   VORLAGEN
   ===================================================== */

.vorlagen-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.vorlage-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.vorlage-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.vorlage-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.vorlage-header h3 {
    margin: 0;
    font-size: 1rem;
}

.vorlage-actions {
    display: flex;
    gap: 6px;
}

.vorlage-content {
    padding: 16px 20px;
}

.vorlage-field {
    display: flex;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.vorlage-field .label {
    color: var(--text-muted);
    width: 100px;
    flex-shrink: 0;
}

.vorlage-footer {
    padding: 12px 20px;
    background: #f8fafc;
    border-top: 1px solid var(--border-color);
}

/* =====================================================
   BULK-IMPORT
   ===================================================== */

.import-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.import-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow);
}

.import-card h3 {
    margin: 0 0 12px 0;
}

.import-card-wide {
    grid-column: 1 / -1;
}

.import-card textarea {
    width: 100%;
    font-family: monospace;
    font-size: 0.85rem;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: vertical;
}

.button-row {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.code-block {
    background: #1e293b;
    color: #e2e8f0;
    padding: 16px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.85rem;
    line-height: 1.6;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
}

/* =====================================================
   NOTIZEN / KOMMENTARE
   ===================================================== */

.notizen-section {
    margin-top: 20px;
    padding: 16px;
    background: #f8fafc;
    border-radius: var(--radius);
}

.notizen-section h4 {
    margin: 0 0 12px 0;
    font-size: 0.95rem;
}

.notizen-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 12px;
}

.notiz-item {
    background: white;
    padding: 12px;
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

.notiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.notiz-author {
    font-weight: 600;
    color: var(--dark-color);
}

.notiz-content {
    font-size: 0.9rem;
    line-height: 1.4;
}

.notiz-form {
    display: flex;
    gap: 10px;
}

.notiz-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: none;
    font-size: 0.9rem;
}

/* =====================================================
   DUPLIKAT-WARNUNG
   ===================================================== */

.duplicate-warning {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.duplicate-warning-icon {
    font-size: 1.2rem;
}

.duplicate-warning-content {
    flex: 1;
}

.duplicate-warning-title {
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

[data-theme="dark"] .duplicate-warning-title {
    color: #fbbf24;
}

.duplicate-warning-text {
    font-size: 0.85rem;
    color: #a16207;
}

[data-theme="dark"] .duplicate-warning-text {
    color: #fcd34d;
}

[data-theme="dark"] .duplicate-warning {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.3);
}

.similar-items {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state p:first-child {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .import-section {
        grid-template-columns: 1fr;
    }
    
    .vorlagen-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   DARK MODE COMPONENT OVERRIDES
   ===================================================== */

/* Karten und Container */
[data-theme="dark"] .table-container,
[data-theme="dark"] .card,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .vorlage-card,
[data-theme="dark"] .import-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .group-card,
[data-theme="dark"] .dashboard-card,
[data-theme="dark"] .settings-card,
[data-theme="dark"] .manage-card,
[data-theme="dark"] .members-section,
[data-theme="dark"] .chat-container,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .empty-state {
    background: var(--bg-card);
}

/* Tabellen */
[data-theme="dark"] .data-table th {
    background: linear-gradient(135deg, #1e293b 0%, #334155 100%);
    color: #94a3b8;
}

[data-theme="dark"] .data-table td {
    border-color: #334155;
}

[data-theme="dark"] .data-table tr:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Formulare */
[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: var(--bg-input);
    color: var(--text-primary);
    border-color: var(--border-color);
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--text-muted);
}

/* Buttons */
[data-theme="dark"] .btn-outline {
    background: var(--bg-card);
    border-color: var(--border-color);
    color: var(--text-primary);
}

[data-theme="dark"] .btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

[data-theme="dark"] .btn-secondary {
    background: #334155;
    color: var(--text-primary);
}

/* Vorlagen */
[data-theme="dark"] .vorlage-header,
[data-theme="dark"] .vorlage-footer {
    background: rgba(255, 255, 255, 0.05);
}

/* Notizen */
[data-theme="dark"] .notizen-section {
    background: rgba(255, 255, 255, 0.05);
}

[data-theme="dark"] .notiz-item {
    background: var(--bg-card);
}

/* Code-Blöcke */
[data-theme="dark"] .code-block {
    background: #0f172a;
}

/* Überschriften */
[data-theme="dark"] .page-header h1,
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4 {
    color: var(--text-primary);
}

/* Chat */
[data-theme="dark"] .chat-message {
    background: #334155;
}

[data-theme="dark"] .chat-message.own {
    background: var(--primary-color);
}

[data-theme="dark"] .chat-input-area {
    background: var(--bg-card);
    border-color: var(--border-color);
}

/* Gruppen */
[data-theme="dark"] .group-invite-code code {
    background: var(--bg-input);
    color: var(--text-primary);
}

[data-theme="dark"] .page-header-stats .stat {
    background: var(--bg-card);
}

/* Badges */
[data-theme="dark"] .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

[data-theme="dark"] .badge-secondary {
    background: #334155;
    color: #94a3b8;
}

/* Detail-Ansicht */
[data-theme="dark"] .detail-label {
    color: var(--text-muted);
}

[data-theme="dark"] .detail-value {
    color: var(--text-primary);
}

/* Mitglieder */
[data-theme="dark"] .member-item {
    border-color: var(--border-color);
}

[data-theme="dark"] .member-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Generator */
[data-theme="dark"] .generated-rufname {
    background: var(--bg-card);
    border-color: var(--primary-color);
}

/* Statistik-Karten */
[data-theme="dark"] .stat-card {
    background: var(--bg-card);
}

[data-theme="dark"] .stat-icon {
    background: rgba(99, 102, 241, 0.2);
}

/* Dashboard */
[data-theme="dark"] .dashboard-card-header {
    border-color: var(--border-color);
}

[data-theme="dark"] .activity-item {
    border-color: var(--border-color);
}

[data-theme="dark"] .activity-item:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* Quick Actions */
[data-theme="dark"] .action-btn {
    background: var(--bg-input);
    color: var(--text-primary);
}

[data-theme="dark"] .action-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary-color);
}

/* Divider */
[data-theme="dark"] .divider {
    border-color: var(--border-color);
}

/* Links */
[data-theme="dark"] a {
    color: var(--primary-light);
}

[data-theme="dark"] a:hover {
    color: var(--primary-color);
}

/* Alerts */
[data-theme="dark"] .alert-info {
    background: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .alert-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
    border-color: rgba(245, 158, 11, 0.3);
}

/* Dropdown */
[data-theme="dark"] .dropdown-menu {
    background: var(--bg-card);
    border-color: var(--border-color);
}

[data-theme="dark"] .dropdown-item:hover {
    background: rgba(99, 102, 241, 0.1);
}

/* Checkbox */
[data-theme="dark"] .checkbox-label {
    color: var(--text-primary);
}

[data-theme="dark"] .alert {
    border-color: var(--border-color);
}

[data-theme="dark"] .alert-success {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}

[data-theme="dark"] .alert-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

/* =====================================================
   DARK MODE TOGGLE
   ===================================================== */

.theme-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    color: rgba(255, 255, 255, 0.7);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.85rem;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
}

.theme-toggle-icon {
    font-size: 1.1rem;
}

/* =====================================================
   DRAG & DROP
   ===================================================== */

.sortable-list {
    list-style: none;
}

.sortable-item {
    cursor: grab;
    user-select: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.sortable-item:active {
    cursor: grabbing;
}

.sortable-item.dragging {
    opacity: 0.8;
    transform: scale(1.02);
    box-shadow: var(--shadow-xl);
    z-index: 100;
}

.sortable-item.drag-over {
    border-top: 3px solid var(--primary-color);
}

.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    color: var(--text-muted);
    cursor: grab;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.drag-handle:hover {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-color);
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle-icon {
    font-size: 1.2rem;
}

/* Table row dragging */
.data-table tbody tr.sortable-item {
    cursor: grab;
}

.data-table tbody tr.sortable-item:active {
    cursor: grabbing;
}

.data-table tbody tr.dragging {
    background: var(--primary-light);
    opacity: 0.9;
}

.data-table tbody tr.drag-over {
    border-top: 3px solid var(--primary-color);
}

/* =====================================================
   KEYBOARD SHORTCUTS
   ===================================================== */

.shortcuts-modal .shortcut-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--light-color);
    border-radius: var(--radius);
}

[data-theme="dark"] .shortcut-item {
    background: rgba(255, 255, 255, 0.05);
}

.shortcut-keys {
    display: flex;
    gap: 6px;
}

.shortcut-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 28px;
    padding: 0 8px;
    background: var(--gradient-dark);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 6px;
    box-shadow: 0 2px 0 rgba(0, 0, 0, 0.2);
}

.shortcut-description {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Shortcut hint toast */
.shortcut-hint {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-dark);
    color: white;
    padding: 12px 20px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    box-shadow: var(--shadow-lg);
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.shortcut-hint.visible {
    opacity: 1;
}

.shortcut-hint kbd {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
    margin: 0 2px;
}

/* =====================================================
   PROFIL-SEITE
   ===================================================== */

.profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 24px;
}

.profile-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.profile-header {
    padding: 30px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    gap: 20px;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.profile-info h2 {
    color: white;
    margin: 0 0 8px 0;
}

.profile-stats {
    display: flex;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.profile-stats .stat-item {
    flex: 1;
    text-align: center;
}

.profile-stats .stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.profile-stats .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.profile-meta {
    padding: 20px;
}

.settings-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.settings-card h3 {
    margin: 0 0 20px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.danger-zone {
    border: 2px solid var(--danger-color);
}

.danger-zone h3 {
    color: var(--danger-color);
}

/* =====================================================
   API-ZUGANG
   ===================================================== */

.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 24px;
}

.api-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 24px;
}

.api-card h3 {
    margin: 0 0 16px 0;
}

.api-card h4 {
    margin: 20px 0 10px 0;
    font-size: 0.9rem;
}

.api-card-wide {
    grid-column: 1 / -1;
}

.token-display {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 12px;
    background: var(--bg-input);
    border-radius: var(--radius);
}

.token-display code {
    flex: 1;
    font-size: 0.85rem;
    word-break: break-all;
}

.api-endpoints {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.endpoint {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: var(--light-color);
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .endpoint {
    background: rgba(255, 255, 255, 0.05);
}

.endpoint .method {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.method.get { background: #10b981; color: white; }
.method.post { background: #3b82f6; color: white; }
.method.put { background: #f59e0b; color: white; }
.method.delete { background: #ef4444; color: white; }

.endpoint code {
    font-size: 0.85rem;
}

.endpoint .desc {
    margin-left: auto;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stats-mini {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-mini {
    text-align: center;
}

.stat-mini .stat-value {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-mini .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.recent-requests {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.request-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    background: var(--light-color);
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
}

[data-theme="dark"] .request-item {
    background: rgba(255, 255, 255, 0.05);
}

.request-item .time {
    margin-left: auto;
    color: var(--text-muted);
}

.response-code {
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
}

.code-2xx { background: #d1fae5; color: #065f46; }
.code-4xx { background: #fef3c7; color: #92400e; }
.code-5xx { background: #fee2e2; color: #991b1b; }

[data-theme="dark"] .code-2xx { background: rgba(16, 185, 129, 0.2); color: #34d399; }
[data-theme="dark"] .code-4xx { background: rgba(245, 158, 11, 0.2); color: #fbbf24; }
[data-theme="dark"] .code-5xx { background: rgba(239, 68, 68, 0.2); color: #f87171; }

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* =====================================================
   BENACHRICHTIGUNGEN
   ===================================================== */

.notification-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.notification-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.notification-icon {
    font-size: 1.2rem;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 18px;
    height: 18px;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.notification-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: var(--bg-card);
    box-shadow: var(--shadow-xl);
    z-index: 1100;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.notification-panel.open {
    right: 0;
}

.notification-panel-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-panel-header h3 {
    margin: 0;
}

.notification-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
}

.notification-item {
    padding: 14px;
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.notification-item:hover {
    background: var(--light-color);
}

[data-theme="dark"] .notification-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.notification-item.unread {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
}

.notification-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-item-message {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.notification-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

.notification-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1099;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
}

.notification-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Sidebar Footer Layout */
.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-footer > .notification-btn,
.sidebar-footer > .theme-toggle {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 12px;
    gap: 10px;
}

@media (max-width: 768px) {
    .profile-grid,
    .api-grid {
        grid-template-columns: 1fr;
    }
    
    .notification-panel {
        width: 100%;
        right: -100%;
    }
}

/* =====================================================
   KOMMENTARE MIT ANTWORTEN
   ===================================================== */

.comments-section {
    margin-top: 24px;
}

.comment-item {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 3px solid var(--primary-color);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.comment-author {
    font-weight: 600;
    color: var(--text-primary);
}

.comment-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comment-edited {
    font-style: italic;
}

.comment-content {
    line-height: 1.6;
    margin-bottom: 10px;
}

.comment-actions {
    display: flex;
    gap: 12px;
    font-size: 0.85rem;
}

.comment-action {
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border: none;
    padding: 0;
}

.comment-action:hover {
    color: var(--primary-color);
}

/* Antworten */
.comment-replies {
    margin-left: 24px;
    margin-top: 12px;
    padding-left: 16px;
    border-left: 2px solid var(--border-color);
}

.comment-replies .comment-item {
    background: var(--light-color);
    border-left-color: var(--text-muted);
}

[data-theme="dark"] .comment-replies .comment-item {
    background: rgba(255, 255, 255, 0.03);
}

.reply-form {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.reply-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    resize: none;
    font-size: 0.9rem;
    background: var(--bg-input);
    color: var(--text-primary);
}

/* @Mentions */
.mention {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-color);
    padding: 1px 4px;
    border-radius: 4px;
    font-weight: 500;
}

.mention-autocomplete {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    min-width: 200px;
}

.mention-item {
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
}

.mention-item:hover,
.mention-item.active {
    background: var(--primary-color);
    color: white;
}

/* =====================================================
   ÄNDERUNGSHISTORIE
   ===================================================== */

.history-timeline {
    position: relative;
    padding-left: 30px;
}

.history-timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.history-item {
    position: relative;
    padding: 16px;
    margin-bottom: 16px;
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.history-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 20px;
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.history-item.action-create::before { background: var(--success-color); }
.history-item.action-update::before { background: var(--info-color); }
.history-item.action-delete::before { background: var(--danger-color); }
.history-item.action-restore::before { background: var(--warning-color); }
.history-item.action-approve::before { background: var(--success-color); }
.history-item.action-reject::before { background: var(--danger-color); }

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.history-action {
    font-weight: 600;
}

.history-time {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.history-user {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.history-summary {
    font-size: 0.9rem;
}

/* Diff-Ansicht */
.diff-view {
    margin-top: 12px;
    font-size: 0.85rem;
}

.diff-field {
    padding: 8px 12px;
    margin-bottom: 6px;
    border-radius: var(--radius-sm);
    background: var(--light-color);
}

[data-theme="dark"] .diff-field {
    background: rgba(255, 255, 255, 0.05);
}

.diff-field-name {
    font-weight: 600;
    margin-bottom: 4px;
}

.diff-old {
    color: var(--danger-color);
    text-decoration: line-through;
}

.diff-new {
    color: var(--success-color);
}

.diff-arrow {
    color: var(--text-muted);
    margin: 0 8px;
}

/* =====================================================
   FREIGABE-WORKFLOW
   ===================================================== */

.approval-queue {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.approval-item {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--warning-color);
}

.approval-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.approval-title {
    font-weight: 600;
    font-size: 1.1rem;
}

.approval-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.approval-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px;
    background: var(--light-color);
    border-radius: var(--radius);
}

[data-theme="dark"] .approval-details {
    background: rgba(255, 255, 255, 0.05);
}

.approval-field label {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 2px;
}

.approval-actions {
    display: flex;
    gap: 10px;
}

.rejection-reason {
    margin-top: 12px;
    padding: 12px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: var(--radius);
    border-left: 3px solid var(--danger-color);
}

.rejection-reason-label {
    font-weight: 600;
    color: var(--danger-color);
    margin-bottom: 4px;
}

/* Status-Badges */
.status-draft { background: var(--text-muted); }
.status-pending { background: var(--warning-color); }
.status-approved { background: var(--success-color); }
.status-rejected { background: var(--danger-color); }

/* =====================================================
   GRUPPEN-ROLLEN
   ===================================================== */

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.role-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.role-header {
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.role-name {
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.role-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.role-member-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.role-permissions {
    padding: 16px;
    border-top: 1px solid var(--border-color);
}

.permission-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 0.85rem;
}

.permission-enabled {
    color: var(--success-color);
}

.permission-disabled {
    color: var(--text-muted);
}

.role-actions {
    padding: 12px 16px;
    background: var(--light-color);
    display: flex;
    gap: 8px;
}

[data-theme="dark"] .role-actions {
    background: rgba(255, 255, 255, 0.05);
}

/* Role Badge in Member List */
.member-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

/* =====================================================
   AUDIT-LOG & LOGIN-HISTORIE
   ===================================================== */

.tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 24px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0;
}

.tab {
    padding: 12px 20px;
    color: var(--text-muted);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition);
}

.tab:hover {
    color: var(--primary-color);
}

.tab.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    font-weight: 600;
}

.audit-section {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-group select,
.filter-group input {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-input);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.filter-group input[type="date"] {
    width: 140px;
}

.filter-group input[type="text"] {
    width: 200px;
}

/* Severity Badges */
.badge-info { background: var(--info-color); color: white; }
.badge-warning { background: var(--warning-color); color: white; }
.badge-error { background: var(--danger-color); color: white; }
.badge-critical { background: #7c2d12; color: white; }

/* Category Badges */
.badge-category-auth { background: #8b5cf6; }
.badge-category-rufzeichen { background: #3b82f6; }
.badge-category-group { background: #10b981; }
.badge-category-user { background: #f59e0b; }
.badge-category-admin { background: #ef4444; }
.badge-category-api { background: #6366f1; }
.badge-category-system { background: #64748b; }

/* Login Status Badges */
.badge-login-success { background: var(--success-color); }
.badge-login-failed { background: var(--danger-color); }
.badge-login-blocked { background: #7c2d12; }
.badge-login-logout { background: var(--text-muted); }

/* Row Severity Highlighting */
.severity-warning { background: rgba(245, 158, 11, 0.05); }
.severity-error { background: rgba(239, 68, 68, 0.05); }
.severity-critical { background: rgba(239, 68, 68, 0.1); }

.login-failed { background: rgba(239, 68, 68, 0.05); }
.login-blocked { background: rgba(239, 68, 68, 0.1); }

/* Security Grid */
.security-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.security-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.security-card h3 {
    margin: 0 0 8px 0;
}

.suspicious-list {
    margin-top: 16px;
}

.suspicious-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.suspicious-item:last-child {
    border-bottom: none;
}

.suspicious-ip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.issue-stats {
    display: flex;
    gap: 20px;
    margin-top: 16px;
}

.issue-stat {
    text-align: center;
}

.issue-count {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.issue-count.warning { color: var(--warning-color); }
.issue-count.error { color: var(--danger-color); }
.issue-count.critical { color: #7c2d12; }

.issue-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.login-overview {
    margin-top: 16px;
}

.login-stat {
    display: inline-block;
    text-align: center;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: var(--radius);
}

.login-stat.success {
    background: rgba(16, 185, 129, 0.1);
}

.login-stat.failed {
    background: rgba(239, 68, 68, 0.1);
}

.login-count {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
}

.login-stat.success .login-count { color: var(--success-color); }
.login-stat.failed .login-count { color: var(--danger-color); }

.login-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.success-rate {
    margin-top: 16px;
    position: relative;
    height: 24px;
    background: var(--light-color);
    border-radius: 12px;
    overflow: hidden;
}

[data-theme="dark"] .success-rate {
    background: rgba(255, 255, 255, 0.1);
}

.rate-bar {
    height: 100%;
    background: var(--success-color);
    border-radius: 12px;
    transition: width 0.5s ease;
}

.success-rate span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.8rem;
    font-weight: 600;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    box-shadow: var(--shadow);
}

.stat-card.wide {
    grid-column: 1 / -1;
}

.stat-card h3 {
    margin: 0 0 16px 0;
    font-size: 1rem;
}

.category-list,
.action-list,
.user-list,
.browser-list,
.device-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item,
.action-item,
.user-item,
.browser-item,
.device-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: var(--light-color);
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .category-item,
[data-theme="dark"] .action-item,
[data-theme="dark"] .user-item,
[data-theme="dark"] .browser-item,
[data-theme="dark"] .device-item {
    background: rgba(255, 255, 255, 0.05);
}

.category-count,
.action-count,
.user-count,
.browser-count,
.device-count {
    font-weight: 600;
    color: var(--primary-color);
}

.session-stat {
    text-align: center;
    padding: 20px;
}

.session-value {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.session-label {
    color: var(--text-muted);
}

/* Detail View in Modal */
.detail-view h4 {
    margin: 16px 0 8px 0;
    font-size: 0.9rem;
}

.detail-view h4:first-child {
    margin-top: 0;
}

.detail-view pre {
    background: var(--light-color);
    padding: 12px;
    border-radius: var(--radius);
    overflow-x: auto;
    font-size: 0.8rem;
}

[data-theme="dark"] .detail-view pre {
    background: rgba(0, 0, 0, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
}

.pagination-info {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.pagination-current {
    font-weight: 600;
}

@media (max-width: 768px) {
    .tabs {
        flex-wrap: wrap;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select,
    .filter-group input {
        flex: 1;
    }
    
    .security-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =====================================================
   BUG-REPORT SYSTEM
   ===================================================== */

/* Floating Bug Report Button */
.bug-report-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
}

.bug-report-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.bug-report-icon {
    font-size: 1.5rem;
}

/* Bug Report Modal */
.bug-report-modal {
    max-width: 600px;
}

.bug-report-intro {
    color: var(--text-muted);
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.screenshot-upload {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    transition: var(--transition);
    position: relative;
}

.screenshot-upload.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.screenshot-upload input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.screenshot-hint {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.screenshot-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.screenshot-preview img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

.bug-report-meta {
    background: var(--light-color);
    border-radius: var(--radius);
    padding: 12px 16px;
    margin-top: 16px;
}

[data-theme="dark"] .bug-report-meta {
    background: rgba(255, 255, 255, 0.05);
}

.bug-report-meta .meta-item {
    display: flex;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.bug-report-meta .meta-item:last-child {
    margin-bottom: 0;
}

.bug-report-meta .meta-label {
    color: var(--text-muted);
    min-width: 50px;
}

.bug-report-meta .meta-value {
    color: var(--dark-color);
    word-break: break-all;
}

[data-theme="dark"] .bug-report-meta .meta-value {
    color: var(--text-primary);
}

/* Admin Bug Reports Page */
.bug-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.bug-stat-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .bug-stat-card {
    background: var(--bg-card);
}

.bug-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.bug-stat-icon.open { background: rgba(59, 130, 246, 0.1); }
.bug-stat-icon.progress { background: rgba(245, 158, 11, 0.1); }
.bug-stat-icon.resolved { background: rgba(16, 185, 129, 0.1); }
.bug-stat-icon.critical { background: rgba(239, 68, 68, 0.1); }

.bug-stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-color);
}

[data-theme="dark"] .bug-stat-value {
    color: var(--text-primary);
}

.bug-stat-label {
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* Bug Filters */
.bug-filters {
    margin-bottom: 24px;
}

.bug-filters .filter-form {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.bug-filters select {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    color: var(--dark-color);
    font-size: 0.9rem;
}

[data-theme="dark"] .bug-filters select {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* Bug List */
.bug-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.bug-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

[data-theme="dark"] .bug-card {
    background: var(--bg-card);
}

.bug-card-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.bug-priority {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.bug-priority.priority-critical { background: rgba(239, 68, 68, 0.1); }
.bug-priority.priority-high { background: rgba(245, 158, 11, 0.1); }
.bug-priority.priority-medium { background: rgba(234, 179, 8, 0.1); }
.bug-priority.priority-low { background: rgba(16, 185, 129, 0.1); }

.bug-info {
    flex: 1;
    min-width: 0;
}

.bug-title {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    color: var(--dark-color);
}

[data-theme="dark"] .bug-title {
    color: var(--text-primary);
}

.bug-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.bug-status {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    flex-shrink: 0;
}

.bug-status.status-open { background: rgba(59, 130, 246, 0.1); color: #3b82f6; }
.bug-status.status-in_progress { background: rgba(245, 158, 11, 0.1); color: #f59e0b; }
.bug-status.status-resolved { background: rgba(16, 185, 129, 0.1); color: #10b981; }
.bug-status.status-closed { background: rgba(107, 114, 128, 0.1); color: #6b7280; }
.bug-status.status-wont_fix { background: rgba(239, 68, 68, 0.1); color: #ef4444; }

.bug-card-body {
    padding: 20px;
}

.bug-description {
    margin: 0;
    color: var(--dark-color);
    line-height: 1.6;
}

[data-theme="dark"] .bug-description {
    color: var(--text-secondary);
}

.bug-screenshot {
    margin-top: 16px;
}

.bug-screenshot img {
    max-width: 100%;
    max-height: 300px;
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
    cursor: pointer;
}

.bug-admin-notes {
    margin-top: 16px;
    padding: 12px 16px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius);
    border-left: 3px solid var(--primary-color);
}

.bug-admin-notes strong {
    display: block;
    margin-bottom: 4px;
    color: var(--primary-color);
    font-size: 0.85rem;
}

.bug-admin-notes p {
    margin: 0;
    font-size: 0.9rem;
}

.bug-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    background: var(--light-color);
    border-top: 1px solid var(--border-color);
}

[data-theme="dark"] .bug-card-footer {
    background: rgba(255, 255, 255, 0.02);
}

.bug-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.bug-actions select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: white;
    font-size: 0.85rem;
}

[data-theme="dark"] .bug-actions select {
    background: var(--bg-input);
    color: var(--text-primary);
}

/* Dark Mode für Bug-Report System */
[data-theme="dark"] .bug-report-btn {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

[data-theme="dark"] .screenshot-upload {
    border-color: #475569;
    background: rgba(255, 255, 255, 0.02);
}

[data-theme="dark"] .screenshot-upload.drag-over {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.1);
}

[data-theme="dark"] .screenshot-hint {
    color: #94a3b8;
}

[data-theme="dark"] .screenshot-preview img {
    border-color: #475569;
}

[data-theme="dark"] .bug-report-intro {
    color: #94a3b8;
}

[data-theme="dark"] .bug-stat-card {
    background: var(--bg-card);
    border-color: #334155;
}

[data-theme="dark"] .bug-stat-icon.open { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .bug-stat-icon.progress { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .bug-stat-icon.resolved { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .bug-stat-icon.critical { background: rgba(239, 68, 68, 0.15); }

[data-theme="dark"] .bug-card {
    background: var(--bg-card);
    border-color: #334155;
}

[data-theme="dark"] .bug-card-header {
    border-color: #334155;
}

[data-theme="dark"] .bug-priority.priority-critical { background: rgba(239, 68, 68, 0.15); }
[data-theme="dark"] .bug-priority.priority-high { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .bug-priority.priority-medium { background: rgba(234, 179, 8, 0.15); }
[data-theme="dark"] .bug-priority.priority-low { background: rgba(16, 185, 129, 0.15); }

[data-theme="dark"] .bug-status.status-open { background: rgba(59, 130, 246, 0.15); }
[data-theme="dark"] .bug-status.status-in_progress { background: rgba(245, 158, 11, 0.15); }
[data-theme="dark"] .bug-status.status-resolved { background: rgba(16, 185, 129, 0.15); }
[data-theme="dark"] .bug-status.status-closed { background: rgba(107, 114, 128, 0.15); }
[data-theme="dark"] .bug-status.status-wont_fix { background: rgba(239, 68, 68, 0.15); }

[data-theme="dark"] .bug-screenshot img {
    border-color: #475569;
}

[data-theme="dark"] .bug-admin-notes {
    background: rgba(99, 102, 241, 0.1);
    border-left-color: var(--primary-color);
}

[data-theme="dark"] .bug-admin-notes p {
    color: #e2e8f0;
}

[data-theme="dark"] .bug-card-footer {
    background: rgba(0, 0, 0, 0.2);
    border-color: #334155;
}

[data-theme="dark"] .bug-actions select {
    background: var(--bg-input);
    border-color: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .bug-filters select {
    background: var(--bg-input);
    border-color: #475569;
    color: #f1f5f9;
}

[data-theme="dark"] .empty-state {
    color: #94a3b8;
}

[data-theme="dark"] .empty-state p {
    color: #f1f5f9;
}

/* Responsive */
@media (max-width: 1024px) {
    .bug-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .bug-stats-grid {
        grid-template-columns: 1fr;
    }
    
    .bug-card-header {
        flex-direction: column;
    }
    
    .bug-card-footer {
        flex-direction: column;
        align-items: stretch;
    }
    
    .bug-actions {
        flex-direction: column;
    }
    
    .bug-report-btn {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
}

/* =====================================================
   ROLLENVERWALTUNG
   ===================================================== */

.roles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.role-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

[data-theme="dark"] .role-card {
    background: var(--bg-card);
    border-color: #334155;
}

.role-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border-left: 4px solid;
    background: var(--light-color);
}

[data-theme="dark"] .role-card-header {
    background: rgba(255, 255, 255, 0.02);
}

.role-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}

.role-info {
    flex: 1;
    min-width: 0;
}

.role-name {
    margin: 0;
    font-size: 1.1rem;
    color: var(--dark-color);
}

[data-theme="dark"] .role-name {
    color: var(--text-primary);
}

.role-slug {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: monospace;
}

.role-card-body {
    padding: 16px 20px;
}

.role-description {
    margin: 0 0 16px 0;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.role-stats {
    display: flex;
    gap: 20px;
}

.role-stat {
    text-align: center;
}

.role-stat-value {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
}

.role-stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.role-card-footer {
    display: flex;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--light-color);
}

[data-theme="dark"] .role-card-footer {
    background: rgba(255, 255, 255, 0.02);
    border-color: #334155;
}

/* Berechtigungen Grid */
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
    max-height: 400px;
    overflow-y: auto;
    padding: 12px;
    background: var(--light-color);
    border-radius: var(--radius);
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .permissions-grid {
    background: rgba(0, 0, 0, 0.2);
    border-color: #334155;
}

.permission-category {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 12px;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .permission-category {
    background: rgba(255, 255, 255, 0.03);
    border-color: #475569;
}

.permission-category-header {
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

[data-theme="dark"] .permission-category-header {
    border-color: #475569;
}

.permission-category-header .checkbox-label {
    font-weight: 600;
    color: var(--dark-color);
}

[data-theme="dark"] .permission-category-header .checkbox-label {
    color: var(--text-primary);
}

.permission-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.permission-item {
    font-size: 0.85rem;
    padding: 4px 0;
}

.permission-item span {
    color: var(--dark-color);
}

[data-theme="dark"] .permission-item span {
    color: var(--text-secondary);
}

/* Checkbox Label */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

/* Color Picker */
.color-picker-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.color-picker-wrapper input[type="color"] {
    width: 50px;
    height: 36px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    cursor: pointer;
    padding: 2px;
}

.color-preview {
    font-family: monospace;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Icon Picker */
.icon-picker-wrapper {
    position: relative;
}

.icon-picker-btn {
    width: 50px;
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--bg-card);
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-picker-btn:hover {
    border-color: var(--primary-color);
    background: var(--light-color);
}

[data-theme="dark"] .icon-picker-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: #475569;
}

[data-theme="dark"] .icon-picker-btn:hover {
    border-color: var(--primary-color);
    background: rgba(255, 255, 255, 0.1);
}

.icon-picker-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 1000;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 12px;
    display: none;
    min-width: 280px;
    margin-top: 4px;
}

.icon-picker-dropdown.active {
    display: block;
}

[data-theme="dark"] .icon-picker-dropdown {
    background: #1e293b;
    border-color: #475569;
}

.icon-picker-grid {
    display: grid;
    grid-template-columns: repeat(8, 1fr);
    gap: 4px;
}

.icon-option {
    width: 32px;
    height: 32px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.icon-option:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

[data-theme="dark"] .icon-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Form Row */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
}

/* Modal Large */
.modal-lg {
    max-width: 900px;
}

/* Bulk Create Styles */
.bulk-vehicle-row {
    align-items: center;
    margin-bottom: 8px;
    padding: 8px;
    background: var(--light-color);
    border-radius: var(--radius-sm);
}

[data-theme="dark"] .bulk-vehicle-row {
    background: rgba(255, 255, 255, 0.05);
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}

.preview-table th,
.preview-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.preview-table th {
    background: var(--light-color);
    font-weight: 600;
}

[data-theme="dark"] .preview-table th {
    background: rgba(255, 255, 255, 0.05);
}

.preview-list {
    max-height: 300px;
    overflow-y: auto;
}

/* Responsive */
@media (max-width: 768px) {
    .roles-grid {
        grid-template-columns: 1fr;
    }
    
    .permissions-grid {
        grid-template-columns: 1fr;
    }
    
    .role-stats {
        justify-content: space-around;
    }
}
