        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            overscroll-behavior: none;
        }
        
        html {
            overscroll-behavior: none;
        }

        :root {
            /* ===== DESIGN TOKENS ===== */

            /* Spacing Scale - 4px base unit */
            --space-xs: 4px;
            --space-sm: 8px;
            --space-md: 12px;
            --space-lg: 16px;
            --space-xl: 24px;
            --space-2xl: 32px;
            --space-3xl: 48px;
            --space-4xl: 64px;

            /* Border Radius - Modernisiert */
            --radius-xs: 6px;
            --radius-sm: 8px;
            --radius-md: 12px;
            --radius-lg: 16px;
            --radius-xl: 20px;
            --radius-2xl: 24px;
            --radius-3xl: 32px;
            --radius-full: 9999px;

            /* Icon Sizes */
            --icon-xs: 14px;
            --icon-sm: 18px;
            --icon-md: 22px;
            --icon-lg: 26px;
            --icon-xl: 36px;
            --icon-2xl: 52px;

            /* Transitions - Verfeinert */
            --transition-fast: 0.12s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            --transition-bounce: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
            --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

            /* Typography - Verbessert */
            --font-size-xs: 12px;
            --font-size-sm: 13px;
            --font-size-base: 15px;
            --font-size-md: 16px;
            --font-size-lg: 18px;
            --font-size-xl: 22px;
            --font-size-2xl: 28px;
            --font-size-3xl: 36px;

            /* Line Heights */
            --leading-tight: 1.3;
            --leading-normal: 1.5;
            --leading-relaxed: 1.65;
            --leading-loose: 1.85;

            /* Z-Index Scale */
            --z-base: 1;
            --z-sidebar: 100;
            --z-dropdown: 200;
            --z-sticky: 300;
            --z-fab: 900;
            --z-modal-backdrop: 1000;
            --z-modal: 1010;
            --z-popover: 1020;
            --z-tooltip: 1100;
            --z-notification: 2000;

            /* Colors - Background - Premium Dark Theme */
            --bg-primary: #0B0F19;
            --bg-secondary: #131720;
            --bg-tertiary: #1A1F2E;
            --bg-elevated: #1F2533;
            --bg-card: rgba(26, 31, 46, 0.97);
            --glass-bg: rgba(26, 31, 46, 0.85);
            --glass-border: rgba(139, 162, 211, 0.12);
            --glass-hover: rgba(26, 31, 46, 0.95);

            /* Colors - Accent - Modern Blue Gradient */
            --accent-primary: #3B82F6;
            --accent-secondary: #2563EB;
            --accent-tertiary: #1D4ED8;
            --accent-light: #60A5FA;
            --accent-lighter: #93C5FD;
            --accent-gradient: linear-gradient(135deg, #60A5FA 0%, #3B82F6 50%, #2563EB 100%);
            --accent-gradient-hover: linear-gradient(135deg, #93C5FD 0%, #60A5FA 50%, #3B82F6 100%);
            --accent-subtle: rgba(59, 130, 246, 0.1);

            /* Colors - Semantic - Verfeinert */
            --success: #10B981;
            --success-light: #34D399;
            --success-dark: #059669;
            --success-subtle: rgba(16, 185, 129, 0.1);
            --warning: #F59E0B;
            --warning-light: #FBBF24;
            --warning-dark: #D97706;
            --warning-subtle: rgba(245, 158, 11, 0.1);
            --danger: #EF4444;
            --danger-light: #F87171;
            --danger-dark: #DC2626;
            --danger-subtle: rgba(239, 68, 68, 0.1);
            --info: #3B82F6;
            --info-light: #60A5FA;
            --info-subtle: rgba(59, 130, 246, 0.1);

            /* Colors - Text - Optimierte Lesbarkeit */
            --text-primary: #F8FAFC;
            --text-secondary: #E2E8F0;
            --text-muted: #CBD5E1;
            --text-dim: #94A3B8;
            --text-subtle: #64748B;

            /* Shadows - Tiefere, realistischere Schatten */
            --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.25);
            --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.3);
            --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.35);
            --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
            --shadow-xl: 0 16px 40px rgba(0, 0, 0, 0.45);
            --shadow-2xl: 0 24px 56px rgba(0, 0, 0, 0.5);
            --shadow-glow: 0 0 24px rgba(59, 130, 246, 0.4), 0 0 48px rgba(59, 130, 246, 0.15);
            --shadow-glow-success: 0 0 24px rgba(16, 185, 129, 0.35);
            --shadow-glow-danger: 0 0 24px rgba(239, 68, 68, 0.35);
            --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.25), 0 8px 24px rgba(0, 0, 0, 0.15);
            --shadow-card-hover: 0 4px 12px rgba(0, 0, 0, 0.3), 0 12px 32px rgba(0, 0, 0, 0.2);

            /* Component-specific */
            --sidebar-width: 280px;
            --border-radius: var(--radius-xl);
            --border-radius-lg: var(--radius-2xl);
            --border-radius-sm: var(--radius-lg);

            /* Feature Colors - Harmonische Palette */
            --color-tasks: #3B82F6;
            --color-tasks-light: #60A5FA;
            --color-knowledge: #10B981;
            --color-knowledge-light: #34D399;
            --color-postits: #F59E0B;
            --color-postits-light: #FBBF24;
            --color-calendar: #8B5CF6;
            --color-calendar-light: #A78BFA;
            --color-chat: #06B6D4;
            --color-chat-light: #22D3EE;
        }

        body {
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            position: relative;
            line-height: var(--leading-normal);
            overscroll-behavior: none;
        }

        /* Canvas Background */
        canvas {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
        }
        
        /* Scrollbar Styling */
        ::-webkit-scrollbar {
            width: 10px;
        }
        
        ::-webkit-scrollbar-track {
            background: rgba(0, 0, 0, 0.15);
        }
        
        ::-webkit-scrollbar-thumb {
            background: var(--accent-gradient);
            border-radius: 20px;
            border: 2px solid rgba(0, 0, 0, 0.3);
        }
        
        ::-webkit-scrollbar-thumb:hover {
            filter: brightness(1.1);
        }
        
        /* ===== ICON SYSTEM ===== */
        .icon {
            width: var(--icon-md);
            height: var(--icon-md);
            display: inline-block;
            vertical-align: middle;
            flex-shrink: 0;
        }
        
        .icon-xs {
            width: var(--icon-xs);
            height: var(--icon-xs);
        }
        
        .icon-sm {
            width: var(--icon-sm);
            height: var(--icon-sm);
        }
        
        .icon-lg {
            width: var(--icon-lg);
            height: var(--icon-lg);
        }
        
        .icon-xl {
            width: var(--icon-xl);
            height: var(--icon-xl);
        }
        
        .icon-2xl {
            width: var(--icon-2xl);
            height: var(--icon-2xl);
        }

        .app-container {
            position: relative;
            z-index: 2;
        }

        /* Login Screen */
        .login-container {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 100vh;
            padding: 20px;
            position: relative;
            z-index: 2;
        }

        .login-box {
            background: var(--glass-bg);
            backdrop-filter: blur(32px) saturate(160%);
            -webkit-backdrop-filter: blur(32px) saturate(160%);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-3xl);
            padding: var(--space-4xl) var(--space-3xl);
            width: 100%;
            max-width: 440px;
            box-shadow: var(--shadow-2xl),
                0 0 0 1px rgba(139, 162, 211, 0.1) inset;
            opacity: 0;
            transform: translateY(24px) scale(0.96);
            animation: containerFade 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards 0.15s;
        }

        @keyframes containerFade {
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .login-title {
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            text-align: center;
            margin-bottom: var(--space-3xl);
            font-size: 2.2rem;
            font-family: 'Orbitron', sans-serif;
            font-weight: 700;
            letter-spacing: -0.02em;
        }

        /* ===== FORM SYSTEM ===== */
        
        /* Form Group */
        .form-group {
            margin-bottom: var(--space-lg);
        }
        
        /* Form Label */
        .form-label {
            display: block;
            margin-bottom: var(--space-sm);
            color: var(--text-primary);
            font-weight: 500;
            font-size: var(--font-size-base);
        }
        
        /* Base Input Styles */
        .form-input,
        .input,
        input[type="text"],
        input[type="email"],
        input[type="password"],
        input[type="date"],
        input[type="number"],
        input[type="url"] {
            width: 100%;
            padding: 14px var(--space-lg);
            background: var(--bg-elevated);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-lg);
            color: var(--text-primary);
            font-size: var(--font-size-base);
            font-family: inherit;
            line-height: var(--leading-normal);
            transition: all var(--transition-smooth);
            outline: none;
        }

        .form-input:focus,
        .input:focus,
        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="password"]:focus,
        input[type="date"]:focus,
        input[type="number"]:focus,
        input[type="url"]:focus {
            background: var(--bg-card);
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
            transform: translateY(-2px);
        }
        
        .form-input::placeholder,
        .input::placeholder {
            color: var(--text-muted);
            opacity: 0.7;
        }
        
        .form-input:disabled,
        .input:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            background: rgba(255, 255, 255, 0.02);
        }
        
        /* Textarea */
        .textarea,
        textarea {
            width: 100%;
            min-height: 120px;
            padding: 14px var(--space-lg);
            background: var(--bg-elevated);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-lg);
            color: var(--text-primary);
            font-size: var(--font-size-base);
            font-family: inherit;
            line-height: var(--leading-relaxed);
            resize: vertical;
            transition: all var(--transition-smooth);
            outline: none;
        }

        .textarea:focus,
        textarea:focus {
            background: var(--bg-card);
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
            transform: translateY(-2px);
        }

        /* Select */
        .select,
        select {
            width: 100%;
            padding: 14px var(--space-lg);
            background: var(--bg-elevated);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-lg);
            color: var(--text-primary);
            font-size: var(--font-size-base);
            font-family: inherit;
            cursor: pointer;
            transition: all var(--transition-smooth);
            outline: none;
            appearance: none;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath fill='%2394a3b8' d='M7 10L2 5h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right var(--space-lg) center;
            padding-right: var(--space-3xl);
        }

        .select:focus,
        select:focus {
            background: var(--bg-card);
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 4px var(--accent-subtle), var(--shadow-sm);
            transform: translateY(-2px);
        }
        
        /* Input with Icon */
        .input-group {
            position: relative;
        }
        
        .input-group .icon {
            position: absolute;
            left: var(--space-md);
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            pointer-events: none;
        }
        
        .input-group .input,
        .input-group input {
            padding-left: calc(var(--icon-md) + var(--space-xl));
        }
        
        /* Form Row - Side by side inputs */
        .form-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: var(--space-lg);
        }
        
        /* Checkbox & Radio */
        input[type="checkbox"],
        input[type="radio"] {
            width: var(--icon-md);
            height: var(--icon-md);
            cursor: pointer;
            accent-color: var(--accent-primary);
        }
        
        .checkbox-wrapper,
        .radio-wrapper {
            display: flex;
            align-items: center;
            gap: var(--space-sm);
            cursor: pointer;
        }
        
        .checkbox-wrapper label,
        .radio-wrapper label {
            cursor: pointer;
            color: var(--text-secondary);
            font-size: var(--font-size-base);
        }

        /* ===== MODERN BUTTON SYSTEM ===== */

        /* Base Button - Foundation for all buttons */
        .btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: var(--space-sm);
            padding: 13px 28px;
            min-height: 46px;
            border-radius: var(--radius-lg);
            font-weight: 600;
            font-size: var(--font-size-base);
            line-height: var(--leading-tight);
            letter-spacing: 0.01em;
            cursor: pointer;
            border: none;
            white-space: nowrap;
            transition: all var(--transition-smooth);
            position: relative;
            overflow: hidden;
            text-decoration: none;
            user-select: none;
            background: var(--accent-gradient);
            color: white;
            box-shadow: var(--shadow-sm), 0 0 0 0 rgba(59, 130, 246, 0);
        }

        .btn::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--accent-gradient-hover);
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }

        .btn:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.4);
        }

        .btn:hover::before {
            opacity: 1;
        }

        .btn:active {
            transform: translateY(0px);
            box-shadow: var(--shadow-sm);
        }

        .btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
        }

        /* Primary Button - Main actions */
        .btn-primary {
            background: var(--accent-gradient);
            color: white;
            position: relative;
        }

        .btn-primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: var(--accent-gradient-hover);
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md), 0 0 24px rgba(59, 130, 246, 0.45);
        }

        .btn-primary:hover::before {
            opacity: 1;
        }
        
        .btn-primary:hover::before {
            left: 100%;
        }
        
        .btn-primary:active {
            transform: translateY(0px);
            box-shadow: var(--shadow-sm);
        }

        /* Secondary Button - Secondary actions */
        .btn-secondary {
            background: var(--bg-elevated);
            color: var(--text-primary);
            border: 1px solid var(--glass-border);
            box-shadow: var(--shadow-sm);
        }

        .btn-secondary::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(255, 255, 255, 0.08);
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }

        .btn-secondary:hover {
            border-color: rgba(139, 162, 211, 0.25);
            transform: translateY(-2px);
            box-shadow: var(--shadow-md);
        }

        .btn-secondary:hover::before {
            opacity: 1;
        }

        /* Danger Button - Destructive actions */
        .btn-danger {
            background: linear-gradient(135deg, var(--danger), var(--danger-dark));
            color: white;
            box-shadow: var(--shadow-sm), 0 0 0 0 rgba(239, 68, 68, 0);
            position: relative;
        }

        .btn-danger::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, var(--danger-light), var(--danger));
            opacity: 0;
            transition: opacity var(--transition-smooth);
        }

        .btn-danger:hover {
            transform: translateY(-2px);
            box-shadow: var(--shadow-md), 0 0 24px rgba(239, 68, 68, 0.45);
        }

        .btn-danger:hover::before {
            opacity: 1;
        }

        /* Ghost Button - Minimal style */
        .btn-ghost {
            background: transparent;
            color: var(--text-secondary);
            border: 1px solid transparent;
            box-shadow: none;
        }

        .btn-ghost:hover {
            background: rgba(255, 255, 255, 0.06);
            color: var(--text-primary);
            border-color: var(--glass-border);
            transform: translateY(-1px);
        }

        /* Icon Button - Circular icon only */
        .btn-icon {
            padding: var(--space-md);
            border-radius: var(--radius-full);
            min-width: 46px;
            min-height: 46px;
            background: var(--bg-elevated);
            border: 1px solid var(--glass-border);
            color: var(--text-secondary);
        }

        .btn-icon:hover {
            background: var(--accent-gradient);
            color: white;
            border-color: transparent;
            box-shadow: var(--shadow-md), 0 0 20px rgba(59, 130, 246, 0.4);
        }
        
        /* Button Sizes */
        .btn-sm {
            padding: 8px 16px;
            min-height: 36px;
            font-size: var(--font-size-sm);
            gap: var(--space-xs);
        }
        
        .btn-lg {
            padding: 16px 32px;
            min-height: 56px;
            font-size: var(--font-size-lg);
        }
        
        .btn-icon.btn-sm {
            padding: var(--space-sm);
            min-width: 36px;
            min-height: 36px;
        }
        
        .btn-icon.btn-lg {
            padding: var(--space-lg);
            min-width: 56px;
            min-height: 56px;
        }
        
        /* Button States */
        .btn:disabled,
        .btn[disabled] {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none !important;
            box-shadow: none !important;
        }
        
        .btn:focus-visible {
            outline: 3px solid var(--accent-primary);
            outline-offset: 3px;
        }
        
        /* Universal Focus Styles */
        *:focus-visible {
            outline: 2px solid var(--accent-primary);
            outline-offset: 2px;
            border-radius: var(--radius-sm);
        }
        
        button:focus-visible,
        a:focus-visible,
        [role="button"]:focus-visible {
            outline: 3px solid var(--accent-primary);
            outline-offset: 3px;
        }
        
        input:focus-visible,
        textarea:focus-visible,
        select:focus-visible {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
        }
        
        /* Button Group */
        .btn-group {
            display: flex;
            gap: var(--space-md);
            flex-wrap: wrap;
        }
        
        /* Full Width Button */
        .btn-full {
            width: 100%;
        }

        .login-footer {
            text-align: center;
            margin-top: 25px;
            font-size: 14px;
            color: var(--text-muted);
        }

        .pulse-ring {
            position: absolute;
            border: 2px solid rgba(58, 200, 255, 0.6);
            border-radius: 50%;
            pointer-events: none;
            z-index: 3;
            animation: pulse 0.8s forwards;
        }

        @keyframes pulse {
            from {
                transform: scale(0.2);
                opacity: 0.7;
            }
            to {
                transform: scale(1.5);
                opacity: 0;
            }
        }

        /* Main App Layout with Sidebar */
        .main-app {
            display: none;
            margin-left: var(--sidebar-width);
            min-height: 100vh;
        }

        /* Sidebar - Premium Design */
        .sidebar {
            position: fixed;
            left: 0;
            top: 0;
            width: var(--sidebar-width);
            height: 100vh;
            background: linear-gradient(180deg,
                var(--bg-secondary) 0%,
                var(--bg-tertiary) 50%,
                var(--bg-secondary) 100%);
            backdrop-filter: blur(32px) saturate(180%);
            -webkit-backdrop-filter: blur(32px) saturate(180%);
            border-right: 1px solid var(--glass-border);
            box-shadow:
                6px 0 32px rgba(0, 0, 0, 0.4),
                inset -1px 0 0 rgba(139, 162, 211, 0.08);
            z-index: var(--z-sidebar);
            display: flex;
            flex-direction: column;
        }

        .sidebar-header {
            padding: var(--space-2xl) var(--space-xl);
            border-bottom: 1px solid var(--glass-border);
        }

        .sidebar-logo {
            display: flex;
            align-items: center;
            gap: 16px;
            color: var(--accent-primary);
            font-size: 32px;
            font-weight: 700;
            text-shadow: 0 0 12px rgba(58, 128, 255, 0.5);
            justify-content: center;
        }

        .sidebar-logo-icon {
            width: 56px;
            height: 56px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .taskbin-logo-svg {
            width: 56px;
            height: 56px;
            filter: drop-shadow(0 4px 12px rgba(58, 128, 255, 0.5));
        }

        .sidebar-nav {
            flex: 1;
            padding: var(--space-xl) var(--space-md);
            overflow-y: auto;
        }

        .nav-item {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            padding: 15px 18px;
            margin-bottom: var(--space-sm);
            background: transparent;
            border: 1px solid transparent;
            border-radius: var(--radius-lg);
            color: var(--text-muted);
            cursor: pointer;
            transition: all var(--transition-smooth);
            font-size: var(--font-size-base);
            font-weight: 500;
            width: 100%;
            text-align: left;
            position: relative;
            letter-spacing: 0.01em;
        }

        .nav-item:hover {
            background: var(--accent-subtle);
            color: var(--text-primary);
            border-color: var(--glass-border);
            transform: translateX(6px);
        }

        .nav-item.active {
            background: var(--accent-subtle);
            color: var(--accent-light);
            border-color: var(--glass-border);
            box-shadow: inset 0 0 16px rgba(59, 130, 246, 0.15);
            position: relative;
            font-weight: 600;
        }

        .nav-item.active::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 4px;
            height: 28px;
            background: var(--accent-gradient);
            border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
            box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
        }
        
        .nav-item:focus-visible,
        .footer-action-btn:focus-visible,
        .quick-action-btn:focus-visible,
        .filter-btn:focus-visible,
        .color-filter-btn:focus-visible,
        .sort-select:focus-visible,
        .search-input:focus-visible {
            outline: 2px solid var(--accent-primary);
            outline-offset: 3px;
        }
        
        /* Navigation Divider & Section */
        .nav-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: var(--space-lg) var(--space-md);
        }
        
        .nav-section-title {
            padding: var(--space-sm) var(--space-lg);
            color: var(--text-muted);
            font-size: var(--font-size-xs);
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-top: var(--space-sm);
        }
        
        /* Action Nav Items (Schnellaktionen) */
        .nav-item-action {
            background: rgba(59, 130, 246, 0.08);
            border-color: rgba(59, 130, 246, 0.2);
        }
        
        .nav-item-action:hover {
            background: rgba(59, 130, 246, 0.15);
            border-color: rgba(59, 130, 246, 0.4);
        }

        /* ===== SIDEBAR FOOTER - HORIZONTAL ICON BAR ===== */
        .sidebar-footer {
            padding: 16px;
            background: linear-gradient(180deg, rgba(26, 31, 46, 0) 0%, rgba(26, 31, 46, 0.8) 100%);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        /* User Section - Kompakt */
        .footer-user {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
            transition: all 0.3s ease;
        }

        .footer-user:hover {
            background: rgba(58, 128, 255, 0.08);
            border-color: rgba(58, 128, 255, 0.2);
        }

        .footer-user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            background: var(--accent-gradient);
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.3);
        }

        .footer-user-avatar svg {
            color: white !important;
        }

        .footer-user-info {
            flex: 1;
            min-width: 0;
        }

        .footer-user-name {
            color: var(--text-primary);
            font-size: 13px;
            font-weight: 600;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .footer-user-role {
            color: var(--text-muted);
            font-size: 10px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 500;
        }

        /* Action Buttons Bar - Horizontal mit voller Breite */
        .footer-actions-bar {
            display: flex;
            align-items: stretch;
            gap: 6px;
            padding: 6px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.06);
            border-radius: 10px;
        }

        .footer-action-group {
            position: relative;
            flex: 1; /* Gleichmäßige Verteilung */
            min-width: 0;
        }

        .footer-action-btn {
            width: 100%; /* Volle Breite des Containers */
            min-height: 48px; /* WCAG Mindestgröße für Touch */
            padding: 0 12px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }

        .footer-action-btn::before {
            content: '';
            position: absolute;
            top: 50%;
            left: 50%;
            width: 0;
            height: 0;
            border-radius: 50%;
            background: rgba(58, 128, 255, 0.3);
            transform: translate(-50%, -50%);
            transition: width 0.4s ease, height 0.4s ease;
        }

        .footer-action-btn:hover::before {
            width: 120px;
            height: 120px;
        }

        .footer-action-btn:hover {
            background: linear-gradient(135deg,
                rgba(58, 128, 255, 0.18),
                rgba(58, 128, 255, 0.12));
            border-color: rgba(58, 128, 255, 0.4);
            color: var(--accent-primary);
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(58, 128, 255, 0.4),
                        0 0 0 1px rgba(58, 128, 255, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .footer-action-btn:active {
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.3);
        }

        /* Primary Button (Plus/Add) - HIGHLIGHT! */
        .footer-action-primary {
            background: linear-gradient(135deg, 
                rgba(58, 128, 255, 0.25), 
                rgba(58, 128, 255, 0.15));
            border: 2px solid rgba(58, 128, 255, 0.4);
            color: var(--accent-primary);
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(58, 128, 255, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
        }

        .footer-action-primary::before {
            background: rgba(58, 128, 255, 0.4);
        }

        .footer-action-primary:hover {
            background: linear-gradient(135deg, 
                rgba(58, 128, 255, 0.4), 
                rgba(58, 128, 255, 0.25));
            border-color: rgba(58, 128, 255, 0.6);
            box-shadow: 0 8px 24px rgba(58, 128, 255, 0.5),
                        0 0 0 1px rgba(58, 128, 255, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.2);
            transform: translateY(-3px) scale(1.02);
        }

        /* Danger Button (Logout) - ATTENTION! */
        .footer-action-danger {
            background: linear-gradient(135deg, 
                rgba(220, 38, 38, 0.15), 
                rgba(220, 38, 38, 0.1));
            border: 2px solid rgba(220, 38, 38, 0.3);
            color: #fca5a5;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
        }

        .footer-action-danger::before {
            background: rgba(220, 38, 38, 0.4);
        }

        .footer-action-danger:hover {
            background: linear-gradient(135deg, 
                rgba(220, 38, 38, 0.25), 
                rgba(220, 38, 38, 0.15));
            border-color: rgba(220, 38, 38, 0.5);
            color: #fef2f2;
            box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4),
                        0 0 0 1px rgba(220, 38, 38, 0.3),
                        inset 0 1px 0 rgba(255, 255, 255, 0.1);
            transform: translateY(-3px) scale(1.02);
        }

        /* Action Dropdowns */
        .footer-action-dropdown {
            position: absolute;
            bottom: calc(100% + 10px);
            left: 50%;
            transform: translateX(-50%);
            min-width: 220px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 24, 33, 0.96));
            backdrop-filter: blur(20px);
            border: 2px solid rgba(58, 128, 255, 0.4);
            border-radius: 14px;
            padding: 10px;
            opacity: 0;
            visibility: hidden;
            transform: translateX(-50%) translateY(10px) scale(0.95);
            transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 12px 40px rgba(58, 128, 255, 0.3),
                        0 0 0 1px rgba(58, 128, 255, 0.2),
                        inset 0 1px 0 rgba(255, 255, 255, 0.08);
            z-index: 100;
        }

        .footer-action-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0) scale(1);
        }

        /* Button Icons - Größer & zentriert */
        .footer-action-btn svg {
            width: 20px;
            height: 20px;
            transition: all 0.25s ease;
        }

        .footer-action-btn:hover svg {
            transform: scale(1.15);
            filter: drop-shadow(0 0 8px currentColor);
        }

        .footer-action-primary:hover svg {
            transform: scale(1.2) rotate(90deg);
        }

        .footer-action-danger:hover svg {
            transform: scale(1.15) translateX(3px);
        }

        /* Quick Actions Dropdown */
        .dropdown-item {
            width: 100%;
            padding: 10px 12px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 10px;
            font-size: 13px;
            font-weight: 500;
            text-align: left;
        }

        .dropdown-item:hover {
            background: rgba(58, 128, 255, 0.15);
            border-color: rgba(58, 128, 255, 0.3);
            color: var(--accent-primary);
            transform: translateX(4px);
        }

        .dropdown-divider {
            height: 1px;
            background: rgba(255, 255, 255, 0.1);
            margin: 6px 0;
        }

        .quick-actions-dropdown {
            position: absolute;
            bottom: 100%;
            left: 0;
            right: 0;
            margin-bottom: 8px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 24, 33, 0.96));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(58, 128, 255, 0.3);
            border-radius: 12px;
            padding: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(10px) scale(0.95);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            box-shadow: 0 8px 32px rgba(58, 128, 255, 0.2), 
                        0 0 0 1px rgba(58, 128, 255, 0.1),
                        inset 0 1px 0 rgba(255, 255, 255, 0.05);
            z-index: 100;
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .quick-actions-dropdown.active {
            opacity: 1;
            visibility: visible;
            transform: translateY(0) scale(1);
        }

        .footer-dropdown-item {
            padding: 0;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            gap: 12px;
            font-size: 13px;
            overflow: hidden;
            position: relative;
        }

        .footer-dropdown-item::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 3px;
            height: 100%;
            background: var(--accent-primary);
            transform: scaleY(0);
            transition: transform 0.25s ease;
        }

        .footer-dropdown-item:hover::before {
            transform: scaleY(1);
        }

        .footer-dropdown-item:hover {
            transform: translateX(4px);
        }

        /* Quick Action Items mit individuellen Farben */
        .quick-action-task {
            background: linear-gradient(135deg, rgba(58, 128, 255, 0.08), rgba(58, 128, 255, 0.04));
        }

        .quick-action-task:hover {
            background: linear-gradient(135deg, rgba(58, 128, 255, 0.15), rgba(58, 128, 255, 0.08));
            border-color: rgba(58, 128, 255, 0.3);
        }

        .quick-action-knowledge {
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.08), rgba(168, 85, 247, 0.04));
        }

        .quick-action-knowledge:hover {
            background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(168, 85, 247, 0.08));
            border-color: rgba(168, 85, 247, 0.3);
        }

        .quick-action-postit {
            background: linear-gradient(135deg, rgba(236, 72, 153, 0.08), rgba(236, 72, 153, 0.04));
        }

        .quick-action-postit:hover {
            background: linear-gradient(135deg, rgba(236, 72, 153, 0.15), rgba(236, 72, 153, 0.08));
            border-color: rgba(236, 72, 153, 0.3);
        }

        /* Quick Action Icon */
        .quick-action-icon {
            width: 40px;
            height: 40px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
            transition: all 0.25s ease;
        }

        .quick-action-icon-task {
            background: linear-gradient(135deg, #3a80ff, #5a9aff);
        }

        .quick-action-icon-knowledge {
            background: linear-gradient(135deg, #a855f7, #c084fc);
        }

        .quick-action-icon-postit {
            background: linear-gradient(135deg, #ec4899, #f472b6);
        }

        .footer-dropdown-item:hover .quick-action-icon {
            transform: scale(1.1) rotate(5deg);
            box-shadow: 0 6px 20px rgba(58, 128, 255, 0.4);
        }

        .quick-action-icon svg {
            color: white !important;
        }

        /* Quick Action Content */
        .quick-action-content {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 2px;
            padding: 8px 12px 8px 0;
        }

        .quick-action-title {
            color: var(--text-primary);
            font-size: 14px;
            font-weight: 600;
            transition: color 0.25s ease;
        }

        .footer-dropdown-item:hover .quick-action-title {
            color: var(--accent-primary);
        }

        .quick-action-knowledge:hover .quick-action-title {
            color: #a855f7;
        }

        .quick-action-postit:hover .quick-action-title {
            color: #ec4899;
        }

        .quick-action-desc {
            color: var(--text-muted);
            font-size: 11px;
            opacity: 0.7;
        }

        /* Password Strength Indicator */
        .password-strength {
            margin-top: 8px;
            transition: all 0.3s ease;
        }

        .password-strength-bar {
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: 2px;
            overflow: hidden;
            position: relative;
        }

        .password-strength-fill {
            height: 100%;
            width: 0%;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .password-strength-fill::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(90deg, 
                transparent, 
                rgba(255, 255, 255, 0.3), 
                transparent
            );
            animation: shimmer 2s infinite;
        }

        @keyframes shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }

        .password-strength-fill.weak {
            width: 25%;
            background: linear-gradient(90deg, #dc2626, #ef4444);
        }

        .password-strength-fill.fair {
            width: 50%;
            background: linear-gradient(90deg, #f59e0b, #fbbf24);
        }

        .password-strength-fill.good {
            width: 75%;
            background: linear-gradient(90deg, #3b82f6, #60a5fa);
        }

        .password-strength-fill.strong {
            width: 100%;
            background: linear-gradient(90deg, #10b981, #34d399);
        }

        .password-strength-text {
            margin-top: 6px;
            font-size: 12px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
            transition: all 0.3s ease;
        }

        .password-strength-text.weak {
            color: #ef4444;
        }

        .password-strength-text.fair {
            color: #fbbf24;
        }

        .password-strength-text.good {
            color: #60a5fa;
        }

        .password-strength-text.strong {
            color: #34d399;
        }

        .password-strength-icon {
            display: inline-flex;
        }

        /* ===== GLOBAL LOADING OVERLAY ===== */
        .global-loader {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(10, 15, 31, 0.95);
            backdrop-filter: blur(8px);
            z-index: 10000;
            display: none;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .global-loader.active {
            display: flex;
            opacity: 1;
        }

        .loader-content {
            text-align: center;
        }

        .loader-spinner {
            width: 60px;
            height: 60px;
            margin: 0 auto 20px;
            border: 4px solid rgba(58, 128, 255, 0.2);
            border-top-color: var(--accent-primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .loader-text {
            color: var(--text-primary);
            font-size: 16px;
            font-weight: 500;
            margin: 0;
            animation: pulse 1.5s ease-in-out infinite;
        }

        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }

        /* Skeleton Loading States */
        .skeleton {
            background: linear-gradient(
                90deg,
                rgba(255, 255, 255, 0.04) 0%,
                rgba(255, 255, 255, 0.10) 50%,
                rgba(255, 255, 255, 0.04) 100%
            );
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s ease-in-out infinite;
            border-radius: var(--radius-lg);
        }

        @keyframes skeleton-loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }

        .skeleton-text {
            height: 16px;
            margin-bottom: 8px;
            border-radius: var(--radius-sm);
        }

        .skeleton-text:last-child {
            width: 60%;
        }

        .skeleton-card {
            height: 140px;
            margin-bottom: 16px;
            border-radius: var(--radius-lg);
        }

        .skeleton-avatar {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-full);
        }
        
        .skeleton-button {
            height: 48px;
            width: 120px;
            border-radius: var(--radius-lg);
        }
        
        .skeleton-title {
            height: 24px;
            width: 80%;
            margin-bottom: 12px;
            border-radius: var(--radius-sm);
        }

        /* ===== KONFETTI EFFECT ===== */
        .confetti-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
            overflow: hidden;
        }

        .confetti {
            position: absolute;
            width: 10px;
            height: 10px;
            background: var(--accent-primary);
            animation: confetti-fall 3s ease-out forwards;
        }

        @keyframes confetti-fall {
            0% {
                transform: translateY(0) rotateZ(0deg);
                opacity: 1;
            }
            100% {
                transform: translateY(100vh) rotateZ(720deg);
                opacity: 0;
            }
        }

        .confetti:nth-child(2n) {
            background: #10b981;
        }

        .confetti:nth-child(3n) {
            background: #f59e0b;
        }

        .confetti:nth-child(4n) {
            background: #ec4899;
        }

        .confetti:nth-child(5n) {
            background: #3b82f6;
        }

        /* ===== EMPTY STATES ===== */
        .empty-state {
            text-align: center;
            padding: 60px 20px;
            color: var(--text-muted);
        }

        .empty-state-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 24px;
            opacity: 0.3;
            filter: grayscale(1);
        }

        .empty-state-title {
            font-size: 20px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }

        .empty-state-description {
            font-size: 14px;
            color: var(--text-muted);
            margin-bottom: 24px;
            line-height: 1.6;
        }

        .empty-state-action {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            background: var(--accent-gradient);
            color: white;
            border: none;
            border-radius: 12px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 12px rgba(58, 128, 255, 0.3);
        }

        .empty-state-action:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(58, 128, 255, 0.5);
        }

        /* ===== PASSWORD MATCH INDICATOR ===== */
        .password-match-indicator {
            margin-top: 10px;
            padding: 10px 14px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            gap: 10px;
            transition: all 0.3s ease;
            border: 2px solid transparent;
        }

        .password-match-indicator.match {
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.08));
            border-color: rgba(16, 185, 129, 0.3);
        }

        .password-match-indicator.no-match {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
            border-color: rgba(220, 38, 38, 0.3);
        }

        .password-match-icon {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 16px;
            flex-shrink: 0;
            transition: all 0.3s ease;
        }

        .password-match-indicator.match .password-match-icon {
            background: linear-gradient(135deg, #10b981, #34d399);
            box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
            animation: checkPulse 0.5s ease;
        }

        .password-match-indicator.no-match .password-match-icon {
            background: linear-gradient(135deg, #dc2626, #ef4444);
            box-shadow: 0 0 12px rgba(220, 38, 38, 0.4);
            animation: shakeFast 0.5s ease;
        }

        @keyframes checkPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.15); }
        }

        @keyframes shakeFast {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }

        .password-match-text {
            font-size: 13px;
            font-weight: 600;
            transition: color 0.3s ease;
        }

        .password-match-indicator.match .password-match-text {
            color: #34d399;
        }

        .password-match-indicator.no-match .password-match-text {
            color: #fca5a5;
        }

        /* Input Field States */
        #confirmPassword.match {
            border-color: rgba(16, 185, 129, 0.5) !important;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
        }

        #confirmPassword.no-match {
            border-color: rgba(220, 38, 38, 0.5) !important;
            box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
        }

        /* ===== LOGIN TRANSITION ANIMATION ===== */
        @keyframes loginFadeOut {
            0% {
                opacity: 1;
                transform: scale(1);
                filter: blur(0px);
            }
            50% {
                opacity: 0.5;
                transform: scale(0.98);
            }
            100% {
                opacity: 0;
                transform: scale(0.95);
                filter: blur(10px);
            }
        }

        @keyframes appZoomIn {
            0% {
                opacity: 0;
                transform: scale(0.9);
                filter: blur(20px) brightness(0.7);
            }
            50% {
                opacity: 0.5;
                transform: scale(0.95);
                filter: blur(10px) brightness(0.85);
            }
            100% {
                opacity: 1;
                transform: scale(1);
                filter: blur(0px) brightness(1);
            }
        }

        @keyframes particleBurst {
            0% {
                opacity: 1;
                transform: translate(0, 0) scale(1);
            }
            100% {
                opacity: 0;
                transform: translate(var(--tx), var(--ty)) scale(0);
            }
        }

        .login-container.fade-out {
            animation: loginFadeOut 0.6s cubic-bezier(0.4, 0, 1, 1) forwards;
        }

        .app-container.zoom-in {
            animation: appZoomIn 0.8s cubic-bezier(0, 0, 0.2, 1) forwards;
        }

        .login-particles {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 9999;
        }

        .login-particle {
            position: absolute;
            width: 4px;
            height: 4px;
            background: var(--accent-primary);
            border-radius: 50%;
            box-shadow: 0 0 10px var(--accent-primary);
            animation: particleBurst 1s ease-out forwards;
        }


        /* Main Content Area */
        .main-content {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            padding: 32px;
            width: 100%;
            max-width: 1280px; /* Bessere Lesbarkeit auf großen Screens */
            margin: 0 auto;
        }

        .btn-logout {
            padding: 8px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 13px;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .btn-logout:hover {
            background: rgba(220, 38, 38, 0.1);
            border-color: var(--danger);
            color: var(--danger);
        }
        
        /* ===== FAB BUTTON (Floating Action Button) ===== */
        .fab-container {
            position: fixed;
            bottom: 24px;
            right: 24px;
            z-index: var(--z-fab);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
        }

        .fab-button {
            width: 60px;
            height: 60px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.95), rgba(20, 24, 33, 0.98));
            backdrop-filter: blur(10px);
            border: 2px solid rgba(58, 128, 255, 0.4);
            border-radius: 50%;
            box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(58, 128, 255, 0.2) inset;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .fab-button:hover {
            transform: scale(1.05);
            border-color: rgba(58, 128, 255, 0.6);
            box-shadow: 0 12px 32px rgba(58, 128, 255, 0.4), 0 0 0 1px rgba(58, 128, 255, 0.4) inset;
        }

        .fab-button.active {
            transform: rotate(45deg);
            border-color: rgba(220, 38, 38, 0.6);
            box-shadow: 0 8px 24px rgba(220, 38, 38, 0.4);
        }

        .fab-button svg {
            width: 24px;
            height: 24px;
            color: var(--accent-primary);
            transition: all 0.3s ease;
        }

        .fab-button.active svg {
            color: #fca5a5;
        }

        .fab-menu {
            position: absolute;
            bottom: 80px;
            right: 0;
            display: flex;
            flex-direction: column;
            gap: 12px;
            opacity: 0;
            pointer-events: none;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            transform-origin: bottom right;
        }

        .fab-menu.active {
            opacity: 1;
            pointer-events: all;
        }

        .fab-menu-item {
            display: flex;
            align-items: center;
            justify-content: flex-end;
            gap: 12px;
            padding: 12px 20px;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(58, 128, 255, 0.2);
            border-radius: 24px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
            white-space: nowrap;
            transform: translateY(20px) scale(0.85);
            opacity: 0;
            font-size: 14px;
            font-weight: 500;
        }

        .fab-menu.active .fab-menu-item {
            transform: translateY(0) scale(1);
            opacity: 1;
        }

        .fab-menu.active .fab-menu-item:nth-child(1) {
            transition-delay: 0.05s;
        }

        .fab-menu.active .fab-menu-item:nth-child(2) {
            transition-delay: 0.1s;
        }

        .fab-menu.active .fab-menu-item:nth-child(3) {
            transition-delay: 0.15s;
        }

        .fab-menu-item:hover {
            background: linear-gradient(135deg, rgba(58, 128, 255, 0.25), rgba(58, 128, 255, 0.15));
            border-color: rgba(58, 128, 255, 0.5);
            transform: translateX(-5px) scale(1.05);
            box-shadow: 0 8px 24px rgba(58, 128, 255, 0.3);
        }

        .fab-menu-icon {
            width: 32px;
            height: 32px;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.3);
            flex-shrink: 0;
        }
        
        /* Chat Button */
        .btn-chat {
            width: 60px;
            height: 60px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.95), rgba(20, 24, 33, 0.98));
            backdrop-filter: blur(10px);
            border: 2px solid rgba(5, 150, 105, 0.4);
            border-radius: 50%;
            box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(5, 150, 105, 0.2) inset;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }
        
        .btn-chat:hover {
            transform: scale(1.05);
            border-color: rgba(5, 150, 105, 0.6);
            box-shadow: 0 8px 28px rgba(5, 150, 105, 0.4), 0 0 0 1px rgba(5, 150, 105, 0.4) inset;
        }
        
        .btn-chat:active {
            transform: scale(0.95);
        }

        .btn-chat svg {
            width: 24px;
            height: 24px;
            color: #10b981;
        }

        .chat-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            width: 22px;
            height: 22px;
            background: #dc2626;
            border-radius: 50%;
            border: 2px solid var(--bg-primary);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 11px;
            font-weight: 700;
            animation: badgePulse 1.5s infinite;
        }

        @keyframes badgePulse {
            0%, 100% {
                transform: scale(1);
            }
            50% {
                transform: scale(1.1);
            }
        }

        /* Navigation Tabs */
        .nav-tabs {
            display: flex;
            gap: 6px;
            margin-bottom: 24px;
            padding: 5px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.92), rgba(20, 24, 33, 0.85));
            backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 12px;
            box-shadow: 0 4px 12px -4px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
        }

        .nav-tab {
            flex: 1;
            padding: 10px 18px;
            background: transparent;
            border: none;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.25s cubic-bezier(.4,.2,.2,1);
            font-size: 14px;
            font-weight: 600;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
        }

        .nav-tab:hover {
            background: rgba(29, 39, 68, 0.55);
            color: var(--text-primary);
            transform: translateY(-1px);
        }

        .nav-tab.active {
            background: var(--accent-gradient);
            color: white;
            box-shadow: 0 4px 14px -4px rgba(99, 102, 241, 0.65);
        }

        /* Content Sections */
        .content-section {
            display: none;
        }

        .content-section.active {
            display: block;
            animation: fadeInUp 0.4s ease;
        }

        /* Chat Section Layout */
        #chatSection {
            display: none;
            flex-direction: column;
            flex: 1 1 auto;
            min-height: 0;
            overflow: hidden;
        }

        #chatSection.active {
            display: flex;
        }

        #chatSection .section-header {
            flex-shrink: 0;
        }

        #chatMessages {
            flex: 1;
            overflow-y: auto;
        }

        @keyframes fadeInUp {
            from { 
                opacity: 0;
                transform: translateY(20px);
            }
            to { 
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Glass Cards - Premium Design */
        /* ===== CARD SYSTEM ===== */
        
        /* Base Card - Glass morphism style */
        .card,
        .glass-card {
            background: var(--glass-bg);
            backdrop-filter: blur(24px) saturate(160%);
            -webkit-backdrop-filter: blur(24px) saturate(160%);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-2xl);
            padding: var(--space-2xl);
            margin-bottom: var(--space-lg);
            box-shadow: var(--shadow-card);
            transition: all var(--transition-smooth);
            position: relative;
            overflow: visible;
            transform: translateZ(0);
            will-change: transform;
        }
        
        /* Interactive Card */
        .card-interactive,
        .glass-card {
            cursor: pointer;
        }
        
        /* Card Accent Bar */
        .card::before,
        .glass-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 5px;
            height: 100%;
            background: var(--accent-gradient);
            opacity: 0;
            transition: opacity var(--transition-smooth);
            border-radius: var(--radius-2xl) 0 0 var(--radius-2xl);
        }

        /* Card Glow Effect */
        .card::after,
        .glass-card::after {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background: radial-gradient(circle, rgba(59, 130, 246, 0.06) 0%, transparent 65%);
            opacity: 0;
            transition: opacity var(--transition-smooth);
            pointer-events: none;
        }

        /* Card Hover States */
        .card:hover,
        .glass-card:hover {
            transform: translateY(-6px);
            box-shadow: var(--shadow-card-hover);
            border-color: rgba(139, 162, 211, 0.25);
            background: var(--glass-hover);
        }

        .card:hover::before,
        .glass-card:hover::before {
            opacity: 0.8;
        }

        .card:hover::after,
        .glass-card:hover::after {
            opacity: 0.4;
        }
        
        /* Card Edit Mode */
        .card[data-card-mode="edit"],
        .glass-card[data-card-mode="edit"] {
            border-color: rgba(58, 128, 255, 0.6);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.2), 
                var(--shadow-lg);
        }
        
        .card[data-card-mode="edit"]::before,
        .glass-card[data-card-mode="edit"]::before {
            opacity: 1;
        }
        
        /* Card Variants */
        .card-elevated {
            box-shadow: var(--shadow-xl);
        }
        
        .card-bordered {
            border: 2px solid rgba(59, 130, 246, 0.3);
        }
        
        /* Card Structure */
        .card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: var(--space-lg);
            padding-bottom: var(--space-md);
            gap: var(--space-lg);
            border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        }
        
        .card-title {
            font-size: var(--font-size-xl);
            font-weight: 700;
            color: var(--text-primary);
            line-height: var(--leading-normal);
            flex: 1;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
            letter-spacing: 0.3px;
        }
        
        .card-subtitle {
            font-size: var(--font-size-sm);
            color: var(--text-muted);
            margin-top: var(--space-xs);
        }
        
        .card-body {
            color: var(--text-secondary);
            line-height: var(--leading-relaxed);
            font-size: var(--font-size-base);
        }
        
        .card-footer {
            margin-top: var(--space-lg);
            padding-top: var(--space-md);
            border-top: 1px solid rgba(255, 255, 255, 0.08);
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: var(--space-md);
        }
        
        /* Card Actions */
        .card-actions {
            display: flex;
            gap: var(--space-sm);
            flex-shrink: 0;
            opacity: 0;
            transition: opacity var(--transition-base);
        }
        
        .card:hover .card-actions,
        .glass-card:hover .card-actions,
        .postit:hover .postit-actions {
            opacity: 1;
        }
        
        .card[data-card-mode="edit"] .card-actions,
        .glass-card[data-card-mode="edit"] .card-actions,
        .postit[data-card-mode="edit"] .postit-actions {
            opacity: 1;
        }
        
        /* Special Delete Button Hover */
        .btn-card-delete:hover,
        .btn-postit-delete:hover {
            background: linear-gradient(135deg, #dc2626, #b91c1c) !important;
            box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4) !important;
            color: white !important;
        }
        
        /* Card Grid */
        .card-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: var(--space-xl);
        }
        
        /* Card with Icon */
        .card-icon {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-lg);
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--accent-gradient);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
            flex-shrink: 0;
        }

        /* Dashboard Styles */
        .dashboard-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
            margin-bottom: 32px;
        }

        .dashboard-grid > * {
            animation: fadeInUp 0.5s ease forwards;
            opacity: 0;
        }

        .dashboard-grid > *:nth-child(1) {
            animation-delay: 0.1s;
        }

        .dashboard-grid > *:nth-child(2) {
            animation-delay: 0.2s;
        }

        .dashboard-grid > *:nth-child(3) {
            animation-delay: 0.3s;
        }

        .card-content {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .card-icon {
            width: 48px;
            height: 48px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 4px 12px rgba(58, 128, 255, 0.4);
        }

        .card-icon-tasks {
            background: var(--accent-gradient);
        }

        .card-icon-knowledge {
            background: linear-gradient(145deg, #059669, #047857);
            box-shadow: 0 4px 12px rgba(5, 150, 105, 0.4);
        }

        .card-icon-postits {
            background: linear-gradient(145deg, #d97706, #b45309);
            box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
        }

        .card-number {
            font-size: 28px;
            font-weight: 700;
        }

        .card-number-tasks {
            color: var(--accent-primary);
        }

        .card-number-knowledge {
            color: #10b981;
        }

        .card-number-postits {
            color: #f59e0b;
        }

        .card-label {
            color: var(--text-secondary);
            font-size: 13px;
        }

        .card-tasks {
            background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08));
            border: 1px solid rgba(59, 130, 246, 0.3);
        }

        .card-knowledge {
            background: linear-gradient(145deg, rgba(16, 185, 129, 0.15), rgba(5, 150, 105, 0.08));
            border: 1px solid rgba(16, 185, 129, 0.3);
        }

        .card-postits {
            background: linear-gradient(145deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.08));
            border: 1px solid rgba(245, 158, 11, 0.3);
        }

        .dashboard-title {
            margin-bottom: 20px;
            color: var(--accent-primary);
            text-shadow: 0 0 10px rgba(58, 128, 255, 0.3);
        }

        .btn-add {
            padding: 11px 20px;
            background: var(--accent-gradient);
            border: none;
            border-radius: 10px;
            color: white;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(.4,.2,.2,1);
            font-weight: 600;
            margin-bottom: 20px;
            font-size: 14px;
            box-shadow: 0 6px 20px -4px rgba(99, 102, 241, 0.55);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-add:hover {
            transform: translateY(-2px);
            box-shadow: 0 10px 30px -6px rgba(99, 102, 241, 0.65);
        }
        
        .btn-add:active {
            transform: translateY(0);
        }

        /* Tasks */
        .task-content {
            color: var(--text-primary);
            margin-top: 16px;
            line-height: 1.8;
            font-size: 15px;
            opacity: 0.9;
        }

        .task-due {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-size: 13px;
            color: var(--text-secondary);
            margin-top: 12px;
            padding: 6px 12px;
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.05);
            border-radius: 8px;
            width: fit-content;
        }

        .task-due.overdue {
            color: var(--danger);
            font-weight: 600;
            background: rgba(220, 38, 38, 0.1);
            border-color: rgba(220, 38, 38, 0.3);
        }

        .task-link {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            margin-top: 12px;
            padding: 8px 16px;
            background: rgba(58, 128, 255, 0.1);
            border: 1px solid rgba(58, 128, 255, 0.2);
            border-radius: 10px;
            color: var(--accent-primary);
            text-decoration: none;
            font-size: 13px;
            font-weight: 500;
            transition: all 0.2s ease;
            width: fit-content;
        }

        .task-link:hover {
            background: rgba(58, 128, 255, 0.2);
            border-color: var(--accent-primary);
            transform: translateX(4px);
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.2);
        }

        .task-completed {
            opacity: 0.5;
            filter: grayscale(0.3);
        }

        .task-completed .card-title {
            text-decoration: line-through;
            color: var(--text-muted);
        }

        /* Knowledge Base */
        .kb-category {
            display: inline-flex;
            align-items: center;
            padding: 6px 14px;
            background: linear-gradient(135deg, rgba(58, 128, 255, 0.15), rgba(20, 94, 255, 0.1));
            border: 1px solid rgba(58, 128, 255, 0.3);
            border-radius: 20px;
            font-size: 11px;
            font-weight: 700;
            color: var(--accent-primary);
            margin-bottom: 14px;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            backdrop-filter: blur(4px);
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.1), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
        }

        .kb-content {
            color: var(--text-primary);
            line-height: 1.8;
            font-size: 15px;
            margin-top: 16px;
            white-space: pre-wrap;
            opacity: 0.9;
        }

        /* Post-Its */
        .postits-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
            gap: 24px;
        }

        .postit {
            min-height: 240px;
            position: relative;
            padding: 20px;
            border-radius: 16px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
            transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
            cursor: pointer;
            border: 2px solid transparent;
            animation: fadeInUp 0.5s ease forwards;
        }

        .postit:hover {
            transform: translateY(-8px) rotate(2deg) scale(1.02);
            box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5);
        }

        .postit[data-card-mode="edit"] {
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.4), 0 12px 36px rgba(0, 0, 0, 0.4);
        }

        .postit-old textarea {
            width: 100%;
            height: 100%;
            background: transparent;
            border: none;
            color: var(--text-primary);
            resize: none;
            font-family: inherit;
            font-size: 14px;
            line-height: 1.6;
        }

        .postit textarea:focus {
            outline: none;
        }

        /* Modal */
        /* ===== MODAL SYSTEM ===== */
        
        /* Modal Backdrop */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.8);
            backdrop-filter: blur(12px) saturate(120%);
            -webkit-backdrop-filter: blur(12px) saturate(120%);
            z-index: var(--z-modal-backdrop);
            align-items: center;
            justify-content: center;
            padding: var(--space-xl);
            animation: modalFadeIn var(--transition-smooth);
        }

        .modal.active {
            display: flex;
        }

        @keyframes modalFadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        /* Modal Content - Base */
        .modal-content {
            background: var(--glass-bg);
            backdrop-filter: blur(24px) saturate(160%);
            -webkit-backdrop-filter: blur(24px) saturate(160%);
            border: 1px solid var(--glass-border);
            border-radius: var(--radius-3xl);
            padding: var(--space-3xl);
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-2xl),
                0 0 0 1px rgba(139, 162, 211, 0.1) inset;
            animation: modalSlideIn var(--transition-smooth);
            display: flex;
            flex-direction: column;
        }

        @keyframes modalSlideIn {
            from {
                opacity: 0;
                transform: translateY(-32px) scale(0.96);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }
        
        /* Modal Size Variants */
        .modal-sm .modal-content {
            max-width: 400px;
        }
        
        .modal-md .modal-content {
            max-width: 600px;
        }
        
        .modal-lg .modal-content {
            max-width: 800px;
        }
        
        .modal-xl .modal-content {
            max-width: 1200px;
        }
        
        .modal-full .modal-content {
            max-width: 95vw;
            max-height: 95vh;
        }

        /* Settings Modal - Specific Height */
        #settingsModal .modal-content {
            height: 600px;
            max-height: 90vh;
        }

        .settings-tab-content {
            flex: 1;
            overflow-y: auto;
            padding-right: var(--space-sm);
        }

        .settings-tab-content::-webkit-scrollbar {
            width: 6px;
        }

        .settings-tab-content::-webkit-scrollbar-thumb {
            background: var(--accent-gradient);
            border-radius: var(--radius-full);
        }

        /* Modal Header */
        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--space-2xl);
            padding-bottom: var(--space-xl);
            border-bottom: 1px solid var(--glass-border);
        }

        .modal-title {
            font-size: var(--font-size-2xl);
            font-weight: 700;
            color: var(--text-primary);
            display: flex;
            align-items: center;
            gap: var(--space-md);
            letter-spacing: -0.01em;
        }

        .modal-subtitle {
            font-size: var(--font-size-sm);
            color: var(--text-dim);
            margin-top: var(--space-sm);
            font-weight: 400;
        }

        /* Modal Body */
        .modal-body {
            flex: 1;
            overflow-y: auto;
        }

        /* Modal Footer */
        .modal-footer {
            display: flex;
            gap: var(--space-md);
            margin-top: var(--space-2xl);
            padding-top: var(--space-xl);
            border-top: 1px solid var(--glass-border);
            justify-content: flex-end;
        }

        /* Close Button */
        .btn-close {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--bg-elevated);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-md);
            cursor: pointer;
            transition: all var(--transition-base);
            color: var(--text-secondary);
            flex-shrink: 0;
        }

        .btn-close:hover {
            background: var(--danger-subtle);
            border-color: var(--danger);
            color: var(--danger-light);
            transform: scale(1.08) rotate(90deg);
            box-shadow: var(--shadow-sm);
        }

        .btn-close:active {
            transform: scale(0.95) rotate(90deg);
        }

        textarea {
            width: 100%;
            min-height: 120px;
            padding: 12px 14px;
            background: rgba(29, 39, 68, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 15px;
            font-family: inherit;
            resize: vertical;
            transition: all 0.25s cubic-bezier(.4,.2,.2,1);
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
        }

        textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            background: rgba(66, 80, 104, 0.75);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
        }

        select {
            width: 100%;
            padding: 12px 14px;
            background: rgba(29, 39, 68, 0.55);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 15px;
            cursor: pointer;
            transition: all 0.25s cubic-bezier(.4,.2,.2,1);
            box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.03) inset;
        }

        select:focus {
            outline: none;
            border-color: var(--accent-primary);
            background: rgba(66, 80, 104, 0.75);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
        }

        .btn-group {
            display: flex;
            gap: 12px;
            margin-top: 24px;
        }

        .btn-secondary {
            padding: 12px 24px;
            background: linear-gradient(135deg, rgba(29, 39, 68, 0.65), rgba(20, 24, 33, 0.65));
            border: 1px solid rgba(255, 255, 255, 0.12);
            border-radius: 10px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.25s cubic-bezier(.4,.2,.2,1);
            font-weight: 600;
            font-size: 14px;
            box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.55);
        }

        .btn-secondary:hover {
            background: linear-gradient(135deg, rgba(29, 39, 68, 0.85), rgba(20, 24, 33, 0.85));
            border-color: var(--accent-primary);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px -4px rgba(0, 0, 0, 0.65);
        }

        .error-message {
            padding: var(--space-lg);
            background: var(--danger-subtle);
            border: 1px solid var(--danger);
            border-radius: var(--radius-lg);
            color: var(--danger-light);
            margin-bottom: var(--space-lg);
            font-size: var(--font-size-base);
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: var(--space-md);
        }

        /* Settings Tabs */
        .settings-tabs {
            display: flex;
            gap: var(--space-sm);
            margin-bottom: var(--space-xl);
            padding-bottom: var(--space-lg);
            border-bottom: 1px solid var(--glass-border);
        }

        .settings-tab {
            flex: 1;
            padding: var(--space-md) var(--space-lg);
            background: transparent;
            border: 1px solid transparent;
            border-radius: var(--radius-lg);
            color: var(--text-muted);
            cursor: pointer;
            transition: all var(--transition-smooth);
            font-weight: 600;
            font-size: var(--font-size-base);
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
        }

        .settings-tab:hover {
            background: var(--accent-subtle);
            border-color: var(--glass-border);
            color: var(--accent-light);
        }

        .settings-tab.active {
            background: var(--accent-gradient);
            border-color: transparent;
            color: white;
            box-shadow: var(--shadow-sm), 0 0 16px rgba(59, 130, 246, 0.3);
        }

        .settings-tab-content {
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .settings-tab-content.active {
            display: block;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* Categories List */
        .categories-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .category-item {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: rgba(29, 39, 68, 0.45);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            transition: all 0.25s ease;
        }

        .category-item:hover {
            background: rgba(29, 39, 68, 0.65);
            border-color: var(--accent-primary);
            transform: translateX(4px);
        }

        .category-item span {
            color: var(--text-primary);
            font-size: 15px;
            font-weight: 500;
        }

        .category-item-actions {
            display: flex;
            gap: 6px;
        }

        .category-item button {
            padding: 6px 12px;
            background: rgba(58, 128, 255, 0.15);
            border: 1px solid rgba(58, 128, 255, 0.3);
            border-radius: 6px;
            color: var(--accent-primary);
            cursor: pointer;
            font-size: 12px;
            font-weight: 600;
            transition: all 0.2s ease;
        }

        .category-item button:hover {
            background: var(--accent-gradient);
            color: white;
            transform: scale(1.05);
        }

        .category-item button:last-child {
            background: rgba(220, 38, 38, 0.15);
            border-color: rgba(220, 38, 38, 0.3);
            color: #fca5a5;
        }

        .category-item button:last-child:hover {
            background: linear-gradient(135deg, #dc2626, #b91c1c);
            border-color: #dc2626;
            color: white;
        }

        .checkbox-wrapper {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-top: 16px;
        }

        input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
        }

        /* Chat Overlay */
        .chat-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.6);
            backdrop-filter: blur(4px);
            z-index: 998;
            display: none;
            animation: fadeIn 0.3s ease;
        }

        .chat-overlay.active {
            display: block;
        }

        /* Chat */
        .chat-window {
            position: fixed;
            bottom: 100px;
            right: 24px;
            width: 550px;
            height: 650px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 24, 33, 0.96));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(58, 128, 255, 0.3);
            border-radius: 16px;
            box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
            display: none;
            flex-direction: column;
            z-index: 999;
            overflow: hidden;
        }

        .chat-window.active {
            display: flex;
            animation: slideInUpBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
        }

        @keyframes slideInUpBounce {
            from {
                opacity: 0;
                transform: translateY(30px) scale(0.9);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        @keyframes slideInUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .chat-header {
            padding: 16px 20px;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 24, 33, 0.95));
            backdrop-filter: blur(10px);
            border-bottom: 1px solid rgba(58, 128, 255, 0.2);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-avatar {
            width: 40px;
            height: 40px;
            background: var(--accent-gradient);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.3);
        }

        .chat-avatar svg {
            color: white;
        }

        .chat-header-btn {
            width: 32px;
            height: 32px;
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
            color: var(--text-secondary);
        }

        .chat-header-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
            color: var(--text-primary);
        }

        .chat-messages {
            flex: 1;
            padding: 20px;
            overflow-y: auto;
            display: flex;
            flex-direction: column;
            gap: 12px;
        }

        .chat-message {
            padding: 14px 18px;
            border-radius: 16px;
            max-width: 85%;
            word-wrap: break-word;
            line-height: 1.6;
            font-size: 14px;
            position: relative;
            animation: messageSlideIn 0.3s ease;
        }

        @keyframes messageSlideIn {
            from {
                opacity: 0;
                transform: translateY(10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .chat-message.user {
            background: var(--accent-gradient);
            color: white;
            align-self: flex-end;
            border-bottom-right-radius: 4px;
            box-shadow: 0 4px 12px rgba(58, 128, 255, 0.3);
        }

        .chat-message.assistant {
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.95), rgba(20, 24, 33, 0.90));
            border: 1px solid rgba(255, 255, 255, 0.12);
            color: var(--text-primary);
            align-self: flex-start;
            border-bottom-left-radius: 4px;
        }

        .chat-message strong {
            color: var(--accent-primary);
            font-weight: 700;
        }

        .chat-message.assistant strong {
            color: var(--accent-primary);
        }

        .chat-message.user strong {
            color: white;
        }

        .chat-message code {
            background: rgba(0, 0, 0, 0.3);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'Courier New', monospace;
            font-size: 13px;
        }

        .chat-message-time {
            font-size: 10px;
            color: rgba(255, 255, 255, 0.5);
            margin-top: 6px;
            text-align: right;
        }

        .chat-message.assistant .chat-message-time {
            color: var(--text-muted);
        }

        .chat-input-container {
            padding: 16px;
            border-top: 1px solid var(--glass-border);
            background: var(--bg-tertiary);
            display: flex;
            gap: 10px;
        }

        .chat-input {
            flex: 1;
            padding: 12px 14px;
            background: var(--bg-card);
            border: 1px solid var(--glass-border);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 14px;
            resize: none;
            height: 44px;
            font-family: inherit;
            transition: all 0.2s ease;
        }
        
        .chat-input:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

        .chat-send-btn {
            width: 48px;
            height: 48px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
            border: none;
            border-radius: 14px;
            color: white;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 4px 16px rgba(58, 128, 255, 0.3);
            flex-shrink: 0;
        }

        .chat-send-btn:hover:not(:disabled) {
            transform: translateY(-2px) scale(1.05);
            box-shadow: 0 8px 24px rgba(58, 128, 255, 0.4);
        }

        .chat-send-btn:active:not(:disabled) {
            transform: translateY(0) scale(0.98);
        }

        .chat-send-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }

        .chat-send-btn .icon {
            transition: transform 0.3s ease;
        }

        .chat-send-btn:hover:not(:disabled) .icon {
            transform: translateX(2px);
        }

        /* Chat Loading Animation - IMPROVED TYPING INDICATOR */
        .chat-loading {
            display: flex;
            gap: 8px;
            padding: 16px 20px;
            background: rgba(255, 255, 255, 0.08);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255, 255, 255, 0.15);
            border-radius: 16px;
            max-width: 100px;
            align-self: flex-start;
            border-bottom-left-radius: 4px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            animation: messageSlideIn 0.3s ease;
            align-items: center;
        }

        .chat-loading::before {
            content: '';
            width: 8px;
            height: 8px;
            margin-right: -4px;
        }

        .chat-loading-dot {
            width: 10px;
            height: 10px;
            background: linear-gradient(135deg, #a855f7, #8b5cf6);
            border-radius: 50%;
            animation: chatBounce 1.4s infinite ease-in-out;
            box-shadow: 0 2px 6px rgba(168, 85, 247, 0.4);
        }

        .chat-loading-dot:nth-child(1) {
            animation-delay: -0.32s;
        }

        .chat-loading-dot:nth-child(2) {
            animation-delay: -0.16s;
        }

        @keyframes chatBounce {
            0%, 80%, 100% {
                transform: scale(0.6) translateY(0);
                opacity: 0.4;
            }
            40% {
                transform: scale(1.1) translateY(-6px);
                opacity: 1;
            }
        }

        .category-item {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 10px 14px;
            background: var(--bg-tertiary);
            border: 1px solid var(--glass-border);
            border-radius: 8px;
            margin-bottom: 8px;
            transition: all 0.2s ease;
        }
        
        .category-item:hover {
            border-color: var(--accent-primary);
        }

        .category-item button {
            padding: 6px 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: 6px;
            color: var(--text-secondary);
            cursor: pointer;
            font-size: 12px;
            transition: all 0.2s ease;
        }

        .category-item button:hover {
            background: rgba(220, 38, 38, 0.1);
            border-color: var(--danger);
            color: var(--danger);
        }

        /* Notifications */
        .notification {
            position: fixed;
            top: 24px;
            right: 24px;
            background: var(--bg-secondary);
            border: 1px solid var(--glass-border);
            border-radius: 16px;
            padding: 16px 20px;
            color: var(--text-primary);
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05) inset;
            z-index: var(--z-notification);
            transform: translateX(420px);
            transition: all 0.4s cubic-bezier(.4,.2,.2,1);
            max-width: 380px;
            display: flex;
            gap: 14px;
            font-size: 14px;
            backdrop-filter: blur(20px);
            align-items: flex-start;
        }
        
        .notification.show {
            transform: translateX(0);
        }
        
        .notification.success {
            border-left: 4px solid var(--accent-primary);
            background: linear-gradient(145deg, var(--bg-secondary), rgba(58, 128, 255, 0.1));
        }

        .notification.error {
            border-left: 4px solid #ef4444;
            background: linear-gradient(145deg, var(--bg-secondary), rgba(239, 68, 68, 0.1));
        }

        .notification.warning {
            border-left: 4px solid #f59e0b;
            background: linear-gradient(145deg, var(--bg-secondary), rgba(245, 158, 11, 0.1));
        }

        .notification.info {
            border-left: 4px solid var(--accent-primary);
            background: linear-gradient(145deg, var(--bg-secondary), rgba(58, 128, 255, 0.1));
        }

        .notification-content {
            flex: 1;
        }

        .notification-icon {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: bold;
            flex-shrink: 0;
            margin-top: 2px;
        }

        .notification.success .notification-icon {
            background: var(--accent-primary);
            color: white;
        }

        .notification.error .notification-icon {
            background: #ef4444;
            color: white;
        }

        .notification.warning .notification-icon {
            background: #f59e0b;
            color: white;
        }

        .notification.info .notification-icon {
            background: var(--accent-primary);
            color: white;
        }

        .notification-title {
            font-weight: 600;
            margin-bottom: 4px;
            font-size: 14px;
            color: var(--text-primary);
        }

        .notification-message {
            font-size: 13px;
            color: var(--text-secondary);
            line-height: 1.4;
        }

        .notification-close {
            background: transparent;
            border: none;
            color: rgba(255, 255, 255, 0.6);
            cursor: pointer;
            font-size: 18px;
            line-height: 1;
            padding: 2px 6px;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .notification-close:hover {
            color: #fff;
        }
        
        .notification-progress {
            position: absolute;
            left: 10px;
            right: 10px;
            bottom: 6px;
            height: 3px;
            background: rgba(255, 255, 255, 0.18);
            border-radius: 3px;
            overflow: hidden;
        }
        
        .notification-progress span {
            display: block;
            width: 100%;
            height: 100%;
            background: linear-gradient(90deg, var(--accent-primary), var(--accent-tertiary));
            transform-origin: left center;
            animation: notifBar 4s linear forwards;
        }
        
        @keyframes notifBar {
            from { transform: scaleX(1); }
            to { transform: scaleX(0); }
        }

        @media (max-width: 968px) {
            :root {
                --sidebar-width: 70px;
            }

            .sidebar-logo span {
                display: none;
            }

            .sidebar-nav .nav-item span:last-child {
                display: none;
            }

            .sidebar-footer .user-section .user-name {
                display: none;
            }

            .footer-btn span {
                display: none;
            }

            .sidebar-nav .nav-item {
                position: relative;
            }

            .sidebar-nav .nav-item::after {
                content: attr(data-label);
                position: absolute;
                left: calc(100% + 12px);
                top: 50%;
                transform: translateY(-50%);
                background: rgba(15, 20, 35, 0.95);
                border: 1px solid rgba(255, 255, 255, 0.1);
                border-radius: 8px;
                padding: 6px 12px;
                color: var(--text-primary);
                font-size: var(--font-size-sm);
                opacity: 0;
                pointer-events: none;
                transition: opacity var(--transition-fast);
                white-space: nowrap;
                box-shadow: 0 10px 20px rgba(5, 10, 25, 0.35);
            }

            .sidebar-nav .nav-item:hover::after,
            .sidebar-nav .nav-item:focus-visible::after {
                opacity: 1;
            }
        }

        /* Mobile Menu Toggle */
        .mobile-menu-toggle {
            display: none;
            position: fixed;
            top: 20px;
            left: 20px;
            z-index: 101;
            width: 48px;
            height: 48px;
            background: var(--bg-card);
            backdrop-filter: blur(15px);
            border: 1px solid var(--glass-border);
            border-radius: 12px;
            cursor: pointer;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 5px;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
        }

        .mobile-menu-toggle span {
            width: 24px;
            height: 2px;
            background: var(--accent-primary);
            border-radius: 2px;
            transition: all 0.3s ease;
        }

        @media (max-width: 768px) {
            .mobile-menu-toggle {
                display: flex;
            }

            .main-app {
                margin-left: 0;
            }

            .sidebar {
                transform: translateX(-100%);
                transition: transform 0.3s ease;
                z-index: 200;
            }

            .sidebar.active {
                transform: translateX(0);
            }

            .sidebar-overlay {
                display: none;
                position: fixed;
                top: 0;
                left: 0;
                width: 100%;
                height: 100%;
                background: rgba(0, 0, 0, 0.5);
                z-index: 150;
            }

            .sidebar-overlay.active {
                display: block;
            }

            .chat-window {
                width: calc(100% - 48px);
                height: calc(100vh - 180px);
                right: 24px;
                bottom: 100px;
            }
            
            .notification {
                right: 16px;
                left: 16px;
                max-width: none;
            }

            .fab-container {
                right: 16px;
                bottom: 90px;
            }

            .btn-chat {
                right: 16px;
                bottom: 16px;
            }
            
            /* Dashboard Improvements */
            .dashboard-grid {
                grid-template-columns: 1fr;
                gap: 16px;
            }
            
            .dashboard-recent {
                grid-template-columns: 1fr;
            }
            
            /* Modal Improvements */
            .modal-content {
                padding: var(--space-xl);
                max-height: 85vh;
            }
            
            /* Section Headers */
            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: var(--space-md);
            }
            
            .section-header h2 {
                font-size: var(--font-size-xl);
            }
            
            .section-header .btn {
                width: 100%;
            }
            
            /* Filter Bar */
            .filter-bar {
                flex-direction: column;
                gap: var(--space-md);
            }
            
            .filter-group {
                width: 100%;
                overflow-x: auto;
                flex-wrap: nowrap;
            }
            

        @media (prefers-reduced-motion: reduce) {
            canvas#bg-canvas {
                display: none;
            }

            *,
            *::before,
            *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }
            
            .pulse-ring,
            .confetti,
            .login-particle,
            .login-container.fade-out,
            .app-container.zoom-in {
                animation: none !important;
            }
        }
            .sort-group {
                margin-left: 0;
                width: 100%;
            }
            
            .sort-select,
            .filter-select {
                width: 100%;
            }
            
            /* Search Box */
            .search-box {
                max-width: 100%;
            }
            
            /* Cards */
            .card-grid,
            .postits-grid {
                grid-template-columns: 1fr;
            }
            
            .glass-card {
                padding: var(--space-lg);
            }
            
            /* Quick Actions */
            .quick-actions-grid {
                grid-template-columns: 1fr;
            }
            
            /* Calendar */
            .calendar-container {
                flex-direction: column;
            }
            
            .calendar-tasks-sidebar {
                width: 100%;
                max-height: none;
                border-left: none;
                border-top: 1px solid var(--glass-border);
                padding-top: var(--space-xl);
            }
            
            /* Chat Controls */
            .chat-controls {
                flex-wrap: wrap;
                gap: var(--space-sm);
            }
            
            .custom-dropdown {
                flex: 1;
                min-width: 150px;
            }
            
            /* Button Groups */
            .btn-group {
                flex-direction: column;
            }
            
            .btn-group .btn {
                width: 100%;
            }
            
            /* Footer Actions Bar - Mobile Optimiert */
            .footer-actions-bar {
                gap: 6px;
                padding: 6px;
            }
            
            .footer-action-btn {
                min-height: 48px; /* WCAG Touch Target */
                padding: 0 10px;
            }
            
            .footer-action-btn svg {
                width: 20px;
                height: 20px;
            }
            
            /* Sidebar Footer - Kompakt */
            .footer-user {
                padding: 8px;
            }
            
            .footer-user-avatar {
                width: 28px;
                height: 28px;
            }
            
            .footer-user-name {
                font-size: 12px;
            }
            
            .footer-user-role {
                font-size: 9px;
            }
        }

        /* Custom Dialogs (Confirm & Prompt) */
        .custom-dialog {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.75);
            backdrop-filter: blur(10px);
            z-index: 2000;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .custom-dialog.active {
            display: flex;
            animation: fadeInDialog 0.25s ease;
        }

        @keyframes fadeInDialog {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }

        .custom-dialog-content {
            background: linear-gradient(160deg, rgba(26, 31, 46, 0.98), rgba(17, 24, 39, 0.96));
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: 16px;
            padding: 32px;
            width: 100%;
            max-width: 450px;
            box-shadow: 0 30px 80px -10px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
            animation: slideInDialog 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            text-align: center;
        }

        @keyframes slideInDialog {
            from {
                opacity: 0;
                transform: translateY(-30px) scale(0.95);
            }
            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .custom-dialog-icon {
            width: 64px;
            height: 64px;
            margin: 0 auto 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            animation: pulseIcon 2s ease-in-out infinite;
        }

        .custom-dialog-icon.warning {
            background: linear-gradient(135deg, rgba(220, 38, 38, 0.2), rgba(185, 28, 28, 0.15));
            border: 2px solid rgba(220, 38, 38, 0.4);
            color: #fca5a5;
        }

        .custom-dialog-icon.primary {
            background: linear-gradient(135deg, rgba(58, 128, 255, 0.2), rgba(30, 99, 255, 0.15));
            border: 2px solid rgba(58, 128, 255, 0.4);
            color: var(--accent-primary);
        }

        @keyframes pulseIcon {
            0%, 100% {
                box-shadow: 0 0 0 0 currentColor;
            }
            50% {
                box-shadow: 0 0 0 8px transparent;
            }
        }

        .custom-dialog-title {
            font-size: 22px;
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: 12px;
        }

        .custom-dialog-message {
            font-size: 15px;
            color: var(--text-secondary);
            margin-bottom: 24px;
            line-height: 1.5;
        }

        .custom-dialog-buttons {
            display: flex;
            gap: 12px;
            justify-content: center;
        }

        .custom-dialog-buttons button {
            flex: 1;
            max-width: 150px;
        }

        .btn-danger {
            padding: 12px 24px;
            background: linear-gradient(135deg, #dc2626, #b91c1c);
            border: 1px solid rgba(220, 38, 38, 0.5);
            border-radius: 10px;
            color: white;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            font-size: 14px;
        }

        .btn-danger:hover {
            background: linear-gradient(135deg, #b91c1c, #991b1b);
            transform: translateY(-2px);
            box-shadow: 0 8px 24px -4px rgba(220, 38, 38, 0.5);
        }

        /* ===== CUSTOM DROPDOWN (AI Provider Selector) ===== */
        .custom-dropdown {
            position: relative;
            min-width: 180px;
        }

        .dropdown-selected {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 10px 14px;
            background: rgba(26, 31, 46, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.25s ease;
            font-size: 14px;
            font-weight: 600;
            user-select: none;
        }

        .dropdown-selected:hover {
            background: rgba(26, 31, 46, 0.8);
            border-color: rgba(58, 128, 255, 0.3);
        }

        .custom-dropdown.open .dropdown-selected {
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.1);
        }

        .dropdown-arrow {
            transition: transform 0.3s ease;
            color: var(--text-muted);
        }

        .custom-dropdown.open .dropdown-arrow {
            transform: rotate(180deg);
        }

        .dropdown-options {
            position: absolute;
            top: calc(100% + 8px);
            left: 0;
            right: 0;
            background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 24, 33, 0.96));
            backdrop-filter: blur(20px);
            border: 1px solid rgba(58, 128, 255, 0.3);
            border-radius: 12px;
            padding: 8px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4), 
                        0 0 0 1px rgba(58, 128, 255, 0.1);
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
            z-index: 100;
        }

        .custom-dropdown.open .dropdown-options {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .dropdown-option {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 14px;
            font-weight: 500;
        }

        .dropdown-option:hover {
            background: rgba(58, 128, 255, 0.1);
            border-color: rgba(58, 128, 255, 0.2);
            color: var(--text-primary);
        }

        .dropdown-option.selected {
            background: rgba(58, 128, 255, 0.15);
            border-color: rgba(58, 128, 255, 0.4);
            color: var(--accent-primary);
        }

        .provider-icon {
            font-size: 20px;
            width: 24px;
            text-align: center;
        }

        /* ===== IMPROVED DASHBOARD STYLES ===== */
        .dashboard-stat-card {
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            overflow: visible;
        }

        .dashboard-stat-card:hover {
            transform: translateY(-8px) scale(1.02);
            box-shadow: 0 20px 60px -12px rgba(58, 128, 255, 0.5),
                0 0 0 1px rgba(59, 130, 246, 0.3);
        }

        .stat-card-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 16px;
        }

        .stat-card-icon {
            width: 56px;
            height: 56px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 6px 16px rgba(58, 128, 255, 0.4);
        }

        .stat-card-badge {
            padding: 4px 12px;
            background: rgba(5, 150, 105, 0.15);
            border: 1px solid rgba(5, 150, 105, 0.4);
            border-radius: 12px;
            font-size: 11px;
            font-weight: 700;
            color: #10b981;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .badge-new {
            background: linear-gradient(135deg, rgba(217, 119, 6, 0.2), rgba(245, 158, 11, 0.15));
            border-color: rgba(217, 119, 6, 0.4);
            color: #f59e0b;
        }

        .stat-card-body {
            margin: 16px 0;
        }

        .stat-card-number {
            font-size: 40px;
            font-weight: 800;
            background: var(--accent-gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            line-height: 1.2;
            margin-bottom: 4px;
        }

        .card-knowledge .stat-card-number {
            background: linear-gradient(145deg, #10b981, #047857);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .card-postits .stat-card-number {
            background: linear-gradient(145deg, #f59e0b, #d97706);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .stat-card-label {
            font-size: 14px;
            color: var(--text-secondary);
            font-weight: 600;
            margin-bottom: 6px;
        }

        .stat-card-detail {
            font-size: 12px;
            color: var(--text-muted);
        }

        .stat-card-footer {
            margin-top: 16px;
            padding-top: 16px;
            border-top: 1px solid rgba(255, 255, 255, 0.04);
        }

        .stat-card-action {
            width: 100%;
            padding: 8px 12px;
            background: rgba(58, 128, 255, 0.08);
            border: 1px solid rgba(58, 128, 255, 0.2);
            border-radius: 8px;
            color: var(--accent-primary);
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .stat-card-action:hover {
            background: rgba(58, 128, 255, 0.15);
            border-color: rgba(58, 128, 255, 0.4);
            transform: translateX(4px);
        }

        .dashboard-recent {
            display: grid;
            grid-template-columns: 2fr 1fr;
            gap: 16px;
            margin-top: 24px;
        }

        .quick-actions-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .quick-action-btn {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            padding: 20px 12px;
            background: rgba(58, 128, 255, 0.05);
            border: 1px solid rgba(58, 128, 255, 0.15);
            border-radius: 12px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
            font-weight: 600;
        }

        .quick-action-btn:hover {
            background: rgba(58, 128, 255, 0.12);
            border-color: rgba(58, 128, 255, 0.3);
            transform: translateY(-4px);
            box-shadow: 0 8px 20px rgba(58, 128, 255, 0.2);
        }

        /* ===== SECTION HEADERS ===== */
        .section-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
        }

        .btn-primary {
            padding: 10px 20px;
            background: var(--accent-gradient);
            border: none;
            border-radius: 10px;
            color: white;
            cursor: pointer;
            transition: all 0.3s ease;
            font-weight: 600;
            font-size: 14px;
            box-shadow: 0 4px 12px rgba(58, 128, 255, 0.4);
            display: inline-flex;
            align-items: center;
            gap: 8px;
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(58, 128, 255, 0.5);
        }

        /* ===== FILTER BAR ===== */
        .filter-bar {
            display: flex;
            gap: 16px;
            margin-bottom: 20px;
            flex-wrap: wrap;
            align-items: center;
        }

        .filter-group {
            display: flex;
            gap: 8px;
            background: rgba(26, 31, 46, 0.6);
            padding: 6px;
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.05);
        }

        .filter-btn {
            padding: 8px 16px;
            background: transparent;
            border: 1px solid transparent;
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
            font-weight: 600;
        }

        .filter-btn:hover {
            background: rgba(58, 128, 255, 0.1);
            color: var(--text-primary);
        }

        .filter-btn.active {
            background: var(--accent-gradient);
            color: white;
            border-color: transparent;
            box-shadow: 0 2px 8px rgba(58, 128, 255, 0.4);
        }

        .sort-group {
            margin-left: auto;
        }

        .sort-select,
        .filter-select {
            padding: 8px 14px;
            background: rgba(26, 31, 46, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 8px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 13px;
            font-weight: 600;
        }

        .sort-select:hover,
        .filter-select:hover {
            background: rgba(26, 31, 46, 0.8);
            border-color: rgba(58, 128, 255, 0.3);
        }

        .sort-select:focus,
        .filter-select:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.1);
        }

        /* ===== SEARCH BOX ===== */
        .search-box {
            position: relative;
            flex: 1;
            max-width: 400px;
        }

        .search-input {
            width: 100%;
            padding: 10px 16px 10px 42px;
            background: rgba(26, 31, 46, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 10px;
            color: var(--text-primary);
            font-size: 14px;
            transition: all 0.3s ease;
        }

        .search-input:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.1);
            background: rgba(26, 31, 46, 0.8);
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .category-filter {
            flex: 1;
            max-width: 250px;
        }

        /* ===== POST-IT COLOR FILTER ===== */
        .postit-color-filter {
            display: flex;
            gap: 8px;
            margin-bottom: 20px;
            padding: 8px;
            background: rgba(26, 31, 46, 0.6);
            border-radius: 10px;
            border: 1px solid rgba(255, 255, 255, 0.05);
            align-items: center;
        }

        .color-filter-btn {
            min-width: 48px;
            min-height: 48px;
            padding: 8px;
            background: transparent;
            border: 2px solid transparent;
            border-radius: 50%;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .color-filter-btn:hover {
            background: rgba(58, 128, 255, 0.1);
            transform: scale(1.1);
        }

        .color-filter-btn.active {
            border-color: var(--accent-primary);
            background: rgba(58, 128, 255, 0.15);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.2);
        }

        /* ===== ENHANCED POST-IT STYLES ===== */
        .postit {
            position: relative;
            cursor: move;
        }

        .postit::before {
            content: '';
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 40px;
            height: 6px;
            background: rgba(0, 0, 0, 0.2);
            border-radius: 3px;
        }

        .postit.color-yellow {
            background: linear-gradient(135deg, #fbbf24, #f59e0b);
            border-color: #d97706;
            color: #1f2937;
            box-shadow: 0 4px 16px rgba(251, 191, 36, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .postit.color-green {
            background: linear-gradient(135deg, #34d399, #10b981);
            border-color: #059669;
            color: #f8fafc;
            box-shadow: 0 4px 16px rgba(52, 211, 153, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .postit.color-pink {
            background: linear-gradient(135deg, #f472b6, #ec4899);
            border-color: #db2777;
            color: #f8fafc;
            box-shadow: 0 4px 16px rgba(244, 114, 182, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .postit.color-blue {
            background: linear-gradient(135deg, #60a5fa, #3b82f6);
            border-color: #2563eb;
            color: #f8fafc;
            box-shadow: 0 4px 16px rgba(96, 165, 250, 0.35),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
        }

        .postit-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 12px;
            padding-top: 8px;
        }

        .postit-color-picker {
            display: flex;
            gap: 6px;
        }

        .postit-color-option {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid transparent;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .postit-color-option:hover {
            transform: scale(1.2);
            border-color: var(--text-primary);
        }

        .postit-color-option.active {
            border-color: var(--text-primary);
            box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
        }

        /* ===== RECENT ITEMS ===== */
        .recent-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px;
            background: rgba(58, 128, 255, 0.05);
            border: 1px solid rgba(58, 128, 255, 0.1);
            border-radius: 10px;
            margin-bottom: 8px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .recent-item:hover {
            background: rgba(58, 128, 255, 0.12);
            border-color: rgba(58, 128, 255, 0.3);
            transform: translateX(4px);
        }

        .recent-item-icon {
            width: 36px;
            height: 36px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(58, 128, 255, 0.15);
            border-radius: 8px;
            font-size: 18px;
        }

        .recent-item-title {
            flex: 1;
            font-weight: 600;
            color: var(--text-primary);
            font-size: 14px;
        }

        .recent-item-type {
            font-size: 11px;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        /* ===== RESPONSIVE IMPROVEMENTS ===== */
        @media (max-width: 1200px) {
            .dashboard-recent {
                grid-template-columns: 1fr;
            }
        }

        /* ===== POST-IT MODAL STYLES ===== */
        .modal-postit {
            max-width: 600px;
        }

        .postit-color-selector {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 12px;
        }

        .postit-color-btn {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 14px 18px;
            background: rgba(26, 31, 46, 0.6);
            border: 2px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            color: var(--text-primary);
            cursor: pointer;
            transition: all 0.3s ease;
            font-size: 14px;
            font-weight: 600;
        }

        .postit-color-btn:hover {
            border-color: rgba(255, 255, 255, 0.2);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        }

        .postit-color-btn.active {
            border-color: var(--accent-primary);
            background: rgba(58, 128, 255, 0.1);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.2);
        }

        .color-preview {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: 2px solid rgba(0, 0, 0, 0.2);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
        }

        .postit-textarea {
            width: 100%;
            min-height: 200px;
            padding: 16px;
            background: rgba(26, 31, 46, 0.6);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 15px;
            line-height: 1.6;
            resize: vertical;
            font-family: inherit;
            transition: all 0.3s ease;
        }

        .postit-textarea:focus {
            outline: none;
            border-color: var(--accent-primary);
            box-shadow: 0 0 0 3px rgba(58, 128, 255, 0.1);
            background: rgba(26, 31, 46, 0.8);
        }

        .postit-content {
            padding: 16px;
            font-size: 15px;
            line-height: 1.8;
            color: inherit;
            white-space: pre-wrap;
            word-wrap: break-word;
        }

        .postit .postit-content {
            cursor: pointer;
        }

        @media (max-width: 768px) {
            .dashboard-grid {
                grid-template-columns: 1fr;
            }

            .filter-bar {
                flex-direction: column;
                align-items: stretch;
            }

            .sort-group {
                margin-left: 0;
            }

            .search-box,
            .category-filter {
                max-width: 100%;
            }

            .quick-actions-grid {
                grid-template-columns: 1fr;
            }

            .section-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 12px;
            }

            .btn-primary {
                width: 100%;
                justify-content: center;
            }

            .postit-color-selector {
                grid-template-columns: 1fr;
            }

            .chat-window {
                width: 100%;
                height: 100%;
                bottom: 0;
                right: 0;
                border-radius: 0;
            }
        }

/* ===== MODERN CHAT DESIGN ===== */

/* Chat Controls - Cleaner Toolbar */
.chat-controls {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Custom Dropdown - Provider Selector */
.custom-dropdown {
    position: relative;
    min-width: 200px;
}

.dropdown-selected {
    padding: 12px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.15), rgba(58, 128, 255, 0.08));
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(58, 128, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(58, 128, 255, 0.2);
}

.dropdown-selected:hover {
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.22), rgba(58, 128, 255, 0.12));
    border-color: rgba(58, 128, 255, 0.45);
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.3);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    opacity: 0.8;
    width: 14px;
    height: 14px;
}

.custom-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.dropdown-options {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(20, 25, 40, 0.98);
    border: 2px solid rgba(58, 128, 255, 0.3);
    border-radius: 14px;
    backdrop-filter: blur(24px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4),
                0 6px 20px rgba(58, 128, 255, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
}

.custom-dropdown.open .dropdown-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-option {
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.dropdown-option::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--accent-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.dropdown-option:hover::before {
    transform: scaleX(1);
}

.dropdown-option:hover {
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.18), rgba(58, 128, 255, 0.10));
    color: var(--text-primary);
}

.dropdown-option.selected {
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.25), rgba(58, 128, 255, 0.15));
    color: var(--accent-primary);
    font-weight: 600;
}

.dropdown-option.selected::before {
    transform: scaleX(1);
    background: var(--accent-primary);
}

.provider-icon {
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.dropdown-option:hover .provider-icon {
    filter: brightness(1.2);
}

/* Legacy support for old select */
.model-select {
    display: none;
}

/* Chat Control Buttons - Unified Style */
.chat-controls .btn-secondary {
    padding: 10px 18px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    min-width: 120px;
    justify-content: center;
}

.chat-controls .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

/* Toggle Knowledge Mode Button - DEUTLICH HERVORGEHOBEN */
.toggle-knowledge-mode {
    padding: 12px 18px;
    border: none;
    border-radius: 12px;
    background: rgba(168, 85, 247, 0.08);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    border: 2px solid rgba(168, 85, 247, 0.2);
    min-width: 140px;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.toggle-knowledge-mode::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.15));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.toggle-knowledge-mode:hover {
    background: rgba(168, 85, 247, 0.12);
    border-color: rgba(168, 85, 247, 0.35);
    color: #c084fc;
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.2);
}

.toggle-knowledge-mode.active {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.15));
    border-color: rgba(168, 85, 247, 0.5);
    color: #c084fc;
    box-shadow: 
        0 6px 20px rgba(168, 85, 247, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.toggle-knowledge-mode.active::before {
    opacity: 1;
}

.toggle-knowledge-mode span {
    position: relative;
    z-index: 1;
}

.toggle-knowledge-mode .icon {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.toggle-knowledge-mode:hover .icon {
    filter: drop-shadow(0 0 4px rgba(168, 85, 247, 0.4));
}

.toggle-knowledge-mode.active .icon {
    filter: drop-shadow(0 0 8px rgba(168, 85, 247, 0.6));
}

.toggle-knowledge-mode.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-color: transparent;
    box-shadow: 0 4px 16px rgba(58, 128, 255, 0.3);
}

.toggle-knowledge-mode .icon {
    transition: transform 0.3s ease;
}

.toggle-knowledge-mode.active .icon {
    transform: scale(1.1);
}

/* ===== CHAT SECTION VISIBILITY CONTROL ===== */
/* Ensure chat components are ONLY visible within #chatSection */
.chat-messages-full,
.chat-input-container-full,
.chat-message,
.chat-input {
    display: none !important;
}

#chatSection .chat-messages-full,
#chatSection .chat-input-container-full {
    display: flex !important;
}

#chatSection .chat-message {
    display: flex !important;
}

#chatSection .chat-input {
    display: block !important;
}

/* Chat Messages Container - ONLY visible within active #chatSection */
#chatSection .chat-messages-full {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    background: rgba(0, 0, 0, 0.15);
    border-radius: 16px 16px 0 0;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: none;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    scroll-behavior: smooth;
    min-height: 0; /* Important for flex shrinking */
}

