/* ==================== CSS RESET & VARIABLES ==================== */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        :root {
            --primary: #667eea;
            --primary-dark: #5568d3;
            --secondary: #64748b;
            --success: #10b981;
            --warning: #f59e0b;
            --danger: #ef4444;
            --info: #06b6d4;
            --light: #f8fafc;
            --dark: #1e293b;
            --white: #ffffff;
            --gray-100: #f1f5f9;
            --gray-200: #e2e8f0;
            --gray-300: #cbd5e1;
            --gray-400: #94a3b8;
            --gray-500: #64748b;
            --gray-600: #475569;
            --gray-700: #334155;
            --gray-800: #1e293b;
            --gray-900: #0f172a;
            --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
            --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
            --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
            --radius: 0.5rem;
            --transition: all 0.3s ease;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
            background: var(--light);
            color: var(--dark);
            line-height: 1.6;
        }

        /* ==================== LAYOUT ==================== */
        .app-container {
            display: flex;
            min-height: 100vh;
        }

        .sidebar {
            width: 280px;
            background: var(--white);
            border-right: 1px solid var(--gray-200);
            overflow-y: auto;
            transition: var(--transition);
            position: fixed;
            height: 100vh;
        }

        .sidebar-header {
            padding: 1.5rem;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: var(--white);
        }

        .sidebar-header h1 {
            font-size: 1.5rem;
            font-weight: 700;
            margin-bottom: 0.25rem;
        }

        .sidebar-header small {
            opacity: 0.9;
            font-size: 0.875rem;
        }

        .nav-menu {
            padding: 1rem 0;
        }

        .nav-section {
            margin-bottom: 1.5rem;
        }

        .nav-section-title {
            padding: 0.5rem 1.5rem;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--gray-500);
            font-weight: 600;
        }

        .nav-item {
            display: flex;
            align-items: center;
            padding: 0.75rem 1.5rem;
            color: var(--gray-700);
            text-decoration: none;
            transition: var(--transition);
            cursor: pointer;
            border-left: 3px solid transparent;
        }

        .nav-item:hover {
            background: var(--gray-100);
            color: var(--primary);
        }

        .nav-item.active {
            background: linear-gradient(to right, rgba(102, 126, 234, 0.1), transparent);
            color: var(--primary);
            border-left-color: var(--primary);
            font-weight: 600;
        }

        .nav-item .icon {
            margin-right: 0.75rem;
            font-size: 1.25rem;
        }

        .main-content {
            margin-left: 280px;
            flex: 1;
            padding: 2rem;
            width: calc(100% - 280px);
        }

        .content-section {
            display: none;
        }

        .content-section.active {
            display: block;
        }

        /* ==================== COMPONENTS ==================== */
        .page-header {
            margin-bottom: 2rem;
        }

        .page-title {
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark);
            margin-bottom: 0.5rem;
        }

        .page-subtitle {
            color: var(--gray-500);
            font-size: 1rem;
        }

        .card {
            background: var(--white);
            border-radius: var(--radius);
            padding: 1.5rem;
            box-shadow: var(--shadow-md);
            margin-bottom: 1.5rem;
        }

        .card-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--dark);
            margin-bottom: 1rem;
        }

        /* ==================== BUTTONS ==================== */
        .btn {
            padding: 0.75rem 1.5rem;
            border-radius: var(--radius);
            border: none;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition);
            font-size: 1rem;
            text-decoration: none;
            display: inline-block;
        }

        .btn-primary {
            background: var(--primary);
            color: var(--white);
        }

        .btn-primary:hover {
            background: var(--primary-dark);
        }

        .btn-secondary {
            background: var(--gray-200);
            color: var(--gray-700);
        }

        .btn-secondary:hover {
            background: var(--gray-300);
        }

        .btn-success {
            background: var(--success);
            color: var(--white);
        }

        .btn-success:hover {
            background: #0d9668;
        }

        .btn-danger {
            background: var(--danger);
            color: var(--white);
        }

        .btn-danger:hover {
            background: #dc2626;
        }

        .btn-sm {
            padding: 0.5rem 1rem;
            font-size: 0.875rem;
        }

        /* ==================== FORMS ==================== */
        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            margin-bottom: 0.5rem;
            font-weight: 600;
            color: var(--dark);
        }

        .form-group input,
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 1rem;
            transition: var(--transition);
        }

        .form-group input:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group textarea {
            min-height: 120px;
            resize: vertical;
        }

        .grid-2 {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1.5rem;
        }

        /* ==================== TABLE ==================== */
        .table {
            width: 100%;
            border-collapse: collapse;
            background: var(--white);
        }

        .table th,
        .table td {
            padding: 1rem;
            text-align: left;
            border-bottom: 1px solid var(--gray-200);
        }

        .table th {
            background: var(--gray-100);
            font-weight: 600;
            color: var(--dark);
        }

        .table tr:hover {
            background: var(--gray-50);
        }

        /* ==================== BADGES & TAGS ==================== */
        /* Base .badge Styles definiert im STATUS BADGES Abschnitt (Zeile ~1196) */

        .badge-success {
            background: #d1fae5;
            color: #065f46;
        }

        .badge-warning {
            background: #fef3c7;
            color: #92400e;
        }

        .badge-danger {
            background: #fee2e2;
            color: #991b1b;
        }

        .badge-info {
            background: #dbeafe;
            color: #1e40af;
        }

        /* ==================== MODAL ==================== */
        .modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            overflow-y: auto;
        }

        .modal.active {
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-content {
            background: var(--white);
            border-radius: var(--radius);
            width: 90%;
            max-width: 800px;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: var(--shadow-lg);
        }

        /* Raum-Modal: Mittig, resizable, größer */
        .raum-modal {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            z-index: 1000;
            align-items: center;
            justify-content: center;
        }

        .raum-modal[style*="display: block"] {
            display: flex !important;
        }

        .raum-modal .modal-content {
            width: 95%;
            max-width: 1200px;
            max-height: 95vh;
            resize: both;
            overflow: auto;
            min-width: 600px;
            min-height: 400px;
        }

        .modal-header {
            padding: 1.5rem;
            border-bottom: 1px solid var(--gray-200);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--dark);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            cursor: pointer;
            color: var(--gray-500);
            padding: 0;
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-close:hover {
            color: var(--dark);
        }

        .modal-body {
            padding: 1.5rem;
        }

        .modal-footer {
            padding: 1.5rem;
            border-top: 1px solid var(--gray-200);
            display: flex;
            justify-content: flex-end;
            gap: 1rem;
        }

        /* ==================== TOAST NOTIFICATIONS ==================== */
        .toast {
            position: fixed;
            top: 2rem;
            right: 2rem;
            background: var(--white);
            padding: 1rem 1.5rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow-lg);
            z-index: 2000;
            display: flex;
            align-items: center;
            gap: 1rem;
            animation: slideIn 0.3s ease;
        }

        @keyframes slideIn {
            from {
                transform: translateX(400px);
                opacity: 0;
            }
            to {
                transform: translateX(0);
                opacity: 1;
            }
        }

        .toast-success {
            border-left: 4px solid var(--success);
        }

        .toast-error {
            border-left: 4px solid var(--danger);
        }

        .toast-info {
            border-left: 4px solid var(--info);
        }

        /* ==================== AUTOCOMPLETE ==================== */
        .autocomplete-item {
            padding: 0.75rem;
            cursor: pointer;
            transition: var(--transition);
        }

        .autocomplete-item:hover {
            background: var(--gray-100);
        }

        /* ==================== SEARCH BOX ==================== */
        .search-box {
            margin-bottom: 1.5rem;
        }

        .search-box input {
            width: 100%;
            padding: 0.75rem 1rem;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 1rem;
        }

        /* ==================== FILTER GROUP ==================== */
        .filter-group {
            display: flex;
            gap: 1rem;
            margin-bottom: 1.5rem;
            flex-wrap: wrap;
        }

        .filter-group select {
            padding: 0.75rem;
            border: 1px solid var(--gray-300);
            border-radius: var(--radius);
            font-size: 1rem;
            flex: 1;
            min-width: 200px;
        }

        /* ==================== TABS ==================== */
        .tabs {
            display: flex;
            gap: 0.5rem;
            border-bottom: 1px solid var(--gray-200);
            margin-bottom: 1.5rem;
        }

        .tab {
            padding: 0.75rem 1.5rem;
            background: none;
            border: none;
            color: var(--gray-600);
            font-weight: 600;
            cursor: pointer;
            border-bottom: 2px solid transparent;
            transition: var(--transition);
        }

        .tab:hover {
            color: var(--primary);
        }

        .tab.active {
            color: var(--primary);
            border-bottom-color: var(--primary);
        }

        /* ==================== TAB DRAG & DROP STATES (Issue #7) ==================== */
        /* Drag-States für Schadenfall-Detail Tabs */
        .tab[draggable="true"] {
            cursor: grab;
        }

        .tab.dragging {
            opacity: 0.4;
            cursor: grabbing;
            transform: scale(0.95);
        }

        .tab.drag-over {
            border-left: 3px solid var(--primary);
            background: var(--gray-100);
            transform: translateX(4px);
        }

        /* ==================== STATS CARDS ==================== */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 1.5rem;
            margin-bottom: 2rem;
        }

        .stat-card {
            background: var(--white);
            padding: 1.5rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow-md);
        }

        .stat-label {
            color: var(--gray-500);
            font-size: 0.875rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .stat-value {
            font-size: 2rem;
            font-weight: 700;
            color: var(--dark);
            margin-top: 0.5rem;
        }

        /* ==================== TIMELINE ==================== */
        .timeline {
            position: relative;
            padding-left: 2rem;
        }

        .timeline-item {
            position: relative;
            padding-bottom: 2rem;
            border-left: 2px solid var(--gray-300);
            padding-left: 1.5rem;
        }

        .timeline-item:last-child {
            border-left-color: transparent;
        }

        .timeline-marker {
            position: absolute;
            left: -0.6rem;
            top: 0.2rem;
            width: 1rem;
            height: 1rem;
            border-radius: 50%;
            background: var(--white);
            border: 3px solid var(--gray-400);
        }

        .timeline-item.completed .timeline-marker {
            border-color: var(--success);
            background: var(--success);
        }

        .timeline-item.completed {
            opacity: 0.8;
        }

        .timeline-content {
            background: var(--white);
            padding: 1rem;
            border-radius: var(--radius);
            box-shadow: var(--shadow-sm);
        }

        .timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            margin-bottom: 0.5rem;
        }

        .timeline-date {
            font-weight: 600;
            color: var(--dark);
        }

        .timeline-activity {
            font-size: 0.875rem;
            color: var(--gray-600);
            margin-bottom: 0.25rem;
        }

        .timeline-description {
            color: var(--gray-700);
            font-size: 0.875rem;
            margin-top: 0.5rem;
            line-height: 1.5;
        }

        .timeline-meta {
            display: flex;
            gap: 1rem;
            margin-top: 0.5rem;
            font-size: 0.75rem;
            color: var(--gray-500);
        }

        .timeline-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }

        .view-toggle {
            display: inline-flex;
            background: var(--gray-200);
            border-radius: var(--radius);
            padding: 0.25rem;
        }

        .view-toggle button {
            padding: 0.5rem 1rem;
            border: none;
            background: transparent;
            cursor: pointer;
            border-radius: calc(var(--radius) - 2px);
            font-size: 0.875rem;
            color: var(--gray-600);
            transition: all 0.2s;
        }

        .view-toggle button.active {
            background: var(--white);
            color: var(--primary);
            box-shadow: var(--shadow-sm);
        }

        /* ==================== TAB CONTENT ==================== */
        .tab-content {
            margin-top: 1.5rem;
        }

        .tab-content.active {
            display: block;
        }

        /* ==================== MARKDOWN EDITOR ==================== */
        .markdown-editor-container {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
            height: 70vh;
            transition: all 0.3s ease;
        }

        .markdown-editor-container.fullscreen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            height: 100vh;
            width: 100vw;
            z-index: 9999;
            background: white;
            margin: 0;
            padding: 1rem;
            box-sizing: border-box;
        }

        .markdown-editor-container.editor-only {
            grid-template-columns: 1fr;
        }

        .markdown-editor-container.editor-only .preview-panel-container {
            display: none;
        }

        .markdown-editor-container.preview-only {
            grid-template-columns: 1fr;
        }

        .markdown-editor-container.preview-only .editor-panel-left {
            display: none;
        }

        .editor-panel {
            display: flex;
            flex-direction: column;
            border: 1px solid var(--gray-300);
            border-radius: 4px;
            overflow: hidden;
        }

        .editor-header {
            background: var(--gray-100);
            padding: 0.5rem 1rem;
            border-bottom: 1px solid var(--gray-300);
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .editor-textarea {
            flex: 1;
            padding: 1rem;
            border: none;
            resize: none;
            font-family: 'Courier New', monospace;
            font-size: 14px;
            line-height: 1.6;
        }

        .preview-panel {
            flex: 1;
            padding: 1rem;
            overflow-y: auto;
            background: white;
        }

        /* Wiki.js Callouts */
        .markdown-alert {
            padding: 1rem;
            margin: 1rem 0;
            border-left: 4px solid;
            border-radius: 4px;
        }

        .markdown-alert-info {
            background: #e7f3ff;
            border-color: #0066cc;
            color: #004080;
        }

        .markdown-alert-warning {
            background: #fff3cd;
            border-color: #ff9800;
            color: #8a6d3b;
        }

        .markdown-alert-danger {
            background: #ffebee;
            border-color: #f44336;
            color: #a94442;
        }

        .markdown-alert-success {
            background: #e8f5e9;
            border-color: #4caf50;
            color: #3c763d;
        }

        .markdown-alert-note {
            background: #f5f5f5;
            border-color: #9e9e9e;
            color: #333;
        }

        .markdown-alert-tip {
            background: #e1f5fe;
            border-color: #03a9f4;
            color: #01579b;
        }

        .markdown-alert-important {
            background: #fce4ec;
            border-color: #e91e63;
            color: #880e4f;
        }

        .markdown-alert-title {
            font-weight: bold;
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }

        .markdown-alert-title::before {
            font-size: 1.2em;
        }

        .markdown-alert-info .markdown-alert-title::before {
            content: 'ℹ️';
        }

        .markdown-alert-warning .markdown-alert-title::before {
            content: '⚠️';
        }

        .markdown-alert-danger .markdown-alert-title::before {
            content: '🚫';
        }

        .markdown-alert-success .markdown-alert-title::before {
            content: '✅';
        }

        .markdown-alert-note .markdown-alert-title::before {
            content: '📝';
        }

        .markdown-alert-tip .markdown-alert-title::before {
            content: '💡';
        }

        .markdown-alert-important .markdown-alert-title::before {
            content: '❗';
        }

        /* ==================== RESPONSIVE ==================== */
        /* ==================== HAMBURGER MENU ==================== */
        .menu-toggle {
            display: none;
            position: fixed;
            top: 1rem;
            left: 1rem;
            z-index: 2000; /* Über Modals (1000) und Sidebar (1100) */
            background: var(--primary);
            color: var(--white);
            border: none;
            border-radius: 8px;
            width: 44px;
            height: 44px;
            cursor: pointer;
            box-shadow: var(--shadow-lg);
            transition: var(--transition);
        }

        .menu-toggle:hover {
            background: var(--primary-dark);
            transform: scale(1.05);
        }

        .menu-toggle:active {
            transform: scale(0.95);
        }

        .sidebar-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 999;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .sidebar-overlay.active {
            opacity: 1;
        }

        /* ==================== RESPONSIVE: TABLET & MOBILE ==================== */

        /* Tablet: 768px - 1024px (iPad) */
        @media (max-width: 1024px) and (min-width: 769px) {
            .grid-2 {
                grid-template-columns: 1fr;
            }
        }

        /* Mobile & Tablet: ≤768px */
        @media (max-width: 768px) {
            /* Hamburger Menu anzeigen */
            .menu-toggle {
                display: flex;
                align-items: center;
                justify-content: center;
            }

            /* Sidebar versteckt, slide-in beim Toggle */
            .sidebar {
                transform: translateX(-100%);
                z-index: 1000;
                box-shadow: var(--shadow-xl);
            }

            .sidebar.mobile-open {
                transform: translateX(0);
            }

            /* Main Content volle Breite */
            .main-content {
                margin-left: 0;
                width: 100%;
                padding: 1rem;
                padding-top: 4rem; /* Platz für Hamburger Button */
            }

            /* 2-Spalten → 1-Spalte */
            .grid-2 {
                grid-template-columns: 1fr;
            }

            /* Page Header kompakter */
            .page-title {
                font-size: 1.5rem;
            }

            /* Modal-Anpassung */
            .modal-content {
                max-width: 95vw !important;
                width: auto !important;
                margin: 0.5rem;
                padding: 1rem;
                max-height: 90vh;
                overflow-y: auto;
            }

            /* Schadenfall-Detail-Modal: Volle Breite auf Tablets */
            #schadenfall-detail-modal .modal-content {
                width: 95vw !important;
            }

            /* Tabellen scrollbar */
            .table-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch;
            }

            /* Buttons touch-freundlich (min 44x44px) */
            .btn {
                min-height: 44px;
                padding: 0.75rem 1.5rem;
            }

            /* Cards weniger Padding */
            .card {
                padding: 1rem;
                margin-bottom: 1rem;
            }

            /* Form-Groups kompakter */
            .form-group {
                margin-bottom: 1rem;
            }

            /* Kalender-Anpassung: Kleinere Schrift */
            .calendar-day {
                font-size: 0.7rem;
                padding: 0.25rem;
            }

            /* Dashboard-Stats kompakter */
            .stat-card {
                padding: 0.75rem;
            }
        }

        /* Kleine Smartphones: ≤480px */
        @media (max-width: 480px) {
            .main-content {
                padding: 0.5rem;
                padding-top: 3.5rem;
            }

            .page-title {
                font-size: 1.25rem;
            }

            .btn {
                width: 100%; /* Buttons volle Breite */
                margin-bottom: 0.5rem;
            }

            .modal-content {
                max-width: 100vw !important;
                margin: 0;
                border-radius: 0;
                max-height: 100vh;
            }
        }

        /* ==================== ENTITY RENDERER STYLES ==================== */
        /* Standards-Architektur v1.0 - Phase 3
         * Styles für EntityRenderer Base Class und konkrete Implementierungen
         * (SchadenfallRenderer, KontaktRenderer, AufgabenRenderer)
         */

        /* Base Entity List Styles */
        .entity-list {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }

        .entity-item {
            background: white;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            padding: 1rem;
            transition: all 0.2s ease;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
        }

        .entity-item:hover {
            border-color: #007bff;
            box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
            transform: translateY(-2px);
        }

        .empty-message {
            text-align: center;
            padding: 3rem 1rem;
            color: #6c757d;
            font-size: 1.1rem;
            background: #f8f9fa;
            border-radius: 8px;
            border: 2px dashed #dee2e6;
        }

        /* Common Header Styles */
        .schadenfall-header,
        .kontakt-header,
        .aufgabe-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 0.75rem;
            padding-bottom: 0.75rem;
            border-bottom: 1px solid #e9ecef;
        }

        /* Common Info Styles */
        .schadenfall-info,
        .kontakt-info,
        .aufgabe-info {
            margin-bottom: 0.75rem;
        }

        .info-row {
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
            color: #495057;
            line-height: 1.5;
        }

        .info-row strong {
            color: #212529;
            font-weight: 600;
            margin-right: 0.25rem;
        }

        /* Common Actions Styles */
        .schadenfall-actions,
        .kontakt-actions,
        .aufgabe-actions {
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
        }

        /* ==================== SCHADENFALL RENDERER ==================== */
        .schadenfall-item {
            border-left: 4px solid #007bff;
        }

        .schadenfall-nummer {
            font-weight: 600;
            font-size: 1.1rem;
            color: #212529;
        }

        .schadenfall-status {
            font-size: 0.85rem;
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-weight: 500;
        }

        /* ==================== KONTAKT RENDERER ==================== */
        .kontakt-item {
            border-left: 4px solid #28a745;
        }

        .kontakt-name {
            font-weight: 600;
            font-size: 1.1rem;
            color: #212529;
        }

        .kontakt-firma {
            font-size: 0.9rem;
            color: #6c757d;
            margin-left: 0.5rem;
        }

        .kontakt-rollen {
            display: flex;
            flex-wrap: wrap;
            gap: 0.5rem;
            margin-top: 0.5rem;
        }

        /* ==================== AUFGABE RENDERER ==================== */
        .aufgabe-item {
            border-left: 4px solid #ffc107;
        }

        .aufgabe-titel {
            font-weight: 600;
            font-size: 1.05rem;
            color: #212529;
        }

        .aufgabe-status {
            font-size: 0.85rem;
            padding: 0.25rem 0.75rem;
            border-radius: 12px;
            font-weight: 500;
        }

        /* ==================== FRISTEN-DRINGLICHKEIT (Issue #12) ==================== */

        /* Blink-Animation für überfällige Aufgaben (0.5s) */
        @keyframes urgency-blink {
            0%, 50% { opacity: 1; }
            51%, 100% { opacity: 0.6; }
        }

        .urgency-blink {
            animation: urgency-blink 0.5s infinite;
        }

        /* Urgency-Balken Basis-Styles */
        .urgency-bar {
            transition: all 0.3s ease;
        }

        .urgency-bar:hover {
            transform: translateX(2px);
            box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        }

        /* Aggregierte Urgency-Anzeige */
        .urgency-aggregate {
            border-top: 1px solid var(--gray-200);
            padding-top: 0.5rem;
        }

        .urgency-aggregate span {
            transition: transform 0.2s ease;
        }

        .urgency-aggregate span:hover {
            transform: scale(1.05);
        }

        /* ==================== STATUS BADGES ==================== */
        .badge {
            display: inline-block;
            padding: 0.35rem 0.65rem;
            font-size: 0.85rem;
            font-weight: 500;
            line-height: 1;
            border-radius: 12px;
            white-space: nowrap;
        }

        /* Status Badges - Schadenfälle & Aufgaben */
        .status-offen,
        .aufgabe-status.status-offen,
        .schadenfall-status.status-offen {
            background-color: #e3f2fd;
            color: #1976d2;
            border: 1px solid #90caf9;
        }

        .status-in-bearbeitung,
        .aufgabe-status.status-in-bearbeitung,
        .schadenfall-status.status-in-bearbeitung {
            background-color: #fff3e0;
            color: #f57c00;
            border: 1px solid #ffb74d;
        }

        .status-erledigt,
        .aufgabe-status.status-erledigt,
        .schadenfall-status.status-erledigt {
            background-color: #e8f5e9;
            color: #388e3c;
            border: 1px solid #81c784;
        }

        .status-archiviert,
        .aufgabe-status.status-archiviert,
        .schadenfall-status.status-archiviert {
            background-color: #f5f5f5;
            color: #616161;
            border: 1px solid #bdbdbd;
        }

        .status-geschlossen,
        .schadenfall-status.status-geschlossen {
            background-color: #e0e0e0;
            color: #424242;
            border: 1px solid #9e9e9e;
        }

        /* Fälligkeit Badges - Aufgaben */
        .badge-due {
            background-color: #e3f2fd;
            color: #1976d2;
            border: 1px solid #90caf9;
        }

        .badge-due-soon {
            background-color: #fff3e0;
            color: #f57c00;
            border: 1px solid #ffb74d;
        }

        .badge-overdue {
            background-color: #ffebee;
            color: #c62828;
            border: 1px solid #ef5350;
            font-weight: 600;
        }

        /* Rollen Badges - Kontakte */
        .badge-role {
            background-color: #f3e5f5;
            color: #7b1fa2;
            border: 1px solid #ce93d8;
        }

        /* ==================== ACTION BUTTONS ==================== */
        .btn-view,
        .btn-edit {
            padding: 0.4rem 1rem;
            font-size: 0.9rem;
            border-radius: 6px;
            border: none;
            cursor: pointer;
            font-weight: 500;
            transition: all 0.2s ease;
            text-decoration: none;
            display: inline-block;
        }

        .btn-view {
            background-color: #007bff;
            color: white;
        }

        .btn-view:hover {
            background-color: #0056b3;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
        }

        .btn-edit {
            background-color: #28a745;
            color: white;
        }

        .btn-edit:hover {
            background-color: #218838;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
        }

        .btn-view:active,
        .btn-edit:active {
            transform: translateY(0);
        }

        /* ==================== RESPONSIVE DESIGN ==================== */
        @media (max-width: 768px) {
            .entity-item {
                padding: 0.75rem;
            }

            .schadenfall-header,
            .kontakt-header,
            .aufgabe-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 0.5rem;
            }

            .schadenfall-actions,
            .kontakt-actions,
            .aufgabe-actions {
                width: 100%;
                justify-content: stretch;
            }

            .btn-view,
            .btn-edit {
                flex: 1;
            }

            .kontakt-rollen {
                margin-top: 0.75rem;
            }
        }

        /* ==================== UTILITY CLASSES ==================== */
        .entity-list-loading {
            text-align: center;
            padding: 2rem;
            color: #6c757d;
        }

        .entity-list-loading::after {
            content: '...';
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {
            0%, 20% { content: '.'; }
            40% { content: '..'; }
            60%, 100% { content: '...'; }
        }

        /* ==================== COLLAPSIBLE CATEGORIES (Issue #5) ==================== */
        .collapse-actions {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            justify-content: flex-end;
        }

        .collapsible-category-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            cursor: pointer;
            user-select: none;
            padding: 0.75rem 1rem;
            background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
            color: white;
            border-radius: 8px;
            margin-bottom: 0.5rem;
            transition: var(--transition);
            box-shadow: var(--shadow-sm);
        }

        .collapsible-category-header:hover {
            background: linear-gradient(135deg, var(--primary-dark) 0%, #4556b8 100%);
            transform: translateX(4px);
            box-shadow: var(--shadow-md);
        }

        .collapsible-category-toggle {
            font-size: 1.2rem;
            transition: transform 0.3s ease;
            font-weight: bold;
            min-width: 20px;
            text-align: center;
        }

        .collapsible-category-toggle.collapsed {
            transform: rotate(-90deg);
        }

        .collapsible-category-title {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 600;
            flex: 1;
        }

        .collapsible-category-content {
            max-height: 50000px;
            overflow: hidden;
            transition: max-height 0.3s ease, opacity 0.3s ease;
            opacity: 1;
        }

        .collapsible-category-content.collapsed {
            max-height: 0;
            opacity: 0;
        }