/* Individual Chat Messages - Clean, flat design with avatars */
#chatSection .chat-message {
    max-width: 75%;
    display: flex;
    gap: 12px;
    align-items: flex-start;
    opacity: 0;
    animation: messageFadeIn 0.2s ease forwards;
}

@keyframes messageFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Message Avatar - IMPROVED */
.chat-message-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.chat-message-avatar::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: left 0.5s ease;
}

.chat-message:hover .chat-message-avatar::before {
    left: 100%;
}

.chat-message-avatar svg {
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Message Bubble Container */
.chat-message-bubble {
    padding: 14px 18px;
    border-radius: 16px;
    line-height: 1.6;
    word-wrap: break-word;
    flex: 1;
    min-width: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

/* User Messages - Right aligned, gradient */
#chatSection .chat-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

#chatSection .chat-message.user .chat-message-avatar {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1d4ed8 100%);
    box-shadow: 0 4px 16px rgba(58, 128, 255, 0.5), 0 0 0 2px rgba(58, 128, 255, 0.2);
}

#chatSection .chat-message.user:hover .chat-message-avatar {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.6), 0 0 0 3px rgba(58, 128, 255, 0.3);
}

#chatSection .chat-message.user .chat-message-bubble {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 12px rgba(58, 128, 255, 0.3);
}

#chatSection .chat-message.user:hover .chat-message-bubble {
    box-shadow: 0 6px 16px rgba(58, 128, 255, 0.4);
}

/* Assistant Messages - Left aligned, glass effect */
#chatSection .chat-message.assistant {
    align-self: flex-start;
    flex-direction: row;
}

#chatSection .chat-message.assistant .chat-message-avatar {
    background: linear-gradient(135deg, #a855f7 0%, #8b5cf6 50%, #7c3aed 100%);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5), 0 0 0 2px rgba(168, 85, 247, 0.2);
}

#chatSection .chat-message.assistant:hover .chat-message-avatar {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(168, 85, 247, 0.6), 0 0 0 3px rgba(168, 85, 247, 0.3);
}

#chatSection .chat-message.assistant .chat-message-bubble {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-bottom-left-radius: 4px;
}

#chatSection .chat-message.assistant:hover .chat-message-bubble {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(168, 85, 247, 0.3);
}

/* Chat Input Container - Floating style & FIXED POSITION */
#chatSection .chat-input-container-full {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    padding: 22px 28px;
    background: linear-gradient(135deg, rgba(26, 31, 46, 0.98), rgba(20, 25, 40, 0.95));
    border-radius: 24px 24px 0 0;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-bottom: none;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.2), 
                0 -4px 16px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    position: sticky;
    bottom: 0;
    z-index: 50;
    margin-top: auto;
}

#chatSection .chat-input-container-full:focus-within {
    border-color: rgba(58, 128, 255, 0.45);
    box-shadow: 0 -12px 40px rgba(58, 128, 255, 0.2), 
                0 -6px 20px rgba(58, 128, 255, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

#chatSection .chat-input-container-full .chat-input {
    flex: 1;
    min-height: 56px;
    max-height: 160px;
    resize: none;
    padding: 18px 22px;
    border-radius: 16px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0.06));
    color: var(--text-primary);
    font-size: 15px;
    line-height: 1.5;
    font-family: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(58, 128, 255, 0.3) transparent;
}

#chatSection .chat-input-container-full .chat-input::-webkit-scrollbar {
    width: 6px;
}

#chatSection .chat-input-container-full .chat-input::-webkit-scrollbar-thumb {
    background: rgba(58, 128, 255, 0.3);
    border-radius: 10px;
}

#chatSection .chat-input-container-full .chat-input::-webkit-scrollbar-thumb:hover {
    background: rgba(58, 128, 255, 0.5);
}

#chatSection .chat-input-container-full .chat-input:focus {
    outline: none;
    border-color: rgba(58, 128, 255, 0.6);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.09));
    box-shadow: 0 0 0 4px rgba(58, 128, 255, 0.15),
                inset 0 2px 8px rgba(0, 0, 0, 0.05);
}

#chatSection .chat-input-container-full .chat-input::placeholder {
    color: var(--text-muted);
    opacity: 0.7;
}

/* Send Button - Enhanced */
#chatSection .chat-send-btn {
    width: 56px;
    height: 56px;
    min-width: 56px;
    min-height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    border: none;
    border-radius: 16px;
    color: white;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.4);
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

#chatSection .chat-send-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.4s ease, height 0.4s ease;
}

#chatSection .chat-send-btn:hover:not(:disabled)::before {
    width: 80px;
    height: 80px;
}

#chatSection .chat-send-btn:hover:not(:disabled) {
    box-shadow: 0 10px 30px rgba(58, 128, 255, 0.5);
}

#chatSection .chat-send-btn:active:not(:disabled) {
    transform: scale(0.98);
}

#chatSection .chat-send-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(58, 128, 255, 0.2);
}

#chatSection .chat-send-btn .icon {
    transition: transform 0.3s ease;
    position: relative;
    z-index: 1;
    width: 22px;
    height: 22px;
}

#chatSection .chat-send-btn:hover:not(:disabled) .icon {
    transform: translateX(2px);
}

/* Enhanced Chat Message Styles */

/* Lists */
#chatSection .chat-message ul.chat-list {
    margin: 12px 0;
    padding-left: 24px;
    list-style: none;
}

#chatSection .chat-message ul.chat-list li {
    margin: 6px 0;
    padding-left: 8px;
    position: relative;
}

#chatSection .chat-message ul.chat-list li::before {
    content: "▸";
    color: var(--accent-primary);
    font-weight: bold;
    position: absolute;
    left: -16px;
}

#chatSection .chat-message.user ul.chat-list li::before {
    color: rgba(255, 255, 255, 0.8);
}

#chatSection .chat-message ol {
    margin: 12px 0;
    padding-left: 24px;
}

#chatSection .chat-message ol li {
    margin: 6px 0;
}

/* Links - IMPROVED BUTTON STYLE */
#chatSection .chat-message a.chat-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 6px 0;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.15), rgba(139, 92, 246, 0.1));
    border: 2px solid rgba(168, 85, 247, 0.4);
    border-radius: 12px;
    color: #a855f7;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.2);
    position: relative;
    overflow: hidden;
}

#chatSection .chat-message a.chat-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.3), transparent);
    transition: left 0.5s ease;
}

.chat-message a.chat-link:hover {
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.25), rgba(139, 92, 246, 0.15));
    border-color: rgba(168, 85, 247, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.4);
    color: #c084fc;
}

.chat-message a.chat-link:hover::before {
    left: 100%;
}

.chat-message a.chat-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.3);
}

.chat-message.user a.chat-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.chat-message.user a.chat-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.2));
    border-color: rgba(255, 255, 255, 0.7);
}

/* Chat Item Links (Buttons für verlinkte Aufgaben/Wissen/Post-ITs) */
.chat-item-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    margin: 8px 4px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    border: 2px solid rgba(59, 130, 246, 0.4);
    border-radius: 12px;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    position: relative;
    overflow: hidden;
}

.chat-item-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.3), transparent);
    transition: left 0.5s ease;
}

.chat-item-link:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(37, 99, 235, 0.15));
    border-color: rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    color: #60a5fa;
}

.chat-item-link:hover::before {
    left: 100%;
}

.chat-item-link:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* In User-Nachrichten */
.chat-message.user .chat-item-link {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.25), rgba(255, 255, 255, 0.15));
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

.chat-message.user .chat-item-link:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.25));
    border-color: rgba(255, 255, 255, 0.7);
}

/* Inline Code */
.chat-message code.inline-code {
    background: rgba(0, 0, 0, 0.3);
    padding: 2px 8px;
    border-radius: 6px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
    font-size: 0.90em;
    color: #ff79c6;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 500;
}

.chat-message.user code.inline-code {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.3);
}

/* Code Blocks - IMPROVED WITH BETTER DESIGN */
.chat-message pre {
    background: linear-gradient(145deg, #1a1b26, #16161e);
    border: 1px solid rgba(168, 85, 247, 0.2);
    border-radius: 12px;
    padding: 16px 18px;
    padding-top: 44px;
    margin: 12px 0;
    overflow-x: auto;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    position: relative;
}

.chat-message pre::before {
    content: 'CODE';
    position: absolute;
    top: 10px;
    left: 14px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    color: rgba(168, 85, 247, 0.6);
    text-transform: uppercase;
}

.chat-message pre code.code-block {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.65;
    color: #c9d1d9;
    display: block;
    white-space: pre;
    word-wrap: normal;
}

/* Syntax Highlighting (Simple) */
.chat-message pre code.code-block .keyword {
    color: #ff79c6;
    font-weight: 600;
}

.chat-message pre code.code-block .string {
    color: #50fa7b;
}

.chat-message pre code.code-block .comment {
    color: #6272a4;
    font-style: italic;
}

.chat-message pre code.code-block .function {
    color: #8be9fd;
}

.chat-message pre code.code-block .number {
    color: #bd93f9;
}

.chat-message.user pre {
    background: linear-gradient(145deg, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.4));
    border-color: rgba(255, 255, 255, 0.2);
}

.chat-message.user pre::before {
    color: rgba(255, 255, 255, 0.5);
}

.code-copy-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: linear-gradient(135deg, rgba(168, 85, 247, 0.9), rgba(139, 92, 246, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

.code-copy-btn:hover {
    background: linear-gradient(135deg, #a855f7, #8b5cf6);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(168, 85, 247, 0.5);
}

.code-copy-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
}

/* Blockquotes */
.chat-message blockquote.chat-quote {
    border-left: 4px solid var(--accent-primary);
    padding-left: 16px;
    margin: 12px 0;
    color: var(--text-secondary);
    font-style: italic;
    background: rgba(58, 128, 255, 0.05);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
}

.chat-message.user blockquote.chat-quote {
    border-left-color: rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

/* Dividers */
.chat-message hr.chat-divider {
    border: none;
    border-top: 1px solid var(--glass-border);
    margin: 16px 0;
}

/* Improved spacing for formatted text */
.chat-message h1,
.chat-message h2,
.chat-message h3 {
    margin: 16px 0 10px;
    line-height: 1.3;
}

.chat-message p {
    margin: 8px 0;
}

        /* Loading Spinner */
        .loading-spinner {
            display: inline-block;
            width: 16px;
            height: 16px;
            border: 2px solid rgba(255, 255, 255, 0.3);
            border-radius: 50%;
            border-top-color: #fff;
            animation: spin 1s ease-in-out infinite;
            margin-right: 8px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Keyboard Shortcut Tags */
        kbd {
            display: inline-block;
            padding: 4px 8px;
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Courier New', monospace;
            font-size: 12px;
            color: var(--text-primary);
            background: var(--bg-tertiary);
            border: 1px solid var(--glass-border);
            border-radius: 6px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
            font-weight: 600;
            white-space: nowrap;
        }

        /* Knowledge Mode Toggle Button */
        .toggle-knowledge-mode {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 14px;
            font-size: 13px;
            font-weight: 600;
            border-radius: var(--border-radius-sm);
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
            overflow: hidden;
        }

        .toggle-knowledge-mode::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--accent-gradient);
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .toggle-knowledge-mode.active {
            box-shadow: 
                0 4px 12px rgba(59, 130, 246, 0.4),
                inset 0 1px 0 rgba(255, 255, 255, 0.2);
        }

        .toggle-knowledge-mode.active::before {
            opacity: 1;
        }

        .toggle-knowledge-mode span {
            position: relative;
            z-index: 1;
        }

        .toggle-knowledge-mode svg {
            position: relative;
            z-index: 1;
        }

        .toggle-knowledge-mode:hover:not(.active) {
            background: rgba(59, 130, 246, 0.1);
            border-color: rgba(59, 130, 246, 0.3);
        }

        /* Code Copy Button */
        .code-copy-btn {
            position: absolute;
            top: 8px;
            right: 8px;
            padding: 6px 12px;
            background: rgba(59, 130, 246, 0.2);
            border: 1px solid rgba(59, 130, 246, 0.3);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 12px;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 4px;
            font-weight: 500;
            z-index: 10;
        }

        .code-copy-btn:hover {
            background: rgba(59, 130, 246, 0.3);
            border-color: rgba(59, 130, 246, 0.5);
            transform: translateY(-1px);
        }

        .code-copy-btn:active {
            transform: translateY(0);
        }

/* Full-width Tasks Layout */
#tasksSection .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#tasksList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Full-width Knowledge Layout */
#knowledgeSection .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

#knowledgeList {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(450px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

/* Full-width Post-ITs Layout */
#postitsSection .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.postits-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
    gap: 20px !important;
    margin-top: 20px;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    #tasksList {
        grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    }
    
    #knowledgeList {
        grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    }
    
    .chat-message {
        max-width: 95% !important;
    }
}

@media (max-width: 768px) {
    #tasksList {
        grid-template-columns: 1fr;
    }
    
    #knowledgeList {
        grid-template-columns: 1fr;
    }
    
    .postits-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    }
    
    .chat-message {
        max-width: 100% !important;
    }
    
    .chat-message.user {
        max-width: 95% !important;
    }
    
    .chat-message.assistant {
        max-width: 100% !important;
    }
}

/* Mini Preview Styles */
.mini-preview {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    max-width: 320px;
    box-shadow: var(--shadow-lg);
    z-index: 10000;
    opacity: 0;
    transform: translateY(-20px);
    transition: all 0.3s ease;
}

.mini-preview.show {
    opacity: 1;
    transform: translateY(0);
}

/* Chat Mini Preview - positioned within chat area */
.chat-mini-preview {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 16px;
    margin: 12px 0;
    max-width: 100%;
    box-shadow: var(--shadow-md);
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    position: relative;
}

.chat-mini-preview.show {
    opacity: 1;
    transform: translateY(0);
}

.mini-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.mini-preview-icon {
    font-size: 16px;
}

.mini-preview-type {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mini-preview-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
    line-height: 1.4;
}

.mini-preview-details {
    font-size: 14px;
    color: var(--text-secondary);
}

.mini-preview-desc {
    margin-bottom: 8px;
    line-height: 1.4;
}

.mini-preview-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.mini-preview-category,
.mini-preview-priority,
.mini-preview-date {
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    color: var(--text-muted);
}

.mini-preview-priority {
    font-weight: 500;
}

.mini-preview-color {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    margin-top: 8px;
}

.mini-preview-close {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.mini-preview-close:hover {
    opacity: 1;
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.mini-preview-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
}

.mini-preview-actions .btn {
    flex: 1;
    justify-content: center;
}

/* Mobile adjustments for mini preview */
@media (max-width: 768px) {
    .mini-preview {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Creation Modal Styles */
.creation-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.creation-modal-overlay.show {
    opacity: 1;
}

.creation-modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.creation-modal-overlay.show .creation-modal {
    transform: scale(1) translateY(0);
}

.creation-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--glass-border);
}

.creation-modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.creation-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.creation-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.creation-modal-body {
    padding: 20px 24px;
}

.creation-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 16px 24px 20px;
    border-top: 1px solid var(--glass-border);
}

.form-group {
    margin-bottom: 16px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.form-row .form-group {
    flex: 1;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
    font-family: inherit;
}

.form-group select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 10px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    appearance: none;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    background: var(--bg-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .creation-modal {
        width: 95%;
        margin: 20px;
    }

    .creation-modal-header,
    .creation-modal-body,
    .creation-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .form-row {
        flex-direction: column;
        gap: 16px;
    }
}

/* Floating Chat Button */
.floating-chat-btn {
    position: fixed;
    bottom: 100px; /* Above FAB button */
    right: 24px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.floating-chat-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.4);
}

.floating-chat-btn:active {
    transform: scale(0.95);
}

/* Large Chat Modal */
.chat-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
}

.chat-modal-overlay.show {
    opacity: 1;
    pointer-events: auto;
}

.chat-modal {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    height: 80%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.chat-modal-overlay.show .chat-modal {
    transform: scale(1) translateY(0);
}

.chat-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    border-radius: 20px 20px 0 0;
}

.chat-modal-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.chat-modal-controls select {
    padding: 6px 12px;
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 12px;
}

.chat-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
}

.chat-modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.chat-modal-close:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.chat-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.chat-input-area {
    border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary);
    padding: 20px 24px;
    border-radius: 0 0 20px 20px;
}

.chat-input-container {
    display: flex;
    gap: 12px;
    align-items: center;
}

#chatModalInput {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 25px;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

#chatModalInput:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.chat-send-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--accent-gradient);
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.chat-send-btn:hover {
    transform: scale(1.05);
}

.chat-send-btn:active {
    transform: scale(0.95);
}

/* Mobile adjustments for chat modal */
@media (max-width: 768px) {
    .floating-chat-btn {
        bottom: 16px;
        right: 16px;
        width: 56px;
        height: 56px;
    }

    .chat-modal {
        width: 95%;
        height: 90%;
        margin: 20px;
    }

    .chat-modal-header,
    .chat-messages,
    .chat-input-area {
        padding-left: 16px;
        padding-right: 16px;
    }
}
/* ============================================
   CALENDAR STYLES
   ============================================ */

.calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    padding: 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.02);
    min-height: 60px; /* Touch-freundlich */
    transform: translateZ(0);
    backface-visibility: hidden;
}

.calendar-day:hover {
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.15), rgba(58, 128, 255, 0.08));
    border-color: rgba(58, 128, 255, 0.4);
    transform: scale(1.08) translateZ(0);
    box-shadow: 0 4px 16px rgba(58, 128, 255, 0.3);
    z-index: 10;
}

.calendar-day.today {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(58, 128, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
    transform: scale(1.05) translateZ(0);
}

.calendar-day.today:hover {
    transform: scale(1.1) translateZ(0);
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.6);
}

.calendar-day.other-month {
    color: var(--text-dim);
    opacity: 0.3;
    cursor: default;
    pointer-events: none;
}

.calendar-day.has-tasks {
    background: linear-gradient(135deg, rgba(58, 128, 255, 0.12), rgba(58, 128, 255, 0.05));
    border-color: rgba(58, 128, 255, 0.3);
    font-weight: 700;
}

.calendar-day.has-tasks::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--accent-primary);
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(58, 128, 255, 0.5);
}

.calendar-day.overdue {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.08));
    border-color: rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    font-weight: 700;
}

.calendar-day.overdue::after {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.calendar-day.overdue:hover {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.15));
    border-color: rgba(239, 68, 68, 0.6);
}

.calendar-day.selected {
    background: var(--accent-gradient);
    border-color: var(--accent-primary);
    color: white;
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.6);
    transform: scale(1.08) translateZ(0);
    z-index: 10;
}

.calendar-day.selected::after {
    background: white;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.8);
}

.calendar-day-count {
    position: absolute;
    top: 2px;
    right: 2px;
    background: var(--accent-primary);
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 2px 4px;
    border-radius: 10px;
    min-width: 16px;
    text-align: center;
}

/* Calendar Tooltip */
.calendar-tooltip {
    position: absolute;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1000;
    min-width: 200px;
    max-width: 300px;
    display: none;
    pointer-events: none;
}

.calendar-tooltip.active {
    display: block;
}

.calendar-tooltip-date {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent-primary);
    margin-bottom: 8px;
}

.calendar-tooltip-task {
    font-size: 13px;
    color: var(--text-primary);
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.calendar-tooltip-task:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .calendar-day {
        font-size: 13px;
        min-height: 56px; /* Größer für Touch */
    }
    
    .calendar-day-header {
        font-size: 11px;
        padding: 10px 0;
    }
    
    .calendar-day-count {
        font-size: 10px;
        padding: 3px 6px;
    }
}

/* ============================================
   ENHANCED CALENDAR SECTION - PREMIUM DESIGN
   ============================================ */

.calendar-controls {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.calendar-month-year {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    min-width: 200px;
    text-align: center;
    background: linear-gradient(145deg, rgba(58, 128, 255, 0.15), rgba(20, 94, 255, 0.1));
    padding: 10px 20px;
    border-radius: 12px;
    border: 1px solid rgba(58, 128, 255, 0.3);
    box-shadow: 0 2px 8px rgba(58, 128, 255, 0.2);
}

.calendar-container {
    display: grid;
    grid-template-columns: 1fr 400px;
    gap: 24px;
    margin-top: 24px;
}

.calendar-view {
    background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 25, 40, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 32px;
    box-shadow: var(--shadow-xl);
}

.calendar-tasks-sidebar {
    background: linear-gradient(145deg, rgba(26, 31, 46, 0.98), rgba(20, 25, 40, 0.95));
    border: 1px solid var(--glass-border);
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: var(--shadow-xl);
    max-height: 700px;
    overflow-y: auto;
}

.calendar-tasks-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.calendar-task-item {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.calendar-task-item:hover {
    background: rgba(58, 128, 255, 0.15);
    border-color: rgba(58, 128, 255, 0.4);
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(58, 128, 255, 0.3);
}

.calendar-task-item.completed {
    opacity: 0.7;
    border-left: 3px solid var(--success);
}

.calendar-task-item.pending {
    border-left: 3px solid var(--accent-primary);
}

.calendar-task-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.calendar-task-title {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 14px;
}

.calendar-task-title svg {
    flex-shrink: 0;
    color: var(--accent-primary);
}

.calendar-task-item.completed .calendar-task-title svg {
    color: var(--success);
}

.calendar-task-content {
    color: var(--text-secondary);
    font-size: 13px;
    line-height: 1.5;
    margin: 0;
}

.task-category-badge {
    background: rgba(58, 128, 255, 0.15);
    border: 1px solid rgba(58, 128, 255, 0.3);
    color: var(--accent-primary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

/* Calendar Grid Headers */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.calendar-weekday {
    text-align: center;
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-primary);
    padding: 12px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

/* Calendar Days Grid */
.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
}

.calendar-day-cell {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(26, 31, 46, 0.6);
    border: 2px solid transparent;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
    padding: 8px;
    min-height: 60px; /* Touch-freundlich */
}

.calendar-day-cell:hover {
    background: linear-gradient(145deg, rgba(58, 128, 255, 0.2), rgba(20, 94, 255, 0.15));
    border-color: rgba(58, 128, 255, 0.5);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 20px rgba(58, 128, 255, 0.4);
}

.calendar-day-cell.today {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    box-shadow: 0 6px 24px rgba(58, 128, 255, 0.5);
    border-color: rgba(255, 255, 255, 0.3);
}

.calendar-day-cell.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.2);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

.calendar-day-cell.has-tasks::before {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--success);
    animation: taskPulse 2s ease-in-out infinite;
}

@keyframes taskPulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.calendar-day-cell.other-month {
    opacity: 0.3;
    cursor: default;
}

.calendar-day-cell.other-month:hover {
    background: rgba(26, 31, 46, 0.6);
    transform: none;
    border-color: transparent;
    box-shadow: none;
}

.calendar-day-number {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.calendar-task-count {
    font-size: 11px;
    opacity: 0.8;
    font-weight: 600;
    color: var(--success);
}

/* Calendar Task Items in Sidebar */
.calendar-task-item {
    padding: 14px 18px;
    background: rgba(26, 31, 46, 0.7);
    border: 1px solid var(--glass-border);
    border-left: 4px solid var(--accent-primary);
    border-radius: 12px;
    margin-bottom: 14px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.calendar-task-item:hover {
    background: rgba(58, 128, 255, 0.18);
    border-left-color: var(--success);
    transform: translateX(6px);
    box-shadow: 0 4px 16px rgba(58, 128, 255, 0.3);
}

.calendar-task-item.completed {
    opacity: 0.5;
    filter: grayscale(0.3);
}

.calendar-task-item.completed .calendar-task-title {
    text-decoration: line-through;
    color: var(--text-muted);
}

.calendar-task-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.calendar-task-time {
    font-size: 13px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Responsive Calendar */
@media (max-width: 1200px) {
    .calendar-container {
        grid-template-columns: 1fr;
    }
    
    .calendar-tasks-sidebar {
        max-height: 500px;
    }
}

@media (max-width: 768px) {
    .calendar-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .calendar-month-year {
        width: 100%;
    }
    
    .calendar-days {
        gap: 6px;
    }
    
    .calendar-day-cell {
        font-size: 13px;
        padding: 6px;
    }
    
    .calendar-day-number {
        font-size: 15px;
    }
    
    .calendar-view {
        padding: 20px;
    }
}

/* ============================================
   IMPROVED CONTRAST & READABILITY
   ============================================ */

/* Enhanced Section Headers */
.section-header {
    background: linear-gradient(145deg, rgba(26, 31, 46, 0.95), rgba(20, 25, 40, 0.9));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 20px 24px;
    border-radius: var(--border-radius);
    border: 1px solid rgba(59, 130, 246, 0.2);
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.section-header h2 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Enhanced Button Styles with Better Contrast */
.btn-primary {
    background: var(--accent-gradient);
    color: white;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 6px 24px rgba(59, 130, 246, 0.6);
    transform: translateY(-2px);
}

/* Enhanced Filter Buttons */
.filter-btn {
    background: rgba(26, 31, 46, 0.7);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
    transition: all 0.3s ease;
}

.filter-btn.active {
    background: var(--accent-gradient);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.4);
}

.filter-btn:hover:not(.active) {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.4);
    color: var(--text-primary);
}

/* Enhanced Dashboard Stat Cards */
.dashboard-stat-card {
    transition: all var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.dashboard-stat-card:hover {
    transform: translateY(-8px) scale(1.01);
}

.stat-card-number {
    font-size: 48px;
    font-weight: 900;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.stat-card-label {
    font-size: var(--font-size-sm);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    margin-top: var(--space-sm);
}

.stat-card-detail {
    color: var(--text-dim);
    font-weight: 500;
    font-size: var(--font-size-sm);
    margin-top: var(--space-xs);
}

/* Enhanced Task Due Date Badge */
.task-due {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.3);
    color: var(--accent-primary);
    font-weight: 700;
}

.task-due.overdue {
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.2), rgba(220, 38, 38, 0.15));
    border-color: rgba(239, 68, 68, 0.5);
    color: var(--danger-light);
}

/* Enhanced Knowledge Category Badge */
.kb-category {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(5, 150, 105, 0.15));
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: var(--color-knowledge-light);
    font-weight: 800;
}

/* Enhanced Post-It Colors with Better Contrast */
.postit[data-color="yellow"] {
    background: linear-gradient(145deg, #fbbf24, #f59e0b);
    color: #1e293b;
    box-shadow: 0 4px 16px rgba(251, 191, 36, 0.4);
}

.postit[data-color="green"] {
    background: linear-gradient(145deg, #34d399, #10b981);
    color: #1e293b;
    box-shadow: 0 4px 16px rgba(52, 211, 153, 0.4);
}

.postit[data-color="pink"] {
    background: linear-gradient(145deg, #f9a8d4, #ec4899);
    color: #1e293b;
    box-shadow: 0 4px 16px rgba(249, 168, 212, 0.4);
}

.postit[data-color="blue"] {
    background: linear-gradient(145deg, #60a5fa, #3b82f6);
    color: white;
    box-shadow: 0 4px 16px rgba(96, 165, 250, 0.4);
}

/* Enhanced Text for Better Readability */
.task-content,
.kb-content {
    color: var(--text-secondary);
    font-weight: 500;
    line-height: 1.8;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Max 4 lines */
    line-clamp: 4; /* Standard property */
    -webkit-box-orient: vertical;
}

.kb-read-more {
    margin-top: 12px;
    color: var(--accent-primary);
    font-size: 13px;
    font-weight: 600;
    font-style: italic;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.glass-card:hover .kb-read-more {
    opacity: 1;
}

        /* ===== TOOLBAR & FILTER SYSTEM ===== */
        
        .toolbar {
            display: flex;
            align-items: center;
            gap: var(--space-lg);
            margin-bottom: var(--space-xl);
            padding: var(--space-md);
            background: rgba(255, 255, 255, 0.03);
            border: 1px solid rgba(255, 255, 255, 0.08);
            border-radius: var(--radius-lg);
            flex-wrap: wrap;
        }
        
        .toolbar-group {
            display: flex;
            gap: var(--space-sm);
            align-items: center;
        }
        
        .toolbar-label {
            font-size: var(--font-size-sm);
            color: var(--text-muted);
            font-weight: 500;
            margin-right: var(--space-xs);
        }
        
        .toolbar-item,
        .filter-btn {
            padding: var(--space-sm) var(--space-lg);
            background: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-md);
            color: var(--text-secondary);
            font-size: var(--font-size-sm);
            font-weight: 500;
            cursor: pointer;
            transition: all var(--transition-base);
            display: inline-flex;
            align-items: center;
            gap: var(--space-xs);
        }
        
        .toolbar-item:hover,
        .filter-btn:hover {
            background: rgba(255, 255, 255, 0.1);
            border-color: rgba(255, 255, 255, 0.2);
            color: var(--text-primary);
            transform: translateY(-1px);
        }
        
        .toolbar-item.active,
        .filter-btn.active {
            background: var(--accent-gradient);
            color: white;
            border-color: transparent;
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        }
        
        .toolbar-divider {
            width: 1px;
            height: 24px;
            background: rgba(255, 255, 255, 0.1);
            margin: 0 var(--space-sm);
        }
        
        .toolbar-search {
            flex: 1;
            min-width: 200px;
        }
        
        .toolbar-actions {
            margin-left: auto;
            display: flex;
            gap: var(--space-sm);
        }

        /* ===== GLOBAL TRANSITIONS & ANIMATIONS ===== */
        
        /* Smooth transitions for interactive elements */
        button,
        a,
        input,
        select,
        textarea {
            transition: background-color var(--transition-base),
                        border-color var(--transition-base),
                        color var(--transition-base),
                        opacity var(--transition-base),
                        transform var(--transition-base),
                        box-shadow var(--transition-base);
        }
        
        /* Fade In Animation */
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        
        /* Fade In Up Animation */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Fade In Down Animation */
        @keyframes fadeInDown {
            from {
                opacity: 0;
                transform: translateY(-30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        /* Scale In Animation */
        @keyframes scaleIn {
            from {
                opacity: 0;
                transform: scale(0.9);
            }
            to {
                opacity: 1;
                transform: scale(1);
            }
        }
        
        /* Slide In Right */
        @keyframes slideInRight {
            from {
                opacity: 0;
                transform: translateX(-30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        /* Slide In Left */
        @keyframes slideInLeft {
            from {
                opacity: 0;
                transform: translateX(30px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        /* Bounce Animation */
        @keyframes bounce {
            0%, 20%, 50%, 80%, 100% {
                transform: translateY(0);
            }
            40% {
                transform: translateY(-20px);
            }
            60% {
                transform: translateY(-10px);
            }
        }
        
        /* Shake Animation */
        @keyframes shake {
            0%, 100% {
                transform: translateX(0);
            }
            10%, 30%, 50%, 70%, 90% {
                transform: translateX(-5px);
            }
            20%, 40%, 60%, 80% {
                transform: translateX(5px);
            }
        }
        
        /* Utility Animation Classes */
        .animate-fadeIn {
            animation: fadeIn 0.3s ease;
        }
        
        .animate-fadeInUp {
            animation: fadeInUp 0.4s ease;
        }
        
        .animate-fadeInDown {
            animation: fadeInDown 0.4s ease;
        }
        
        .animate-scaleIn {
            animation: scaleIn 0.3s ease;
        }
        
        .animate-slideInRight {
            animation: slideInRight 0.4s ease;
        }
        
        .animate-slideInLeft {
            animation: slideInLeft 0.4s ease;
        }
        
        .animate-bounce {
            animation: bounce 1s ease;
        }
        
        .animate-shake {
            animation: shake 0.5s ease;
        }
        
        /* Hover Effects */
        .hover-lift {
            transition: transform var(--transition-base), 
                        box-shadow var(--transition-base);
        }
        
        .hover-lift:hover {
            transform: translateY(-4px);
            box-shadow: var(--shadow-lg);
        }
        
        .hover-glow {
            transition: box-shadow var(--transition-base);
        }
        
        .hover-glow:hover {
            box-shadow: var(--shadow-glow);
        }
        
        /* Smooth Scroll */
        html {
            scroll-behavior: smooth;
        }
        
        /* Focus Visible for Accessibility */
        *:focus-visible {
            outline: 2px solid var(--accent-primary);
            outline-offset: 2px;
            border-radius: var(--radius-sm);
        }

        /* ===== LOADING STATES & SKELETONS ===== */
        
        /* Skeleton Loader */
        .skeleton {
            background: linear-gradient(
                90deg,
                rgba(255, 255, 255, 0.04) 25%,
                rgba(255, 255, 255, 0.08) 50%,
                rgba(255, 255, 255, 0.04) 75%
            );
            background-size: 200% 100%;
            animation: skeleton-loading 1.5s ease-in-out infinite;
            border-radius: var(--radius-md);
            position: relative;
            overflow: hidden;
        }
        
        @keyframes skeleton-loading {
            0% { background-position: 200% 0; }
            100% { background-position: -200% 0; }
        }
        
        .skeleton::after {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(
                90deg,
                transparent,
                rgba(255, 255, 255, 0.05),
                transparent
            );
            animation: skeleton-shimmer 2s infinite;
        }
        
        @keyframes skeleton-shimmer {
            0% { transform: translateX(-100%); }
            100% { transform: translateX(100%); }
        }
        
        /* Skeleton Variants */
        .skeleton-text {
            height: 16px;
            margin-bottom: var(--space-sm);
            width: 100%;
        }
        
        .skeleton-text-sm {
            height: 12px;
            width: 80%;
        }
        
        .skeleton-title {
            height: 24px;
            width: 60%;
            margin-bottom: var(--space-md);
        }
        
        .skeleton-avatar {
            width: 48px;
            height: 48px;
            border-radius: var(--radius-full);
        }
        
        .skeleton-card {
            height: 200px;
            border-radius: var(--radius-xl);
        }
        
        .skeleton-button {
            height: 40px;
            width: 120px;
            border-radius: var(--radius-lg);
        }
        
        /* Skeleton Card Structure */
        .skeleton-card-header {
            display: flex;
            align-items: center;
            gap: var(--space-md);
            margin-bottom: var(--space-lg);
        }
        
        .skeleton-card-body {
            display: flex;
            flex-direction: column;
            gap: var(--space-sm);
        }
        
        /* Loading Spinner */
        .spinner {
            display: inline-block;
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255, 255, 255, 0.1);
            border-top-color: var(--accent-primary);
            border-radius: var(--radius-full);
            animation: spinner-spin 0.8s linear infinite;
        }
        
        @keyframes spinner-spin {
            to { transform: rotate(360deg); }
        }
        
        .spinner-sm {
            width: 20px;
            height: 20px;
            border-width: 2px;
        }
        
        .spinner-lg {
            width: 60px;
            height: 60px;
            border-width: 4px;
        }
        
        /* Loading Container */
        .loading-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: var(--space-3xl) var(--space-xl);
            gap: var(--space-lg);
        }
        
        .loading-text {
            color: var(--text-muted);
            font-size: var(--font-size-base);
        }
        
        /* Pulse Animation for Loading Elements */
        .pulse {
            animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
        }
        
        @keyframes pulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.5; }
        }
        
        /* Dots Loading */
        .loading-dots {
            display: flex;
            gap: var(--space-sm);
        }
        
        .loading-dot {
            width: 8px;
            height: 8px;
            background: var(--accent-primary);
            border-radius: var(--radius-full);
            animation: loading-bounce 1.4s infinite ease-in-out both;
        }
        
        .loading-dot:nth-child(1) {
            animation-delay: -0.32s;
        }
        
        .loading-dot:nth-child(2) {
            animation-delay: -0.16s;
        }
        
        @keyframes loading-bounce {
            0%, 80%, 100% {
                transform: scale(0);
                opacity: 0.3;
            }
            40% {
                transform: scale(1);
                opacity: 1;
            }
        }
        
        /* Progress Bar */
        .progress-bar {
            width: 100%;
            height: 4px;
            background: rgba(255, 255, 255, 0.1);
            border-radius: var(--radius-full);
            overflow: hidden;
        }
        
        .progress-bar-fill {
            height: 100%;
            background: var(--accent-gradient);
            border-radius: var(--radius-full);
            transition: width var(--transition-base);
        }
        
        .progress-bar-animated .progress-bar-fill {
            animation: progress-indeterminate 1.5s ease-in-out infinite;
        }
        
        @keyframes progress-indeterminate {
            0% {
                width: 0%;
                margin-left: 0%;
            }
            50% {
                width: 50%;
                margin-left: 25%;
            }
            100% {
                width: 0%;
                margin-left: 100%;
            }
        }
        
        /* ===== EMPTY STATES ===== */
        
        .empty-state {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: var(--space-4xl) var(--space-xl);
            min-height: 400px;
        }
        
        .empty-state-icon {
            width: var(--icon-2xl);
            height: var(--icon-2xl);
            margin-bottom: var(--space-xl);
            opacity: 0.3;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .empty-state-icon svg,
        .empty-state-icon .icon {
            width: var(--icon-2xl);
            height: var(--icon-2xl);
        }
        
        .empty-state-title {
            font-size: var(--font-size-2xl);
            font-weight: 700;
            color: var(--text-primary);
            margin-bottom: var(--space-sm);
            line-height: var(--leading-tight);
        }
        
        .empty-state-description {
            font-size: var(--font-size-base);
            color: var(--text-secondary);
            margin-bottom: var(--space-2xl);
            max-width: 480px;
            line-height: var(--leading-relaxed);
        }
        
        .empty-state-action {
            display: flex;
            gap: var(--space-md);
            flex-wrap: wrap;
            justify-content: center;
        }
        
        /* Empty State Variants */
        .empty-state-illustration {
            width: 200px;
            height: 200px;
            margin-bottom: var(--space-xl);
            opacity: 0.4;
        }
        
        .empty-state-compact {
            padding: var(--space-2xl);
            min-height: 200px;
        }
        
        .empty-state-compact .empty-state-title {
            font-size: var(--font-size-lg);
        }
        
        .empty-state-compact .empty-state-icon {
            width: var(--icon-xl);
            height: var(--icon-xl);
            margin-bottom: var(--space-md);
        }

/* Enhanced Scrollbar */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gradient);
    border-radius: 10px;
    border: 2px solid rgba(0, 0, 0, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    filter: brightness(1.2);
}
