/* S&Z RepCenter Styles - v3.0.14 */
        :root {
            --primary: #3b82f6;
            --primary-dark: #1e40af;
            --primary-light: #eff6ff;
            --success: #10b981;
            --warning: #f59e0b;
            --error: #ef4444;
            --sidebar-bg: #1e293b;
            --sidebar-hover: #334155;
            --sidebar-active: #3b82f6;
            --bg-primary: #ffffff;
            --bg-secondary: #f8fafc;
            --bg-tertiary: #f1f5f9;
            --text-primary: #0f172a;
            --text-secondary: #475569;
            --text-muted: #94a3b8;
            --border: #e2e8f0;
            
            /* ============================================
               REPCENTER V2 - NEUE CSS VARIABLEN
               ============================================ */
            
            /* Statusfarben V2 */
            --rc-status-offen: #3b82f6;
            --rc-status-bearbeitung: #f97316;
            --rc-status-erledigt: #22c55e;
            --rc-status-verschickt: #64748b;
            --rc-status-nichtreparabel: #dc2626;
            --rc-status-warteauffeig: #8b5cf6;
            --rc-status-eingelagert: #6b7280;
            --rc-status-entsorgt: #6b7280;
            
            /* Hintergrundfarben V2 */
            --rc-bg-light: #f1f5f9;
            --rc-bg-white: #ffffff;
            --rc-bg-hover: rgba(255,255,255,0.5);
            
            /* Schatten V2 */
            --rc-shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
            --rc-shadow-md: 0 2px 8px rgba(0,0,0,0.12);
            --rc-shadow-lg: 0 4px 12px rgba(0,0,0,0.15);
            
            /* Border-Radius V2 */
            --rc-radius-sm: 8px;
            --rc-radius-md: 10px;
            --rc-radius-lg: 14px;
            
            /* Dienstleister-Farben */
            --rc-dl-sz: #3b82f6;
            --rc-dl-guf: #059669;
            --rc-dl-feig: #0891b2;
            --rc-dl-seco: #6366f1;
            --rc-dl-cpi: #f59e0b;
            --rc-dl-nri: #ec4899;
            --rc-dl-mei: #8b5cf6;
            --rc-dl-ict: #14b8a6;
            
            /* Button-Farben V2 */
            --rc-btn-success: #22c55e;
            --rc-btn-success-hover: #16a34a;
            --rc-btn-warning: #fbbf24;
            --rc-btn-warning-hover: #f59e0b;
            --rc-btn-danger: #dc2626;
        }

        [data-theme="dark"] {
            --bg-primary: #0f172a;
            --bg-secondary: #1e293b;
            --bg-tertiary: #334155;
            --text-primary: #f1f5f9;
            --text-secondary: #cbd5e1;
            --text-muted: #64748b;
            --border: #334155;
        }
        
        /* Theme: Silver (Elegant) */
        [data-theme="silver"] {
            --primary: #6b7280;
            --primary-dark: #4b5563;
            --primary-light: #e5e7eb;
            --success: #10b981;
            --sidebar-bg: #1f2937;
            --sidebar-hover: #374151;
            --sidebar-active: #9ca3af;
            --bg-primary: #f9fafb;
            --bg-secondary: #f3f4f6;
            --bg-tertiary: #e5e7eb;
            --text-primary: #111827;
            --text-secondary: #4b5563;
            --text-muted: #6b7280;
            --border: #d1d5db;
        }

        * { margin: 0; padding: 0; box-sizing: border-box; }
        
        html {
            margin: 0;
            padding: 0;
        }
        
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            min-height: 100vh;
            overflow-x: hidden;
            margin: 0;
            padding: 0;
        }

        /* Sidebar */
        .sidebar {
            width: 85px;
            background: var(--sidebar-bg);
            display: flex;
            flex-direction: column;
            padding: 0;
            position: fixed;
            left: 0;
            top: 0;
            height: 100vh;
            z-index: 1000;
            border-right: 1px solid rgba(255,255,255,0.1);
            overflow-y: auto;
            overflow-x: hidden;
            scrollbar-width: none;
            -ms-overflow-style: none;
        }
        
        .sidebar::-webkit-scrollbar {
            display: none;
        }
        
        /* Horizontal Layout Mode - Modern Design */
        [data-layout="horizontal"] body {
            flex-direction: column;
        }
        
        [data-layout="horizontal"] .sidebar {
            width: 100%;
            height: 60px;
            flex-direction: row;
            padding: 0 1.5rem;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            border-right: none;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            background: linear-gradient(135deg, var(--sidebar-bg) 0%, color-mix(in srgb, var(--sidebar-bg) 90%, black) 100%);
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }
        
        [data-layout="horizontal"] .sidebar-logo {
            display: flex !important;
            margin-bottom: 0;
            margin-right: 1.5rem;
            width: 38px;
            height: 38px;
            background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, black) 100%);
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        
        [data-layout="horizontal"] .sidebar-nav {
            flex-direction: row;
            flex: 1;
            gap: 0.25rem;
            padding: 0;
            overflow-x: auto;
            justify-content: flex-start;
        }
        
        [data-layout="horizontal"] .sidebar-item {
            flex-direction: row;
            padding: 0.6rem 1rem;
            white-space: nowrap;
            gap: 0.5rem;
            font-size: 0.85rem;
            border-radius: 10px;
            font-weight: 500;
        }
        
        [data-layout="horizontal"] .sidebar-item .sidebar-item-text {
            display: inline !important;
            opacity: 1 !important;
        }
        
        [data-layout="horizontal"] .sidebar-item:hover {
            background: rgba(255,255,255,0.1);
        }
        
        [data-layout="horizontal"] .sidebar-item.active {
            background: linear-gradient(135deg, var(--primary) 0%, color-mix(in srgb, var(--primary) 70%, black) 100%);
            box-shadow: 0 4px 12px rgba(59,130,246,0.3);
        }
        
        /* Override Dashboard separator in horizontal mode */
        [data-layout="horizontal"] .sidebar-item[data-tab="dashboard"] {
            margin-bottom: 0 !important;
            padding-bottom: 0.6rem !important;
            border-bottom: none !important;
            border-right: 1px solid rgba(255,255,255,0.15);
            margin-right: 0.75rem;
            padding-right: 1rem;
        }
        
        [data-layout="horizontal"] .sidebar-item-icon {
            width: 20px;
            height: 20px;
        }
        
        [data-layout="horizontal"] .sidebar-item-icon svg {
            width: 18px;
            height: 18px;
        }
        
        [data-layout="horizontal"] .main-content {
            margin-left: 0;
            margin-top: 60px;
        }
        
        [data-layout="horizontal"] .sidebar-bottom {
            flex-direction: row;
            margin-top: 0;
            margin-left: auto;
            border-top: none;
            padding: 0;
            gap: 0.5rem;
        }
        
        [data-layout="horizontal"] .sidebar-bottom .sidebar-item {
            position: relative;
        }
        
        /* Hide header in horizontal mode since info is in sidebar */
        [data-layout="horizontal"] .header {
            display: none;
        }
        
        /* Add search to horizontal sidebar */
        [data-layout="horizontal"] .sidebar-search {
            display: flex;
            align-items: center;
            margin-left: auto;
            margin-right: 1rem;
        }
        
        .sidebar-search {
            display: none;
        }
        
        .sidebar-search-input {
            width: 200px;
            padding: 0.5rem 1rem 0.5rem 2.25rem;
            border: 1px solid rgba(255,255,255,0.2);
            border-radius: 20px;
            background: rgba(255,255,255,0.1);
            color: white;
            font-size: 0.85rem;
            transition: all 0.2s ease;
        }
        
        .sidebar-search-input::placeholder {
            color: rgba(255,255,255,0.5);
        }
        
        .sidebar-search-input:focus {
            outline: none;
            background: rgba(255,255,255,0.15);
            outline-color: var(--primary);
            width: 280px;
        }
        
        .sidebar-search-icon {
            position: absolute;
            left: 0.75rem;
            color: rgba(255,255,255,0.5);
        }

        .sidebar-logo {
            width: 40px;
            height: 40px;
            background: transparent;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            margin-bottom: 2rem;
            color: white;
        }

        .sidebar-nav {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
            width: 100%;
            padding: 0.75rem;
        }

        .sidebar-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.25rem;
            padding: 0.6rem 0.4rem;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            border-radius: 10px;
            transition: all 0.2s;
            font-size: 0.65rem;
            text-align: center;
            position: relative;
        }
        
        .sidebar-item-icon {
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 10px;
            transition: all 0.2s;
            flex-shrink: 0;
        }
        
        .sidebar-item-text {
            font-weight: 500;
            letter-spacing: 0.02em;
            font-size: 0.65rem;
            max-width: 100%;
        }

        .sidebar-item:hover {
            background: rgba(255,255,255,0.08);
            color: white;
        }
        
        .sidebar-item:hover .sidebar-item-icon {
            background: rgba(255,255,255,0.1);
        }

        /* Simple active state - no colors */
        .sidebar-item.active {
            color: white;
            background: rgba(255,255,255,0.1);
        }
        
        .sidebar-item.active .sidebar-item-text {
            font-weight: 600;
        }
        
        .sidebar-item.active .sidebar-item-icon {
            background: rgba(255,255,255,0.15);
        }
        
        /* ===== IMPORT WIZARD STYLES ===== */
        .import-wizard-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .import-wizard-overlay.active { opacity: 1; visibility: visible; }
        
        .import-wizard-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.95);
            width: 720px;
            max-width: 95vw;
            max-height: 90vh;
            background: var(--bg-primary);
            border-radius: 16px;
            box-shadow: 0 25px 80px rgba(0,0,0,0.4);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .import-wizard-modal.active {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) scale(1);
        }
        
        .import-wizard-header {
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .import-wizard-title { display: flex; align-items: center; gap: 1rem; color: white; }
        .import-wizard-icon {
            width: 48px; height: 48px;
            background: rgba(255,255,255,0.2);
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
        }
        .import-wizard-title h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
        .import-wizard-title p { margin: 0; font-size: 0.8rem; opacity: 0.9; }
        .import-wizard-close {
            width: 36px; height: 36px;
            background: rgba(255,255,255,0.2);
            border: none; border-radius: 8px;
            color: white; font-size: 1.5rem;
            cursor: pointer; transition: all 0.2s;
        }
        .import-wizard-close:hover { background: rgba(255,255,255,0.3); }
        
        .import-wizard-progress {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1.25rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            gap: 0;
        }
        .import-progress-step {
            display: flex; flex-direction: column; align-items: center; gap: 0.35rem;
        }
        .import-progress-step .step-number {
            width: 32px; height: 32px;
            background: var(--bg-tertiary);
            border: 2px solid var(--border);
            border-radius: 50%;
            display: flex; align-items: center; justify-content: center;
            font-weight: 700; font-size: 0.85rem;
            color: var(--text-muted);
            transition: all 0.3s;
        }
        .import-progress-step span { font-size: 0.75rem; color: var(--text-muted); }
        .import-progress-step.active .step-number {
            background: #3b82f6; outline-color: #3b82f6; color: white;
        }
        .import-progress-step.active span { color: #3b82f6; font-weight: 600; }
        .import-progress-step.completed .step-number {
            background: #10b981; outline-color: #10b981; color: white;
        }
        .import-progress-line {
            width: 60px; height: 2px;
            background: var(--border);
            margin: 0 0.5rem;
            margin-bottom: 1.25rem;
        }
        
        .import-wizard-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        .import-step { display: none; }
        .import-step.active { display: block; }
        
        .import-upload-area {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 3rem 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--bg-secondary);
        }
        .import-upload-area:hover {
            outline-color: #3b82f6;
            background: rgba(59, 130, 246, 0.05);
        }
        .import-upload-area.dragover {
            outline-color: #3b82f6;
            background: rgba(59, 130, 246, 0.1);
        }
        .upload-icon { color: var(--text-muted); margin-bottom: 1rem; }
        .import-upload-area h4 { margin: 0 0 0.5rem; color: var(--text-primary); }
        .import-upload-area p { margin: 0; font-size: 0.85rem; color: var(--text-muted); }
        
        .import-file-info {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 1rem;
            background: #dbeafe;
            border-radius: 10px;
            margin-top: 1rem;
        }
        .file-icon { font-size: 2rem; }
        .file-details { flex: 1; }
        .file-details strong { display: block; color: #1e40af; }
        .file-details span { font-size: 0.85rem; color: #3b82f6; }
        .file-remove {
            width: 28px; height: 28px;
            background: rgba(239, 68, 68, 0.1);
            border: none; border-radius: 6px;
            color: #ef4444; font-size: 1.25rem;
            cursor: pointer;
        }
        
        .import-options { margin-top: 1.5rem; }
        .import-options h5 { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--text-primary); }
        .import-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; }
        .import-option {
            display: flex; align-items: center; gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: var(--bg-secondary);
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
        }
        
        .import-mapping-info { margin-bottom: 1rem; }
        .mapping-stats { display: flex; gap: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
        .import-mapping-table-wrap {
            max-height: 300px;
            overflow-y: auto;
            border: 1px solid var(--border);
            border-radius: 10px;
        }
        .import-mapping-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
        .import-mapping-table th {
            padding: 0.75rem;
            text-align: left;
            background: var(--bg-secondary);
            font-weight: 600;
            position: sticky; top: 0;
            border-bottom: 1px solid var(--border);
        }
        .import-mapping-table td {
            padding: 0.75rem;
            border-bottom: 1px solid var(--border);
            vertical-align: middle;
        }
        .import-mapping-table select {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            background: var(--bg-primary);
        }
        .mapping-preview { font-size: 0.8rem; color: var(--text-muted); font-family: monospace; }
        
        .import-required-fields { margin-top: 1rem; }
        .import-required-fields h5 { font-size: 0.85rem; margin: 0 0 0.5rem; }
        .required-field-list { display: flex; gap: 0.5rem; }
        .required-field {
            padding: 0.35rem 0.75rem;
            background: #fef3c7;
            color: #92400e;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        .required-field.mapped { background: #d1fae5; color: #065f46; }
        
        .validation-status {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 1rem;
            padding: 3rem;
            color: var(--text-muted);
        }
        .validation-spinner {
            width: 32px; height: 32px;
            border: 3px solid var(--border);
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 1s linear infinite;
        }
        @keyframes spin { to { transform: rotate(360deg); } }
        .spin { animation: spin 1s linear infinite; }
        
        .validation-summary {
            display: flex;
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        .validation-stat {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            border-radius: 10px;
            font-size: 0.9rem;
        }
        .validation-stat.valid { background: #d1fae5; color: #065f46; }
        .validation-stat.warning { background: #fef3c7; color: #92400e; }
        .validation-stat.error { background: #fee2e2; color: #991b1b; }
        
        .validation-issues {
            max-height: 200px;
            overflow-y: auto;
            border: 1px solid var(--border);
            border-radius: 10px;
        }
        .validation-issue {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.75rem;
            border-bottom: 1px solid var(--border);
            font-size: 0.85rem;
        }
        .validation-issue:last-child { border-bottom: none; }
        .issue-row { font-weight: 600; color: var(--text-muted); min-width: 60px; }
        
        .conflict-options { margin-top: 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border); }
        .conflict-options h5 { margin: 0 0 0.5rem; }
        .conflict-options > p { font-size: 0.9rem; color: var(--text-muted); margin: 0 0 1rem; }
        .conflict-option-list { display: flex; flex-direction: column; gap: 0.5rem; }
        .conflict-option {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border-radius: 10px;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        .conflict-option:has(input:checked) { outline-color: #3b82f6; background: rgba(59, 130, 246, 0.05); }
        .conflict-option-content strong { display: block; color: var(--text-primary); }
        .conflict-option-content span { font-size: 0.85rem; color: var(--text-muted); }
        
        .import-progress-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 2rem;
        }
        .import-progress-circle {
            position: relative;
            width: 120px; height: 120px;
        }
        .import-progress-circle svg { width: 100%; height: 100%; transform: rotate(-90deg); }
        .circle-bg { fill: none; stroke: var(--border); stroke-width: 3; }
        .circle-progress { fill: none; stroke: #3b82f6; stroke-width: 3; stroke-linecap: round; transition: stroke-dasharray 0.3s; }
        .import-progress-circle span {
            position: absolute;
            top: 50%; left: 50%;
            transform: translate(-50%, -50%);
            font-size: 1.5rem;
            font-weight: 700;
            color: #3b82f6;
        }
        .import-progress-text { text-align: center; margin-top: 1rem; }
        .import-progress-text strong { display: block; font-size: 1rem; color: var(--text-primary); }
        .import-progress-text span { font-size: 0.9rem; color: var(--text-muted); }
        
        .import-results { text-align: center; padding: 1rem; }
        .import-results-icon { margin-bottom: 1rem; }
        .import-results-icon.success { color: #10b981; }
        .import-results h4 { margin: 0 0 1.5rem; font-size: 1.25rem; }
        .import-results-stats {
            display: flex;
            justify-content: center;
            gap: 2rem;
            margin-bottom: 1.5rem;
        }
        .result-stat { text-align: center; }
        .result-number { display: block; font-size: 1.75rem; font-weight: 700; color: var(--text-primary); }
        .result-label { font-size: 0.85rem; color: var(--text-muted); }
        .import-results-actions { display: flex; justify-content: center; gap: 1rem; }
        .btn-import-log {
            display: flex; align-items: center; gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.9rem;
            cursor: pointer;
        }
        
        .import-wizard-footer {
            display: flex;
            justify-content: space-between;
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            background: var(--bg-secondary);
        }
        .btn-wizard-cancel {
            padding: 0.75rem 1.25rem;
            background: transparent;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .wizard-nav-buttons { display: flex; gap: 0.75rem; }
        .btn-wizard-back, .btn-wizard-next {
            display: flex; align-items: center; gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            border: none; border-radius: 8px;
            font-weight: 600; cursor: pointer;
        }
        .btn-wizard-back { background: var(--bg-tertiary); color: var(--text-secondary); }
        .btn-wizard-next { background: #3b82f6; color: white; }
        .btn-wizard-next:disabled { opacity: 0.5; cursor: not-allowed; }
        
        /* ===== EXPORT MODAL STYLES ===== */
        .export-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            z-index: 9998;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }
        .export-modal-overlay.active { opacity: 1; visibility: visible; }
        
        .export-modal {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) scale(0.95);
            width: 600px;
            max-width: 95vw;
            max-height: 90vh;
            background: var(--bg-primary);
            border-radius: 16px;
            box-shadow: 0 25px 80px rgba(0,0,0,0.4);
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .export-modal.active {
            opacity: 1;
            visibility: visible;
            transform: translate(-50%, -50%) scale(1);
        }
        
        .export-modal-header {
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .export-modal-title { display: flex; align-items: center; gap: 1rem; color: white; }
        .export-modal-icon {
            width: 48px; height: 48px;
            background: rgba(255,255,255,0.2);
            border-radius: 12px;
            display: flex; align-items: center; justify-content: center;
        }
        .export-modal-title h3 { margin: 0; font-size: 1.1rem; font-weight: 700; }
        .export-modal-title p { margin: 0; font-size: 0.8rem; opacity: 0.9; }
        .export-modal-close {
            width: 36px; height: 36px;
            background: rgba(255,255,255,0.2);
            border: none; border-radius: 8px;
            color: white; font-size: 1.5rem;
            cursor: pointer;
        }
        
        .export-modal-body {
            flex: 1;
            overflow-y: auto;
            padding: 1.5rem;
        }
        
        .export-section { margin-bottom: 1.5rem; }
        .export-section:last-child { margin-bottom: 0; }
        .export-section h5 { margin: 0 0 0.75rem; font-size: 0.9rem; color: var(--text-primary); font-weight: 600; }
        
        .export-format-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
        }
        .export-format-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .export-format-option input { display: none; }
        .export-format-option.active,
        .export-format-option:has(input:checked) {
            outline-color: #8b5cf6;
            background: rgba(139, 92, 246, 0.1);
        }
        .format-icon {
            width: 48px; height: 48px;
            border-radius: 10px;
            display: flex; align-items: center; justify-content: center;
        }
        .format-icon.xlsx { background: #d1fae5; color: #059669; }
        .format-icon.csv { background: #dbeafe; color: #2563eb; }
        .format-icon.pdf { background: #fee2e2; color: #dc2626; }
        .export-format-option span { font-size: 0.85rem; font-weight: 600; }
        
        .export-data-options { display: flex; flex-direction: column; gap: 0.5rem; }
        .export-data-option {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 1rem;
            background: var(--bg-secondary);
            border: 2px solid transparent;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        .export-data-option:has(input:checked) {
            outline-color: #8b5cf6;
            background: rgba(139, 92, 246, 0.05);
        }
        .export-data-option .option-content strong { display: block; }
        .export-data-option .option-content span { font-size: 0.85rem; color: var(--text-muted); }
        
        .export-filter-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.75rem;
        }
        .export-filter-item label { display: block; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.35rem; }
        .export-filter-item select {
            width: 100%;
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-secondary);
        }
        
        .export-columns-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 0.5rem;
        }
        .export-column-option {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            background: var(--bg-secondary);
            border-radius: 6px;
            font-size: 0.85rem;
            cursor: pointer;
        }
        .export-column-actions {
            display: flex;
            gap: 0.5rem;
            margin-top: 0.75rem;
        }
        .export-column-actions button {
            padding: 0.4rem 0.75rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.8rem;
            cursor: pointer;
        }
        
        .export-modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            background: var(--bg-secondary);
        }
        .btn-export-cancel {
            padding: 0.75rem 1.25rem;
            background: transparent;
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .btn-export-start {
            display: flex; align-items: center; gap: 0.5rem;
            padding: 0.75rem 1.5rem;
            background: linear-gradient(135deg, #8b5cf6, #7c3aed);
            border: none; border-radius: 8px;
            color: white;
            font-weight: 600;
            cursor: pointer;
        }

        /* Badge positioning */
        .sidebar-badge {
            position: absolute;
            top: 0.25rem;
            right: 0.25rem;
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 16px;
            height: 16px;
            padding: 0 5px;
            background: #ef4444;
            color: white;
            font-size: 0.6rem;
            font-weight: 700;
            border-radius: 9px;
            top: 0;
            right: 0.5rem;
        }
        
        /* Sidebar Bottom - Fixed at bottom */
        .sidebar-bottom {
            margin-top: auto;
            padding: 0.75rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            flex-direction: column;
            gap: 0.35rem;
        }
        
        /* Inquiry Row Styling */
        tr.inq-row {
            background: var(--bg-secondary);
            border-radius: 8px;
        }
        tr.inq-row:hover {
            background: var(--bg-tertiary, #e5e7eb);
        }
        tr.inq-row td {
            padding: 12px 10px;
            vertical-align: middle;
        }
        tr.inq-row td:first-child {
            border-radius: 8px 0 0 8px;
        }
        tr.inq-row td:last-child {
            border-radius: 0 8px 8px 0;
        }
        tr.inq-row-open {
            background: #fef3c7;
        }
        tr.inq-row-open:hover {
            background: #fde68a;
        }
        tr.inq-row-done {
            background: #dcfce7;
        }
        tr.inq-row-done:hover {
            background: #bbf7d0;
        }
        tr.inq-row-urgent {
            background: #fee2e2;
        }
        tr.inq-row-urgent:hover {
            background: #fecaca;
        }
        
        /* Theme Dropdown */
        .theme-dropdown {
            display: none;
            position: fixed;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 8px;
            min-width: 160px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.3);
            z-index: 10001;
        }
        
        .theme-dropdown.show {
            display: block;
        }
        
        /* Theme Selection in Settings */
        .theme-select-option {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem;
            background: var(--bg-secondary);
            border: 2px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .theme-select-option:hover {
            outline-color: var(--primary);
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        }
        
        .theme-select-option.active {
            outline-color: var(--primary);
            background: var(--primary-light);
        }
        
        .theme-select-preview {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            border: 2px solid var(--border);
        }
        
        .theme-select-name {
            font-size: 0.7rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-align: center;
        }
        
        .theme-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s;
            font-size: 0.8rem;
            color: var(--text-primary);
        }
        
        .theme-option:hover {
            background: var(--bg-tertiary);
        }
        
        .theme-option.active {
            background: var(--primary);
            color: white;
        }
        
        .theme-preview {
            width: 24px;
            height: 24px;
            border-radius: 50%;
            border: 2px solid var(--border);
            flex-shrink: 0;
        }

        .sidebar-item-icon {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
        }
        
        .sidebar-item-icon svg {
            width: 18px;
            height: 18px;
        }


        /* Main Content */
        .main-content {
            display: flex;
            flex-direction: column;
            margin-left: 85px;
            min-height: 100vh;
            position: relative;
            width: calc(100vw - 85px);
            background: var(--bg-primary);
            padding: 0;
            margin-top: 0;
        }

        /* Header - New Design */
        .header {
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border);
            padding: 0.625rem 1.5rem;
            margin: 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
            position: sticky;
            top: 0;
            left: 0;
            right: 0;
            z-index: 900;
            gap: 1.5rem;
            width: 100%;
            box-sizing: border-box;
        }

        .header-left {
            display: flex;
            align-items: center;
            gap: 10px;
            min-width: 180px;
        }
        
        .header-welcome {
            display: flex;
            flex-direction: column;
        }
        
        .welcome-text {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .welcome-date {
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .header-center {
            flex: 1;
            display: flex;
            justify-content: center;
            max-width: 400px;
        }

        .header-right {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        
        /* Global Search - Pill Style */
        .global-search-wrapper {
            position: relative;
            width: 100%;
            max-width: 320px;
        }
        
        .global-search-wrapper svg {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            width: 16px;
            height: 16px;
        }
        
        .global-search-input {
            width: 100%;
            padding: 10px 16px 10px 40px;
            border: 1px solid var(--border);
            border-radius: 24px;
            background: var(--bg-secondary);
            font-size: 0.85rem;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }
        
        .global-search-input:focus {
            outline: none;
            outline-color: var(--primary);
            background: var(--bg-primary);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }
        
        .global-search-input::placeholder {
            color: var(--text-muted);
        }
        
        /* Header Action Buttons */
        .header-action-btn {
            width: 38px;
            height: 38px;
            border-radius: 10px;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            color: var(--text-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .header-action-btn:hover {
            outline-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }
        
        .header-action-btn svg {
            width: 18px;
            height: 18px;
        }
        
        .header-action-btn.primary {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            border: none;
            color: white;
            box-shadow: 0 2px 8px rgba(59,130,246,0.3);
        }
        
        .header-action-btn.primary:hover {
            transform: scale(1.05);
            box-shadow: 0 4px 12px rgba(59,130,246,0.4);
        }
        
        /* Notification Badge */
        .notification-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            font-size: 0.65rem;
            font-weight: 700;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(239,68,68,0.4);
        }
        
        /* New Header User Styles */
        .header-user-new {
            display: flex;
            align-items: center;
            gap: 0.625rem;
            padding: 0.375rem 0.75rem 0.375rem 0.375rem;
            background: var(--bg-secondary);
            border-radius: 24px;
            cursor: pointer;
            transition: all 0.2s ease;
            position: relative;
        }
        
        .header-user-new:hover {
            background: var(--bg-tertiary);
        }
        
        .header-user-avatar-new {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            overflow: hidden;
            background: linear-gradient(135deg, #e0e7ff 0%, #c7d2fe 100%);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .header-user-avatar-new img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }
        
        .header-user-info-new {
            display: flex;
            flex-direction: column;
        }
        
        .header-user-name-new {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-primary);
            line-height: 1.2;
        }
        
        .header-user-role-new {
            font-size: 0.65rem;
            color: var(--text-muted);
            line-height: 1.2;
        }
        
        .header-user-chevron {
            color: var(--text-muted);
            transition: transform 0.2s ease;
        }
        
        .header-user-new:hover .header-user-chevron {
            transform: translateY(2px);
        }
        
        /* Inquiry Button */
        .header-action-btn.inquiry-btn {
            position: relative;
        }
        .inquiry-badge {
            position: absolute;
            top: -4px;
            right: -4px;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            background: linear-gradient(135deg, #ef4444, #dc2626);
            color: white;
            font-size: 0.65rem;
            font-weight: 700;
            border-radius: 9px;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0 2px 6px rgba(239,68,68,0.4);
            animation: inquiryPulse 2s ease-in-out infinite;
        }
        @keyframes inquiryPulse {
            0%, 100% { transform: scale(1); }
            50% { transform: scale(1.1); }
        }
        
        /* Inquiry Modal */
        .inquiry-modal-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0,0,0,0.5);
            backdrop-filter: blur(4px);
            z-index: 10000;
            display: flex;
            align-items: center;
            justify-content: center;
            animation: fadeIn 0.2s ease;
        }
        .inquiry-modal {
            background: var(--bg-primary);
            border-radius: 16px;
            width: 95%;
            max-width: 700px;
            max-height: 90vh;
            overflow: hidden;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideUp 0.3s ease;
        }
        @keyframes slideUp {
            from { transform: translateY(30px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        @keyframes lsConfirm {
            0% { transform: scale(0.95); opacity: 0; }
            50% { transform: scale(1.02); }
            100% { transform: scale(1); opacity: 1; }
        }
        .ls-confirm-animate {
            animation: lsConfirm 0.3s ease-out;
        }
        .inquiry-modal-header {
            padding: 1.25rem 1.5rem;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        .inquiry-modal-header h3 {
            margin: 0;
            font-size: 1.1rem;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .inquiry-modal-close {
            background: rgba(255,255,255,0.2);
            border: none;
            color: white;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.2s;
        }
        .inquiry-modal-close:hover {
            background: rgba(255,255,255,0.3);
        }
        .inquiry-modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            max-height: calc(90vh - 140px);
        }
        .inquiry-search-row {
            display: flex;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        .inquiry-field {
            flex: 1;
        }
        .inquiry-field label {
            display: block;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.4rem;
        }
        .inquiry-field input,
        .inquiry-field textarea,
        .inquiry-field select {
            width: 100%;
            padding: 0.7rem 1rem;
            border: 1.5px solid var(--border);
            border-radius: 10px;
            font-size: 0.9rem;
            transition: all 0.2s;
            background: var(--bg-primary);
            color: var(--text-primary);
        }
        .inquiry-field input:focus,
        .inquiry-field textarea:focus {
            outline: none;
            outline-color: #3b82f6;
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }
        .inquiry-jobs-list {
            background: var(--bg-secondary);
            border-radius: 12px;
            padding: 1rem;
            margin-bottom: 1rem;
            max-height: 200px;
            overflow-y: auto;
        }
        .inquiry-jobs-title {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        .inquiry-job-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem;
            background: var(--bg-primary);
            border-radius: 10px;
            margin-bottom: 0.5rem;
            cursor: pointer;
            border: 2px solid transparent;
            transition: all 0.2s;
        }
        .inquiry-job-item:hover {
            outline-color: #3b82f6;
        }
        .inquiry-job-item.selected {
            outline-color: #22c55e;
            background: #f0fdf4;
        }
        .inquiry-job-item input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: #22c55e;
        }
        .inquiry-job-info {
            flex: 1;
        }
        .inquiry-job-rma {
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--text-primary);
        }
        .inquiry-job-device {
            font-size: 0.8rem;
            color: var(--text-secondary);
        }
        .inquiry-job-status {
            font-size: 0.7rem;
            padding: 0.25rem 0.6rem;
            border-radius: 6px;
            font-weight: 600;
        }
        .inquiry-job-status.offen { background: #fef3c7; color: #92400e; }
        .inquiry-job-status.inbearbeitung { background: #dbeafe; color: #1e40af; }
        .inquiry-job-status.erledigt { background: #dcfce7; color: #166534; }
        .inquiry-job-status.verschickt { background: #f3e8ff; color: #6b21a8; }
        .inquiry-job-location {
            font-size: 0.75rem;
            color: #6b7280;
            display: flex;
            align-items: center;
            gap: 0.3rem;
        }
        .inquiry-no-jobs {
            text-align: center;
            color: var(--text-secondary);
            padding: 1.5rem;
            font-size: 0.9rem;
        }
        .inquiry-quick-replies {
            margin-bottom: 1rem;
        }
        .inquiry-quick-replies-title {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-secondary);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 0.5rem;
        }
        .inquiry-quick-replies-list {
            display: flex;
            flex-wrap: wrap;
            gap: 0.4rem;
        }
        .inquiry-quick-reply {
            padding: 0.4rem 0.75rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 20px;
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s;
            color: var(--text-secondary);
        }
        .inquiry-quick-reply:hover {
            background: #dbeafe;
            outline-color: #3b82f6;
            color: #1d4ed8;
        }
        .inquiry-modal-footer {
            padding: 1rem 1.5rem;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .inquiry-reminder-check {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: var(--text-secondary);
        }
        .inquiry-reminder-check input {
            width: 18px;
            height: 18px;
            accent-color: #f59e0b;
        }
        .inquiry-modal-actions {
            display: flex;
            gap: 0.75rem;
        }
        .inquiry-btn-cancel {
            padding: 0.6rem 1.25rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.85rem;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.2s;
        }
        .inquiry-btn-cancel:hover {
            background: var(--bg-secondary);
        }
        .inquiry-btn-save {
            padding: 0.6rem 1.5rem;
            background: linear-gradient(135deg, #22c55e, #16a34a);
            border: none;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            color: white;
            display: flex;
            align-items: center;
            gap: 0.4rem;
            transition: all 0.2s;
            box-shadow: 0 2px 8px rgba(34,197,94,0.3);
        }
        .inquiry-btn-save:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(34,197,94,0.4);
        }
        
        /* Sidebar Inquiry Section */
        .sidebar-inquiries {
            margin-top: 0.75rem;
        }
        .sidebar-inquiry-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.2rem 0.5rem;
            background: #dbeafe;
            color: #1e40af;
            border-radius: 6px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        .sidebar-inquiry-item {
            background: #f0f9ff;
            border: 1px solid #bae6fd;
            border-radius: 8px;
            padding: 0.6rem;
            margin-top: 0.5rem;
            font-size: 0.75rem;
        }
        .sidebar-inquiry-date {
            color: #0369a1;
            font-weight: 600;
            margin-bottom: 0.25rem;
        }
        .sidebar-inquiry-text {
            color: #0c4a6e;
        }
        .sidebar-inquiry-answer {
            color: #065f46;
            background: #d1fae5;
            padding: 0.4rem;
            border-radius: 6px;
            margin-top: 0.3rem;
        }
        
        /* Header User Profile */
        .header-user {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 4px 10px 4px 4px;
            background: var(--bg-secondary);
            border-radius: 20px;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        
        .header-user:hover {
            background: var(--bg-tertiary);
        }
        
        .header-user-avatar {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-weight: 600;
            font-size: 0.75rem;
        }
        
        .header-user-info {
            display: flex;
            flex-direction: column;
        }
        
        .header-user-name {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .header-user-role {
            font-size: 0.6rem;
            color: var(--text-muted);
        }
        
        /* Optimierte Header-Suchfelder - Legacy */
        .header-search-group {
            display: flex;
            gap: 0.5rem;
            align-items: center;
        }
        
        .header-search-field {
            position: relative;
            width: 120px;
        }
        
        .header-search-input {
            width: 100%;
            padding: 0.6rem 0.75rem 0.35rem;
            font-size: 0.8rem;
            border: 1px solid var(--border);
            border-radius: 8px;
            background: var(--bg-secondary);
            color: var(--text-primary);
            transition: all 0.2s ease;
            outline: none;
        }
        
        .header-search-input:focus {
            outline-color: var(--primary);
            background: var(--bg-primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .header-search-label {
            position: absolute;
            left: 0.75rem;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.75rem;
            color: var(--text-muted);
            pointer-events: none;
            transition: all 0.2s ease;
            background: transparent;
        }
        
        .header-search-input:focus + .header-search-label,
        .header-search-input:not(:placeholder-shown) + .header-search-label {
            top: 0.15rem;
            transform: translateY(0);
            font-size: 0.6rem;
            color: var(--primary);
            font-weight: 600;
        }

        .btn {
            padding: 0.5rem 1rem;
            border: none;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 600;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.2s;
        }

        .btn-primary { background: var(--primary); color: white; }
        .btn-primary:hover { background: var(--primary-dark); }
        .btn-secondary { background: var(--bg-tertiary); color: var(--text-primary); }
        .btn-secondary:hover { background: var(--border); }
        .btn-success { background: var(--success); color: white; }
        .btn-warning { background: #f59e0b; color: white; }
        .btn-warning:hover { background: #d97706; }
        .btn-white { background: white; color: var(--primary); }
        
        /* Modern Selection Pill */
        .selection-pill {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.4rem 0.875rem;
            background: linear-gradient(135deg, #3b82f6 0%, #06b6d4 100%);
            border-radius: 50px;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
            animation: pillPulse 2s ease-in-out infinite;
        }
        
        .selection-pill-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            padding: 0 6px;
            background: white;
            color: #3b82f6;
            font-size: 0.8rem;
            font-weight: 700;
            border-radius: 50px;
        }
        
        .selection-pill-text {
            color: white;
            font-size: 0.8rem;
            font-weight: 600;
        }
        
        @keyframes pillPulse {
            0%, 100% { box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3); }
            50% { box-shadow: 0 4px 16px rgba(59, 130, 246, 0.5); }
        }
        
        @keyframes slideIn {
            from { opacity: 0; transform: translateX(-10px); }
            to { opacity: 1; transform: translateX(0); }
        }
        
        /* Green Action Buttons */
        .btn-action-green {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.875rem;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 6px rgba(16, 185, 129, 0.3);
        }
        
        .btn-action-green:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
        }
        
        .btn-action-green:active {
            transform: translateY(0);
        }
        
        /* Orange Action Button (Ext. RMA) */
        .btn-action-orange {
            display: inline-flex;
            align-items: center;
            gap: 0.4rem;
            padding: 0.5rem 0.875rem;
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: white;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 6px rgba(245, 158, 11, 0.3);
        }
        
        .btn-action-orange:hover {
            background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(245, 158, 11, 0.4);
        }
        
        .btn-action-orange:active {
            transform: translateY(0);
        }

        /* Content - Mit leichtem Grau-Hintergrund wie Mockup */
        .content {
            flex: 1;
            padding: 1.5rem;
            background: #f1f5f9;
        }

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

        /* Stats */
        .stats-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
            gap: 1rem;
            margin-bottom: 1.5rem;
        }

        .stat-card {
            background: var(--bg-primary);
            padding: 1.25rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            text-align: center;
        }

        .stat-icon { 
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 0.5rem;
            color: var(--primary);
        }
        .stat-icon svg {
            width: 28px;
            height: 28px;
        }
        
        /* ========================================
           AWARD-WINNING DASHBOARD DESIGN
           "Obsidian Luxe" - Dark Industrial Elegance
           ======================================== */
        
        .dashboard-award {
            min-height: 100vh;
            background: linear-gradient(135deg, #0a0a0f 0%, #1a1a2e 50%, #0f0f1a 100%);
            padding: 2rem;
            position: relative;
            overflow: hidden;
        }
        
        .dashboard-award::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: 
                radial-gradient(ellipse at 20% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                radial-gradient(ellipse at 50% 50%, rgba(16, 185, 129, 0.05) 0%, transparent 70%);
            pointer-events: none;
        }
        
        .dashboard-award * {
            position: relative;
            z-index: 1;
        }
        
        /* Dashboard Header */
        .dash-header {
            display: flex;
            justify-content: space-between;
            align-items: flex-end;
            margin-bottom: 2.5rem;
            padding-bottom: 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.06);
        }
        
        .dash-title {
            font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
            font-size: 2.5rem;
            font-weight: 700;
            background: linear-gradient(135deg, #ffffff 0%, #a0a0a0 100%);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            letter-spacing: -0.02em;
            margin: 0;
        }
        
        .dash-subtitle {
            font-size: 0.95rem;
            color: rgba(255,255,255,0.5);
            margin-top: 0.5rem;
            font-weight: 400;
        }
        
        .dash-date {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.4);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }
        
        /* Hero Stats Row */
        .hero-stats {
            display: grid;
            grid-template-columns: repeat(6, 1fr);
            gap: 1rem;
            margin-bottom: 2rem;
        }
        
        @media (max-width: 1400px) {
            .hero-stats { grid-template-columns: repeat(3, 1fr); }
        }
        
        @media (max-width: 768px) {
            .hero-stats { grid-template-columns: repeat(2, 1fr); }
        }
        
        .hero-stat {
            background: rgba(255,255,255,0.03);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.06);
            border-radius: 20px;
            padding: 1.5rem;
            position: relative;
            overflow: hidden;
            cursor: pointer;
            transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
            animation: statFadeIn 0.6s ease-out both;
        }
        
        .hero-stat:nth-child(1) { animation-delay: 0.1s; }
        .hero-stat:nth-child(2) { animation-delay: 0.15s; }
        .hero-stat:nth-child(3) { animation-delay: 0.2s; }
        .hero-stat:nth-child(4) { animation-delay: 0.25s; }
        .hero-stat:nth-child(5) { animation-delay: 0.3s; }
        .hero-stat:nth-child(6) { animation-delay: 0.35s; }
        
        @keyframes statFadeIn {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .hero-stat::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 3px;
            background: var(--stat-accent, linear-gradient(90deg, #3b82f6, #8b5cf6));
            opacity: 0;
            transition: opacity 0.3s;
        }
        
        .hero-stat:hover {
            transform: translateY(-4px);
            background: rgba(255,255,255,0.06);
            outline-color: rgba(255,255,255,0.12);
            box-shadow: 
                0 20px 40px rgba(0,0,0,0.3),
                0 0 60px rgba(59, 130, 246, 0.1);
        }
        
        .hero-stat:hover::before {
            opacity: 1;
        }
        
        .hero-stat--total { --stat-accent: linear-gradient(90deg, #3b82f6, #60a5fa); }
        .hero-stat--open { --stat-accent: linear-gradient(90deg, #f59e0b, #fbbf24); }
        .hero-stat--progress { --stat-accent: linear-gradient(90deg, #ef4444, #f87171); }
        .hero-stat--done { --stat-accent: linear-gradient(90deg, #10b981, #34d399); }
        .hero-stat--shipped { --stat-accent: linear-gradient(90deg, #06b6d4, #22d3ee); }
        .hero-stat--special { --stat-accent: linear-gradient(90deg, #8b5cf6, #a78bfa); }
        
        .hero-stat-icon {
            width: 48px;
            height: 48px;
            border-radius: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 1rem;
            background: rgba(255,255,255,0.05);
            transition: all 0.3s;
        }
        
        .hero-stat:hover .hero-stat-icon {
            transform: scale(1.1) rotate(-5deg);
        }
        
        .hero-stat-icon svg {
            width: 24px;
            height: 24px;
            stroke-width: 1.5;
        }
        
        .hero-stat--total .hero-stat-icon { color: #60a5fa; background: rgba(59, 130, 246, 0.15); }
        .hero-stat--open .hero-stat-icon { color: #fbbf24; background: rgba(245, 158, 11, 0.15); }
        .hero-stat--progress .hero-stat-icon { color: #f87171; background: rgba(239, 68, 68, 0.15); }
        .hero-stat--done .hero-stat-icon { color: #34d399; background: rgba(16, 185, 129, 0.15); }
        .hero-stat--shipped .hero-stat-icon { color: #22d3ee; background: rgba(6, 182, 212, 0.15); }
        .hero-stat--special .hero-stat-icon { color: #a78bfa; background: rgba(139, 92, 246, 0.15); }
        
        .hero-stat-value {
            font-family: 'SF Pro Display', -apple-system, sans-serif;
            font-size: 2.5rem;
            font-weight: 700;
            color: #ffffff;
            line-height: 1;
            margin-bottom: 0.5rem;
            letter-spacing: -0.02em;
        }
        
        .hero-stat-label {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.5);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.08em;
        }
        
        .hero-stat-trend {
            position: absolute;
            top: 1rem;
            right: 1rem;
            font-size: 0.75rem;
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            font-weight: 600;
        }
        
        .hero-stat-trend.up {
            color: #34d399;
            background: rgba(16, 185, 129, 0.15);
        }
        
        .hero-stat-trend.down {
            color: #f87171;
            background: rgba(239, 68, 68, 0.15);
        }
        
        /* Widget Grid */
        .dash-widgets {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 1.5rem;
            margin-bottom: 1.5rem;
        }
        
        @media (max-width: 1200px) {
            .dash-widgets { grid-template-columns: repeat(2, 1fr); }
        }
        
        @media (max-width: 768px) {
            .dash-widgets { grid-template-columns: 1fr; }
        }
        
        .dash-widget {
            background: rgba(255,255,255,0.02);
            backdrop-filter: blur(20px);
            -webkit-backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.05);
            border-radius: 20px;
            overflow: hidden;
            animation: widgetFadeIn 0.6s ease-out both;
        }
        
        .dash-widget:nth-child(1) { animation-delay: 0.4s; }
        .dash-widget:nth-child(2) { animation-delay: 0.5s; }
        .dash-widget:nth-child(3) { animation-delay: 0.6s; }
        .dash-widget:nth-child(4) { animation-delay: 0.7s; }
        .dash-widget:nth-child(5) { animation-delay: 0.8s; }
        .dash-widget:nth-child(6) { animation-delay: 0.9s; }
        
        @keyframes widgetFadeIn {
            from {
                opacity: 0;
                transform: translateY(30px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        .dash-widget-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.05);
        }
        
        .dash-widget-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: rgba(255,255,255,0.9);
        }
        
        .dash-widget-title svg {
            width: 20px;
            height: 20px;
            color: rgba(255,255,255,0.4);
        }
        
        .dash-widget-body {
            padding: 1.5rem;
            min-height: 200px;
        }
        
        /* Progress Bars in Widgets */
        .dash-progress-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
            padding: 0.75rem;
            border-radius: 12px;
            transition: background 0.2s;
            cursor: pointer;
        }
        
        .dash-progress-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .dash-progress-label {
            min-width: 100px;
            font-size: 0.85rem;
            font-weight: 500;
            color: rgba(255,255,255,0.8);
        }
        
        .dash-progress-bar {
            flex: 1;
            height: 8px;
            background: rgba(255,255,255,0.08);
            border-radius: 4px;
            overflow: hidden;
        }
        
        .dash-progress-fill {
            height: 100%;
            border-radius: 4px;
            transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .dash-progress-value {
            min-width: 40px;
            text-align: right;
            font-size: 0.85rem;
            font-weight: 600;
            color: rgba(255,255,255,0.9);
        }
        
        /* Donut Chart */
        .dash-donut-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 2rem;
        }
        
        .dash-donut {
            position: relative;
            width: 140px;
            height: 140px;
        }
        
        .dash-donut svg {
            transform: rotate(-90deg);
        }
        
        .dash-donut-bg {
            fill: none;
            stroke: rgba(255,255,255,0.08);
            stroke-width: 12;
        }
        
        .dash-donut-fill {
            fill: none;
            stroke-width: 12;
            stroke-linecap: round;
            transition: stroke-dashoffset 1s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .dash-donut-center {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            text-align: center;
        }
        
        .dash-donut-percent {
            font-size: 2rem;
            font-weight: 700;
            color: #ffffff;
        }
        
        .dash-donut-label {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.5);
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }
        
        .dash-donut-legend {
            display: flex;
            flex-direction: column;
            gap: 0.75rem;
        }
        
        .dash-legend-item {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.7);
        }
        
        .dash-legend-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }
        
        /* Activity Feed */
        .dash-activity-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            padding: 1rem;
            border-radius: 12px;
            margin-bottom: 0.5rem;
            transition: background 0.2s;
            cursor: pointer;
        }
        
        .dash-activity-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .dash-activity-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .dash-activity-icon svg {
            width: 18px;
            height: 18px;
        }
        
        .dash-activity-content {
            flex: 1;
            min-width: 0;
        }
        
        .dash-activity-title {
            font-size: 0.85rem;
            font-weight: 500;
            color: rgba(255,255,255,0.9);
            margin-bottom: 0.25rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .dash-activity-meta {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.4);
        }
        
        .dash-activity-time {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.3);
            flex-shrink: 0;
        }
        
        /* Empty State */
        .dash-empty {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            min-height: 180px;
            color: rgba(255,255,255,0.3);
            font-size: 0.85rem;
        }
        
        .dash-empty svg {
            width: 48px;
            height: 48px;
            margin-bottom: 1rem;
            opacity: 0.3;
        }
        
        /* Full Width Widget */
        .dash-widget--full {
            grid-column: 1 / -1;
        }
        
        /* Ranking List */
        .dash-rank-item {
            display: flex;
            align-items: center;
            gap: 1rem;
            padding: 0.875rem 1rem;
            border-radius: 12px;
            margin-bottom: 0.5rem;
            transition: background 0.2s;
            cursor: pointer;
        }
        
        .dash-rank-item:hover {
            background: rgba(255,255,255,0.03);
        }
        
        .dash-rank-pos {
            width: 28px;
            height: 28px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
            font-weight: 700;
            flex-shrink: 0;
        }
        
        .dash-rank-pos--1 { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #000; }
        .dash-rank-pos--2 { background: linear-gradient(135deg, #94a3b8, #64748b); color: #fff; }
        .dash-rank-pos--3 { background: linear-gradient(135deg, #c2410c, #ea580c); color: #fff; }
        .dash-rank-pos--other { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.5); }
        
        .dash-rank-info {
            flex: 1;
            min-width: 0;
        }
        
        .dash-rank-name {
            font-size: 0.9rem;
            font-weight: 500;
            color: rgba(255,255,255,0.9);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .dash-rank-sub {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.4);
        }
        
        .dash-rank-value {
            font-size: 1rem;
            font-weight: 700;
            color: rgba(255,255,255,0.9);
        }
        
        /* Dashboard Widgets (Legacy) */
        .dashboard-widget {
            background: var(--bg-primary);
            border-radius: 12px;
            border: 1px solid var(--border);
            overflow: hidden;
        }
        
        .widget-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 1rem;
            font-weight: 600;
            font-size: 0.85rem;
            border-bottom: 1px solid var(--border);
            color: var(--text-primary);
        }
        
        .widget-header svg {
            color: var(--primary);
        }
        
        .widget-content {
            padding: 1rem;
            max-height: 280px;
            overflow-y: auto;
        }
        
        .widget-empty {
            text-align: center;
            color: var(--text-muted);
            font-size: 0.8rem;
            padding: 2rem;
        }
        
        .widget-bar {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin-bottom: 0.75rem;
            cursor: pointer;
            padding: 0.5rem;
            border-radius: 8px;
            transition: background 0.2s;
        }
        
        .widget-bar:hover {
            background: var(--bg-tertiary);
        }
        
        .widget-bar-label {
            font-size: 0.8rem;
            font-weight: 500;
            min-width: 80px;
            color: var(--text-primary);
        }
        
        /* Autocomplete Dropdown */
        .autocomplete-wrapper {
            position: relative;
        }
        
        .autocomplete-wrapper.input-wrapper {
            overflow: visible;
        }
        
        .autocomplete-dropdown {
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            background: #fef9e7;
            border: 1px solid #d4a843;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            z-index: 1000;
            margin-top: 0.25rem;
            max-height: 200px;
            overflow-y: auto;
            display: none;
        }
        
        .autocomplete-dropdown.show {
            display: block;
        }
        
        .autocomplete-item {
            padding: 0.65rem 0.85rem;
            cursor: pointer;
            border-bottom: 1px solid #e8d9a0;
            transition: background 0.15s;
            background: #fef9e7;
        }
        
        .autocomplete-item:last-child {
            border-bottom: none;
        }
        
        .autocomplete-item:hover {
            background: #fdf0c4;
        }
        
        .autocomplete-item .customer-name {
            font-weight: 500;
            font-size: 0.85rem;
            color: #000000;
        }
        
        .autocomplete-item .customer-info {
            font-size: 0.7rem;
            color: #8b7355;
            margin-top: 0.15rem;
        }
        
        .autocomplete-item .customer-info span {
            margin-right: 0.75rem;
        }
        
        .autocomplete-empty {
            padding: 0.75rem;
            text-align: center;
            color: #8b7355;
            font-size: 0.8rem;
            background: #fef9e7;
        }
        
        .hersteller-option {
            transition: background 0.15s;
        }
        
        .hersteller-option:hover {
            background: var(--primary) !important;
            color: white !important;
        }
        
        .hersteller-option:last-child {
            border-bottom: none !important;
        }
        
        /* Service Modal Dropdown Styles */
        .svc-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            right: 0;
            max-height: 220px;
            overflow-y: auto;
            background: var(--bg-primary);
            border: 2px solid var(--primary);
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.2);
            z-index: 1001;
            margin-top: 4px;
        }
        
        .svc-dropdown-item {
            padding: 10px 14px;
            cursor: pointer;
            font-size: 0.9rem;
            border-bottom: 1px solid var(--border);
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .svc-dropdown-item:last-child {
            border-bottom: none;
        }
        
        .svc-dropdown-item:hover,
        .svc-dropdown-item.highlighted {
            background: var(--primary);
            color: white;
        }
        
        .svc-dropdown-item .recent-badge {
            font-size: 0.6rem;
            background: rgba(16,185,129,0.2);
            color: #10b981;
            padding: 2px 6px;
            border-radius: 4px;
            margin-left: auto;
        }
        
        .svc-dropdown-item:hover .recent-badge,
        .svc-dropdown-item.highlighted .recent-badge {
            background: rgba(255,255,255,0.3);
            color: white;
        }
        
        /* Field Validation Styles */
        .field-error {
            font-size: 0.7rem;
            color: #ef4444;
            margin-top: 4px;
            display: none;
        }
        
        /* Modern Lucide-style Inline SVG Icons */
        .icon-svg {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1em;
            height: 1em;
            vertical-align: -0.125em;
        }
        .icon-svg svg {
            width: 100%;
            height: 100%;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
        }
        .icon-svg-lg {
            width: 1.25em;
            height: 1.25em;
        }
        .icon-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
        }
        .icon-btn svg {
            width: 18px;
            height: 18px;
            stroke: currentColor;
            stroke-width: 2;
            stroke-linecap: round;
            stroke-linejoin: round;
            fill: none;
            flex-shrink: 0;
        }
        
        .form-input.error {
            outline-color: #ef4444 !important;
            background: rgba(239,68,68,0.05) !important;
        }
        
        .form-input.valid {
            outline-color: #10b981 !important;
        }
        
        .svc-required:focus {
            outline-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
        }
        
        .widget-bar-track {
            flex: 1;
            height: 24px;
            background: var(--bg-tertiary);
            border-radius: 6px;
            overflow: hidden;
            position: relative;
        }
        
        .widget-bar-fill {
            height: 100%;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding-right: 8px;
            font-size: 0.75rem;
            font-weight: 600;
            color: white;
            min-width: 30px;
            transition: width 0.3s ease;
        }
        
        .widget-activity-item {
            display: flex;
            align-items: flex-start;
            gap: 0.75rem;
            padding: 0.6rem 0;
            border-bottom: 1px solid var(--border);
        }
        
        .widget-activity-item:last-child {
            border-bottom: none;
        }
        
        .widget-activity-icon {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            flex-shrink: 0;
        }
        
        .widget-activity-content {
            flex: 1;
            min-width: 0;
        }
        
        .widget-activity-text {
            font-size: 0.8rem;
            color: var(--text-primary);
            margin-bottom: 0.2rem;
        }
        
        .widget-activity-time {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        @media (max-width: 1200px) {
            #dashboard > div:last-child {
                grid-template-columns: 1fr 1fr;
            }
        }
        
        @media (max-width: 768px) {
            #dashboard > div:last-child {
                grid-template-columns: 1fr;
            }
        }
        .stat-value { font-size: 1.5rem; font-weight: 700; color: var(--primary); }
        .stat-label { color: var(--text-secondary); font-size: 0.75rem; }

        /* Table Container */
        .table-container {
            background: var(--bg-primary);
            border-radius: 12px;
            border: 1px solid var(--border);
            overflow: hidden;
            display: flex;
            flex-direction: column;
            height: calc(100vh - 120px);
        }

        .table-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem;
            border-bottom: 1px solid var(--border);
            flex-wrap: wrap;
            gap: 0.75rem;
        }

        .search-box {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            background: var(--bg-tertiary);
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            min-width: 220px;
        }

        .search-box input {
            border: none;
            background: none;
            outline: none;
            width: 100%;
            font-size: 0.8rem;
            color: var(--text-primary);
        }

        .selection-bar {
            display: none;
            background: var(--primary);
            color: white;
            padding: 0.5rem 1rem;
            align-items: center;
            justify-content: space-between;
            font-size: 0.8rem;
        }

        .selection-bar.active { display: flex; }

.table-wrapper { overflow-x: auto; }

        table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 3px;
            min-width: 1100px;
        }

        thead {
            position: sticky;
            top: 0;
            z-index: 10;
        }

        th {
            text-align: left;
            padding: 0.5rem 0.5rem;
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--text-primary);
            text-transform: uppercase;
            background: #ffffff;
            border-bottom: none;
            white-space: nowrap;
            letter-spacing: 0.03em;
        }

        /* Generic table styles (not for .table-new) */
        .generic-table td {
            padding: 0.35rem 0.5rem;
            font-size: 0.8rem;
            border-bottom: none;
            vertical-align: middle;
            background: #d1d5db;
            line-height: 1.2;
        }
        
        /* First and last cell rounded corners - generic tables only */
        .generic-table td:first-child {
            border-radius: 6px 0 0 6px;
        }
        
        .generic-table th:first-child {
            padding-left: 1rem;
        }
        
        .generic-table td:last-child {
            border-radius: 0 6px 6px 0;
        }
        
        .generic-table tbody tr {
            box-shadow: 0 1px 3px rgba(0,0,0,0.08);
            transition: all 0.2s ease;
        }
        
        .generic-table tbody tr:hover {
            box-shadow: 0 2px 6px rgba(0,0,0,0.1);
        }
        
        .generic-table tbody tr:hover td {
            background: #c0c5cc;
        }

        .generic-table tr.selected td { background: var(--primary-light); }

        .checkbox { width: 16px; height: 16px; cursor: pointer; accent-color: var(--primary); }

        .edit-btn {
            background: none;
            border: none;
            cursor: pointer;
            font-size: 0.875rem;
            padding: 0.125rem;
            border-radius: 4px;
            color: var(--text-muted);
        }

        .edit-btn:hover { background: var(--primary-light); color: var(--primary); }

        /* ==================== */
        /* UNIFIED DESIGN SYSTEM */
        /* ==================== */
        
        /* Page Header */
        .page-header {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 20px 24px;
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border);
        }
        
        .page-header-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
        }
        
        .page-header h2 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }
        
        /* Unified Toolbar */
        .toolbar {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 12px 16px;
            background: var(--bg-primary);
            border-bottom: 1px solid var(--border);
            gap: 12px;
            flex-wrap: wrap;
            flex-shrink: 0;
        }
        
        .toolbar-left {
            display: flex;
            align-items: center;
            gap: 8px;
        }
        
        .toolbar-right {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        /* Settings Tabs */
        .settings-tab {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.25rem;
            border: none;
            background: transparent;
            color: var(--text-muted);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            border-radius: 8px;
            transition: all 0.2s ease;
        }
        
        .settings-tab:hover {
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        
        .settings-tab.active {
            background: var(--primary);
            color: white;
        }
        
        .settings-tab svg {
            width: 16px;
            height: 16px;
        }
        
        .settings-section {
            display: none;
        }
        
        .settings-section.active {
            display: block;
        }
        
        /* Icon Buttons for Toolbar */
        .toolbar-btn {
            width: 36px;
            height: 36px;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-secondary);
            transition: all 0.2s ease;
        }
        
        .toolbar-btn:hover {
            outline-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }
        
        .toolbar-btn.active {
            outline-color: var(--primary);
            color: var(--primary);
            background: var(--primary-light);
        }
        
        .toolbar-btn svg {
            width: 18px;
            height: 18px;
        }
        
        /* Search Input - Rounded Style */
        .search-input-wrapper {
            position: relative;
            min-width: 280px;
        }
        
        .search-input-wrapper svg {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            width: 18px;
            height: 18px;
        }
        
        .search-input {
            width: 100%;
            padding: 10px 16px 10px 42px;
            border: 1px solid var(--border);
            border-radius: 24px;
            background: var(--bg-secondary);
            font-size: 0.85rem;
            color: var(--text-primary);
            transition: all 0.2s ease;
        }
        
        .search-input:focus {
            outline: none;
            outline-color: var(--primary);
            background: var(--bg-primary);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
        }
        
        .search-input::placeholder {
            color: var(--text-muted);
        }
        
        /* Add Button - Circle Style */
        .add-btn-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
            border: none;
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            box-shadow: 0 4px 12px rgba(34,197,94,0.3);
            transition: all 0.2s ease;
        }
        
        .add-btn-circle:hover {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(34,197,94,0.4);
        }
        
        .add-btn-circle svg {
            width: 20px;
            height: 20px;
        }
        
        /* More Options Button */
        .more-btn {
            width: 36px;
            height: 36px;
            border: none;
            background: transparent;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 1.2rem;
            letter-spacing: 2px;
        }
        
        .more-btn:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }

        /* ==================== */
        /* OPTIMIZED TABLE STYLES */
        /* ==================== */
        
        /* Table Container Card */
        .table-container {
            background: var(--bg-secondary);
            border-radius: 16px;
            border: 1px solid var(--border);
            overflow: hidden;
            box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        }
        
        /* Table Header - Glassmorphism */
        .table-header {
            background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(16,185,129,0.08) 100%);
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 1rem;
        }
        
        [data-theme="dark"] .table-header {
            background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(16,185,129,0.12) 100%);
        }
        
        .table-title {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        
        .table-title-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
        }
        
        .table-title h3 {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 0;
        }
        
        .table-count {
            background: rgba(59,130,246,0.15);
            color: var(--primary);
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.7rem;
            font-weight: 600;
        }
        
        .table-header-actions {
            display: flex;
            gap: 8px;
        }
        
        .header-action-btn {
            padding: 8px 14px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .header-action-btn:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            outline-color: var(--primary);
        }
        
        .header-action-btn.primary {
            background: linear-gradient(135deg, var(--primary) 0%, #2563eb 100%);
            color: white;
            border: none;
            font-weight: 600;
        }
        
        .header-action-btn.primary:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(59,130,246,0.3);
        }
        
        /* Optimized Status Tabs */
        /* Filter Bar */
        .filter-bar {
            padding: 0.75rem 1rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .filter-left {
            display: flex;
            gap: 8px;
            align-items: center;
            flex-wrap: wrap;
        }
        
        .filter-chips {
            display: flex;
            gap: 6px;
            flex-wrap: wrap;
        }
        
        .filter-chip {
            padding: 5px 10px;
            background: rgba(59,130,246,0.1);
            border: 1px solid rgba(59,130,246,0.3);
            border-radius: 16px;
            color: var(--primary);
            font-size: 0.7rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .filter-chip .remove {
            cursor: pointer;
            opacity: 0.7;
            transition: opacity 0.2s;
        }
        
        .filter-chip .remove:hover {
            opacity: 1;
        }
        
        /* Status Field Color Coding */
        .form-group.status-erledigt {
            background: linear-gradient(135deg, #065f46 0%, #047857 100%);
            padding: 0.75rem;
            border-radius: 10px;
            transition: all 0.3s ease;
        }
        
        .form-group.status-erledigt .form-label {
            color: #a7f3d0;
        }
        
        .form-group.status-erledigt .form-select {
            background: rgba(255,255,255,0.15);
            outline-color: #10b981;
            color: #ecfdf5;
            font-weight: 600;
        }
        
        .form-group.status-bearbeitung {
            background: linear-gradient(135deg, #92400e 0%, #b45309 100%);
            padding: 0.75rem;
            border-radius: 10px;
            transition: all 0.3s ease;
        }
        
        .form-group.status-bearbeitung .form-label {
            color: #fef3c7;
        }
        
        .form-group.status-bearbeitung .form-select {
            background: rgba(255,255,255,0.15);
            outline-color: #f59e0b;
            color: #fffbeb;
            font-weight: 600;
        }
        
        .form-group.status-verschickt {
            background: linear-gradient(135deg, #3730a3 0%, #4338ca 100%);
            padding: 0.75rem;
            border-radius: 10px;
            transition: all 0.3s ease;
        }
        
        .form-group.status-verschickt .form-label {
            color: #c7d2fe;
        }
        
        .form-group.status-verschickt .form-select {
            background: rgba(255,255,255,0.15);
            outline-color: #6366f1;
            color: #eef2ff;
            font-weight: 600;
        }
        
        /* Table Row Status Colors */
        /* Job Row Card Style */
        tr.job-row {
            background: #e5e7eb;
            border-left: 4px solid transparent;
        }
        
        tr.job-row:hover {
            background: #d1d5db;
        }
        
        tr.job-row td {
            padding: 12px 8px;
            vertical-align: middle;
        }
        
        /* Status indicator - full row background color */
        tr.row-status-offen td { background: #f5a855 !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-offen:hover td { background: #e09440 !important; }
        
        tr.row-status-bearbeitung td { background: #ef4444 !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-bearbeitung:hover td { background: #dc2626 !important; }
        
        tr.row-status-erledigt td { background: #22c55e !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-erledigt:hover td { background: #16a34a !important; }
        
        tr.row-status-verschickt td { background: #06b6d4 !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-verschickt:hover td { background: #0891b2 !important; }
        
        tr.row-status-archiv td { background: #6b7280 !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-archiv:hover td { background: #4b5563 !important; }
        
        tr.row-status-verschickt-erledigt td { background: #e5e7eb !important; color: #000000 !important; font-size: 0.8rem; }
        tr.row-status-verschickt-erledigt:hover td { background: #d1d5db !important; }
        
        /* Bulk Actions Bar */
        .bulk-actions-bar {
            padding: 0.6rem 1rem;
            background: linear-gradient(135deg, rgba(59,130,246,0.12) 0%, rgba(16,185,129,0.12) 100%);
            border-bottom: 1px solid rgba(59,130,246,0.2);
            display: none;
            justify-content: space-between;
            align-items: center;
        }
        
        .bulk-actions-bar.active {
            display: flex;
        }
        
        .bulk-info {
            color: var(--primary);
            font-size: 0.8rem;
            font-weight: 500;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .bulk-info .deselect-link {
            background: none;
            border: none;
            color: var(--primary);
            cursor: pointer;
            font-size: 0.75rem;
            text-decoration: underline;
        }
        
        .bulk-buttons {
            display: flex;
            gap: 6px;
        }
        
        .bulk-btn {
            padding: 6px 12px;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 6px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        
        .bulk-btn:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
        }
        
        .bulk-btn.danger:hover {
            background: rgba(239,68,68,0.1);
            outline-color: rgba(239,68,68,0.5);
            color: #ef4444;
        }
        
        /* Sortable Headers */
        th.sortable {
            cursor: pointer;
            user-select: none;
            transition: color 0.2s;
        }
        
        th.sortable:hover {
            color: var(--primary);
        }
        
        th .sort-icon {
            margin-left: 4px;
            opacity: 0.4;
            font-size: 0.6rem;
        }
        
        th.sorted .sort-icon {
            opacity: 1;
            color: var(--primary);
        }
        
        /* Status Badges - Enhanced */
        .status-badge {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            padding: 5px 10px;
            border-radius: 16px;
            font-size: 0.7rem;
            font-weight: 600;
            white-space: nowrap;
        }

        .status-badge.booked { 
            background: rgba(250,204,21,0.25); 
            color: #a16207; 
            border: 1px solid rgba(250,204,21,0.5);
        }
        .status-badge.progress { 
            background: rgba(245,158,11,0.25); 
            color: #b45309; 
            border: 1px solid rgba(245,158,11,0.5);
        }
        .status-badge.quote { 
            background: rgba(229,231,235,0.5); 
            color: #6b7280; 
            border: 1px solid rgba(156,163,175,0.5);
        }
        .status-badge.noparts { 
            background: rgba(100,116,139,0.12); 
            color: #64748b; 
            border: 1px solid rgba(100,116,139,0.25);
        }
        .status-badge.closed { 
            background: #ffffff; 
            color: #374151; 
            border: 2px solid #d1d5db;
            font-weight: 800;
        }
        .status-badge.ready { 
            background: rgba(16,185,129,0.12); 
            color: #10b981; 
            border: 1px solid rgba(16,185,129,0.25);
        }
        
        /* Garantie Badges - Enhanced */
        .garantie-badge {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            padding: 4px 10px;
            border-radius: 12px;
            font-size: 0.65rem;
            font-weight: 600;
        }
        
        .garantie-badge.yes {
            background: rgba(16,185,129,0.12);
            color: #10b981;
            border: 1px solid rgba(16,185,129,0.25);
        }
        
        .garantie-badge.no {
            background: rgba(239, 68, 68, 0.15);
            color: #dc2626;
            border: 1px solid rgba(239, 68, 68, 0.3);
        }
        
        /* Legacy garantie classes */
        .garantie-yes { background: rgba(16,185,129,0.12); color: #10b981; }
        .garantie-no { background: rgba(239, 68, 68, 0.15); color: #dc2626; }
        .dtv-badge { background: linear-gradient(135deg, #fbbf24, #f59e0b); color: #78350f; }
        
        /* Memo Icon */
        .memo-icon {
            cursor: pointer;
            font-size: 0.9rem;
            opacity: 0.7;
            transition: all 0.2s ease;
            padding: 2px;
        }
        
        .memo-icon:hover {
            opacity: 1;
            transform: scale(1.2);
        }
        
        /* Memo Popup */
        .memo-popup {
            position: fixed;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 10px;
            padding: 1rem;
            box-shadow: 0 10px 40px rgba(0,0,0,0.2);
            z-index: 1000;
            max-width: 350px;
            min-width: 200px;
            animation: memoFadeIn 0.2s ease;
        }
        
        .memo-popup-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            font-size: 0.85rem;
            color: var(--primary);
            margin-bottom: 0.5rem;
            padding-bottom: 0.5rem;
            border-bottom: 1px solid var(--border);
        }
        
        .memo-popup-content {
            font-size: 0.85rem;
            color: var(--text-primary);
            line-height: 1.5;
            white-space: pre-wrap;
            word-break: break-word;
        }
        
        .memo-popup-close {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            background: none;
            border: none;
            font-size: 1.2rem;
            cursor: pointer;
            color: var(--text-muted);
            line-height: 1;
            padding: 0;
        }
        
        .memo-popup-close:hover {
            color: var(--text-primary);
        }
        
        @keyframes memoFadeIn {
            from { opacity: 0; transform: translateY(-5px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        /* Row Actions - Appear on Hover */
        .row-actions {
            display: flex;
            gap: 8px;
            opacity: 1;
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            padding: 8px 14px;
            border-radius: 10px;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
            transition: all 0.2s ease;
        }
        
        tr:hover .row-actions {
            opacity: 1;
            background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
            box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
        }
        
        tr.selected .row-actions {
            opacity: 1;
        }
        
        .action-btn {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: none;
            background: rgba(255, 255, 255, 0.2);
            color: white;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.8rem;
        }
        
        .action-btn:hover {
            background: rgba(255, 255, 255, 0.4);
            color: white;
            transform: scale(1.1);
        }
        
        .action-btn.edit {
            color: white;
        }
        
        .action-btn.edit:hover {
            background: rgba(245,158,11,0.15);
            color: #d97706;
        }
        
        .action-btn.status {
            color: #10b981;
        }
        
        .action-btn.status:hover {
            background: rgba(16,185,129,0.15);
            color: #059669;
        }
        
        .action-btn.danger:hover {
            background: rgba(239, 68, 68, 0.8);
            color: white;
        }
        
        /* Expand Button */
        .expand-btn {
            width: 22px;
            height: 22px;
            border-radius: 5px;
            border: none;
            background: var(--bg-tertiary);
            color: var(--text-muted);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.6rem;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .expand-btn:hover {
            background: rgba(59,130,246,0.15);
            color: var(--primary);
        }
        
        .expand-btn.expanded {
            background: rgba(59,130,246,0.15);
            color: var(--primary);
            transform: rotate(90deg);
        }
        
        /* Expanded Row Details */
        .expanded-row {
            display: none;
        }
        
        .expanded-row.active {
            display: table-row;
        }
        
        /* Newly created job highlight */
        .job-row.newly-created td {
            background: linear-gradient(90deg, rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.05)) !important;
            animation: newJobPulse 1s ease-out;
        }
        
        .job-row.newly-created td:first-child {
            border-left-color: #10b981 !important;
            border-left-width: 4px !important;
        }
        
        @keyframes newJobPulse {
            0% { background: rgba(16, 185, 129, 0.3); }
            100% { background: rgba(16, 185, 129, 0.1); }
        }
        
        .rma-filter-chip {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(37, 99, 235, 0.05) 100%);
            border-radius: 12px;
            margin-bottom: 1rem;
            border: 2px dashed rgba(59, 130, 246, 0.3);
            animation: filterChipAppear 0.3s ease-out;
        }
        
        @keyframes filterChipAppear {
            0% { opacity: 0; transform: translateY(-10px); }
            100% { opacity: 1; transform: translateY(0); }
        }
        
        .expanded-row td {
            background: var(--bg-secondary);
            border-bottom: 1px solid rgba(59,130,246,0.15);
            padding: 0;
        }
        
        .expanded-content {
            padding: 16px 20px 16px 60px;
            display: grid;
            grid-template-columns: repeat(4, 1fr);
            gap: 16px;
        }
        
        @media (max-width: 900px) {
            .expanded-content {
                grid-template-columns: repeat(2, 1fr);
            }
        }
        
        .detail-group {
            display: flex;
            flex-direction: column;
            gap: 3px;
        }
        
        .detail-label {
            font-size: 0.6rem;
            color: var(--text-muted);
            text-transform: uppercase;
            letter-spacing: 0.5px;
            font-weight: 600;
        }
        
        .detail-value {
            font-size: 0.8rem;
            color: var(--text-primary);
        }
        
        .detail-actions {
            display: flex;
            gap: 8px;
            margin-top: 12px;
            padding-top: 12px;
            border-top: 1px solid var(--border);
            grid-column: 1 / -1;
        }
        
        /* Cell Styles */
        .cell-primary {
            color: var(--text-primary);
            font-weight: 500;
        }
        
        .cell-secondary {
            color: var(--text-muted);
            font-size: 0.65rem;
            margin-top: 1px;
        }
        
        .cell-mono {
            font-family: 'Consolas', 'Monaco', monospace;
            color: var(--primary);
            font-size: 0.75rem;
        }

        /* Pagination - Enhanced */
        .pagination {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1rem;
            font-size: 0.75rem;
            color: var(--text-secondary);
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
        }
        
        .pagination-info strong {
            color: var(--primary);
        }
        
        .pagination-controls {
            display: flex;
            gap: 4px;
            align-items: center;
        }
        
        .page-btn {
            width: 32px;
            height: 32px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s ease;
            font-size: 0.8rem;
        }
        
        .page-btn:hover {
            background: rgba(59,130,246,0.1);
            outline-color: rgba(59,130,246,0.3);
            color: var(--primary);
        }
        
        .page-btn.active {
            background: var(--primary);
            color: white;
            outline-color: var(--primary);
        }
        
        .page-btn:disabled {
            opacity: 0.3;
            cursor: not-allowed;
        }

        /* Forms - Modern Design */
        .form-card {
            background: var(--bg-primary);
            border-radius: 16px;
            border: 1px solid var(--border);
            padding: 0;
            margin-bottom: 1rem;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
        }

        .form-header {
            background: linear-gradient(135deg, rgba(59,130,246,0.08) 0%, rgba(16,185,129,0.08) 100%);
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        [data-theme="dark"] .form-header {
            background: linear-gradient(135deg, rgba(59,130,246,0.15) 0%, rgba(16,185,129,0.15) 100%);
        }

        .form-title {
            font-size: 1rem;
            font-weight: 600;
            margin: 0;
            padding: 0;
            border: none;
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }

        .form-title-icon {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, var(--primary) 0%, var(--success) 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.1rem;
            color: white;
        }

        .form-header-actions {
            display: flex;
            gap: 0.5rem;
        }

        .header-action-btn {
            padding: 0.5rem 0.85rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.75rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }

        .header-action-btn:hover {
            background: var(--bg-tertiary);
            color: var(--text-primary);
            outline-color: var(--primary);
        }

        .form-body {
            padding: 1.5rem;
        }

        /* Section Dividers */
        .section-divider {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            margin: 1.75rem 0 1.25rem 0;
            color: var(--primary);
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 1.5px;
        }

        .section-divider:first-child {
            margin-top: 0;
        }

        .section-divider::before,
        .section-divider::after {
            content: '';
            flex: 1;
            height: 1px;
            background: linear-gradient(90deg, var(--primary) 0%, transparent 100%);
            opacity: 0.3;
        }

        .section-divider::after {
            background: linear-gradient(90deg, transparent 0%, var(--primary) 100%);
        }

        .section-icon {
            width: 26px;
            height: 26px;
            background: rgba(59,130,246,0.1);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.85rem;
        }

        [data-theme="dark"] .section-icon {
            background: rgba(59,130,246,0.2);
        }

        /* Field Grid */
        .field-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 1rem;
        }

        .field-grid.single-col {
            grid-template-columns: 1fr;
        }

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

        .form-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
            gap: 0.875rem;
        }

        .form-group { display: flex; flex-direction: column; gap: 0.25rem; }
        .form-label { font-size: 0.75rem; font-weight: 600; color: var(--text-secondary); }
        .form-label.required::after { content: ' *'; color: var(--error); }

        /* Modern Input Fields with Icon Prefix */
        .modern-field {
            position: relative;
        }

        .modern-field.full-width {
            grid-column: 1 / -1;
        }

        .input-wrapper {
            position: relative;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            transition: all 0.25s ease;
            overflow: hidden;
        }

        .input-wrapper:hover {
            outline-color: var(--text-muted);
            background: var(--bg-tertiary);
        }

        .input-wrapper:focus-within {
            outline-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
            background: var(--bg-primary);
        }

        .input-wrapper .prefix-icon {
            position: absolute;
            left: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 1rem;
            transition: color 0.25s ease;
            z-index: 1;
            pointer-events: none;
        }

        .input-wrapper:focus-within .prefix-icon {
            color: var(--primary);
        }

        .input-wrapper input,
        .input-wrapper select,
        .input-wrapper textarea {
            width: 100%;
            padding: 1rem 0.75rem 0.5rem 2.5rem;
            background: transparent;
            border: none;
            color: var(--text-primary);
            font-size: 0.875rem;
            outline: none;
        }

        .input-wrapper select {
            cursor: pointer;
            appearance: none;
            padding-right: 2rem;
        }

        .input-wrapper textarea {
            min-height: 80px;
            resize: vertical;
            padding-top: 1.5rem;
        }

        .input-wrapper .floating-label {
            position: absolute;
            left: 2.5rem;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.85rem;
            pointer-events: none;
            transition: all 0.2s ease;
        }

        .input-wrapper textarea ~ .floating-label {
            top: 1rem;
            transform: none;
        }

        .input-wrapper input:focus ~ .floating-label,
        .input-wrapper input:not(:placeholder-shown) ~ .floating-label,
        .input-wrapper select:focus ~ .floating-label,
        .input-wrapper select:valid ~ .floating-label,
        .input-wrapper textarea:focus ~ .floating-label,
        .input-wrapper textarea:not(:placeholder-shown) ~ .floating-label {
            top: 0.4rem;
            transform: none;
            font-size: 0.65rem;
            color: var(--primary);
            font-weight: 600;
            letter-spacing: 0.5px;
        }

        /* Select Arrow */
        .select-wrapper::after {
            content: '▼';
            position: absolute;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-muted);
            font-size: 0.55rem;
            pointer-events: none;
        }

        /* Toggle Switch for Garantie */
        .toggle-field {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 0.875rem 1rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            transition: all 0.25s ease;
        }

        .toggle-field:hover {
            background: var(--bg-tertiary);
        }

        .toggle-label {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 500;
        }

        .toggle-label .icon {
            font-size: 1rem;
        }

        .toggle-switch {
            position: relative;
            width: 48px;
            height: 26px;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 13px;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .toggle-switch.active {
            background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
            outline-color: var(--success);
        }

        .toggle-switch::after {
            content: '';
            position: absolute;
            width: 20px;
            height: 20px;
            background: white;
            border-radius: 50%;
            top: 2px;
            left: 2px;
            transition: all 0.3s ease;
            box-shadow: 0 2px 6px rgba(0,0,0,0.2);
        }

        .toggle-switch.active::after {
            left: calc(100% - 22px);
        }

        .toggle-status {
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-left: 0.5rem;
            min-width: 30px;
        }

        .toggle-status.yes {
            color: var(--success);
        }

        .toggle-status.no {
            color: var(--text-muted);
        }

        /* Form Footer */
        .form-footer {
            padding: 1rem 1.5rem;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .footer-options {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }

        .checkbox-option {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            color: var(--text-secondary);
            font-size: 0.8rem;
            cursor: pointer;
            user-select: none;
        }

        .checkbox-option input[type="checkbox"] {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
            cursor: pointer;
        }

        .footer-buttons {
            display: flex;
            gap: 0.75rem;
        }

        /* Legacy form styles for compatibility */
        .form-input, .form-select, .form-textarea {
            padding: 0.5rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.8rem;
            background: var(--bg-primary);
            color: var(--text-primary);
        }

        .form-input:focus, .form-select:focus, .form-textarea:focus {
            outline: none;
            outline-color: var(--primary);
            box-shadow: 0 0 0 2px var(--primary-light);
        }

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

        .form-actions {
            display: flex;
            gap: 0.5rem;
            justify-content: flex-end;
            margin-top: 1rem;
            padding-top: 0.75rem;
            border-top: 1px solid var(--border);
        }

        /* Dropdown */
        .dropdown {
            position: relative;
            display: inline-block;
        }

        .dropdown-content {
            display: none;
            position: fixed;
            background: var(--bg-primary);
            min-width: 220px;
            box-shadow: 0 8px 24px rgba(0,0,0,0.25);
            border-radius: 8px;
            border: 1px solid var(--border);
            z-index: 99999;
            overflow: hidden;
        }

        .dropdown-content.show { display: block; }

        .dropdown-item {
            padding: 0.625rem 1rem;
            font-size: 0.8rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--text-primary);
        }

        .dropdown-item:hover { background: var(--bg-tertiary); }
        .dropdown-item:first-child { border-radius: 8px 8px 0 0; }
        .dropdown-item:last-child { border-radius: 0 0 8px 8px; }
        .dropdown-divider { border-top: 1px solid var(--border); margin: 0.25rem 0; }

        /* Toast */
        .toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 2000; }
        .toast {
            background: var(--bg-primary);
            padding: 0.625rem 1rem;
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            margin-bottom: 0.5rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            animation: slideIn 0.3s ease;
            font-size: 0.8rem;
        }
        .toast.success { border-left: 3px solid var(--success); }
        .toast.error { border-left: 3px solid var(--error); }
        .toast.warning { border-left: 3px solid #f59e0b; }
        .toast.info { border-left: 3px solid #3b82f6; }

        /* Loading Overlay */
        .loading-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 9999;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.2s, visibility 0.2s;
        }
        .loading-overlay.active {
            opacity: 1;
            visibility: visible;
        }
        .loading-spinner {
            width: 48px;
            height: 48px;
            border: 4px solid var(--bg-secondary);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        .loading-text {
            color: white;
            margin-top: 1rem;
            font-weight: 500;
        }
        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        /* Form Validation Styles */
        .form-input.invalid, .award-input.invalid, .award-select.invalid {
            outline-color: var(--error) !important;
            background: #fef2f2;
        }
        .form-input.valid, .award-input.valid {
            outline-color: var(--success) !important;
        }
        .validation-message {
            font-size: 0.75rem;
            color: var(--error);
            margin-top: 0.25rem;
            display: none;
        }
        .validation-message.show {
            display: block;
        }

        @keyframes slideIn {
            from { transform: translateX(100%); opacity: 0; }
            to { transform: translateX(0); opacity: 1; }
        }

        /* Print */
        @media print {
            .sidebar, .header, .table-header, .status-tabs, .selection-bar, .pagination, .edit-btn, .checkbox, .toast-container, .dropdown { display: none !important; }
            body { background: white; }
            .main-content { margin-left: 0; }
            table { font-size: 8pt; min-width: auto; }
            th, td { padding: 0.25rem; border: 1px solid #ccc; }
            .print-header { display: block !important; text-align: center; margin-bottom: 1rem; }
        }
        .print-header { display: none; }

        .placeholder-view {
            background: var(--bg-primary);
            border-radius: 12px;
            border: 1px solid var(--border);
            padding: 3rem;
            text-align: center;
        }

        .placeholder-icon { font-size: 4rem; margin-bottom: 1rem; }
        .placeholder-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
        .placeholder-text { color: var(--text-secondary); }

        /* Modal Styles */
        .modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(15, 23, 42, 0.85);
            z-index: 1000;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal-overlay.active {
            opacity: 1;
            visibility: visible;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .modal-container {
            background: var(--bg-primary);
            border-radius: 12px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            position: relative;
            max-width: 90vw;
        }
        
        .modal-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .modal {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 1001;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .modal.active {
            opacity: 1;
            visibility: visible;
        }
        
        .modal-content {
            background: var(--bg-primary);
            border-radius: 16px;
            box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
            width: 90%;
            max-width: 500px;
            max-height: 90vh;
            overflow: hidden;
            transform: scale(0.9);
            transition: transform 0.3s ease;
        }
        
        .modal.active .modal-content {
            transform: scale(1);
        }

        .modal-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid var(--border);
            background: var(--bg-secondary);
        }

        .modal-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .modal-close {
            background: none;
            border: none;
            font-size: 1.5rem;
            color: var(--text-secondary);
            cursor: pointer;
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            transition: all 0.2s;
        }

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

        .modal-body {
            padding: 1.5rem;
            overflow-y: auto;
            max-height: calc(90vh - 140px);
        }

        .modal-footer {
            display: flex;
            justify-content: flex-end;
            gap: 0.75rem;
            padding: 1rem 1.5rem;
            border-top: 1px solid var(--border);
            background: var(--bg-secondary);
        }

        /* ============================================ */
        /* AUFTRÄGE ANZEIGEN - REDESIGNED */
        /* ============================================ */
        
        .auftraege-header {
            background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
            color: white;
            padding: 1rem 1.5rem;
            margin: -1.5rem -1.5rem 1.5rem -1.5rem;
        }
        
        .auftraege-header-top {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 1rem;
        }
        
        .auftraege-header-left {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .auftraege-title {
            font-size: 1.25rem;
            font-weight: 700;
        }
        
        .auftraege-header-right {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .header-btn-new {
            padding: 0.5rem 1rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: all 0.15s;
            background: #10b981;
            color: white;
        }
        
        .header-btn-new:hover {
            background: #059669;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(16,185,129,0.4);
        }
        
        .stats-row-new {
            display: flex;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .stat-card-new {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.625rem 1rem;
            background: rgba(255,255,255,0.05);
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.15s;
            min-width: 130px;
        }
        
        .stat-card-new:hover {
            background: rgba(255,255,255,0.1);
            transform: translateY(-2px);
        }
        
        .stat-card-new.active {
            background: rgba(16,185,129,0.2);
            outline-color: rgba(16,185,129,0.4);
        }
        
        .stat-icon-new {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .stat-icon-new.blue { background: rgba(59,130,246,0.2); color: #60a5fa; }
        .stat-icon-new.orange { background: rgba(249,115,22,0.2); color: #fb923c; }
        .stat-icon-new.green { background: rgba(34,197,94,0.2); color: #4ade80; }
        .stat-icon-new.purple { background: rgba(139,92,246,0.2); color: #a78bfa; }
        .stat-icon-new.red { background: rgba(239,68,68,0.2); color: #f87171; }
        
        .stat-content-new {
            display: flex;
            flex-direction: column;
        }
        
        .stat-value-new {
            font-size: 1.25rem;
            font-weight: 800;
            line-height: 1;
        }
        
        .stat-label-new {
            font-size: 0.7rem;
            color: rgba(255,255,255,0.6);
            margin-top: 0.125rem;
        }
        
        /* Enhanced Table Card - Weißer Hintergrund wie Mockup Layout A */
        /* ============================================
           TABLE CARD V2 - Neues Design
           ============================================ */
        .table-card-new {
            background: transparent;
            border-radius: 0;
            box-shadow: none;
            overflow: visible;
        }
        
        /* Tabellen-Container transparent - Rows direkt auf Seiten-Hintergrund */
        .table-card-new .table-wrapper {
            background: transparent;
            padding: 0;
            margin: 0;
            border-radius: 0;
            overflow: visible;
        }
        
        /* Enhanced Toolbar */
        .toolbar-new {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.875rem 1.25rem;
            background: transparent;
            border-bottom: none;
            gap: 1rem;
            flex-wrap: wrap;
        }
        
        .toolbar-left-new {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex: 1;
            flex-wrap: wrap;
        }
        
        .search-container-new {
            position: relative;
            min-width: 280px;
        }
        
        .search-box-new {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.6rem 1rem;
            background: #f1f5f9;
            border: none;
            border-radius: 10px;
            transition: all 0.15s;
            width: 100%;
        }
        
        .search-box-new:focus-within {
            outline-color: #10b981;
            box-shadow: 0 0 0 4px rgba(16,185,129,0.1);
            background: var(--bg-primary);
        }
        
        .search-box-new input {
            border: none;
            outline: none;
            font-size: 0.875rem;
            width: 100%;
            background: transparent;
            color: var(--text-primary);
        }
        
        .search-box-new svg {
            color: var(--text-muted);
            flex-shrink: 0;
        }
        
        /* Quick Filters */
        .quick-filters-new {
            display: flex;
            gap: 0.375rem;
            flex-wrap: wrap;
        }
        
        /* ===== MODERN FILTER BAR - Award Design ===== */
        .filter-bar-container {
            background: transparent;
            border-radius: 0;
            padding: 0; /* Kein Padding hier - die inneren Elemente machen das */
            margin-bottom: 0.75rem;
            border: none;
            box-shadow: none;
        }
        
        .filter-section {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        
        /* Status Filter Row */
        .status-filter-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-bottom: 0.4rem;
        }
        
        /* ============================================
           STATUS-TABS V2 - Neues Design (volle Breite wie Mockup)
           ============================================ */
        .segmented-control {
            display: flex;
            align-items: center;
            gap: 0;
            background: #e2e8f0;
            border-radius: 10px;
            padding: 0.5rem 1.25rem;
            position: relative;
            width: 100%;
            border: none;
            box-shadow: none;
            width: 100%;
            box-sizing: border-box;
        }
        
        .segment-btn {
            position: relative;
            padding: 0.4rem 0.9rem;
            border-radius: 25px;
            font-size: 0.85rem;
            font-weight: 500;
            background: transparent;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            border: none;
            z-index: 1;
            white-space: nowrap;
        }
        
        /* Trennlinien zwischen Tabs */
        .segment-btn::after {
            content: '';
            position: absolute;
            right: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 1px;
            height: 16px;
            background: var(--border);
        }
        
        .segment-btn:last-of-type::after,
        .segment-btn.active::after,
        .segment-btn:has(+ .segment-btn.active)::after,
        .segment-btn:has(+ .dl-filter-btn)::after {
            display: none;
        }
        
        /* Status-spezifische Hintergrundfarben entfernt - alle transparent */
        .segment-btn[data-filter="offen"],
        .segment-btn[data-filter="inbearbeitung"],
        .segment-btn[data-filter="erledigt"],
        .segment-btn[data-filter="versendet"] {
            background: transparent;
            color: var(--text-secondary);
        }
        
        .segment-btn:hover {
            background: var(--rc-bg-hover);
        }
        
        /* Aktiver Tab - ragt über die Leiste */
        .segment-btn.active {
            background: var(--rc-bg-white);
            color: var(--text-primary);
            box-shadow: var(--rc-shadow-md);
            padding: 0.75rem 1.1rem;
            margin: -0.6rem 0.15rem;
            border-radius: var(--rc-radius-md);
            z-index: 2;
        }
        
        /* Status-spezifische Active-Farben - alle weiß */
        .segment-btn[data-filter="all"].active,
        .segment-btn[data-filter="offen"].active,
        .segment-btn[data-filter="inbearbeitung"].active,
        .segment-btn[data-filter="erledigt"].active,
        .segment-btn[data-filter="versendet"].active {
            background: var(--rc-bg-white);
            color: var(--text-primary);
            box-shadow: var(--rc-shadow-md);
        }
        
        .segment-btn .seg-icon {
            width: 15px;
            height: 15px;
            opacity: 0.7;
            display: none; /* Icons ausblenden im neuen Design */
        }
        
        .segment-btn.active .seg-icon {
            opacity: 1;
        }
        
        /* Zähler als farbiger Kreis */
        .segment-btn .seg-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            padding: 0 0.4rem;
            border-radius: 50%;
            font-size: 0.7rem;
            font-weight: 700;
            color: white;
            transition: all 0.2s;
            order: -1; /* Zähler vor dem Text */
        }
        
        /* Status-spezifische seg-count Farben - farbige Kreise */
        .segment-btn[data-filter="all"] .seg-count {
            background: #1e293b;
        }
        .segment-btn[data-filter="offen"] .seg-count {
            background: var(--rc-status-offen);
        }
        .segment-btn[data-filter="inbearbeitung"] .seg-count {
            background: var(--rc-status-bearbeitung);
        }
        .segment-btn[data-filter="erledigt"] .seg-count {
            background: var(--rc-status-erledigt);
        }
        
        /* Active state - Farben bleiben */
        .segment-btn.active .seg-count {
            /* Farben bleiben wie inaktiv */
        }
        
        /* Danger Segment Styles - Nicht Reparabel */
        .segment-btn.danger {
            color: var(--text-secondary);
            background: transparent;
            border: none !important;
        }
        
        .segment-btn.danger::after {
            display: none;
        }
        
        .segment-btn.danger.active {
            background: var(--rc-bg-white) !important;
            color: var(--text-primary) !important;
            box-shadow: var(--rc-shadow-md);
            border: none !important;
        }
        
        .segment-btn.danger .seg-count {
            background: #ef4444; /* Rot */
            color: white;
        }
        
        /* ABREK/Voraustausch Button */
        .segment-btn.abrek {
            color: var(--text-secondary);
            background: transparent;
            border: none !important;
        }
        
        .segment-btn.abrek::after {
            display: none;
        }
        
        .segment-btn.abrek.active {
            background: var(--rc-bg-white) !important;
            color: var(--text-primary) !important;
            box-shadow: var(--rc-shadow-md);
            border: none !important;
        }
        
        .segment-btn.abrek .seg-count {
            background: #f59e0b;
            color: white;
        }
        
        .segment-btn.abrek.active .seg-count {
            background: #f59e0b;
            color: white;
        }
        
        .segment-btn.urgent {
            color: var(--text-secondary);
            background: transparent;
        }
        
        .segment-btn.urgent.active {
            background: var(--rc-bg-white) !important;
            color: var(--text-primary) !important;
            box-shadow: var(--rc-shadow-md);
        }
        
        .segment-btn.urgent .seg-count {
            background: var(--rc-btn-danger);
            color: white;
        }
        
        .segment-btn.urgent.active .seg-count {
            background: var(--rc-btn-danger);
            color: white;
        }
        
        /* ============================================
           DIENSTLEISTER FILTER BUTTON (Pill wie Mockup)
           ============================================ */
        .dl-filter-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.6rem 0.85rem;
            border-radius: 14px;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.25s ease;
            border: none;
            background: linear-gradient(135deg, #3b82f6, #6366f1);
            color: white;
            margin-left: 0.5rem;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        }
        
        .dl-filter-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
        }
        
        .dl-filter-btn.active {
            background: linear-gradient(135deg, #2563eb, #4f46e5);
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(99, 102, 241, 0.3);
        }
        
        .dl-filter-btn svg {
            width: 18px;
            height: 18px;
            stroke: white;
            fill: none;
        }
        
        .dl-filter-btn .dl-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 18px;
            padding: 0 0.3rem;
            border-radius: 9px;
            font-size: 0.65rem;
            font-weight: 700;
            background: white;
            color: #3b82f6;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .dl-filter-btn.active .dl-badge {
            background: white;
            color: #3b82f6;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        /* ============================================
           DIENSTLEISTER CHIPS ROW (einblendbar)
           ============================================ */
        .dl-chips-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0;
            background: transparent;
            border-radius: 0;
            margin-bottom: 0;
            overflow: hidden;
            max-height: 0;
            opacity: 0;
            transition: all 0.25s ease;
        }
        
        .dl-chips-row.show {
            max-height: 60px;
            opacity: 1;
            padding: 0.5rem 1.25rem; /* Horizontal gleich wie Bulk-Action-Row */
            margin-bottom: 0.4rem;
            background: #e2e8f0;
            border-radius: 10px;
            border: none;
        }
        
        .dl-chips {
            display: flex;
            align-items: center;
            gap: 0.4rem;
            flex-wrap: nowrap;
        }
        
        /* Dienstleister Chips */
        .dl-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            border-radius: 10px;
            font-size: 0.8rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
            border: none;
            background: white;
            color: #1e293b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        
        .dl-chip:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        .dl-chip.active {
            background: white;
            color: var(--text-primary);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            outline: 2px solid var(--primary);
        }
        
        /* Zähler-Kreis im Chip */
        .dl-chip .chip-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            padding: 0 0.4rem;
            border-radius: 50%;
            font-size: 0.7rem;
            font-weight: 700;
            color: white;
            order: -1;
        }
        
        /* Dienstleister Farben für die Kreise */
        .dl-chip.sz .chip-count { background: var(--rc-dl-sz); }
        .dl-chip.guf .chip-count { background: var(--rc-dl-guf); }
        .dl-chip.feig .chip-count { background: var(--rc-dl-feig); }
        .dl-chip.seco .chip-count { background: var(--rc-dl-seco); }
        .dl-chip.cpi .chip-count { background: var(--rc-dl-cpi); }
        .dl-chip.nri .chip-count { background: var(--rc-dl-nri); }
        .dl-chip.mei .chip-count { background: var(--rc-dl-mei); }
        .dl-chip.ict .chip-count { background: var(--rc-dl-ict); }
        
        /* Aktive Dienstleister Outline-Farben */
        .dl-chip.sz.active { outline-color: var(--rc-dl-sz); }
        .dl-chip.guf.active { outline-color: var(--rc-dl-guf); }
        .dl-chip.feig.active { outline-color: var(--rc-dl-feig); }
        .dl-chip.seco.active { outline-color: var(--rc-dl-seco); }
        .dl-chip.cpi.active { outline-color: var(--rc-dl-cpi); }
        .dl-chip.nri.active { outline-color: var(--rc-dl-nri); }
        .dl-chip.mei.active { outline-color: var(--rc-dl-mei); }
        .dl-chip.ict.active { outline-color: var(--rc-dl-ict); }
        
        /* Reset Button */
        .dl-reset-btn {
            display: flex;
            align-items: center;
            gap: 0.3rem;
            padding: 0.4rem 0.75rem;
            border-radius: var(--rc-radius-sm);
            font-size: 0.75rem;
            font-weight: 500;
            cursor: pointer;
            border: 1px solid var(--border);
            background: var(--rc-bg-white);
            color: var(--text-secondary);
            transition: all 0.15s;
            margin-left: auto;
        }
        
        .dl-reset-btn:hover {
            background: #fee2e2;
            outline-color: #fca5a5;
            color: var(--rc-btn-danger);
        }
        
        .dl-reset-btn svg {
            width: 14px;
            height: 14px;
        }
        
        /* Dienstleister/Routing Filter Row */
        /* ============================================
           DIENSTLEISTER-FILTER V2 - Neues Design
           ============================================ */
        .routing-filter-row {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
        }
        
        .routing-toggle-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.85rem;
            border-radius: var(--rc-radius-lg);
            border: none;
            background: linear-gradient(135deg, #3b82f6, #6366f1);
            color: white;
            cursor: pointer;
            transition: all 0.25s ease;
            font-family: inherit;
            box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
        }
        
        .routing-toggle-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 16px rgba(59, 130, 246, 0.4);
        }
        
        .routing-toggle-btn.active {
            background: linear-gradient(135deg, #2563eb, #4f46e5);
            box-shadow: 0 0 20px rgba(59, 130, 246, 0.5), 0 0 40px rgba(99, 102, 241, 0.3);
        }
        
        .routing-pin-icon {
            width: 16px;
            height: 16px;
            color: white;
            flex-shrink: 0;
        }
        
        .routing-toggle-icon {
            width: 14px;
            height: 14px;
            color: rgba(255,255,255,0.8);
            transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .routing-toggle-btn.collapsed .routing-toggle-icon {
            transform: rotate(-90deg);
        }
        
        .routing-label {
            font-size: 0.8rem;
            font-weight: 500;
            color: white;
            text-transform: none;
            letter-spacing: 0;
        }
        
        .routing-active-count {
            display: none;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 9px;
            font-size: 0.65rem;
            font-weight: 700;
            background: #ef4444;
            color: white;
            box-shadow: 0 2px 4px rgba(239, 68, 68, 0.4);
        }
        
        .routing-active-count.visible {
            display: inline-flex;
        }
        
        .routing-toggle-btn.active .routing-active-count {
            background: white;
            color: #3b82f6;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
        }
        
        .routing-chips-wrapper {
            display: flex;
            flex: 1;
            overflow: hidden;
            max-height: 100px;
            opacity: 1;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        
        .routing-chips-wrapper.collapsed {
            max-height: 0;
            opacity: 0;
            margin: 0;
            padding: 0;
        }
        
        .routing-chips {
            display: flex;
            gap: 0.4rem;
            flex-wrap: wrap;
        }
        
        /* V2: Chips mit weißem Hintergrund und Schatten */
        .routing-chip {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            border-radius: 10px;
            font-size: 0.8rem;
            font-weight: 500;
            background: white;
            color: #1e293b;
            cursor: pointer;
            transition: all 0.15s;
            border: none;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }
        
        .routing-chip:hover {
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        /* V2: Aktiver Chip - weißer Hintergrund mit farbigem Outline */
        .routing-chip.active {
            background: white;
            color: var(--text-primary);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
            outline: 2px solid var(--primary);
        }
        
        /* V2: Zähler als farbiger Kreis */
        .routing-chip .chip-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 22px;
            height: 22px;
            padding: 0 0.4rem;
            border-radius: 50%;
            font-size: 0.7rem;
            font-weight: 700;
            color: white;
            order: -1; /* Zähler vor dem Text */
        }
        
        .routing-chip.active .chip-count {
            /* Farben bleiben wie inaktiv */
        }
        
        /* V2: Dienstleister-spezifische Farben für Kreise und aktive Outline */
        .routing-chip[data-routing="S&Z"] .chip-count { background: var(--rc-dl-sz); }
        .routing-chip[data-routing="S&Z"].active { outline-color: var(--rc-dl-sz); }
        
        .routing-chip[data-routing="SECO"] .chip-count { background: var(--rc-dl-seco); }
        .routing-chip[data-routing="SECO"].active { outline-color: var(--rc-dl-seco); }
        
        .routing-chip[data-routing="CPI"] .chip-count { background: var(--rc-dl-cpi); }
        .routing-chip[data-routing="CPI"].active { outline-color: var(--rc-dl-cpi); }
        
        .routing-chip[data-routing="FEIG"] .chip-count { background: var(--rc-dl-feig); }
        .routing-chip[data-routing="FEIG"].active { outline-color: var(--rc-dl-feig); }
        
        .routing-chip[data-routing="G&F"] .chip-count,
        .routing-chip[data-routing="GuF"] .chip-count { background: var(--rc-dl-guf); }
        .routing-chip[data-routing="G&F"].active,
        .routing-chip[data-routing="GuF"].active { outline-color: var(--rc-dl-guf); }
        
        .routing-chip[data-routing="NRI"] .chip-count { background: var(--rc-dl-nri); }
        .routing-chip[data-routing="NRI"].active { outline-color: var(--rc-dl-nri); }
        
        .routing-chip[data-routing="MEI"] .chip-count { background: var(--rc-dl-mei); }
        .routing-chip[data-routing="MEI"].active { outline-color: var(--rc-dl-mei); }
        
        .routing-chip[data-routing="ICT"] .chip-count { background: var(--rc-dl-ict); }
        .routing-chip[data-routing="ICT"].active { outline-color: var(--rc-dl-ict); }
        
        /* Fallback für andere Dienstleister */
        .routing-chip:not([data-routing]) .chip-count,
        .routing-chip[data-routing=""] .chip-count { background: #64748b; }
        .routing-chip:not([data-routing]).active,
        .routing-chip[data-routing=""].active { outline-color: #64748b; }
        
        /* Standort Dropdown V2 */
        .standort-dropdown {
            position: relative;
        }
        
        .standort-btn {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.85rem;
            border-radius: var(--rc-radius-md);
            font-size: 0.8rem;
            font-weight: 500;
            background: var(--rc-bg-white);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            border: 1px solid var(--border);
        }
        
        .standort-btn:hover {
            outline-color: var(--border);
            box-shadow: 0 2px 4px rgba(0,0,0,0.05);
        }
        
        .standort-btn svg {
            width: 12px;
            height: 12px;
            transition: transform 0.2s;
        }
        
        /* Actions Row */
        /* ============================================
           ACTIONS-ROW V2 - VERSTECKT, nutze neue bulk-action-row
           ============================================ */
        .actions-row {
            display: none !important;
        }
        
        .actions-left {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        
        .actions-right {
            display: flex;
            align-items: center;
            gap: 0.4rem;
        }
        
        .action-btn-modern {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 0.75rem;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 500;
            background: white;
            color: #1e293b;
            cursor: pointer;
            transition: all 0.15s;
            border: 1.5px solid #e2e8f0;
            box-shadow: none;
        }
        
        .action-btn-modern:hover {
            box-shadow: none;
            border-color: #cbd5e1;
        }
        
        .action-btn-modern svg {
            width: 16px;
            height: 16px;
            color: #64748b;
        }
        
        /* Icon-Kreis im Aktionen-Button (blau) */
        .action-btn-modern .action-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 20px;
            height: 20px;
        }
        
        .action-btn-modern .action-icon svg {
            width: 16px;
            height: 16px;
            color: #64748b;
        }
        
        .action-btn-modern.primary {
            background: #22c55e;
            color: white;
        }
        
        .action-btn-modern.primary svg {
            color: white;
        }
        
        .action-btn-modern.label-btn {
            background: #fbbf24;
            color: #78350f;
        }
        
        .action-btn-modern.label-btn svg {
            color: #78350f;
        }
        
        /* Selection Buttons Container - VERSTECKT */
        .selection-buttons {
            display: none !important;
        }
        
        .selection-buttons.show {
            display: none !important;
        }
        
        /* Clear Selection Button */
        .clear-selection-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: transparent;
            border: none;
            cursor: pointer;
            color: #64748b;
            transition: all 0.15s;
        }
        
        .clear-selection-btn:hover {
            background: #fee2e2;
            color: #dc2626;
        }
        
        .clear-selection-btn svg {
            width: 16px;
            height: 16px;
        }
        
        /* View Toggle Buttons (rechts in Actions-Row) - wie Mockup */
        .view-toggle {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .view-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.5rem 0.75rem;
            border: none;
            background: transparent;
            border-radius: 8px;
            cursor: pointer;
            color: #94a3b8;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.15s;
        }
        
        .view-btn:hover {
            color: #64748b;
        }
        
        .view-btn.active {
            background: white;
            color: #1e293b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            border-radius: 10px;
        }
        
        .view-btn svg {
            width: 18px;
            height: 18px;
        }
        
        .action-btn-modern .btn-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 6px;
            border-radius: 10px;
            font-size: 0.7rem;
            font-weight: 700;
            background: rgba(255,255,255,0.3);
            margin-left: 0.25rem;
        }
        
        .action-btn-modern .close-selection {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 18px;
            height: 18px;
            border-radius: 50%;
            background: rgba(255,255,255,0.2);
            margin-left: 0.25rem;
            transition: background 0.15s;
        }
        
        .action-btn-modern .close-selection:hover {
            background: rgba(255,255,255,0.35);
        }
        
        /* Selection Buttons (Bericht, Label) - VERSTECKT, nutze neue bulk-action-row */
        .selection-buttons {
            display: none !important;
        }
        
        .selection-buttons.show {
            display: none !important;
        }
        
        @keyframes fadeInSelection {
            from { opacity: 0; transform: translateX(-10px); }
            to { opacity: 1; transform: translateX(0); }
        }
        
        .selection-action-btn {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1.1rem;
            border-radius: var(--rc-radius-md);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.15s;
            border: none;
            box-shadow: var(--rc-shadow-md);
        }
        
        .selection-action-btn:hover {
            box-shadow: var(--rc-shadow-lg);
            transform: translateY(-1px);
        }
        
        .selection-action-btn svg {
            width: 16px;
            height: 16px;
        }
        
        /* Bericht Button - Grün */
        .selection-action-btn.print {
            background: var(--rc-btn-success);
            color: white;
        }
        
        .selection-action-btn.print:hover {
            background: var(--rc-btn-success-hover);
        }
        
        .selection-action-btn.print .btn-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 20px;
            height: 20px;
            padding: 0 0.35rem;
            border-radius: 50%;
            font-size: 0.7rem;
            font-weight: 700;
            background: rgba(255,255,255,0.3);
            color: white;
        }
        
        /* Label Button - Gelb */
        .selection-action-btn.label {
            background: var(--rc-btn-warning);
            color: var(--text-primary);
        }
        
        .selection-action-btn.label:hover {
            background: var(--rc-btn-warning-hover);
        }
        
        /* Clear Button */
        .selection-clear {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.5rem 0.75rem;
            border: none;
            background: transparent;
            border-radius: var(--rc-radius-sm);
            cursor: pointer;
            color: var(--text-secondary);
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.15s;
        }
        
        .selection-clear:hover {
            background: var(--rc-bg-white);
            color: var(--rc-btn-danger);
            box-shadow: var(--rc-shadow-md);
            border-radius: var(--rc-radius-md);
        }
        
        .selection-clear svg {
            width: 16px;
            height: 16px;
        }
        
        /* View Toggle Buttons */
        .view-toggle {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .view-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.4rem;
            padding: 0.5rem 0.75rem;
            border: none;
            background: transparent;
            border-radius: var(--rc-radius-sm);
            cursor: pointer;
            color: #94a3b8;
            font-size: 0.8rem;
            font-weight: 500;
            transition: all 0.15s;
        }
        
        .view-btn:hover {
            color: #64748b;
        }
        
        .view-btn.active {
            background: white;
            color: #1e293b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            border-radius: 10px;
        }
        
        .view-btn svg {
            width: 18px;
            height: 18px;
        }
        
        /* Aktionen Dropdown - Gruppiert mit Sektionen */
        .aktionen-dropdown-new {
            position: fixed;
            background: white;
            border-radius: 12px;
            box-shadow: 0 12px 48px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.05);
            min-width: 220px;
            z-index: 10000;
            overflow: visible;
            display: none;
            padding: 0.35rem 0;
            isolation: isolate; /* Neuer Stacking Context */
        }
        
        .aktionen-dropdown-new.show {
            display: block;
            animation: dropdownFadeIn 0.15s ease-out;
        }
        
        @keyframes dropdownFadeIn {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .aktionen-dropdown-new .section-label {
            padding: 0.5rem 0.75rem 0.3rem;
            font-size: 0.6rem;
            font-weight: 700;
            color: #94a3b8;
            text-transform: uppercase;
            letter-spacing: 0.08em;
            background: #f8fafc;
        }
        
        .aktionen-dropdown-new .menu-item {
            display: flex;
            align-items: center;
            gap: 0.6rem;
            padding: 0.5rem 0.75rem;
            cursor: pointer;
            transition: all 0.15s;
            position: relative;
        }
        
        .aktionen-dropdown-new .menu-item:hover {
            background: #f1f5f9;
        }
        
        .aktionen-dropdown-new .menu-item .icon {
            width: 26px;
            height: 26px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .aktionen-dropdown-new .menu-item .icon svg {
            width: 14px;
            height: 14px;
        }
        
        .aktionen-dropdown-new .menu-item .icon.blue { background: #dbeafe; color: #2563eb; }
        .aktionen-dropdown-new .menu-item .icon.green { background: #dcfce7; color: #16a34a; }
        .aktionen-dropdown-new .menu-item .icon.purple { background: #f3e8ff; color: #7c3aed; }
        .aktionen-dropdown-new .menu-item .icon.orange { background: #ffedd5; color: #ea580c; }
        .aktionen-dropdown-new .menu-item .icon.red { background: #fee2e2; color: #dc2626; }
        .aktionen-dropdown-new .menu-item .icon.gray { background: #f1f5f9; color: #64748b; }
        .aktionen-dropdown-new .menu-item .icon.teal { background: #ccfbf1; color: #0d9488; }
        
        .aktionen-dropdown-new .menu-item .text {
            flex: 1;
            min-width: 0;
        }
        
        .aktionen-dropdown-new .menu-item .text .label {
            font-size: 0.8rem;
            font-weight: 500;
            color: #1e293b;
        }
        
        .aktionen-dropdown-new .menu-item .text .desc {
            font-size: 0.65rem;
            color: #94a3b8;
            margin-top: 1px;
        }
        
        .aktionen-dropdown-new .menu-item .shortcut {
            font-size: 0.6rem;
            color: #94a3b8;
            background: #f1f5f9;
            padding: 0.15rem 0.35rem;
            border-radius: 4px;
            font-family: 'SF Mono', 'Consolas', monospace;
        }
        
        .aktionen-dropdown-new .menu-item .arrow {
            color: #94a3b8;
        }
        
        .aktionen-dropdown-new .menu-item .arrow svg {
            width: 12px;
            height: 12px;
        }
        
        .aktionen-dropdown-new .divider {
            height: 1px;
            background: #e2e8f0;
            margin: 0.25rem 0;
        }
        
        .aktionen-dropdown-new .menu-item.danger:hover {
            background: #fef2f2;
        }
        
        .aktionen-dropdown-new .menu-item.danger .text .label {
            color: #dc2626;
        }
        
        /* Submenu für Drucken */
        .aktionen-dropdown-new .menu-item.has-submenu {
            position: relative;
        }
        
        .aktionen-dropdown-new .menu-item .submenu {
            position: absolute;
            left: 100%;
            top: -0.35rem;
            background: white;
            border-radius: 10px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.12), 0 0 0 1px rgba(0,0,0,0.05);
            min-width: 180px;
            padding: 0.35rem 0;
            display: none;
            z-index: 10000;
        }
        
        .aktionen-dropdown-new .menu-item.has-submenu:hover .submenu {
            display: block;
            animation: submenuFadeIn 0.12s ease-out;
        }
        
        @keyframes submenuFadeIn {
            from { opacity: 0; transform: translateX(-4px); }
            to { opacity: 1; transform: translateX(0); }
        }
        
        .aktionen-dropdown-new .submenu .menu-item {
            padding: 0.45rem 0.7rem;
        }
        
        .aktionen-dropdown-new .submenu .menu-item .icon {
            width: 22px;
            height: 22px;
        }
        
        .aktionen-dropdown-new .submenu .menu-item .icon svg {
            width: 12px;
            height: 12px;
        }
        
        .aktionen-dropdown-new .submenu .menu-item .text .label {
            font-size: 0.75rem;
        }
        
        /* Legacy compatibility - keep old classes working */
        .quick-filter-new {
            padding: 0.375rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
            background: var(--bg-tertiary);
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            gap: 0.375rem;
            border: 1px solid transparent;
            white-space: nowrap;
        }
        
        .quick-filter-new:hover {
            background: rgba(16,185,129,0.1);
            color: #059669;
        }
        
        .quick-filter-new.active {
            background: #10b981;
            color: white;
        }
        
        .quick-filter-new .filter-count {
            background: rgba(0,0,0,0.1);
            padding: 0.0625rem 0.375rem;
            border-radius: 10px;
            font-size: 0.65rem;
        }
        
        .quick-filter-new.active .filter-count {
            background: rgba(255,255,255,0.25);
        }
        
        .toolbar-right-new {
            display: flex;
            gap: 0.375rem;
        }
        
        .toolbar-btn-new {
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-size: 0.8rem;
            font-weight: 600;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.375rem;
            transition: all 0.15s;
            color: var(--text-secondary);
        }
        
        .toolbar-btn-new:hover {
            outline-color: var(--primary);
            background: var(--bg-secondary);
            color: var(--text-primary);
        }
        
        .toolbar-btn-new.primary {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            outline-color: #10b981;
            color: white;
        }
        
        .toolbar-btn-new.primary:hover {
            background: linear-gradient(135deg, #059669 0%, #047857 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
        }
        
        .toolbar-btn-new.active {
            outline-color: var(--primary);
            background: var(--primary);
            color: white;
        }
        
        /* Enhanced Bulk Bar */
        .bulk-bar-new {
            display: none;
            align-items: center;
            justify-content: space-between;
            padding: 0.625rem 1.25rem;
            background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
            color: white;
            animation: bulkSlideDown 0.2s ease;
        }
        
        .bulk-bar-new.visible {
            display: flex;
        }
        
        @keyframes bulkSlideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .bulk-info-new {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .bulk-count-new {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-weight: 600;
            font-size: 0.85rem;
        }
        
        .bulk-count-new .number {
            background: #10b981;
            padding: 0.125rem 0.5rem;
            border-radius: 6px;
            font-weight: 700;
        }
        
        .bulk-clear-new {
            background: rgba(255,255,255,0.1);
            border: none;
            color: rgba(255,255,255,0.8);
            padding: 0.25rem 0.5rem;
            border-radius: 6px;
            font-size: 0.75rem;
            cursor: pointer;
        }
        
        .bulk-clear-new:hover {
            background: rgba(255,255,255,0.2);
        }
        
        .bulk-actions-new {
            display: flex;
            gap: 0.375rem;
        }
        
        .bulk-btn-new {
            padding: 0.375rem 0.625rem;
            border-radius: 6px;
            font-size: 0.8rem;
            font-weight: 600;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 0.375rem;
            transition: all 0.15s;
            background: rgba(255,255,255,0.1);
            color: white;
        }
        
        .bulk-btn-new:hover {
            background: rgba(255,255,255,0.2);
            transform: translateY(-1px);
        }
        
        .bulk-btn-new.primary {
            background: #10b981;
        }
        
        .bulk-btn-new.danger {
            background: #ef4444;
        }
        
        /* ═══════════════════════════════════════════════════════════
           BULK ACTION ROW + HEADER - PERFEKTE AUSRICHTUNG
           Reset aller Werte für pixelgenaue Kontrolle
           ═══════════════════════════════════════════════════════════ */
        
        /* CONTAINER: Transparent damit Seiten-Hintergrund durchscheint */
        .table-wrapper.standard-table-view {
            padding: 0 !important;
            margin: 0 !important;
            border: none !important;
            background: transparent !important; /* Seiten-BG (#f8fafc) scheint durch */
            border-radius: 0 !important;
            overflow: visible !important; /* Wichtig: Dropdown darf nicht abgeschnitten werden */
        }
        
        /* BULK-ROW: Weiß, volle Breite, eigene Rundung */
        .bulk-action-row {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.625rem 1.25rem;
            margin: 0;
            border: none;
            background: white;
            border-radius: 12px 12px 0 0; /* Rundung hier statt auf Container */
            position: relative;
            z-index: 100; /* Höher als Tabelle */
            box-sizing: border-box;
            width: 100%;
        }
        
        /* Kein ::before */
        .bulk-action-row::before {
            display: none !important;
        }
        
        /* ::after füllt die Lücke zum Header mit Grau */
        .bulk-action-row::after {
            content: '';
            position: absolute;
            left: 0;
            right: 0;
            bottom: -0.6rem;
            height: 0.6rem;
            background: #e2e8f0;
            z-index: -1; /* Unter dem Content */
        }
        
        /* TABELLE: Reset */
        .table-wrapper.standard-table-view .table-new {
            margin: 0 !important;
            padding: 0 !important;
            border: none !important;
            border-spacing: 0 0.6rem !important;
            width: 100% !important;
            box-sizing: border-box;
        }
        
        /* THEAD: Grau, volle Breite */
        .table-wrapper.standard-table-view .table-new thead {
            margin: 0;
            padding: 0;
            border: none;
        }
        
        .table-wrapper.standard-table-view .table-new thead tr {
            margin: 0;
            padding: 0;
            border: none;
            background: #e2e8f0;
        }
        
        .table-wrapper.standard-table-view .table-new thead th {
            margin: 0;
            border: none;
            background: #e2e8f0;
            box-sizing: border-box;
        }
        
        /* Erste und letzte TH: Keine Rundung OBEN, nur unten */
        .table-wrapper.standard-table-view .table-new thead th:first-child {
            border-radius: 0 0 0 12px;
            padding-left: 1.25rem; /* Gleich wie Bulk-Row */
        }
        
        .table-wrapper.standard-table-view .table-new thead th:last-child {
            border-radius: 0 0 12px 0;
            padding-right: 1.25rem; /* Gleich wie Bulk-Row */
        }
        
        .bulk-dropdown-btn {
            display: flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.4rem 0.75rem;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            color: #64748b;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .bulk-dropdown-btn:hover {
            background: #f8fafc;
            color: #475569;
        }
        
        .bulk-dropdown-btn .chevron {
            width: 12px;
            height: 12px;
        }
        
        .bulk-btn-green {
            display: none;
            align-items: center;
            gap: 0.25rem;
            padding: 0.4rem 0.75rem;
            background: #22c55e;
            border: none;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .bulk-btn-green:hover {
            background: #16a34a;
        }
        
        .bulk-btn-green svg {
            width: 14px;
            height: 14px;
        }
        
        .bulk-btn-yellow {
            display: none;
            align-items: center;
            gap: 0.25rem;
            padding: 0.4rem 0.75rem;
            background: #fbbf24;
            border: none;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            color: #78350f;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .bulk-btn-yellow:hover {
            background: #f59e0b;
        }
        
        .bulk-btn-yellow svg {
            width: 14px;
            height: 14px;
        }
        
        /* Bei Auswahl: Bericht und Label einblenden */
        .bulk-action-row.has-selection .bulk-btn-green,
        .bulk-action-row.has-selection .bulk-btn-yellow {
            display: inline-flex;
        }
        
        /* Bulk Dropdown Container */
        .bulk-dropdown-container {
            position: relative;
        }
        
        .bulk-aktionen-dropdown {
            display: none;
            position: absolute;
            top: 100%;
            left: 0;
            margin-top: 0.5rem;
            background: white;
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            min-width: 220px;
            z-index: 1000;
            padding: 0.5rem;
        }
        
        .bulk-aktionen-dropdown.show {
            display: block;
        }
        
        .bulk-menu-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.625rem 0.875rem;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.8rem;
            font-weight: 500;
            color: #334155;
            transition: all 0.15s;
        }
        
        .bulk-menu-item:hover {
            background: #f1f5f9;
        }
        
        .bulk-menu-item svg {
            width: 16px;
            height: 16px;
            color: #64748b;
        }
        
        .bulk-menu-item.danger {
            color: #dc2626;
        }
        
        .bulk-menu-item.danger svg {
            color: #dc2626;
        }
        
        .bulk-menu-item.danger:hover {
            background: #fef2f2;
        }
        
        .bulk-menu-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 0.375rem 0;
        }

        /* ============================================
           CARD ROWS DESIGN - Enhanced Table
           ============================================ */
        
        .table-new {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 0.6rem;
        }
        
        /* Header als Farbleiste - verbunden mit Aktionen-Zeile */
        .table-new thead tr {
            background: #e2e8f0;
        }
        
        .table-new thead th {
            background: #e2e8f0;
            padding: 0.56rem 1.25rem;
            text-align: left;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: #64748b;
            border-bottom: none;
            position: sticky;
            top: 0;
            z-index: 10;
            white-space: nowrap;
        }
        
        /* Header NUR UNTEN abgerundet */
        .table-new thead th:first-child {
            border-radius: 0 0 0 12px;
        }
        
        .table-new thead th:last-child {
            border-radius: 0 0 12px 0;
        }
        
        /* ═══════════════════════════════════════════════════════════
           CARD-STYLE ZEILEN - Modern Design
           ═══════════════════════════════════════════════════════════ */
        .table-new tbody tr {
            background: linear-gradient(135deg, #ffffff 0%, #fefefe 100%);
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 
                0 1px 3px rgba(0,0,0,0.08),
                0 2px 8px rgba(0,0,0,0.04);
            border-radius: 12px;
        }
        
        .table-new tbody tr:hover {
            background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
            box-shadow: 
                0 4px 12px rgba(0,0,0,0.1),
                0 2px 4px rgba(0,0,0,0.06);
            transform: translateY(-1px);
        }
        
        .table-new tbody tr.selected {
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            box-shadow: 
                0 0 0 2px var(--primary),
                0 4px 12px rgba(59,130,246,0.15);
        }
        
        .table-new tbody tr.warning-row {
            background: linear-gradient(135deg, rgba(254,243,199,0.5) 0%, rgba(254,240,138,0.3) 100%);
            box-shadow: 
                0 1px 3px rgba(245,158,11,0.1),
                0 2px 8px rgba(245,158,11,0.05);
        }
        
        .table-new tbody td {
            padding: 1rem 1.25rem;
            font-size: 0.875rem;
            vertical-align: middle;
            background: transparent;
            border-bottom: none;
            position: relative;
        }
        
        /* Card-Ecken - erste und letzte Zelle */
        .table-new tbody td:first-child {
            border-radius: 12px 0 0 12px;
            /* Status-Streifen am linken Rand */
            border-left: 4px solid #3b82f6;
        }
        
        /* Checkbox-Zelle - Header und Body */
        .table-new thead th.checkbox-col,
        .table-new tbody td.checkbox-cell {
            text-align: right;
            padding-left: 1.25rem !important; /* Gleich wie Bulk-Row für Ausrichtung */
            padding-right: 8px !important;
            white-space: nowrap;
        }
        
        .table-new thead th.checkbox-col {
            border-radius: 0 0 0 12px;
        }
        
        .table-new tbody td:last-child {
            border-radius: 0 12px 12px 0;
            padding-right: 1rem;
        }
        
        /* RMA-Spalte Header und Body gleich */
        .table-new thead th.rma-col,
        .table-new tbody td.rma-cell {
            padding-left: 0 !important;
            text-align: left;
        }
        
        /* ═══════════════════════════════════════════════════════════
           STATUS-STREIFEN FARBEN (linker Rand)
           ═══════════════════════════════════════════════════════════ */
        
        /* Offen - Blau */
        .table-new tbody tr[data-status="Offen"] td:first-child,
        .table-new tbody tr[data-status="offen"] td:first-child {
            border-left-color: #3b82f6;
        }
        
        /* In Bearbeitung - Orange */
        .table-new tbody tr[data-status="In Bearbeitung"] td:first-child,
        .table-new tbody tr[data-status="in bearbeitung"] td:first-child {
            border-left-color: #f59e0b;
        }
        
        /* Erledigt - Grün */
        .table-new tbody tr[data-status="Erledigt"] td:first-child,
        .table-new tbody tr[data-status="erledigt"] td:first-child {
            border-left-color: #22c55e;
        }
        
        /* Verschickt - Grau */
        .table-new tbody tr[data-status="Verschickt"] td:first-child,
        .table-new tbody tr[data-status="verschickt"] td:first-child {
            border-left-color: #64748b;
        }
        
        /* Nicht Reparabel - Rot */
        .table-new tbody tr[data-status="Nicht Reparabel"] td:first-child,
        .table-new tbody tr[data-status="nicht reparabel"] td:first-child {
            border-left-color: #ef4444;
        }
        
        /* Eingelagert - Lila */
        .table-new tbody tr[data-status="Eingelagert"] td:first-child,
        .table-new tbody tr[data-status="eingelagert"] td:first-child {
            border-left-color: #8b5cf6;
        }
        
        /* ═══════════════════════════════════════════════════════════
           STATUS-SPEZIFISCHE CARD STYLES
           ═══════════════════════════════════════════════════════════ */
        
        /* Erledigt - Grüner Gradient */
        .table-new tbody tr[style*="background:#dcfce7"],
        .table-new tbody tr.status-erledigt {
            background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%) !important;
            box-shadow: 
                0 1px 3px rgba(34,197,94,0.15),
                0 2px 8px rgba(34,197,94,0.08);
        }
        
        .table-new tbody tr[style*="background:#dcfce7"]:hover,
        .table-new tbody tr.status-erledigt:hover {
            background: linear-gradient(135deg, #bbf7d0 0%, #86efac 100%) !important;
            box-shadow: 
                0 4px 12px rgba(34,197,94,0.2),
                0 2px 4px rgba(34,197,94,0.1);
            transform: translateY(-1px);
        }
        
        /* In Bearbeitung - Gelber Akzent */
        .table-new tbody tr.status-inbearbeitung {
            background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
            box-shadow: 
                0 1px 3px rgba(234,179,8,0.1),
                0 2px 8px rgba(234,179,8,0.05);
        }
        
        .table-new tbody tr.status-inbearbeitung:hover {
            background: linear-gradient(135deg, #fef9c3 0%, #fef08a 100%);
        }
        
        /* Verschickt - Blauer Akzent */
        .table-new tbody tr.status-verschickt {
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            box-shadow: 
                0 1px 3px rgba(59,130,246,0.1),
                0 2px 8px rgba(59,130,246,0.05);
        }
        
        .table-new tbody tr.status-verschickt:hover {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
        }
        
        /* Checkbox und Status-Band zentriert */
        .table-new tbody td:first-child,
        .table-new tbody td:nth-child(2) {
            vertical-align: middle;
        }
        
        /* V2: Vertikale Trennstreifen entfernt - cleaner Look */
        .table-new tbody td:nth-child(3)::after,
        .table-new tbody td:nth-child(4)::after,
        .table-new tbody td:nth-child(5)::after,
        .table-new tbody td:nth-child(6)::after,
        .table-new tbody td:nth-child(7)::after {
            display: none;
        }
        
        /* V2: Status Bar Styling - Volle Höhe über ganze Zeile */
        .table-new tbody td:nth-child(2) {
            padding: 0 !important;
            width: 6px !important;
            min-width: 6px !important;
            max-width: 6px !important;
            position: relative;
        }
        
        .table-new tbody td:nth-child(2) > div {
            position: absolute;
            top: 0;
            bottom: 0;
            left: 0;
            width: 6px;
            border-radius: 0;
        }
        
        /* Warning Badge */
        .warning-badge-new {
            width: 20px;
            height: 20px;
            background: #ef4444;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 0.7rem;
            font-weight: 700;
        }
        
        /* Status Badge Cell V2 */
        .status-badge-cell {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.35rem;
            padding: 0.3rem 0.6rem;
            border-radius: 6px;
            font-size: 0.75rem;
            font-weight: 600;
            min-width: 100px;
            width: auto;
        }
        
        .status-icon-new {
            width: 14px;
            height: 14px;
            min-width: 14px;
            flex-shrink: 0;
        }
        
        .status-text-new {
            white-space: nowrap;
            flex: 1;
        }
        
        /* Status Farben V2 */
        .status-badge-cell.offen {
            background: #eff6ff;
            color: #1d4ed8;
        }
        .status-badge-cell.offen .status-icon-new {
            stroke: var(--rc-status-offen);
        }
        
        .status-badge-cell.bearbeitung {
            background: #fff7ed;
            color: #b45309;
        }
        .status-badge-cell.bearbeitung .status-icon-new {
            stroke: var(--rc-status-bearbeitung);
        }
        
        .status-badge-cell.erledigt {
            background: #f0fdf4;
            color: #15803d;
        }
        .status-badge-cell.erledigt .status-icon-new {
            stroke: var(--rc-status-erledigt);
        }
        
        .status-badge-cell.verschickt {
            background: #f8fafc;
            color: #475569;
        }
        .status-badge-cell.verschickt .status-icon-new {
            stroke: var(--rc-status-verschickt);
        }
        
        .status-badge-cell.nichtreparabel {
            background: #fee2e2;
            color: #b91c1c;
        }
        .status-badge-cell.nichtreparabel .status-icon-new {
            stroke: var(--rc-status-nichtreparabel);
        }
        
        .status-badge-cell.beimdienstleister,
        .status-badge-cell.warteauffeig {
            background: #f5f3ff;
            color: #6d28d9;
        }
        .status-badge-cell.beimdienstleister .status-icon-new,
        .status-badge-cell.warteauffeig .status-icon-new {
            stroke: var(--rc-status-warteauffeig);
        }
        
        .status-badge-cell.eingelagert {
            background: #f3f4f6;
            color: #4b5563;
        }
        .status-badge-cell.eingelagert .status-icon-new {
            stroke: var(--rc-status-eingelagert);
        }
        
        .status-badge-cell.entsorgt {
            background: #f3f4f6;
            color: #6b7280;
        }
        .status-badge-cell.entsorgt .status-icon-new {
            stroke: var(--rc-status-entsorgt);
        }
        
        /* RMA Cell (wie Mockup Layout A) */
        .rma-cell-new {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        
        .rma-number-new {
            font-weight: 600;
            color: #1e293b;
            font-size: 0.85rem;
            font-family: 'Inter', -apple-system, sans-serif;
        }
        
        /* Customer Cell - Icon links, Name/Ort bündig untereinander rechts */
        .customer-cell-new {
            display: flex;
            align-items: center;
            gap: 0.375rem;
            min-width: 0;
        }
        
        .customer-icon-new {
            width: 28px;
            height: 28px;
            background: #e2e8f0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            flex-shrink: 0;
        }
        
        .customer-icon-new svg {
            width: 14px;
            height: 14px;
        }
        
        .customer-info-new {
            display: flex;
            flex-direction: column;
            gap: 0;
            min-width: 0;
        }
        
        .customer-name-new {
            font-weight: 600;
            color: #1e293b;
            font-size: 0.85rem;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 140px;
        }
        
        .customer-meta-new {
            font-size: 0.75rem;
            color: #64748b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .customer-nr-new {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        /* Device Cell V2 - nur Gerätename */
        .device-cell-new {
            display: flex;
            flex-direction: column;
            gap: 0;
            min-width: 0;
        }
        
        .device-name-new {
            font-weight: 600;
            font-size: 0.85rem;
            color: #1e293b;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        /* Serial Cell V2 - Seriennummer + Garantie */
        .serial-cell-new {
            display: flex;
            flex-direction: column;
            gap: 0.15rem;
        }
        
        .serial-number-new {
            font-size: 0.85rem;
            font-weight: 600;
            color: #1e293b;
            font-family: 'Inter', -apple-system, sans-serif;
        }
        
        .serial-garantie-new {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        /* Device Cell Combined (Legacy) */
        .device-cell-combined {
            display: flex;
            flex-direction: column;
            gap: 0.1rem;
            padding: 0.125rem;
        }
        
        .device-name-combined {
            font-weight: 700;
            font-size: 0.85rem;
            font-family: 'Inter', -apple-system, sans-serif;
            color: #000000;
        }
        
        .device-serial-combined {
            font-size: 0.85rem;
            font-weight: 700;
            font-family: 'Inter', -apple-system, sans-serif;
            color: #000000;
        }
        
        .device-serial-combined span {
            color: #000000;
            margin-right: 0.25rem;
        }
        
        .device-garantie-combined {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            margin-top: 0.1rem;
        }
        
        /* Device Cell (Legacy) */
        .device-cell-new {
            display: flex;
            flex-direction: column;
            gap: 0.25rem;
        }
        
        .device-main-new {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .device-id-new {
            display: flex;
            align-items: center;
            gap: 0.375rem;
            font-size: 0.65rem;
            color: var(--text-muted);
            font-family: monospace;
        }
        
        .device-id-label-new {
            color: #3b82f6;
            font-weight: 600;
        }
        
        /* Serial Cell */
        .serial-cell-new {
            font-family: 'Inter', -apple-system, sans-serif;
            font-size: 0.9rem;
            font-weight: 600;
            color: #0f172a;
            letter-spacing: -0.01em;
        }
        
        /* Dienstleister/Routing Cell - mit Avatar wie Mockup */
        .dienstleister-badge-new {
            display: inline-flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.25rem 0.5rem;
            background: #f1f5f9;
            border: 1px solid #e2e8f0;
            border-radius: 14px;
            font-size: 0.75rem;
            font-weight: 500;
            color: #475569;
        }
        
        .dienstleister-badge-new::before {
            content: attr(data-initials);
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 26px;
            height: 22px;
            padding: 0 4px;
            border-radius: 11px;
            font-size: 0.6rem;
            font-weight: 600;
            color: white;
            background: linear-gradient(135deg, #3b82f6, #2563eb);
        }
        
        /* Dienstleister-spezifische Avatar-Farben */
        .dienstleister-badge-new.dl-sz::before { background: linear-gradient(135deg, #3b82f6, #2563eb); }
        .dienstleister-badge-new.dl-guf::before { background: linear-gradient(135deg, #10b981, #059669); }
        .dienstleister-badge-new.dl-feig::before { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
        .dienstleister-badge-new.dl-seco::before { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .dienstleister-badge-new.dl-cpi::before { background: linear-gradient(135deg, #ec4899, #db2777); }
        .dienstleister-badge-new.dl-nri::before { background: linear-gradient(135deg, #f97316, #ea580c); }
        .dienstleister-badge-new.dl-mei::before { background: linear-gradient(135deg, #a855f7, #9333ea); }
        .dienstleister-badge-new.dl-ict::before { background: linear-gradient(135deg, #14b8a6, #0d9488); }
        .dienstleister-badge-new.dl-other::before { background: #e2e8f0; color: #94a3b8; }
        
        /* Status Badge - Card Rows Style */
        .status-badge-new {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 0.35rem;
            padding: 0.375rem 0.75rem;
            border-radius: 8px;
            font-size: 0.7rem;
            font-weight: 600;
            cursor: pointer;
            position: relative;
            min-width: 95px;
        }
        
        .status-badge-new:hover {
            /* No hover effect */
        }
        
        .status-badge-new .status-dot {
            width: 7px;
            height: 7px;
            border-radius: 50%;
        }
        
        .status-badge-new.offen {
            background: rgba(59, 130, 246, 0.12);
            color: #1d4ed8;
        }
        .status-badge-new.offen .status-dot { background: #3b82f6; animation: statusPulse 2s infinite; }
        
        .status-badge-new.bearbeitung {
            background: rgba(249, 115, 22, 0.12);
            color: #c2410c;
        }
        .status-badge-new.bearbeitung .status-dot { background: #f97316; animation: statusPulse 2s infinite; }
        
        .status-badge-new.erledigt {
            background: rgba(34, 197, 94, 0.12);
            color: #15803d;
        }
        .status-badge-new.erledigt .status-dot { background: #22c55e; }
        
        .status-badge-new.versendet {
            background: #f1f5f9;
            color: #64748b;
        }
        .status-badge-new.versendet .status-dot { background: #94a3b8; }
        
        .status-badge-new.nichtreparabel {
            background: #fef2f2;
            color: #991b1b;
        }
        .status-badge-new.nichtreparabel .status-dot { background: #ef4444; }
        
        .status-badge-new.beimdienstleister,
        .status-badge-new.warteauffeig {
            background: #f5f3ff;
            color: #6d28d9;
        }
        .status-badge-new.beimdienstleister .status-dot,
        .status-badge-new.warteauffeig .status-dot { background: #8b5cf6; animation: statusPulse 2s infinite; }
        
        .status-badge-new.eingelagert {
            background: #f0f9ff;
            color: #075985;
        }
        .status-badge-new.eingelagert .status-dot { background: #0ea5e9; }
        
        .status-badge-new.entsorgt {
            background: #f3f4f6;
            color: #6b7280;
        }
        .status-badge-new.entsorgt .status-dot { background: #9ca3af; }
        
        @keyframes statusPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.4; }
        }
        
        /* Garantie Badge (wie Mockup) */
        .garantie-badge-new {
            display: inline-flex;
            align-items: center;
            padding: 0.15rem 0.4rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            width: fit-content;
        }
        
        .garantie-badge-new.ja { background: #dcfce7; color: #15803d; }
        .garantie-badge-new.nein { background: #f1f5f9; color: #64748b; }
        .garantie-badge-new.gew { background: #dbeafe; color: #1d4ed8; }
        
        /* Date Cell (wie Mockup) */
        .date-cell-new {
            display: flex;
            flex-direction: column;
            gap: 0;
        }
        
        .ls-date-value {
            font-size: 0.8rem;
            font-weight: 500;
            color: #64748b;
        }
        
        .date-cell-new .datum-value {
            font-weight: 500;
            font-size: 0.8rem;
            color: #64748b;
            white-space: nowrap;
        }
        
        /* Actions Cell */
        .actions-cell-new {
            display: flex;
            gap: 0.25rem;
            opacity: 0;
            transition: opacity 0.15s;
        }
        
        .table-new tbody tr:hover .actions-cell-new {
            opacity: 1;
        }
        
        .action-btn-new {
            width: 32px;
            height: 32px;
            border-radius: 8px;
            border: none;
            background: #f1f5f9;
            color: #64748b;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .action-btn-new:hover {
            background: #3b82f6;
            color: white;
        }
        
        .action-btn-new.edit:hover { background: #3b82f6; color: white; }
        .action-btn-new.print:hover { background: #10b981; color: white; }
        .action-btn-new.email:hover { background: #8b5cf6; color: white; }
        .action-btn-new.delete:hover { background: #ef4444; color: white; }
        
        /* Enhanced Pagination */
        .pagination-new {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0.75rem 1.25rem;
            background: var(--bg-secondary);
            border-top: 1px solid var(--border);
        }
        
        .pagination-info-new {
            color: var(--text-muted);
            font-size: 0.8rem;
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .rows-select-new {
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }
        
        .rows-select-new select {
            padding: 0.25rem 0.5rem;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 0.8rem;
            background: var(--bg-primary);
            cursor: pointer;
        }
        
        .pagination-controls-new {
            display: flex;
            align-items: center;
            gap: 0.25rem;
        }
        
        .page-btn-new {
            min-width: 30px;
            height: 30px;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg-primary);
            cursor: pointer;
            font-weight: 600;
            font-size: 0.8rem;
            transition: all 0.15s;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-secondary);
        }
        
        .page-btn-new:hover:not(:disabled) {
            outline-color: #10b981;
            background: #d1fae5;
            color: #059669;
        }
        
        .page-btn-new.active {
            background: #10b981;
            outline-color: #10b981;
            color: white;
        }
        
        .page-btn-new:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }
        
        /* ==================== VIEW TOGGLE ==================== */
        .view-toggle-container {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-left: 1rem;
            padding-left: 1rem;
            border-left: 1px solid var(--border);
        }
        
        .view-toggle-label {
            font-size: 0.75rem;
            color: var(--text-muted);
            font-weight: 500;
        }
        
        .view-toggle {
            display: flex;
            background: transparent;
            border-radius: 8px;
            padding: 0;
            border: none;
        }
        
        .view-toggle-btn {
            display: flex;
            align-items: center;
            gap: 0.35rem;
            padding: 0.35rem 0.6rem;
            border-radius: 6px;
            border: none;
            background: transparent;
            font-size: 0.7rem;
            font-weight: 600;
            color: #94a3b8;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .view-toggle-btn:hover {
            color: #64748b;
        }
        
        .view-toggle-btn.active {
            background: white;
            color: #1e293b;
            box-shadow: 0 2px 8px rgba(0,0,0,0.12);
            border-radius: 8px;
        }
        
        .view-toggle-btn svg {
            width: 14px;
            height: 14px;
        }
        
        /* ==================== COMPACT DEVICE TABLE VIEW ==================== */
        .compact-device-view {
            display: none;
        }
        
        .compact-device-view.active {
            display: block;
        }
        
        .compact-device-table {
            width: 100%;
            border-collapse: separate;
            border-spacing: 0 0.35rem;
            background: transparent;
        }
        
        .compact-device-table thead tr {
            background: #e2e8f0;
        }
        
        .compact-device-table th {
            padding: 0.5rem 0.6rem;
            font-size: 0.65rem;
            font-weight: 600;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            background: #e2e8f0;
            border-bottom: none;
            text-align: left;
            white-space: nowrap;
            position: sticky;
            top: 0;
            z-index: 10;
        }
        
        .compact-device-table th:first-child {
            border-radius: 10px 0 0 10px;
        }
        
        .compact-device-table th:last-child {
            border-radius: 0 10px 10px 0;
        }
        
        .compact-device-table tbody tr {
            background: var(--rc-bg-white, white);
            box-shadow: 0 1px 3px rgba(0,0,0,0.06);
        }
        
        .compact-device-table td {
            padding: 0.5rem 0.6rem;
            font-size: 0.75rem;
            border-bottom: none;
            vertical-align: middle;
            background: inherit;
        }
        
        .compact-device-table tbody td:first-child {
            border-radius: 10px 0 0 10px;
        }
        
        .compact-device-table tbody td:last-child {
            border-radius: 0 10px 10px 0;
        }
        
        .compact-device-table tr:hover td {
            background: #f8fafc;
        }
        
        .compact-device-table .idx-cell {
            color: var(--text-muted);
            font-weight: 600;
            font-size: 0.7rem;
            width: 30px;
        }
        
        .compact-device-table .rma-cell {
            font-weight: 700;
            color: var(--text-primary);
            font-size: 0.8rem;
        }
        
        .compact-device-table .hersteller-badge {
            display: inline-block;
            padding: 0.2rem 0.45rem;
            border-radius: 4px;
            font-size: 0.65rem;
            font-weight: 600;
            text-align: center;
            min-width: 45px;
        }
        
        .compact-device-table .hersteller-badge.feig { background: #dbeafe; color: #1d4ed8; }
        .compact-device-table .hersteller-badge.seco { background: #dcfce7; color: #15803d; }
        .compact-device-table .hersteller-badge.cpi { background: #f3e8ff; color: #7c3aed; }
        .compact-device-table .hersteller-badge.jcm { background: #ffedd5; color: #c2410c; }
        .compact-device-table .hersteller-badge.itl { background: #fef3c7; color: #b45309; }
        .compact-device-table .hersteller-badge.ingenico { background: #fce7f3; color: #be185d; }
        .compact-device-table .hersteller-badge.other { background: #f1f5f9; color: #64748b; }
        
        /* Ext. RMA Status Badges (neben RMA - Legacy) */
        .ext-rma-badge {
            display: inline-block;
            margin-left: 4px;
            font-size: 0.75rem;
            cursor: help;
            transition: transform 0.15s ease;
        }
        .ext-rma-badge:hover {
            transform: scale(1.2);
        }
        .ext-rma-angefragt { opacity: 0.9; }
        .ext-rma-erhalten { opacity: 1; }
        .ext-rma-versendet { opacity: 1; }
        
        /* Ext. RMA Status Badge UNTER der RMA-Nummer */
        .ext-rma-status-badge {
            display: inline-flex;
            font-size: 0.6rem;
            font-weight: 600;
            padding: 1px 6px;
            border-radius: 4px;
            margin-top: 1px;
            white-space: nowrap;
            cursor: help;
            width: fit-content;
        }
        .ext-rma-status-badge.angefragt {
            background: #fef3c7;
            color: #92400e;
        }
        .ext-rma-status-badge.erhalten {
            background: #dcfce7;
            color: #166534;
        }
        .ext-rma-status-badge.versendet {
            background: #dbeafe;
            color: #1e40af;
        }
        .ext-rma-status-badge.vorgemerkt {
            background: #fef9c3;
            color: #854d0e;
        }
        
        /* Legacy Badge (für Kompatibilität) */
        .ext-rma-ls-badge {
            display: inline-block;
            margin-left: 4px;
            font-size: 0.7rem;
            cursor: help;
            opacity: 0.9;
        }
        .ext-rma-ls-badge:hover {
            opacity: 1;
            transform: scale(1.1);
        }
        
        .compact-device-table .modell-cell {
            color: var(--text-primary);
            font-weight: 500;
            max-width: 150px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .compact-device-table .sn-cell {
            font-family: 'SF Mono', 'Consolas', 'Monaco', monospace;
            font-size: 0.7rem;
            color: var(--text-secondary);
        }
        
        .compact-device-table .garantie-badge {
            display: inline-block;
            padding: 0.15rem 0.35rem;
            border-radius: 3px;
            font-size: 0.6rem;
            font-weight: 600;
        }
        
        .compact-device-table .garantie-badge.ja { background: #dcfce7; color: #15803d; }
        .compact-device-table .garantie-badge.nein { background: #fee2e2; color: #dc2626; }
        
        .compact-device-table .status-mini {
            display: inline-flex;
            align-items: center;
            gap: 0.25rem;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            font-size: 0.6rem;
            font-weight: 600;
        }
        
        .compact-device-table .status-mini.offen { background: rgba(59, 130, 246, 0.12); color: #1d4ed8; }
        .compact-device-table .status-mini.bearbeitung { background: rgba(249, 115, 22, 0.12); color: #c2410c; }
        .compact-device-table .status-mini.erledigt { background: rgba(34, 197, 94, 0.12); color: #15803d; }
        .compact-device-table .status-mini.verschickt { background: rgba(100, 116, 139, 0.12); color: #475569; }
        
        .compact-device-table .dienstl-cell {
            font-size: 0.7rem;
            color: var(--text-muted);
            vertical-align: top;
            padding-top: 0.4rem !important;
        }
        
        /* Dienstleister-Cell für Standard-Tabelle */
        .dienstleister-cell-new {
            display: flex;
            flex-direction: column;
            gap: 2px;
        }
        
        .compact-device-table .date-cell {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .compact-device-table .kunde-cell {
            font-size: 0.7rem;
            color: var(--text-secondary);
            max-width: 120px;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .compact-device-table .actions-cell {
            display: flex;
            gap: 0.2rem;
        }
        
        .compact-device-table .action-mini {
            width: 24px;
            height: 24px;
            border-radius: 4px;
            border: none;
            background: var(--bg-secondary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
        }
        
        .compact-device-table .action-mini:hover {
            background: var(--border);
        }
        
        .compact-device-table .action-mini svg {
            width: 12px;
            height: 12px;
            color: var(--text-muted);
        }
        
        .compact-device-table .action-mini.edit:hover { background: #dbeafe; }
        .compact-device-table .action-mini.edit:hover svg { color: #2563eb; }
        .compact-device-table .action-mini.delete:hover { background: #fee2e2; }
        .compact-device-table .action-mini.delete:hover svg { color: #dc2626; }
        
        /* Standard view when toggled */
        .standard-table-view {
            display: block;
        }
        
        .standard-table-view.hidden {
            display: none;
        }
        
        /* Quick View Sidebar */
        .sidebar-overlay-new {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.4);
            z-index: 100001;
        }
        
        .sidebar-overlay-new.visible {
            display: block;
        }
/* REMOVED: .quick-sidebar */
/* REMOVED: .sidebar-overlay-new.visible .quick-sidebar */
        
        .sidebar-header-new {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 1rem 1.25rem;
            border-bottom: 1px solid var(--border);
            background: var(--bg-secondary);
        }
        
        .sidebar-title-new {
            display: flex;
            align-items: center;
            gap: 0.75rem;
        }
        
        .sidebar-title-new h2 {
            font-size: 1rem;
            font-weight: 700;
        }
        
        .sidebar-close-new {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            border: none;
            background: var(--bg-tertiary);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: var(--text-muted);
            transition: all 0.15s;
        }
        
        .sidebar-close-new:hover {
            background: #fee2e2;
            color: #ef4444;
        }
        
        .sidebar-body-new {
            flex: 1;
            padding: 1rem 1.25rem;
            overflow-y: auto;
        }
        
        .sidebar-section-new {
            margin-bottom: 1.25rem;
        }
        
        .sidebar-section-title-new {
            font-size: 0.6rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.1em;
            color: var(--text-muted);
            margin-bottom: 0.625rem;
            display: flex;
            align-items: center;
            gap: 0.375rem;
        }
        
        .sidebar-grid-new {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 0.75rem;
        }
        
        .sidebar-item-new {
            display: flex;
            flex-direction: column;
            gap: 0.125rem;
        }
        
        .sidebar-item-new.full {
            grid-column: span 2;
        }
        
        .sidebar-label-new {
            font-size: 0.65rem;
            color: var(--text-muted);
            font-weight: 600;
        }
        
        .sidebar-value-new {
            font-weight: 600;
            color: var(--text-primary);
            font-size: 0.85rem;
        }
        
        .sidebar-value-new.mono {
            font-family: 'Consolas', monospace;
        }
        
        .sidebar-value-new.large {
            font-size: 1.1rem;
            font-weight: 800;
        }
        
        /* Timeline */
        .timeline-new {
            position: relative;
            padding-left: 1.5rem;
        }
        
        .timeline-new::before {
            content: '';
            position: absolute;
            left: 5px;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--border);
        }
        
        .timeline-item-new {
            position: relative;
            padding-bottom: 1rem;
        }
        
        .timeline-item-new:last-child {
            padding-bottom: 0;
        }
        
        .timeline-dot-new {
            position: absolute;
            left: -1.5rem;
            top: 2px;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--border);
            border: 2px solid var(--bg-primary);
        }
        
        .timeline-dot-new.active {
            background: #10b981;
        }
        
        .timeline-dot-new.current {
            background: #3b82f6;
            animation: statusPulse 2s infinite;
        }
        
        .timeline-content-new {
            display: flex;
            flex-direction: column;
        }
        
        .timeline-title-new {
            font-size: 0.8rem;
            font-weight: 600;
            color: var(--text-primary);
        }
        
        .timeline-title-new.muted {
            color: var(--text-muted);
        }
        
        .timeline-date-new {
            font-size: 0.7rem;
            color: var(--text-muted);
        }
        
        .sidebar-note-new {
            background: var(--bg-tertiary);
            padding: 0.75rem;
            border-radius: 8px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }
        
        .sidebar-footer-new {
            padding: 1rem 1.25rem;
            border-top: 1px solid var(--border);
            display: flex;
            gap: 0.5rem;
        }
        
        .sidebar-btn-new {
            flex: 1;
            padding: 0.5rem 0.875rem;
            border-radius: 8px;
            font-size: 0.85rem;
            font-weight: 600;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.375rem;
            transition: all 0.15s;
        }
        
        .sidebar-btn-new.primary {
            background: #10b981;
            color: white;
        }
        
        .sidebar-btn-new.primary:hover {
            background: #059669;
        }
        
        .sidebar-btn-new.secondary {
            background: var(--bg-tertiary);
            color: var(--text-secondary);
        }
        
        .sidebar-btn-new.secondary:hover {
            background: var(--border);
        }
        
        /* Toast Notifications */
        .toast-container-new {
            position: fixed;
            bottom: 1.5rem;
            right: 1.5rem;
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            z-index: 2000;
        }
        
        .toast-new {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: #0f172a;
            color: white;
            border-radius: 10px;
            box-shadow: 0 10px 25px rgba(0,0,0,0.2);
            animation: toastInNew 0.3s ease;
            font-size: 0.85rem;
            font-weight: 500;
        }
        
        @keyframes toastInNew {
            from { opacity: 0; transform: translateX(100px); }
            to { opacity: 1; transform: translateX(0); }
        }
        
        .toast-new.success { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
        .toast-new.error { background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); }
        .toast-new.info { background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%); }
        
        /* Timeline Steps for Edit Page */
        .timeline-step {
            display: flex;
            flex-direction: column;
            align-items: center;
            flex: 1;
            position: relative;
        }
        .timeline-dot {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #e2e8f0;
            border: 3px solid #e2e8f0;
            z-index: 1;
            transition: all 0.3s ease;
        }
        .timeline-step.active .timeline-dot {
            background: #10b981;
            outline-color: #10b981;
            box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
        }
        .timeline-step.current .timeline-dot {
            background: #3b82f6;
            outline-color: #3b82f6;
            animation: timelinePulse 2s infinite;
        }
        @keyframes timelinePulse {
            0%, 100% { box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2); }
            50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0.1); }
        }
        .timeline-label {
            font-size: 0.7rem;
            font-weight: 600;
            color: #94a3b8;
            margin-top: 0.5rem;
            text-align: center;
        }
        .timeline-step.active .timeline-label,
        .timeline-step.current .timeline-label {
            color: #0f172a;
        }
        .timeline-connector {
            flex: 1;
            height: 3px;
            background: #e2e8f0;
            margin-top: 7px;
            min-width: 30px;
        }
        .timeline-connector.active {
            background: #10b981;
        }
        
        /* FEIG Toggle Buttons for Edit Page */
        .feig-toggle-btn {
            padding: 0.5rem 0.875rem;
            border: 2px solid #93c5fd;
            border-radius: 8px;
            background: white;
            color: #64748b;
            font-weight: 600;
            font-size: 0.8rem;
            cursor: pointer;
            transition: all 0.2s ease;
        }
        .feig-toggle-btn:hover {
            outline-color: #3b82f6;
            color: #3b82f6;
        }
        .feig-toggle-btn.active {
            background: linear-gradient(135deg, #10b981, #059669);
            outline-color: #10b981;
            color: white;
        }
        
        /* ===== RESPONSIVE / MOBILE DESIGN ===== */
        
        /* Large Desktop */
        @media (min-width: 1600px) {
            .main-content { max-width: 1800px; margin-right: auto; }
            .stats-grid-new { grid-template-columns: repeat(5, 1fr); }
        }
        
        /* Desktop */
        @media (max-width: 1400px) {
            .header-center { max-width: 300px; }
            .global-search-wrapper { max-width: 280px; }
        }
        
        /* Tablet Portrait */
        @media (max-width: 1024px) {
            .main-content { margin-left: 85px; }
            
            .stats-grid-new { grid-template-columns: repeat(2, 1fr); }
            .widget-grid { grid-template-columns: 1fr; }
            
            .toolbar-new { flex-wrap: wrap; gap: 0.5rem; }
            .toolbar-new > * { flex-shrink: 0; }
            
            /* Header responsive */
            .header { padding: 0.5rem 1rem; gap: 0.75rem; }
            .header-center { max-width: 250px; }
            .global-search-wrapper { max-width: 220px; }
            .header-welcome .welcome-text { font-size: 0.8rem; }
            .header-welcome .welcome-date { font-size: 0.7rem; }
            .header-user-info-new { display: none; }
            .header-user-chevron { display: none; }
        }
        
        /* Mobile Landscape */
        @media (max-width: 768px) {
            :root { font-size: 14px; }
            
            .sidebar {
                position: fixed;
                left: -280px;
                width: 280px;
                z-index: 1000;
                transition: left 0.3s ease;
            }
            .sidebar.mobile-open { left: 0; }
            .sidebar.mobile-open .sidebar-item { flex-direction: row; gap: 0.75rem; padding: 0.75rem; font-size: 0.85rem; text-align: left; }
            .sidebar.mobile-open .sidebar-item-icon { width: 36px; height: 36px; }
            .sidebar.mobile-open .sidebar-item-text { font-size: 0.85rem; }
            
            .main-content { margin-left: 0; padding: 0.5rem; }
            
            /* Header mobile */
            .header {
                padding: 0.5rem 0.75rem;
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            .header-left { order: 1; flex: 1; min-width: auto; }
            .header-center { order: 3; width: 100%; max-width: none; margin-top: 0.5rem; }
            .header-right { order: 2; }
            .global-search-wrapper { max-width: 100%; }
            .header-action-btn { width: 36px; height: 36px; }
            .header-action-btn svg { width: 16px; height: 16px; }
            
            .header-new {
                padding: 0.75rem 1rem;
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            .header-new .search-wrapper { width: 100%; order: 3; }
            
            .stats-grid-new { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
            .stat-card-new { padding: 0.75rem; }
            .stat-card-new h3 { font-size: 1.25rem; }
            
            .toolbar-new {
                flex-direction: column;
                align-items: stretch;
            }
            .toolbar-new .filter-group {
                flex-wrap: wrap;
                width: 100%;
            }
            .toolbar-new input, .toolbar-new select {
                flex: 1 1 45%;
                min-width: 120px;
            }
            
            .table-new { font-size: 0.8rem; }
            .table-new th, .table-new td { padding: 0.5rem 0.4rem; }
            
            /* Hide less important columns on mobile */
            .table-new th:nth-child(1),
            .table-new td:nth-child(1) { display: none; } /* Checkbox */
            .table-new th:nth-child(3),
            .table-new td:nth-child(3) { display: none; } /* Kunde */
            .table-new th:nth-child(7),
            .table-new td:nth-child(7) { display: none; } /* Dienstleister */
            
            .sidebar-new { width: 100%; right: -100%; }
            .sidebar-new.active { right: 0; }
            
            .modal-content { 
                max-width: 95vw; 
                max-height: 90vh;
                margin: 5vh auto;
            }
            
            .btn, button { padding: 0.6rem 1rem; font-size: 0.85rem; }
            
            .hersteller-grid-startseite { grid-template-columns: repeat(3, 1fr); }
            
            .bulk-bar-new {
                flex-direction: column;
                padding: 0.75rem;
                gap: 0.5rem;
            }
            .bulk-bar-new button { width: 100%; justify-content: center; }
            
            /* Theme selection responsive */
            .theme-select-option { padding: 0.5rem; }
            .theme-select-preview { width: 32px; height: 32px; }
            .theme-select-name { font-size: 0.6rem; }
        }
        
        /* Mobile Portrait */
        @media (max-width: 480px) {
            :root { font-size: 13px; }
            
            .header-new h1 { font-size: 1rem; }
            .header-new .actions-wrapper { gap: 0.25rem; }
            
            .stats-grid-new { grid-template-columns: 1fr; }
            
            .toolbar-new input, .toolbar-new select {
                flex: 1 1 100%;
            }
            
            .table-new { font-size: 0.75rem; }
            /* Show only essential columns */
            .table-new th:nth-child(5),
            .table-new td:nth-child(5) { display: none; } /* Seriennummer */
            .table-new th:nth-child(8),
            .table-new td:nth-child(8) { display: none; } /* Datum */
            
            .hersteller-grid-startseite { grid-template-columns: 1fr 1fr; gap: 0.5rem; }
            .hersteller-card-start { padding: 0.75rem; }
            
            .sidebar-footer-new { padding: 0.75rem; }
            .sidebar-footer-new button { font-size: 0.75rem; padding: 0.5rem; }
            
            .pagination-new { flex-wrap: wrap; gap: 0.25rem; }
            .pagination-new button { padding: 0.4rem 0.6rem; font-size: 0.75rem; }
        }
        
        /* Mobile Menu Toggle Button */
        .mobile-menu-toggle {
            display: none;
            position: fixed;
            bottom: 20px;
            left: 20px;
            width: 56px;
            height: 56px;
            border-radius: 50%;
            background: linear-gradient(135deg, #3b82f6, #1d4ed8);
            color: white;
            border: none;
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.4);
            cursor: pointer;
            z-index: 999;
            font-size: 1.5rem;
        }
        @media (max-width: 768px) {
            .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
        }
        
        /* Mobile Overlay */
        .mobile-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.5);
            z-index: 999;
        }
        .mobile-overlay.active { display: block; }
        
        /* Touch-friendly interactions */
        @media (hover: none) and (pointer: coarse) {
            .btn, button, .nav-item, .action-btn {
                min-height: 44px;
                min-width: 44px;
            }
            .table-new tr { cursor: pointer; }
            .table-new tr:active { background: var(--bg-tertiary); }
        }
        
        /* Landscape phone adjustments */
        @media (max-height: 500px) and (orientation: landscape) {
            .modal-content { max-height: 85vh; overflow-y: auto; }
            .sidebar-new { max-height: 100vh; overflow-y: auto; }
        }
        
        /* ============================================
           BLOCK 1: LOGIN & AUTH SYSTEM
           ============================================ */
        
        .login-screen {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 10000;
        }
        
        .login-screen.hidden { display: none; }
        
        .login-box {
            background: var(--bg-primary);
            border-radius: 20px;
            padding: 3rem;
            width: 100%;
            max-width: 420px;
            box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
        }
        
        .login-logo {
            text-align: center;
            margin-bottom: 2rem;
        }
        
        .login-logo svg {
            width: 60px;
            height: 60px;
            color: var(--primary);
        }
        
        .login-logo h1 {
            font-size: 1.75rem;
            font-weight: 700;
            color: var(--text-primary);
            margin-top: 1rem;
        }
        
        .login-logo p {
            color: var(--text-muted);
            font-size: 0.9rem;
        }
        
        .login-form .form-group {
            margin-bottom: 1.25rem;
        }
        
        .login-form label {
            display: block;
            font-weight: 500;
            margin-bottom: 0.5rem;
            color: var(--text-secondary);
        }
        
        .login-form input {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid var(--border);
            border-radius: 10px;
            font-size: 1rem;
            background: var(--bg-secondary);
            color: var(--text-primary);
            transition: all 0.2s;
        }
        
        .login-form input:focus {
            outline: none;
            outline-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        .login-btn {
            width: 100%;
            padding: 1rem;
            background: var(--primary);
            color: white;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
            margin-top: 0.5rem;
        }
        
        .login-btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
        
        .login-error {
            background: #fef2f2;
            border: 1px solid #fecaca;
            color: #dc2626;
            padding: 0.75rem 1rem;
            border-radius: 8px;
            margin-bottom: 1rem;
            font-size: 0.9rem;
            display: none;
        }
        
        .login-error.show { display: block; }
        
        .login-demo {
            margin-top: 1.5rem;
            padding-top: 1.5rem;
            border-top: 1px solid var(--border);
        }
        
        .login-demo-title {
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
            margin-bottom: 0.75rem;
        }
        
        .login-demo-accounts {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 0.5rem;
        }
        
        .login-demo-btn {
            padding: 0.5rem;
            background: var(--bg-tertiary);
            border: 1px solid var(--border);
            border-radius: 8px;
            cursor: pointer;
            text-align: center;
            transition: all 0.2s;
            font-size: 0.8rem;
        }
        
        .login-demo-btn:hover {
            outline-color: var(--primary);
            background: var(--primary-light);
        }
        
        .login-demo-btn strong { display: block; color: var(--text-primary); }
        .login-demo-btn span { color: var(--text-muted); font-size: 0.7rem; }
        
        /* User Badge in Header */
        .user-badge {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 1rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .user-badge:hover { outline-color: var(--primary); }
        
        .user-avatar {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.9rem;
        }
        
        .user-info { text-align: left; }
        .user-name { font-weight: 600; font-size: 0.9rem; color: var(--text-primary); }
        .user-role { font-size: 0.75rem; color: var(--text-muted); }
        
        .user-dropdown {
            position: absolute;
            top: calc(100% + 0.5rem);
            right: 0;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.15);
            min-width: 200px;
            display: none;
            z-index: 1000;
        }
        
        .user-dropdown.show { display: block; }
        
        .user-dropdown-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .user-dropdown-item:hover { background: var(--bg-secondary); color: var(--text-primary); }
        .user-dropdown-item:first-child { border-radius: 12px 12px 0 0; }
        .user-dropdown-item:last-child { border-radius: 0 0 12px 12px; }
        .user-dropdown-item.danger { color: #dc2626; }
        .user-dropdown-item.danger:hover { background: #fef2f2; }
        
        /* ============================================
           BLOCK 2: BENUTZER-VERWALTUNG
           ============================================ */
        
        .users-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
            gap: 1rem;
        }
        
        .user-card {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.25rem;
            transition: all 0.2s;
        }
        
        .user-card:hover { outline-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
        
        .user-card-header {
            display: flex;
            align-items: center;
            gap: 1rem;
            margin-bottom: 1rem;
        }
        
        .user-card-avatar {
            width: 48px;
            height: 48px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            font-size: 1.2rem;
        }
        
        .user-card-avatar.admin { background: #8b5cf6; }
        .user-card-avatar.manager { background: #3b82f6; }
        .user-card-avatar.techniker { background: #10b981; }
        .user-card-avatar.extern { background: #f59e0b; }
        
        .user-card-info h4 { font-size: 1rem; font-weight: 600; color: var(--text-primary); }
        .user-card-info p { font-size: 0.85rem; color: var(--text-muted); }
        
        .user-card-role {
            display: inline-block;
            padding: 0.25rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .user-card-role.admin { background: #ede9fe; color: #7c3aed; }
        .user-card-role.manager { background: #dbeafe; color: #2563eb; }
        .user-card-role.techniker { background: #d1fae5; color: #059669; }
        .user-card-role.extern { background: #fef3c7; color: #d97706; }
        
        .user-card-meta {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 1rem;
            padding-top: 1rem;
            border-top: 1px solid var(--border);
        }
        
        .user-card-status {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            font-size: 0.8rem;
        }
        
        .user-card-status .dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
        }
        
        .user-card-status .dot.active { background: #10b981; }
        .user-card-status .dot.inactive { background: #94a3b8; }
        
        .user-card-actions {
            display: flex;
            gap: 0.5rem;
        }
        
        .user-card-actions button {
            padding: 0.4rem 0.6rem;
            border-radius: 6px;
            border: 1px solid var(--border);
            background: var(--bg-secondary);
            cursor: pointer;
            transition: all 0.2s;
        }
        
        .user-card-actions button:hover { outline-color: var(--primary); }
        
        /* ============================================
           BLOCK 3: ROLLEN & BERECHTIGUNGEN
           ============================================ */
        
        .permission-denied {
            display: none !important;
        }
        
        .main-container {
            display: block;
            width: 100%;
            min-height: 100vh;
            margin: 0;
            padding: 0;
        }
        
        .main-container.hidden {
            display: none !important;
        }
        
        .hidden {
            display: none !important;
        }
        
        .role-badge {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.8rem;
            font-weight: 500;
        }
        
        .role-badge.administrator { background: linear-gradient(135deg, #8b5cf6, #a78bfa); color: white; }
        .role-badge.manager { background: linear-gradient(135deg, #3b82f6, #60a5fa); color: white; }
        .role-badge.techniker { background: linear-gradient(135deg, #10b981, #34d399); color: white; }
        .role-badge.extern { background: linear-gradient(135deg, #f59e0b, #fbbf24); color: white; }
        
        .permissions-matrix {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
        }
        
        .permissions-matrix table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .permissions-matrix th,
        .permissions-matrix td {
            padding: 0.75rem 1rem;
            text-align: left;
            border-bottom: 1px solid var(--border);
        }
        
        .permissions-matrix th {
            background: var(--bg-secondary);
            font-weight: 600;
            font-size: 0.85rem;
        }
        
        .permissions-matrix .check { color: #10b981; }
        .permissions-matrix .cross { color: #ef4444; }
        
        /* ============================================
           BLOCK 4: AUDIT-LOG & STATUS-HISTORIE
           ============================================ */
        
        .audit-log-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .audit-log-item {
            display: flex;
            align-items: flex-start;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 10px;
            transition: all 0.2s;
        }
        
        .audit-log-item:hover { outline-color: var(--primary); }
        
        .audit-log-icon {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
        }
        
        .audit-log-icon.create { background: #d1fae5; color: #059669; }
        .audit-log-icon.update { background: #dbeafe; color: #2563eb; }
        .audit-log-icon.delete { background: #fee2e2; color: #dc2626; }
        .audit-log-icon.login { background: #ede9fe; color: #7c3aed; }
        .audit-log-icon.status { background: #fef3c7; color: #d97706; }
        
        .audit-log-content { flex: 1; }
        .audit-log-content strong { color: var(--text-primary); }
        .audit-log-content p { font-size: 0.9rem; color: var(--text-secondary); margin-top: 0.25rem; }
        
        .audit-log-meta {
            text-align: right;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        /* Status Timeline */
        .status-timeline {
            position: relative;
            padding-left: 2rem;
        }
        
        .status-timeline::before {
            content: '';
            position: absolute;
            left: 0.5rem;
            top: 0;
            bottom: 0;
            width: 2px;
            background: var(--border);
        }
        
        .status-timeline-item {
            position: relative;
            padding-bottom: 1.5rem;
        }
        
        .status-timeline-item::before {
            content: '';
            position: absolute;
            left: -1.5rem;
            top: 0.25rem;
            width: 12px;
            height: 12px;
            border-radius: 50%;
            background: var(--primary);
            border: 2px solid var(--bg-primary);
        }
        
        .status-timeline-item.completed::before { background: #10b981; }
        .status-timeline-item.current::before { background: var(--primary); box-shadow: 0 0 0 4px rgba(59,130,246,0.2); }
        
        .status-timeline-content {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 0.75rem 1rem;
        }
        
        .status-timeline-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .status-timeline-status { font-weight: 600; color: var(--text-primary); }
        .status-timeline-time { font-size: 0.8rem; color: var(--text-muted); }
        .status-timeline-user { font-size: 0.85rem; color: var(--text-secondary); margin-top: 0.25rem; }
        
        /* ============================================
           BLOCK 5: FEHLERKATALOG ERWEITERT
           ============================================ */
        
        .fehler-katalog-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
            gap: 1rem;
        }
        
        .fehler-card {
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            transition: all 0.2s;
        }
        
        .fehler-card:hover { outline-color: var(--primary); box-shadow: 0 4px 12px rgba(0,0,0,0.05); }
        
        .fehler-card-header {
            padding: 1rem;
            display: flex;
            align-items: center;
            gap: 1rem;
            border-bottom: 1px solid var(--border);
        }
        
        .fehler-code {
            padding: 0.5rem 0.75rem;
            border-radius: 8px;
            font-weight: 700;
            font-size: 0.85rem;
        }
        
        .fehler-code.leicht { background: #d1fae5; color: #059669; }
        .fehler-code.mittel { background: #fef3c7; color: #d97706; }
        .fehler-code.schwer { background: #fee2e2; color: #dc2626; }
        
        .fehler-card-body { padding: 1rem; }
        .fehler-card-title { font-weight: 600; color: var(--text-primary); margin-bottom: 0.5rem; }
        .fehler-card-desc { font-size: 0.9rem; color: var(--text-secondary); }
        
        .fehler-card-meta {
            display: flex;
            gap: 0.5rem;
            flex-wrap: wrap;
            margin-top: 0.75rem;
        }
        
        .fehler-tag {
            padding: 0.25rem 0.5rem;
            background: var(--bg-tertiary);
            border-radius: 4px;
            font-size: 0.75rem;
            color: var(--text-muted);
        }
        
        .fehler-card-footer {
            padding: 0.75rem 1rem;
            background: var(--bg-secondary);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .fehler-time { font-size: 0.8rem; color: var(--text-muted); }
        
        /* ============================================
           BLOCK 6: REPARATUR-DOKUMENTATION
           ============================================ */
        
        .repair-doc-container {
            display: grid;
            grid-template-columns: 1fr 300px;
            gap: 1.5rem;
        }
        
        @media (max-width: 1024px) {
            .repair-doc-container { grid-template-columns: 1fr; }
        }
        
        .repair-tabs {
            display: flex;
            gap: 0.5rem;
            margin-bottom: 1rem;
            border-bottom: 2px solid var(--border);
            padding-bottom: 0.5rem;
        }
        
        .repair-tab {
            padding: 0.5rem 1rem;
            border: none;
            background: none;
            color: var(--text-muted);
            cursor: pointer;
            font-weight: 500;
            border-radius: 6px;
            transition: all 0.2s;
        }
        
        .repair-tab:hover { background: var(--bg-secondary); color: var(--text-primary); }
        .repair-tab.active { background: var(--primary); color: white; }
        
        .repair-step {
            display: flex;
            gap: 1rem;
            padding: 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 10px;
            margin-bottom: 0.75rem;
        }
        
        .repair-step-number {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: var(--primary);
            color: white;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 700;
            flex-shrink: 0;
        }
        
        .repair-step-content { flex: 1; }
        .repair-step-content h4 { font-size: 0.95rem; color: var(--text-primary); margin-bottom: 0.25rem; }
        .repair-step-content p { font-size: 0.85rem; color: var(--text-secondary); }
        
        .repair-step-meta {
            display: flex;
            gap: 1rem;
            margin-top: 0.5rem;
            font-size: 0.8rem;
            color: var(--text-muted);
        }
        
        .material-list {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
        }
        
        .material-item {
            display: grid;
            grid-template-columns: 1fr auto auto auto;
            gap: 1rem;
            padding: 0.75rem 1rem;
            background: var(--bg-secondary);
            border-radius: 8px;
            align-items: center;
        }
        
        .material-item-name { font-weight: 500; color: var(--text-primary); }
        .material-item-qty { color: var(--text-secondary); }
        .material-item-price { font-weight: 600; color: var(--primary); }
        
        /* Prüfprotokoll */
        .pruef-messung {
            display: grid;
            grid-template-columns: 1fr 100px 100px auto;
            gap: 1rem;
            padding: 0.75rem 1rem;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 8px;
            margin-bottom: 0.5rem;
            align-items: center;
        }
        
        .pruef-messung.ok { border-left: 3px solid #10b981; }
        .pruef-messung.fail { border-left: 3px solid #ef4444; }
        
        .pruef-parameter { font-weight: 500; }
        .pruef-value { text-align: center; font-family: monospace; }
        .pruef-status { text-align: center; }
        
        /* ============================================
           BLOCK 7: DOKUMENT-UPLOAD
           ============================================ */
        
        .upload-zone {
            border: 2px dashed var(--border);
            border-radius: 12px;
            padding: 2rem;
            text-align: center;
            cursor: pointer;
            transition: all 0.2s;
            background: var(--bg-secondary);
        }
        
        .upload-zone:hover,
        .upload-zone.dragover {
            outline-color: var(--primary);
            background: var(--primary-light);
        }
        
        .upload-zone-icon {
            width: 48px;
            height: 48px;
            margin: 0 auto 1rem;
            color: var(--text-muted);
        }
        
        .upload-zone-text { color: var(--text-secondary); }
        .upload-zone-text strong { color: var(--primary); }
        
        .dokument-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 1rem;
            margin-top: 1rem;
        }
        
        .dokument-item {
            position: relative;
            border: 1px solid var(--border);
            border-radius: 10px;
            overflow: hidden;
            background: var(--bg-primary);
        }
        
        .dokument-preview {
            height: 120px;
            background: var(--bg-secondary);
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .dokument-preview img {
            max-width: 100%;
            max-height: 100%;
            object-fit: cover;
        }
        
        .dokument-preview .pdf-icon {
            font-size: 3rem;
        }
        
        .dokument-info {
            padding: 0.75rem;
        }
        
        .dokument-name {
            font-size: 0.8rem;
            font-weight: 500;
            color: var(--text-primary);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .dokument-meta {
            font-size: 0.7rem;
            color: var(--text-muted);
            margin-top: 0.25rem;
        }
        
        .dokument-delete {
            position: absolute;
            top: 0.5rem;
            right: 0.5rem;
            width: 24px;
            height: 24px;
            border-radius: 50%;
            background: rgba(0,0,0,0.6);
            color: white;
            border: none;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            transition: opacity 0.2s;
        }
        
        .dokument-item:hover .dokument-delete { opacity: 1; }
        
        .dokument-kategorie {
            display: inline-block;
            padding: 0.2rem 0.5rem;
            background: var(--bg-tertiary);
            border-radius: 4px;
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: var(--text-muted);
        }
        
        /* ===== TEAMS SHARE MODAL - Dark Glassmorphism ===== */
        .teams-modal-overlay {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0,0,0,0.6);
            backdrop-filter: blur(4px);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 10000;
            animation: teamsFadeIn 0.2s ease;
        }
        
        .teams-modal-overlay.active {
            display: flex;
        }
        
        @keyframes teamsFadeIn {
            from { opacity: 0; }
            to { opacity: 1; }
        }
        
        .teams-modal {
            background: linear-gradient(180deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
            backdrop-filter: blur(20px);
            border: 1px solid rgba(255,255,255,0.1);
            box-shadow: 
                0 25px 60px rgba(0,0,0,0.5),
                inset 0 1px 0 rgba(255,255,255,0.1);
            border-radius: 20px;
            width: 480px;
            max-width: 95%;
            max-height: 90vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            animation: teamsSlideUp 0.3s ease;
        }
        
        @keyframes teamsSlideUp {
            from { transform: translateY(20px); opacity: 0; }
            to { transform: translateY(0); opacity: 1; }
        }
        
        .teams-modal-header {
            padding: 1.25rem 1.5rem;
            border-bottom: 1px solid rgba(255,255,255,0.1);
            display: flex;
            align-items: center;
            justify-content: space-between;
        }
        
        .teams-modal-title {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            color: white;
            font-weight: 600;
            font-size: 1rem;
        }
        
        .teams-modal-title .icon-wrap {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #5b5fc7 0%, #7b83eb 100%);
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .teams-modal-title svg {
            width: 20px;
            height: 20px;
        }
        
        .teams-modal-close {
            background: rgba(255,255,255,0.1);
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            color: rgba(255,255,255,0.6);
            cursor: pointer;
            font-size: 1.25rem;
            transition: all 0.2s;
        }
        
        .teams-modal-close:hover {
            background: rgba(255,255,255,0.2);
            color: white;
        }
        
        .teams-search-section {
            padding: 1rem 1.5rem;
        }
        
        .teams-search-box {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            background: rgba(255,255,255,0.05);
            padding: 0.75rem 1rem;
            border-radius: 12px;
            border: 1px solid rgba(255,255,255,0.1);
            transition: all 0.2s;
        }
        
        .teams-search-box:focus-within {
            outline-color: #5b5fc7;
            background: rgba(255,255,255,0.08);
        }
        
        .teams-search-box input {
            border: none;
            background: transparent;
            flex: 1;
            font-size: 0.9rem;
            outline: none;
            color: white;
        }
        
        .teams-search-box input::placeholder {
            color: rgba(255,255,255,0.4);
        }
        
        .teams-search-box svg {
            color: rgba(255,255,255,0.4);
            width: 18px;
            height: 18px;
            flex-shrink: 0;
        }
        
        .teams-section-title {
            padding: 0.75rem 1.5rem;
            font-size: 0.7rem;
            font-weight: 600;
            color: rgba(255,255,255,0.4);
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        
        .teams-contact-list {
            max-height: 320px;
            overflow-y: auto;
            flex: 1;
        }
        
        .teams-contact-list::-webkit-scrollbar {
            width: 6px;
        }
        
        .teams-contact-list::-webkit-scrollbar-track {
            background: rgba(255,255,255,0.05);
        }
        
        .teams-contact-list::-webkit-scrollbar-thumb {
            background: rgba(255,255,255,0.2);
            border-radius: 3px;
        }
        
        .teams-contact {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1.5rem;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .teams-contact:hover {
            background: rgba(255,255,255,0.05);
        }
        
        .teams-contact.selected {
            background: rgba(91, 95, 199, 0.2);
        }
        
        .teams-contact-check {
            width: 20px;
            height: 20px;
            border: 2px solid rgba(255,255,255,0.2);
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            transition: all 0.15s;
        }
        
        .teams-contact.selected .teams-contact-check {
            background: linear-gradient(135deg, #5b5fc7 0%, #7b83eb 100%);
            outline-color: transparent;
        }
        
        .teams-contact-check svg {
            width: 12px;
            height: 12px;
            stroke: white;
            stroke-width: 3;
            opacity: 0;
            transition: opacity 0.15s;
        }
        
        .teams-contact.selected .teams-contact-check svg {
            opacity: 1;
        }
        
        .teams-avatar {
            width: 40px;
            height: 40px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 600;
            font-size: 0.85rem;
            color: white;
            flex-shrink: 0;
        }
        
        .teams-avatar.blue { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
        .teams-avatar.purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
        .teams-avatar.green { background: linear-gradient(135deg, #10b981, #059669); }
        .teams-avatar.orange { background: linear-gradient(135deg, #f59e0b, #d97706); }
        .teams-avatar.pink { background: linear-gradient(135deg, #ec4899, #db2777); }
        .teams-avatar.cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
        .teams-avatar.red { background: linear-gradient(135deg, #ef4444, #dc2626); }
        
        .teams-contact-info {
            flex: 1;
            min-width: 0;
        }
        
        .teams-contact-name {
            font-weight: 600;
            color: white;
            font-size: 0.9rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .teams-status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            flex-shrink: 0;
        }
        
        .teams-status-dot.online { background: #10b981; }
        .teams-status-dot.away { background: #f59e0b; }
        .teams-status-dot.busy { background: #ef4444; }
        .teams-status-dot.offline { background: #64748b; }
        
        .teams-contact-subtitle {
            font-size: 0.8rem;
            color: rgba(255,255,255,0.5);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .teams-member-count {
            font-size: 0.75rem;
            color: rgba(255,255,255,0.4);
            background: rgba(255,255,255,0.1);
            padding: 0.2rem 0.5rem;
            border-radius: 10px;
            flex-shrink: 0;
        }
        
        .teams-message-section {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.1);
        }
        
        .teams-message-label {
            font-size: 0.8rem;
            font-weight: 600;
            color: rgba(255,255,255,0.6);
            margin-bottom: 0.5rem;
        }
        
        .teams-message-textarea {
            width: 100%;
            padding: 0.75rem;
            border: 1px solid rgba(255,255,255,0.1);
            border-radius: 10px;
            font-size: 0.9rem;
            resize: none;
            height: 70px;
            font-family: inherit;
            background: rgba(255,255,255,0.05);
            color: white;
            transition: all 0.2s;
        }
        
        .teams-message-textarea:focus {
            outline: none;
            outline-color: #5b5fc7;
        }
        
        .teams-message-textarea::placeholder {
            color: rgba(255,255,255,0.3);
        }
        
        .teams-modal-footer {
            padding: 1rem 1.5rem;
            border-top: 1px solid rgba(255,255,255,0.1);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        
        .teams-selected-count {
            font-size: 0.85rem;
            color: rgba(255,255,255,0.6);
        }
        
        .teams-selected-count strong {
            color: #7b83eb;
        }
        
        .teams-btn {
            padding: 0.65rem 1.25rem;
            border-radius: 10px;
            font-size: 0.85rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.2s;
        }
        
        .teams-btn-secondary {
            background: rgba(255,255,255,0.1);
            color: rgba(255,255,255,0.8);
        }
        
        .teams-btn-secondary:hover {
            background: rgba(255,255,255,0.15);
        }
        
        .teams-btn-primary {
            background: linear-gradient(135deg, #5b5fc7 0%, #7b83eb 100%);
            color: white;
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .teams-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 20px rgba(91, 95, 199, 0.5);
        }
        
        .teams-btn-primary:disabled {
            opacity: 0.5;
            cursor: not-allowed;
            transform: none;
            box-shadow: none;
        }
        
        .teams-group-header {
            padding: 0.5rem 1.5rem;
            font-size: 0.7rem;
            font-weight: 600;
            color: rgba(255,255,255,0.3);
            text-transform: uppercase;
            letter-spacing: 1px;
            background: rgba(0,0,0,0.2);
            border-top: 1px solid rgba(255,255,255,0.05);
        }
        
        .teams-no-results {
            padding: 2rem 1.5rem;
            text-align: center;
            color: rgba(255,255,255,0.4);
        }
        
        .teams-no-results svg {
            width: 48px;
            height: 48px;
            margin-bottom: 0.75rem;
            opacity: 0.5;
        }
        
        /* Teams Button Style */
        .action-btn-modern.teams {
            background: linear-gradient(135deg, #5b5fc7 0%, #7b83eb 100%);
            color: white;
            border: none;
        }
        
        .action-btn-modern.teams:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 15px rgba(91, 95, 199, 0.4);
        }
        
        /* Teams Preview Section */
        .teams-preview-toggle {
            padding: 0.75rem 1.5rem;
            background: rgba(0,0,0,0.2);
            border-top: 1px solid rgba(255,255,255,0.1);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: space-between;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.6);
            font-weight: 500;
            transition: all 0.2s;
        }
        
        .teams-preview-toggle:hover {
            background: rgba(0,0,0,0.3);
            color: rgba(255,255,255,0.8);
        }
        
        .teams-preview-toggle .arrow {
            transition: transform 0.2s;
        }
        
        .teams-preview-toggle.open .arrow {
            transform: rotate(180deg);
        }
        
        .teams-preview-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.3s ease;
            background: rgba(0,0,0,0.2);
        }
        
        .teams-preview-content.open {
            max-height: 500px;
        }
        
        .teams-preview-inner {
            padding: 1rem 1.5rem;
        }
        
        .teams-card-preview {
            background: white;
            border-radius: 8px;
            border-left: 4px solid #5b5fc7;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
        }
        
        .teams-card-header {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.75rem 1rem;
            border-bottom: 1px solid #e5e7eb;
            background: #f9fafb;
        }
        
        .teams-card-logo {
            width: 36px;
            height: 36px;
            background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
            border-radius: 8px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: 800;
            font-size: 0.75rem;
            color: white;
        }
        
        .teams-card-title-wrap {
            flex: 1;
        }
        
        .teams-card-title {
            font-weight: 700;
            color: #1e293b;
            font-size: 0.9rem;
        }
        
        .teams-card-subtitle {
            font-size: 0.75rem;
            color: #64748b;
        }
        
        .teams-card-body {
            padding: 0.75rem 1rem;
        }
        
        .teams-card-message {
            padding: 0.5rem 0.75rem;
            background: #f1f5f9;
            border-radius: 6px;
            margin-bottom: 0.75rem;
            font-size: 0.85rem;
            color: #334155;
            font-style: italic;
        }
        
        .teams-card-row {
            display: flex;
            padding: 0.35rem 0;
            font-size: 0.8rem;
            border-bottom: 1px solid #f1f5f9;
        }
        
        .teams-card-row:last-child {
            border-bottom: none;
        }
        
        .teams-card-label {
            width: 110px;
            color: #64748b;
            font-weight: 500;
            flex-shrink: 0;
        }
        
        .teams-card-value {
            flex: 1;
            color: #1e293b;
        }
        
        .teams-card-footer {
            display: flex;
            gap: 0.5rem;
            padding: 0.75rem 1rem;
            background: #f9fafb;
            border-top: 1px solid #e5e7eb;
        }
        
        .teams-card-btn {
            padding: 0.4rem 0.75rem;
            border-radius: 4px;
            font-size: 0.75rem;
            font-weight: 600;
            cursor: pointer;
            border: none;
            transition: all 0.15s;
        }
        
        .teams-card-btn.primary {
            background: #5b5fc7;
            color: white;
        }
        
        .teams-card-btn.secondary {
            background: #e5e7eb;
            color: #374151;
        }
        
        .teams-preview-note {
            margin-top: 0.75rem;
            font-size: 0.75rem;
            color: rgba(255,255,255,0.4);
            text-align: center;
        }
        
        .teams-multi-card-info {
            background: rgba(91, 95, 199, 0.2);
            border: 1px solid rgba(91, 95, 199, 0.3);
            border-radius: 8px;
            padding: 0.75rem 1rem;
            margin-bottom: 0.75rem;
            display: flex;
            align-items: center;
            gap: 0.75rem;
            font-size: 0.85rem;
            color: rgba(255,255,255,0.8);
        }
        
        .teams-multi-card-info svg {
            width: 20px;
            height: 20px;
            color: #7b83eb;
            flex-shrink: 0;
        }
        
        /* ===== COLLAPSIBLE ARTIKEL ACCORDION ===== */
        .artikel-accordion {
            border: 1px solid var(--border);
            border-radius: 12px;
            overflow: hidden;
            background: var(--bg-primary);
        }
        
        .artikel-manufacturer-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 1rem 1.25rem;
            background: var(--bg-secondary);
            border-bottom: 1px solid var(--border);
            cursor: pointer;
            transition: all 0.2s ease;
            user-select: none;
        }
        
        .artikel-manufacturer-header:hover {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(147, 51, 234, 0.08));
        }
        
        .artikel-manufacturer-header.active {
            background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(147, 51, 234, 0.12));
            border-left: 4px solid #3b82f6;
        }
        
        .artikel-manufacturer-header:last-child {
            border-bottom: none;
        }
        
        .artikel-manufacturer-info {
            display: flex;
            align-items: center;
            gap: 1rem;
        }
        
        .artikel-manufacturer-icon {
            width: 42px;
            height: 42px;
            border-radius: 10px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.25rem;
            font-weight: 700;
            color: white;
            text-transform: uppercase;
            flex-shrink: 0;
        }
        
        .artikel-manufacturer-name {
            font-weight: 600;
            font-size: 1rem;
            color: var(--text-primary);
        }
        
        .artikel-manufacturer-count {
            font-size: 0.8rem;
            color: var(--text-muted);
            margin-top: 2px;
        }
        
        .artikel-manufacturer-badge {
            display: flex;
            align-items: center;
            gap: 0.5rem;
        }
        
        .artikel-count-badge {
            background: linear-gradient(135deg, #3b82f6, #8b5cf6);
            color: white;
            padding: 0.35rem 0.75rem;
            border-radius: 20px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        
        .artikel-chevron {
            width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: transform 0.3s ease;
            color: var(--text-muted);
        }
        
        .artikel-manufacturer-header.active .artikel-chevron {
            transform: rotate(180deg);
            color: #3b82f6;
        }
        
        .artikel-manufacturer-content {
            max-height: 0;
            overflow: hidden;
            transition: max-height 0.35s ease-out, opacity 0.25s ease;
            opacity: 0;
            background: var(--bg-primary);
        }
        
        .artikel-manufacturer-content.open {
            max-height: 5000px;
            opacity: 1;
            transition: max-height 0.5s ease-in, opacity 0.25s ease;
        }
        
        .artikel-table-wrapper {
            overflow-x: auto;
            border-top: 1px solid var(--border);
        }
        
        .artikel-inner-table {
            width: 100%;
            border-collapse: collapse;
            font-size: 0.85rem;
        }
        
        .artikel-inner-table thead {
            background: linear-gradient(180deg, var(--bg-secondary), rgba(59, 130, 246, 0.05));
            position: sticky;
            top: 0;
            z-index: 5;
        }
        
        .artikel-inner-table th {
            padding: 0.65rem 0.75rem;
            text-align: left;
            font-weight: 600;
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.025em;
            color: var(--text-muted);
            border-bottom: 2px solid var(--border);
            white-space: nowrap;
        }
        
        .artikel-inner-table tbody tr {
            border-bottom: 1px solid var(--border);
            transition: all 0.15s ease;
        }
        
        .artikel-inner-table tbody tr:hover {
            background: rgba(59, 130, 246, 0.04);
        }
        
        .artikel-inner-table tbody tr:last-child {
            border-bottom: none;
        }
        
        .artikel-inner-table td {
            padding: 0.65rem 0.75rem;
            vertical-align: middle;
        }
        
        .artikel-cell-code {
            font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
            font-size: 0.75rem;
            padding: 0.2rem 0.45rem;
            border-radius: 4px;
            display: inline-block;
        }
        
        .artikel-cell-code.pruef { background: #f3f4f6; color: #4b5563; }
        .artikel-cell-code.rep { background: #eff6ff; color: #2563eb; }
        .artikel-cell-code.klein { background: #ecfdf5; color: #059669; }
        .artikel-cell-code.gross { background: #fef2f2; color: #dc2626; }
        .artikel-cell-code.gewaehr { background: #f5f3ff; color: #7c3aed; }
        .artikel-cell-code.garantie { background: #fef3c7; color: #92400e; }
        .artikel-cell-code.dtv { background: #f0fdf4; color: #166534; }
        .artikel-cell-code.routing { background: #e0e7ff; color: #4338ca; font-weight: 600; }
        
        .artikel-action-btn {
            padding: 0.35rem;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s ease;
            display: inline-flex;
            align-items: center;
            justify-content: center;
        }
        
        .artikel-action-btn:hover {
            background: #ede9fe;
            outline-color: #a78bfa;
            transform: translateY(-1px);
        }
        
        .artikel-action-btn.delete:hover {
            background: #fef2f2;
            outline-color: #fca5a5;
        }
        
        .artikel-loading-spinner {
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
            gap: 0.75rem;
            color: var(--text-muted);
        }
        
        .artikel-loading-spinner .spinner {
            width: 24px;
            height: 24px;
            border: 3px solid var(--border);
            border-top-color: #3b82f6;
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
        }
        
        @keyframes spin {
            to { transform: rotate(360deg); }
        }
        
        .artikel-empty-state {
            padding: 3rem;
            text-align: center;
            color: var(--text-muted);
        }
        
        .artikel-empty-state-icon {
            font-size: 3rem;
            margin-bottom: 1rem;
        }
        
        /* Responsive */
        @media (max-width: 768px) {
            .artikel-manufacturer-header {
                padding: 0.85rem 1rem;
            }
            
            .artikel-manufacturer-icon {
                width: 36px;
                height: 36px;
                font-size: 1rem;
            }
            
            .artikel-manufacturer-name {
                font-size: 0.9rem;
            }
            
            .artikel-inner-table {
                font-size: 0.75rem;
            }
            
            .artikel-inner-table th,
            .artikel-inner-table td {
                padding: 0.5rem;
            }
        }
        
        /* =====================================================
           STAMMDATEN MODULE STYLES
           ===================================================== */
        .sm-subtab {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.5rem 1rem;
            border: none;
            background: transparent;
            border-radius: 8px;
            cursor: pointer;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-muted);
            transition: all 0.15s;
        }
        .sm-subtab:hover {
            background: var(--bg-hover);
            color: var(--text-primary);
        }
        .sm-subtab.active {
            background: white;
            color: var(--text-primary);
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }
        .sm-count {
            background: var(--bg-secondary);
            padding: 0.125rem 0.5rem;
            border-radius: 10px;
            font-size: 0.75rem;
            font-weight: 600;
        }
        .sm-subtab.active .sm-count {
            background: var(--primary);
            color: white;
        }
        .sm-content {
            display: none;
        }
        .sm-content.active {
            display: block;
        }
        .sm-filter-btn {
            padding: 0.375rem 0.75rem;
            border: none;
            background: transparent;
            border-radius: 6px;
            cursor: pointer;
            font-size: 0.8rem;
            color: var(--text-muted);
            transition: all 0.15s;
        }
        .sm-filter-btn:hover {
            background: var(--bg-hover);
        }
        .sm-filter-btn.active {
            background: var(--primary);
            color: white;
        }
        .sm-group {
            border-bottom: 1px solid var(--border);
        }
        .sm-group-header {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            padding: 0.625rem 0.75rem;
            cursor: pointer;
            font-weight: 600;
            font-size: 0.875rem;
            background: var(--bg-secondary);
            transition: background 0.15s;
        }
        .sm-group-header:hover {
            background: var(--bg-hover);
        }
        .sm-group-header svg {
            transition: transform 0.2s;
        }
        .sm-group.open .sm-group-header svg {
            transform: rotate(90deg);
        }
        .sm-group-items {
            display: none;
        }
        .sm-group.open .sm-group-items {
            display: block;
        }
        .sm-artikel-item {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            padding: 0.5rem 0.75rem 0.5rem 2rem;
            cursor: pointer;
            border-bottom: 1px solid var(--border-light);
            transition: background 0.15s;
        }
        .sm-artikel-item:hover {
            background: var(--bg-hover);
        }
        .sm-artikel-item.active {
            background: var(--primary-light);
            border-left: 3px solid var(--primary);
        }
        .sm-dl-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 1.25rem;
            transition: all 0.15s;
        }
        .sm-dl-card:hover {
            border-color: var(--primary);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
        }

/* ============================================
   STAPEL-SCAN FRONTEND - CSS
   Version: 1.0.0
   ============================================ */

/* Dokument Badge in Job-Liste */
.doc-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.doc-badge:hover {
    background: #f1f5f9;
}

.doc-badge svg {
    width: 18px;
    height: 18px;
}

/* Nur bei vorhandenem Dokument: Badge + schwarzer Punkt */
.doc-badge.has-doc {
    background: #f1f5f9;
    color: #475569;
}

.doc-badge.has-doc:hover {
    background: #e2e8f0;
    transform: scale(1.05);
}

.doc-badge.has-doc::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #1e293b;
    border-radius: 50%;
    border: 2px solid white;
}

.doc-badge.no-doc {
    background: transparent;
    color: #cbd5e1;
    cursor: default;
}

.doc-badge.no-doc:hover {
    transform: none;
}

.doc-cell {
    text-align: center;
    width: 50px;
}

/* Dokument Panel (Sidebar) */
.document-panel {
    position: fixed;
    top: 0;
    right: -420px;
    width: 400px;
    height: 100vh;
    background: white;
    box-shadow: -4px 0 24px rgba(0,0,0,0.15);
    z-index: 1000;
    transition: right 0.3s ease;
    display: flex;
    flex-direction: column;
}

.document-panel.open {
    right: 0;
}

.document-panel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.3);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.document-panel-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.doc-panel-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.doc-panel-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.doc-panel-header p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.25rem 0 0 0;
}

.doc-panel-close {
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    transition: all 0.2s;
}

.doc-panel-close:hover {
    background: #e2e8f0;
    color: #334155;
}

.doc-panel-content {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
}

.document-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.document-preview {
    aspect-ratio: 16/10;
    background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.document-preview-placeholder {
    text-align: center;
}

.document-preview-placeholder svg {
    width: 48px;
    height: 48px;
    color: #ef4444;
    margin-bottom: 0.5rem;
}

.document-preview-placeholder span {
    display: block;
    font-size: 0.75rem;
    color: #64748b;
}

.document-badge-new {
    position: absolute;
    top: 8px;
    right: 8px;
    padding: 0.25rem 0.625rem;
    background: #10b981;
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    border-radius: 9999px;
}

.document-info {
    padding: 1rem;
}

.document-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.25rem 0;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #64748b;
    margin-bottom: 1rem;
}

.document-meta svg {
    width: 14px;
    height: 14px;
}

.document-pages {
    padding: 0.25rem 0.5rem;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.7rem;
    border-radius: 4px;
    margin-left: auto;
}

.document-actions {
    display: flex;
    gap: 0.5rem;
}

.doc-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.doc-btn svg {
    width: 16px;
    height: 16px;
}

.doc-btn-primary {
    background: #0f172a;
    color: white;
}

.doc-btn-primary:hover {
    background: #1e293b;
}

.doc-btn-secondary {
    background: white;
    color: #334155;
    border: 1px solid #d1d5db;
}

.doc-btn-secondary:hover {
    background: #f8fafc;
}

.doc-btn-share {
    flex: 0;
    padding: 0.625rem;
    background: #3b82f6;
    color: white;
}

.doc-btn-share:hover {
    background: #2563eb;
}

.doc-info-box {
    margin-top: 1rem;
    padding: 1rem;
    background: #eff6ff;
    border-radius: 10px;
    border: 1px solid #bfdbfe;
}

.doc-info-box h5 {
    font-size: 0.85rem;
    font-weight: 600;
    color: #1e40af;
    margin: 0 0 0.25rem 0;
}

.doc-info-box p {
    font-size: 0.8rem;
    color: #1e40af;
    margin: 0;
    line-height: 1.5;
}

.doc-empty-state h5 {
    font-size: 0.8rem;
    font-weight: 600;
    color: #64748b;
    margin: 0 0 0.75rem 0;
}

.doc-empty-placeholder {
    border: 2px dashed #e2e8f0;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
}

.doc-empty-placeholder svg {
    width: 32px;
    height: 32px;
    color: #cbd5e1;
    margin-bottom: 0.5rem;
}

.doc-empty-placeholder p {
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

/* Share Dialog */
.share-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 1100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
}

.share-dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.share-dialog {
    background: white;
    border-radius: 16px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.share-dialog-overlay.visible .share-dialog {
    transform: scale(1);
}

.share-dialog-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.875rem;
}

.share-dialog-icon {
    width: 44px;
    height: 44px;
    background: #eff6ff;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #3b82f6;
}

.share-dialog-icon svg {
    width: 22px;
    height: 22px;
}

.share-dialog-title h3 {
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0;
}

.share-dialog-title p {
    font-size: 0.8rem;
    color: #64748b;
    margin: 0.125rem 0 0 0;
}

.share-dialog-close {
    margin-left: auto;
    width: 36px;
    height: 36px;
    border: none;
    background: #f1f5f9;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #94a3b8;
    transition: all 0.2s;
}

.share-dialog-close:hover {
    background: #e2e8f0;
    color: #475569;
}

.share-method-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.share-method-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    background: #f1f5f9;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    transition: all 0.2s;
}

.share-method-tab svg {
    width: 18px;
    height: 18px;
}

.share-method-tab.active {
    background: #3b82f6;
    color: white;
    box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.share-method-tab.active.teams {
    background: #7c3aed;
    box-shadow: 0 4px 12px rgba(124,58,237,0.3);
}

.share-dialog-body {
    padding: 1.5rem;
}

.share-form-group {
    margin-bottom: 1rem;
}

.share-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
}

.share-form-group input,
.share-form-group textarea,
.share-form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all 0.2s;
}

.share-form-group input:focus,
.share-form-group textarea:focus,
.share-form-group select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1);
}

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

.share-quick-recipients {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.share-quick-btn {
    padding: 0.375rem 0.75rem;
    background: #f1f5f9;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.share-quick-btn:hover {
    background: #e2e8f0;
}

.share-teams-info {
    padding: 1rem;
    background: #f5f3ff;
    border-radius: 10px;
    border: 1px solid #ddd6fe;
}

.share-teams-info p {
    font-size: 0.85rem;
    color: #5b21b6;
    margin: 0;
}

.share-dialog-footer {
    display: flex;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.25rem;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}

.share-cancel-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s;
}

.share-cancel-btn:hover {
    background: #f8fafc;
}

.share-send-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: #3b82f6;
    border: none;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 600;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
}

.share-send-btn:hover {
    background: #2563eb;
}

.share-send-btn.teams {
    background: #7c3aed;
}

.share-send-btn.teams:hover {
    background: #6d28d9;
}

.share-send-btn svg {
    width: 16px;
    height: 16px;
}

.share-success {
    padding: 3rem 2rem;
    text-align: center;
}

.share-success-icon {
    width: 64px;
    height: 64px;
    background: #ecfdf5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.share-success-icon svg {
    width: 32px;
    height: 32px;
    color: #10b981;
}

.share-success h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
    margin: 0 0 0.375rem 0;
}

.share-success p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

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

.doc-badge.new-doc {
    animation: docBadgePulse 2s ease-in-out infinite;
}

@media (max-width: 768px) {
    .document-panel {
        width: 100%;
        right: -100%;
    }
    .share-dialog {
        max-width: 100%;
        margin: 1rem;
        border-radius: 12px;
    }
}

/* ============================================
   FEIG WORKFLOW CSS
   Integration für RepCenter v3.0.14
   ============================================ */

/* FEIG Section Styling */
.feig-workflow-section {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 2px solid #93c5fd;
    border-radius: 12px;
    margin-top: 1rem;
    overflow: hidden;
}

.feig-workflow-section .section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.7);
    border-bottom: 1px solid #93c5fd;
}

.feig-workflow-section .section-body {
    padding: 18px;
}

/* Badges */
.badge-sz {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.badge-feig {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Werkstatt Row Layout */
.werkstatt-row {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 16px;
}

@media (max-width: 900px) {
    .werkstatt-row {
        grid-template-columns: 1fr;
    }
}

/* Schnellauswahl Panel */
.schnellauswahl-panel {
    background: white;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    overflow: hidden;
}

.schnellauswahl-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}

.schnellauswahl-header .counter {
    margin-left: auto;
    background: #e2e8f0;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
}

.schnellauswahl-header .drag-hint {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 400;
}

/* Checkbox Grid */
.checkbox-grid {
    padding: 8px;
    max-height: 250px;
    overflow-y: auto;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s;
    user-select: none;
}

.checkbox-item:hover {
    background: #f1f5f9;
}

.checkbox-item.checked {
    background: #dcfce7;
}

.checkbox-item.checked .checkbox-visual {
    background: #22c55e;
    border-color: #22c55e;
}

.checkbox-item.checked .checkbox-visual svg {
    opacity: 1;
}

.checkbox-item .drag-handle {
    color: #cbd5e1;
    cursor: grab;
    font-size: 14px;
}

.checkbox-item .nummer {
    width: 18px;
    height: 18px;
    background: #e2e8f0;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #64748b;
}

.checkbox-item.checked .nummer {
    background: #166534;
    color: white;
}

.checkbox-visual {
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.checkbox-visual svg {
    width: 12px;
    height: 12px;
    stroke: white;
    opacity: 0;
    transition: opacity 0.15s;
}

.checkbox-label {
    font-size: 12px;
    color: #374151;
    flex: 1;
}

.checkbox-item.dragging {
    opacity: 0.5;
    background: #dbeafe;
}

/* Diagnose Ergebnis Box */
.diagnose-ergebnis-box {
    margin-top: 20px;
    padding: 16px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 2px solid #fcd34d;
    border-radius: 12px;
}

.diagnose-ergebnis-box .box-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-weight: 700;
    color: #92400e;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Radio Options */
.diagnose-option,
.feig-ergebnis-option {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: white;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}

.diagnose-option:hover,
.feig-ergebnis-option:hover {
    border-color: #9ca3af;
}

.diagnose-option.selected,
.feig-ergebnis-option.selected {
    border-color: #22c55e;
    background: #f0fdf4;
}

.diagnose-option.selected.feig-selected {
    border-color: #3b82f6;
    background: #eff6ff;
}

.feig-ergebnis-option.selected.wto-selected {
    border-color: #dc2626;
    background: #fef2f2;
}

.radio-visual {
    width: 22px;
    height: 22px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    flex-shrink: 0;
}

.radio-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    opacity: 0;
    transition: all 0.2s;
}

.diagnose-option.selected .radio-visual,
.feig-ergebnis-option.selected .radio-visual {
    border-color: #22c55e;
}

.diagnose-option.selected .radio-dot {
    opacity: 1;
    background: #22c55e;
}

.diagnose-option.selected.feig-selected .radio-visual {
    border-color: #3b82f6;
}

.diagnose-option.selected.feig-selected .radio-dot {
    background: #3b82f6;
}

.feig-ergebnis-option.selected .radio-dot {
    opacity: 1;
    background: #22c55e;
}

.feig-ergebnis-option.selected.wto-selected .radio-visual {
    border-color: #dc2626;
}

.feig-ergebnis-option.selected.wto-selected .radio-dot {
    background: #dc2626;
}

/* WTO Details Section */
.wto-details-section {
    margin-top: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    border: 2px solid #fca5a5;
    border-radius: 12px;
    animation: slideDown 0.3s ease;
}

.wto-details-section .wto-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.wto-details-section .wto-icon {
    width: 36px;
    height: 36px;
    background: #dc2626;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wto-details-section .wto-icon svg {
    stroke: white;
}

/* Re-Integration Hint */
.reintegration-hint {
    margin-top: 20px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
    border: 2px solid #fcd34d;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideDown 0.3s ease;
}

/* Versand Check Section */
.versand-check-section {
    margin-top: 20px;
    padding: 18px;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #86efac;
    border-radius: 12px;
}

.versand-check-section .check-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-weight: 700;
    color: #166534;
    font-size: 13px;
}

.versand-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
}

.versand-check-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    background: white;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s;
}

.versand-check-item:hover {
    border-color: #86efac;
}

.versand-check-item.checked {
    background: #dcfce7;
    border-color: #22c55e;
}

.versand-check-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #22c55e;
}

.versand-check-item label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
}

/* Animation */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* FEIG-Only Visibility */
.feig-only-section {
    display: none;
}

.feig-only-section.visible {
    display: block;
}

/* Form Textarea in FEIG sections */
.feig-workflow-section .form-textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 13px;
    resize: vertical;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.feig-workflow-section .form-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Status indicator for FEIG workflow */
.feig-status-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.feig-status-indicator.pending {
    background: #fef3c7;
    color: #d97706;
}

.feig-status-indicator.at-feig {
    background: #dbeafe;
    color: #2563eb;
}

.feig-status-indicator.returned {
    background: #dcfce7;
    color: #16a34a;
}

.feig-status-indicator.wto {
    background: #fee2e2;
    color: #dc2626;
}

/* ============================================================
   AUFTRAG BEARBEITEN - Clean Design v2
   ============================================================ */
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body {
            font-family: system-ui, -apple-system, sans-serif;
            background: #f1f5f9;
            padding: 20px;
            color: #1e293b;
        }
        
        .container {
            max-width: 900px;
            margin: 0 auto;
        }
        
        /* ========================================
           FORM CARD
           ======================================== */
        .form-card {
            background: white;
            border-radius: 16px;
            box-shadow: 0 4px 20px rgba(0,0,0,0.06);
            border: 1px solid #e2e8f0;
            overflow: visible;
        }
        
        /* ========================================
           HEADER
           ======================================== */
        .form-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 16px 24px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .header-left {
            display: flex;
            align-items: center;
            gap: 16px;
        }
        
        .back-btn {
            width: 36px;
            height: 36px;
            border-radius: 8px;
            border: 1px solid #e2e8f0;
            background: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #64748b;
            transition: all 0.2s;
        }
        
        .back-btn:hover {
            background: #f1f5f9;
            color: #1e293b;
        }
        
        .header-info h1 {
            font-size: 18px;
            font-weight: 700;
            color: #1e293b;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        
        .rma-badge {
            background: #1e40af;
            color: white;
            padding: 4px 12px;
            border-radius: 6px;
            font-size: 14px;
            font-family: monospace;
            font-weight: 700;
        }
        
        .header-meta {
            font-size: 12px;
            color: #64748b;
            margin-top: 2px;
        }
        
        .save-btn {
            padding: 10px 24px;
            background: #10b981;
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            gap: 8px;
            transition: all 0.2s;
        }
        
        .save-btn:hover {
            background: #059669;
        }
        
        /* ========================================
           INFO BAR (Read-only)
           ======================================== */
        .info-bar {
            display: flex;
            align-items: center;
            gap: 24px;
            padding: 12px 24px;
            background: #fafafa;
            border-bottom: 1px solid #e2e8f0;
            font-size: 13px;
            flex-wrap: wrap;
        }
        
        .info-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }
        
        .info-item svg {
            width: 14px;
            height: 14px;
            color: #94a3b8;
        }
        
        .info-label {
            color: #64748b;
        }
        
        .info-value {
            font-weight: 600;
            color: #1e293b;
        }
        
        .info-divider {
            width: 1px;
            height: 20px;
            background: #e2e8f0;
        }
        
        /* ========================================
           CONTENT
           ======================================== */
        .form-content {
            padding: 24px;
        }
        
        /* ========================================
           SECTION
           ======================================== */
        .section {
            background: #fafafa;
            border: 1px solid #e2e8f0;
            border-radius: 12px;
            margin-bottom: 20px;
            overflow: visible;
        }
        
        .section:last-child {
            margin-bottom: 0;
        }
        
        .section-header {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 14px 18px;
            background: white;
            border-bottom: 1px solid #e2e8f0;
        }
        
        .section-icon {
            width: 28px;
            height: 28px;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        
        .section-icon.green { background: #dcfce7; color: #16a34a; }
        .section-icon.blue { background: #dbeafe; color: #2563eb; }
        .section-icon.amber { background: #fef3c7; color: #d97706; }
        .section-icon.purple { background: #ede9fe; color: #7c3aed; }
        
        .section-title {
            font-size: 13px;
            font-weight: 700;
            color: #374151;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        
        .section-body {
            padding: 18px;
            overflow: visible;
        }
        
        /* ========================================
           FORM GRID
           ======================================== */
        .form-row {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
            margin-bottom: 16px;
            overflow: visible;
        }
        
        .form-row:last-child {
            margin-bottom: 0;
        }
        
        .form-row.two-cols {
            grid-template-columns: repeat(2, 1fr);
        }
        
        .form-row.four-cols {
            grid-template-columns: repeat(4, 1fr);
        }
        
        .form-row.five-cols {
            grid-template-columns: repeat(5, 1fr);
        }
        
        .form-group {
            display: flex;
            flex-direction: column;
            gap: 6px;
            overflow: visible;
        }
        
        .form-group.span-2 {
            grid-column: span 2;
        }
        
        .form-label {
            font-size: 11px;
            font-weight: 600;
            color: #64748b;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        
        .form-label .required {
            color: #ef4444;
        }
        
        .form-input,
        .form-select {
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            color: #1e293b;
            background: white;
            transition: all 0.15s;
        }
        
        .form-input:focus,
        .form-select:focus {
            outline: none;
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }
        
        .form-input.mono {
            font-family: 'Consolas', 'Monaco', monospace;
        }
        
        .form-input.readonly,
        .form-input:disabled {
            background: #f3f4f6;
            color: #6b7280;
            cursor: not-allowed;
            border-color: #e5e7eb;
            pointer-events: none;
            user-select: none;
        }
        
        .form-input.readonly:focus,
        .form-input:disabled:focus {
            border-color: #e5e7eb;
            box-shadow: none;
        }
        
        /* Validation Error Styling */
        .validation-error {
            border-color: #ef4444 !important;
            background-color: #fef2f2 !important;
            animation: shake 0.3s ease;
        }
        
        .validation-error:focus {
            border-color: #ef4444 !important;
            box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
        }
        
        @keyframes shake {
            0%, 100% { transform: translateX(0); }
            25% { transform: translateX(-4px); }
            75% { transform: translateX(4px); }
        }
        
        .form-textarea {
            padding: 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            color: #1e293b;
            background: white;
            resize: vertical;
            min-height: 100px;
            transition: all 0.15s;
        }
        
        .form-textarea:focus {
            outline: none;
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
        }
        
        /* ========================================
           STATUS SELECT
           ======================================== */
        .status-select {
            font-weight: 600;
            padding: 10px 12px;
        }
        
        .status-select.offen { background: #3b82f6; border-color: #2563eb; color: #ffffff; }
        .status-select.bearbeitung { background: #FF7F00; border-color: #cc6600; color: #ffffff; }
        .status-select.erledigt { background: #d1fae5; border-color: #86efac; color: #15803d; }
        .status-select.verschickt { background: #e0e7ff; border-color: #a5b4fc; color: #4338ca; }
        .status-select.wto { background: #e74c3c; border-color: #c0392b; color: #ffffff; }
        
        /* ========================================
           STATUS DROPDOWN - Lucide Icons
           ======================================== */
        .status-dropdown-container {
            position: relative;
            z-index: 100;
        }
        
        .status-dropdown-trigger {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 14px;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            cursor: pointer;
            transition: all 0.15s;
            min-width: 200px;
        }
        
        .status-dropdown-trigger:hover {
            border-color: #10b981;
        }
        
        .status-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        
        .status-icon.offen, .item-icon.offen { color: #3b82f6; }
        .status-icon.bearbeitung, .item-icon.bearbeitung { color: #FF7F00; }
        .status-icon.erledigt, .item-icon.erledigt { color: #22c55e; }
        .status-icon.verschickt, .item-icon.verschickt { color: #8b5cf6; }
        .status-icon.wto, .item-icon.wto { color: #e74c3c; }
        
        .status-dropdown-trigger .status-label {
            flex: 1;
            font-size: 14px;
            font-weight: 500;
            color: #1e293b;
        }
        
        .status-dropdown-trigger .status-arrow {
            color: #94a3b8;
            transition: transform 0.2s;
        }
        
        .status-dropdown-trigger.open .status-arrow {
            transform: rotate(180deg);
        }
        
        .status-dropdown-menu {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            min-width: 250px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0,0,0,0.12);
            z-index: 9999;
            display: none;
            overflow: hidden;
        }
        
        .status-dropdown-menu.show {
            display: block;
            animation: dropdownFadeIn 0.15s ease;
        }
        
        @keyframes dropdownFadeIn {
            from { opacity: 0; transform: translateY(-8px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        @keyframes slideDown {
            from { opacity: 0; transform: translateY(-10px); }
            to { opacity: 1; transform: translateY(0); }
        }
        
        .status-dropdown-menu .status-item {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 12px 16px;
            cursor: pointer;
            transition: background 0.15s;
        }
        
        .status-dropdown-menu .status-item:hover {
            background: #f8fafc;
        }
        
        .status-dropdown-menu .status-item.selected {
            background: #f0fdf4;
        }
        
        .status-dropdown-menu .status-item .item-icon {
            width: 20px;
            height: 20px;
            flex-shrink: 0;
        }
        
        .status-dropdown-menu .status-item .item-label {
            flex: 1;
            font-size: 14px;
            font-weight: 500;
            color: #1e293b;
            white-space: nowrap;
        }
        
        .status-dropdown-menu .status-item .item-check {
            width: 18px;
            height: 18px;
            color: #10b981;
            opacity: 0;
        }
        
        .status-dropdown-menu .status-item.selected .item-check {
            opacity: 1;
        }
        
        .status-dropdown-menu .status-divider {
            height: 1px;
            background: #e2e8f0;
            margin: 4px 0;
        }
        
        
        
        /* ========================================
           TOGGLE BUTTONS
           ======================================== */
        .toggle-row {
            display: flex;
            gap: 6px;
        }
        
        .toggle-btn {
            flex: 1;
            padding: 10px 16px;
            border: 1px solid #d1d5db;
            background: white;
            font-size: 13px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.15s;
            color: #64748b;
        }
        
        .toggle-btn:first-child {
            border-radius: 8px 0 0 8px;
        }
        
        .toggle-btn:last-child {
            border-radius: 0 8px 8px 0;
        }
        
        .toggle-btn.active-yes {
            background: #22c55e;
            border-color: #22c55e;
            color: white;
        }
        
        .toggle-btn.active-no {
            background: #9ca3af;
            border-color: #9ca3af;
            color: white;
        }
        
        .toggle-btn:not(.active-yes):not(.active-no):hover {
            background: #f8fafc;
            border-color: #94a3b8;
        }
        
        /* ========================================
           MANUELLE EINGABE HIGHLIGHT
           ======================================== */
        .manual-input {
            background: #fffef5;
            border: 2px dashed #fcd34d !important;
            transition: all 0.3s ease;
        }
        
        .manual-input:focus {
            background: white;
            border-color: #f59e0b !important;
            box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
        }
        
        .manual-input.filled {
            background: white;
            border: 1px solid #d1d5db !important;
            border-style: solid !important;
        }
        
        .manual-input.filled:focus {
            border-color: #3b82f6 !important;
            box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
        }
        
        /* ========================================
           FEIG SECTION
           ======================================== */
        .feig-section {
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border-color: #93c5fd;
        }
        
        .feig-section .section-header {
            background: rgba(255,255,255,0.7);
            border-color: #93c5fd;
        }
        
        .badge-feig {
            margin-left: auto;
            padding: 4px 10px;
            background: #dbeafe;
            color: #1d4ed8;
            font-size: 11px;
            font-weight: 600;
            border-radius: 6px;
        }
        
        /* ========================================
           WERKSTATT ROW (Textarea + Checkboxen)
           ======================================== */
        .werkstatt-row {
            display: grid;
            grid-template-columns: 280px 1fr;
            gap: 16px;
        }
        
        @media (max-width: 900px) {
            .werkstatt-row {
                grid-template-columns: 1fr;
            }
        }
        
        .werkstatt-textarea {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }
        
        .werkstatt-textarea .form-textarea {
            flex: 1;
            min-height: 180px;
            border-color: #93c5fd;
            font-size: 14px;
            line-height: 1.8;
        }
        
        .textarea-label {
            font-size: 11px;
            font-weight: 600;
            color: #1d4ed8;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        
        /* ========================================
           CARD LISTE (statt Textarea)
           ======================================== */
        .list-cards-wrapper {
            display: flex;
            flex-direction: column;
            gap: 0;
            border: 1px solid #93c5fd;
            border-radius: 10px;
            overflow: hidden;
            flex: 1;
            min-height: 180px;
        }
        
        .list-cards-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 8px 12px;
            background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
            border-bottom: 1px solid #93c5fd;
            font-size: 11px;
            font-weight: 600;
            color: #1d4ed8;
        }
        
        .list-cards-header svg {
            width: 14px;
            height: 14px;
        }
        
        .list-cards-header .count {
            margin-left: auto;
            padding: 2px 8px;
            background: #3b82f6;
            color: white;
            font-size: 10px;
            font-weight: 700;
            border-radius: 10px;
        }
        
        .list-cards {
            display: flex;
            flex-direction: column;
            gap: 6px;
            padding: 10px;
            background: #f8fafc;
            flex: 1;
            min-height: 60px;
        }
        
        .list-cards:empty::before {
            content: 'Keine Fehlertexte ausgewählt';
            color: #94a3b8;
            font-size: 13px;
            font-style: italic;
            padding: 16px;
            text-align: center;
            display: block;
        }
        
        .list-card-item {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 10px 12px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            font-size: 14px;
            animation: cardSlideIn 0.2s ease;
        }
        
        @keyframes cardSlideIn {
            from {
                opacity: 0;
                transform: translateY(-8px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
        
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateX(100px);
            }
            to {
                opacity: 1;
                transform: translateX(0);
            }
        }
        
        @keyframes slideOut {
            from {
                opacity: 1;
                transform: translateX(0);
            }
            to {
                opacity: 0;
                transform: translateX(100px);
            }
        }
        
        .list-card-item .num {
            min-width: 24px;
            height: 24px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #10b981;
            color: white;
            font-size: 11px;
            font-weight: 700;
            border-radius: 6px;
        }
        
        .list-card-item .text {
            flex: 1;
            color: #1e293b;
        }
        
        .list-card-item .icon {
            color: #10b981;
            flex-shrink: 0;
        }
        
        /* Zusatz-Textarea in der Hybrid-Lösung */
        .list-cards-extra {
            border-top: 1px solid #93c5fd;
            background: white;
        }
        
        .list-cards-extra-header {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 6px 12px;
            background: #fefce8;
            border-bottom: 1px solid #fcd34d;
            font-size: 10px;
            font-weight: 600;
            color: #a16207;
        }
        
        .list-cards-extra-header svg {
            width: 12px;
            height: 12px;
        }
        
        .list-cards-extra textarea {
            width: 100%;
            min-height: 60px;
            padding: 10px 12px;
            border: none;
            font-family: inherit;
            font-size: 13px;
            line-height: 1.6;
            resize: none;
            background: white;
        }
        
        .list-cards-extra textarea:focus {
            outline: none;
            background: #fffef5;
        }
        
        .list-cards-extra textarea::placeholder {
            color: #94a3b8;
        }
        
        /* ========================================
           SCHNELLAUSWAHL PANEL
           ======================================== */
        .schnellauswahl-panel {
            background: #f0fdf4;
            border: 1px solid #86efac;
            border-radius: 10px;
            overflow: hidden;
        }
        
        .schnellauswahl-header {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 14px;
            background: transparent;
            border-bottom: none;
            font-size: 12px;
            font-weight: 600;
            color: #16a34a;
        }
        
        .schnellauswahl-header .counter {
            margin-left: auto;
            padding: 2px 8px;
            background: #10b981;
            color: white;
            font-size: 10px;
            font-weight: 700;
            border-radius: 10px;
        }
        
        .schnellauswahl-header .drag-hint {
            font-size: 10px;
            font-weight: 400;
            color: #6b7280;
        }
        
        /* ========================================
           CHECKBOX GRID (2 Spalten × 5 Reihen)
           ======================================== */
        .checkbox-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            grid-template-rows: repeat(5, 1fr);
            grid-auto-flow: column;
            gap: 6px;
            padding: 0 10px 10px 10px;
            background: transparent;
        }
        
        .checkbox-item {
            display: flex;
            align-items: center;
            gap: 6px;
            padding: 8px 10px;
            background: white;
            border: 1px solid #e2e8f0;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.15s;
            user-select: none;
        }
        
        .checkbox-item:hover {
            border-color: #10b981;
            background: #fafafa;
        }
        
        .checkbox-item.checked {
            background: #dcfce7;
            border-color: #86efac;
        }
        
        .checkbox-item.dragging {
            opacity: 0.4;
            transform: scale(1.02);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        
        .checkbox-item.drag-over {
            border-color: #10b981;
            border-width: 2px;
            background: #f0fdf4;
        }
        
        .checkbox-item .drag-handle {
            color: #cbd5e1;
            cursor: grab;
            font-size: 11px;
            line-height: 1;
        }
        
        .checkbox-item .drag-handle:active {
            cursor: grabbing;
        }
        
        .checkbox-item .nummer {
            min-width: 18px;
            height: 18px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: #e2e8f0;
            color: #64748b;
            font-size: 9px;
            font-weight: 700;
            border-radius: 4px;
            transition: all 0.15s;
        }
        
        .checkbox-item.checked .nummer {
            background: #10b981;
            color: white;
        }
        
        .checkbox-item .checkbox-visual {
            width: 14px;
            height: 14px;
            border: 2px solid #d1d5db;
            border-radius: 3px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.15s;
            flex-shrink: 0;
        }
        
        .checkbox-item.checked .checkbox-visual {
            background: #10b981;
            border-color: #10b981;
        }
        
        .checkbox-item .checkbox-visual svg {
            width: 8px;
            height: 8px;
            color: white;
            opacity: 0;
            transition: opacity 0.15s;
        }
        
        .checkbox-item.checked .checkbox-visual svg {
            opacity: 1;
        }
        
        .checkbox-item .checkbox-label {
            flex: 1;
            font-size: 14px;
            color: #374151;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        
        .checkbox-item.checked .checkbox-label {
            color: #166534;
            font-weight: 500;
        }
        
        /* ========================================
           ARTIKELNUMMER-VORSCHLAG
           ======================================== */
        .artikel-vorschlag {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .artikel-info {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 40px;
            padding: 24px;
            background: white;
            border-radius: 10px;
            border: 1px solid #fcd34d;
        }
        
        .artikel-col {
            text-align: center;
        }
        
        .artikel-label {
            font-size: 11px;
            font-weight: 600;
            color: #94a3b8;
            letter-spacing: 0.5px;
            margin-bottom: 8px;
        }
        
        .artikel-value {
            font-size: 28px;
            font-weight: 700;
            font-family: 'SF Mono', monospace;
            margin-bottom: 4px;
        }
        
        .artikel-desc {
            font-size: 12px;
            color: #64748b;
        }
        
        .artikel-actions {
            display: flex;
            justify-content: flex-end;
            gap: 12px;
        }
        
        .btn-outline {
            padding: 10px 20px;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            color: #374151;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .btn-outline:hover {
            background: #f9fafb;
            border-color: #9ca3af;
        }
        
        .btn-success {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: #10b981;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .btn-success:hover {
            background: #059669;
        }
        
        /* ========================================
           FOOTER BUTTONS
           ======================================== */
        .form-footer {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 24px;
            padding-top: 24px;
            border-top: 1px solid #e2e8f0;
        }
        
        .footer-right {
            display: flex;
            gap: 12px;
        }
        
        .btn-cancel {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: white;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 500;
            color: #374151;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .btn-cancel:hover {
            background: #f3f4f6;
        }
        
        .btn-danger {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 20px;
            background: #fee2e2;
            border: 1px solid #fca5a5;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            color: #dc2626;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .btn-danger:hover {
            background: #fecaca;
        }
        
        .btn-save {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 24px;
            background: #10b981;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            color: white;
            cursor: pointer;
            transition: all 0.15s;
        }
        
        .btn-save:hover {
            background: #059669;
        }
        
        .feig-badge {
            font-size: 10px;
            font-weight: 700;
            background: #2563eb;
            color: white;
            padding: 2px 8px;
            border-radius: 4px;
            margin-left: auto;
        }
        
        .badge-sz {
            font-size: 11px;
            font-weight: 800;
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 6px;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 4px rgba(16, 185, 129, 0.3);
        }
        
        .badge-feig-header {
            font-size: 11px;
            font-weight: 800;
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            color: white;
            padding: 4px 10px;
            border-radius: 6px;
            letter-spacing: 0.5px;
            box-shadow: 0 2px 4px rgba(37, 99, 235, 0.3);
        }
        
        /* ========================================
           RESPONSIVE
           ======================================== */
        @media (max-width: 768px) {
            .form-row {
                grid-template-columns: 1fr;
            }
            .form-row.two-cols,
            .form-row.four-cols,
            .form-row.five-cols {
                grid-template-columns: 1fr;
            }
            .form-group.span-2 {
                grid-column: span 1;
            }
            .info-bar {
                gap: 12px;
            }
            .info-divider {
                display: none;
            }
        }
/* ═══════════════════════════════════════════════════════════════════════════
   REPCENTER v3.0.16 - LAYOUT FIX
   Vollständige Korrektur aller Layout-Probleme
   
   Behebt:
   1. Globale Suche - Content verschiebt sich beim Eingeben
   2. Header nicht bündig positioniert
   3. Artikel/Stammdaten Tab - Content nach unten/links verschoben
   4. Inkonsistente Tab-Layouts
   
   Version: 5.0 - Systematische Korrektur
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 1: ROOT & BODY FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

html, body {
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 2: MAIN CONTAINER STRUCTURE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Main Container - wenn sichtbar */
.main-container {
    display: flex !important;
    min-height: 100vh !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Main Content Area - rechts von Sidebar */
.main-content {
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
    margin-left: 85px !important;
    min-height: 100vh !important;
    width: calc(100vw - 85px) !important;
    max-width: calc(100vw - 85px) !important;
    position: relative !important;
    background: var(--bg-primary) !important;
    overflow-x: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 3: HEADER FIXES - Bündiger Abschluss
   ═══════════════════════════════════════════════════════════════════════════ */

.header {
    position: sticky !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 900 !important;
    width: 100% !important;
    min-height: 56px !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0.625rem 1.5rem !important;
    box-sizing: border-box !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    gap: 1rem !important;
    background: var(--bg-primary) !important;
    border-bottom: 1px solid var(--border) !important;
}

/* Header Left - feste Breite für Stabilität */
.header-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    min-width: 160px !important;
    flex-shrink: 0 !important;
}

/* Header Brand */
.header-brand {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
}

.header-brand h1,
#pageTitle {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    margin: 0 !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
}

.header-brand span,
#headerSubtitle {
    font-size: 0.7rem !important;
    margin: 0 !important;
    color: var(--text-muted) !important;
}

/* Header Right - fixierte Breite */
.header-right {
    display: flex !important;
    gap: 0.5rem !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    position: relative !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 4: GLOBAL SEARCH - Keine Layout-Verschiebung
   ═══════════════════════════════════════════════════════════════════════════ */

/* Global Search Wrapper - FIXE BREITE */
.global-search-wrapper {
    position: relative !important;
    width: 200px !important;
    min-width: 200px !important;
    max-width: 200px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
}

/* Global Search Input - KEINE Größenänderung bei Focus */
.global-search-input {
    width: 100% !important;
    padding: 10px 16px 10px 40px !important;
    border: 1px solid var(--border) !important;
    border-radius: 24px !important;
    background: var(--bg-secondary) !important;
    font-size: 0.85rem !important;
    color: var(--text-primary) !important;
    box-sizing: border-box !important;
    /* WICHTIG: Keine transition auf width/padding */
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease !important;
}

.global-search-input:focus {
    width: 100% !important;
    outline: none !important;
    background: var(--bg-primary) !important;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.1) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 5: CONTENT AREA - Stabiles Layout
   ═══════════════════════════════════════════════════════════════════════════ */

.content {
    flex: 1 !important;
    padding: 1rem 1.5rem !important;
    margin: 0 !important;
    background: #f1f5f9 !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-x: visible !important;
    overflow-y: auto !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 6: TAB CONTENT - Einheitliches Layout
   ═══════════════════════════════════════════════════════════════════════════ */

.tab-content {
    display: none !important;
}

.tab-content.active {
    display: block !important;
    position: relative !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Startseite: Vollbild-Hintergrund ohne Scrollbalken */
#startseite.tab-content.active {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: calc(100vh - 60px) !important;
    overflow: hidden !important;
}
#startseite.tab-content.active ~ .tab-content,
.content:has(> #startseite.active) {
    overflow: hidden !important;
    padding: 0 !important;
    background: transparent !important;
}
body:has(#startseite.active) {
    overflow: hidden !important;
}
body:has(#startseite.active) .content {
    overflow: hidden !important;
    padding: 0 !important;
    background: transparent !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 7: STAMMDATEN/ARTIKEL TAB - Spezifische Fixes
   ═══════════════════════════════════════════════════════════════════════════ */

#stammdaten {
    position: relative !important;
    left: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    width: 100% !important;
}

/* Alle Kinder des Stammdaten Tabs */
#stammdaten > *:not(style) {
    position: relative !important;
    left: 0 !important;
    margin-left: 0 !important;
    transform: none !important;
}

/* Breadcrumb Navigation im Stammdaten Tab */
#stammdaten > nav:first-of-type {
    margin: 0 0 1rem 0 !important;
    padding: 0 !important;
}

/* Stammdaten Filter Bar */
.stamm-filter-bar {
    display: flex !important;
    align-items: center !important;
    gap: 1rem !important;
    padding: 1rem !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    margin: 0 0 1.5rem 0 !important;
    flex-wrap: wrap !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

/* Stammdaten Filter Select */
.stamm-filter-select {
    padding: 0.5rem 0.75rem !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    background: var(--bg-secondary) !important;
    font-size: 0.875rem !important;
    min-width: 160px !important;
}

/* Stammdaten Tabs */
.stamm-tabs {
    display: flex !important;
    gap: 0.25rem !important;
    border-bottom: 1px solid var(--border) !important;
    margin: 0 0 1.5rem 0 !important;
}

.stamm-tab {
    padding: 0.75rem 1.25rem !important;
    font-size: 0.875rem !important;
    font-weight: 500 !important;
    color: var(--text-muted) !important;
    cursor: pointer !important;
    border: none !important;
    background: transparent !important;
    border-bottom: 2px solid transparent !important;
    margin-bottom: -1px !important;
}

.stamm-tab.active {
    color: var(--primary) !important;
    border-bottom-color: var(--primary) !important;
}

/* Stammdaten Grid */
.stamm-grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 1rem !important;
}

@media (max-width: 1200px) {
    .stamm-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 700px) {
    .stamm-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Stammdaten Column */
.stamm-column {
    background: var(--bg-secondary) !important;
    border-radius: 10px !important;
    display: flex !important;
    flex-direction: column !important;
}

.stamm-column-header {
    padding: 0.75rem 1rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    border-radius: 10px 10px 0 0 !important;
}

.stamm-column-header.pruef {
    border-bottom: 3px solid #10b981 !important;
    background: rgba(16, 185, 129, 0.1) !important;
}

.stamm-column-header.rep {
    border-bottom: 3px solid #3b82f6 !important;
    background: rgba(59, 130, 246, 0.1) !important;
}

.stamm-column-header.klein {
    border-bottom: 3px solid #f59e0b !important;
    background: rgba(245, 158, 11, 0.1) !important;
}

.stamm-column-header.gross {
    border-bottom: 3px solid #ef4444 !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.stamm-column-body {
    padding: 0.75rem !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    min-height: 150px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
}

/* Stammdaten Fehler Items */
.stamm-fehler-item {
    padding: 0.5rem 0.75rem !important;
    background: var(--bg-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    font-size: 0.8rem !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
}

.stamm-fehler-item:hover {
    border-color: var(--primary) !important;
}

/* Stammdaten Add Button */
.stamm-add-btn {
    width: calc(100% - 1.5rem) !important;
    margin: 0.75rem !important;
    padding: 0.5rem !important;
    border: 1px dashed var(--border) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: var(--text-muted) !important;
    font-size: 0.75rem !important;
    cursor: pointer !important;
}

.stamm-add-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

/* Stammdaten Artikel Card */
.stamm-artikel-card {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 10px !important;
    overflow: hidden !important;
}

.stamm-artikel-field {
    display: flex !important;
    align-items: center !important;
    padding: 0.75rem 1rem !important;
    background: var(--bg-secondary) !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    cursor: pointer !important;
}

.stamm-artikel-field:hover {
    border-color: var(--primary) !important;
}

.stamm-artikel-value {
    flex: 1 !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    font-family: monospace !important;
    color: var(--primary) !important;
}

.stamm-artikel-field.empty .stamm-artikel-value {
    color: #ef4444 !important;
    font-style: italic !important;
    font-weight: 400 !important;
    font-family: inherit !important;
}

.stamm-artikel-status {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-top: 1rem !important;
    padding: 0.5rem !important;
    border-radius: 6px !important;
    font-size: 0.75rem !important;
    font-weight: 500 !important;
}

.stamm-artikel-status.success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: #10b981 !important;
}

.stamm-artikel-status.warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: #f59e0b !important;
}

/* Stammdaten Icon Buttons */
.stamm-icon-btn {
    width: 28px !important;
    height: 28px !important;
    border: 1px solid var(--border) !important;
    border-radius: 6px !important;
    background: var(--bg-secondary) !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.15s !important;
    color: var(--text-muted) !important;
}

.stamm-icon-btn:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
    background: var(--bg-primary) !important;
}

.stamm-icon-btn.edit:hover {
    color: #3b82f6 !important;
    border-color: #3b82f6 !important;
}

.stamm-icon-btn.delete:hover {
    color: #ef4444 !important;
    border-color: #ef4444 !important;
}

.stamm-fehler-actions {
    display: flex !important;
    gap: 0.25rem !important;
    flex-shrink: 0 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 8: AUFTRÄGE TAB
   ═══════════════════════════════════════════════════════════════════════════ */

#auftraege {
    padding: 0 !important;
    margin: 0 !important;
}

#auftraege .table-card-new {
    padding: 0 !important;
    margin: 0 !important;
}

#auftraege .filter-bar-container {
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important; /* Kein Padding - innere Elemente machen das */
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 9: PRINT HEADER - Versteckt für Screen
   ═══════════════════════════════════════════════════════════════════════════ */

.print-header {
    display: none !important;
    height: 0 !important;
    max-height: 0 !important;
    visibility: hidden !important;
    position: absolute !important;
    left: -9999px !important;
    overflow: hidden !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 10: SIDEBAR - Korrektes Fixed Positioning
   ═══════════════════════════════════════════════════════════════════════════ */

.sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 85px !important;
    height: 100vh !important;
    z-index: 1000 !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 11: RESPONSIVE FIXES
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .global-search-wrapper {
        width: 150px !important;
        min-width: 150px !important;
        max-width: 150px !important;
    }
    
    .header-left {
        min-width: auto !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTION 12: PRINT MEDIA QUERIES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .print-header {
        display: block !important;
        height: auto !important;
        max-height: none !important;
        visibility: visible !important;
        position: static !important;
        left: auto !important;
        overflow: visible !important;
    }
    
    .sidebar,
    .header,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}



/* ============================================================================
   REPCENTER DOCUMENT MANAGEMENT SYSTEM v5.0 - CSS STYLES
   Integriert in RepCenter CSS-Architektur mit CSS-Variablen
   ============================================================================ */

/* DOK Badge - RepCenter-Style */
.dok-badge {
    display: inline-flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 4px 8px;
    border-radius: var(--rc-radius-sm);
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--rc-shadow-sm);
    user-select: none;
}

.dok-badge:hover {
    transform: translateY(-1px);
    box-shadow: var(--rc-shadow-md);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.dok-badge--has-documents {
    background: linear-gradient(135deg, var(--success), #059669);
}

.dok-badge--has-documents:hover {
    background: linear-gradient(135deg, #059669, #047857);
}

.dok-badge__count {
    margin-left: 4px;
    font-weight: 700;
}

/* Document Sidebar - RepCenter-Style */
#documentsSidebar {
    position: fixed !important;
    top: 0 !important;
    right: -420px !important;
    width: 420px !important;
    height: 100vh !important;
    background: var(--bg-primary) !important;
    border-left: 1px solid var(--border) !important;
    box-shadow: -4px 0 24px rgba(0,0,0,0.12) !important;
    z-index: 9999 !important;
    transition: right 0.3s ease !important;
    overflow: hidden !important;
    font-family: system-ui, -apple-system, sans-serif !important;
}

#documentsSidebar.open {
    right: 0 !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #documentsSidebar {
        right: -100vw !important;
        width: 100vw !important;
    }
    #documentsSidebar.open {
        right: 0 !important;
    }
}

/* Sidebar Header - RepCenter-Style */
#documentsSidebar .sidebar-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

#documentsSidebar .sidebar-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

#documentsSidebar .sidebar-subtitle {
    font-size: 14px;
    opacity: 0.9;
    margin: 4px 0 0 0;
}

#documentsSidebar .close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

#documentsSidebar .close-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.1);
}

/* Sidebar Content */
#documentsSidebar .sidebar-content {
    height: calc(100vh - 80px);
    overflow-y: auto;
    padding: 20px;
}

/* Upload Zone - RepCenter-Style */
#documentsSidebar .upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--rc-radius-md);
    padding: 40px 20px;
    text-align: center;
    transition: all 0.2s;
    margin-bottom: 20px;
    cursor: pointer;
    background: var(--bg-secondary);
}

#documentsSidebar .upload-zone:hover,
#documentsSidebar .upload-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

#documentsSidebar .upload-zone.uploading {
    border-color: var(--success);
    background: #ecfdf5;
}

#documentsSidebar .upload-icon {
    font-size: 32px;
    color: var(--text-muted);
    margin-bottom: 12px;
    transition: color 0.2s;
}

#documentsSidebar .upload-zone:hover .upload-icon,
#documentsSidebar .upload-zone.dragover .upload-icon {
    color: var(--primary);
}

#documentsSidebar .upload-text {
    font-size: 16px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

#documentsSidebar .upload-hint {
    font-size: 12px;
    color: var(--text-muted);
}

/* Document List - RepCenter-Style */
#documentsSidebar .document-item {
    display: flex;
    align-items: center;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: var(--rc-radius-sm);
    margin-bottom: 8px;
    transition: all 0.2s;
    background: var(--bg-primary);
}

#documentsSidebar .document-item:hover {
    border-color: var(--primary);
    box-shadow: var(--rc-shadow-sm);
    background: var(--primary-light);
}

#documentsSidebar .document-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    font-size: 14px;
    color: var(--text-secondary);
}

#documentsSidebar .document-info {
    flex: 1;
    min-width: 0;
}

#documentsSidebar .document-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}

#documentsSidebar .document-meta {
    font-size: 12px;
    color: var(--text-muted);
}

#documentsSidebar .document-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

#documentsSidebar .document-item:hover .document-actions {
    opacity: 1;
}

#documentsSidebar .document-action-btn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 4px;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    font-size: 12px;
}

#documentsSidebar .document-action-btn:hover {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

#documentsSidebar .document-action-btn.download:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

#documentsSidebar .document-action-btn.delete:hover {
    background: #fef2f2;
    color: var(--error);
}

/* Progress Bar - RepCenter-Style */
#documentsSidebar .upload-progress {
    width: 100%;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
    margin: 8px 0;
}

#documentsSidebar .upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-dark));
    width: 0%;
    transition: width 0.3s ease;
}

/* Toast Notifications - RepCenter-Style */
.document-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--text-primary);
    color: white;
    padding: 12px 16px;
    border-radius: var(--rc-radius-sm);
    font-size: 14px;
    z-index: 10000;
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: var(--rc-shadow-lg);
}

.document-toast.show {
    transform: translateY(0);
    opacity: 1;
}

.document-toast.success {
    background: var(--success);
}

.document-toast.error {
    background: var(--error);
}

/* Empty State - RepCenter-Style */
#documentsSidebar .documents-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

#documentsSidebar .documents-empty-icon {
    font-size: 48px;
    margin-bottom: 16px;
}

#documentsSidebar .documents-empty-text {
    font-size: 16px;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

#documentsSidebar .documents-empty-hint {
    font-size: 14px;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
}

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

/* Dark Mode Support für RepCenter */
@media (prefers-color-scheme: dark) {
    #documentsSidebar {
        background: var(--sidebar-bg) !important;
        color: #e2e8f0 !important;
    }
    
    #documentsSidebar .sidebar-header {
        border-bottom-color: var(--sidebar-hover);
    }
    
    #documentsSidebar .document-item {
        background: var(--sidebar-hover);
        border-color: #475569;
        color: #e2e8f0;
    }
    
    #documentsSidebar .document-item:hover {
        border-color: var(--primary);
        background: #2563eb20;
    }
}

/* ============================================================================
   END DOCUMENT MANAGEMENT STYLES
   ============================================================================ */

/* === CHECKBOX FIX: Weißes Häkchen === */
/* checkbox-white-check */
.job-row input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    background: white;
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.job-row input[type="checkbox"]:hover {
    border-color: var(--primary, #10b981);
}

.job-row input[type="checkbox"]:checked {
    background: var(--primary, #10b981);
    border-color: var(--primary, #10b981);
}

.job-row input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* === STATUS ICON FARBEN === */
/* status-icon-colors */
.status-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.status-icon.offen {
    color: #3b82f6;  /* Blau */
}

.status-icon.bearbeitung {
    color: #f59e0b;  /* Orange */
}

.status-icon.erledigt {
    color: #22c55e;  /* Grün */
}

.status-icon.verschickt {
    color: #8b5cf6;  /* Lila */
}

.status-icon.wto {
    color: #dc2626;  /* Rot */
}

/* === DROPDOWN ITEM-ICON FARBEN === */
/* item-icon-colors */
.item-icon {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.item-icon.offen {
    color: #3b82f6 !important;  /* Blau */
}

.item-icon.bearbeitung {
    color: #f59e0b;  /* Orange */
}

.item-icon.erledigt {
    color: #22c55e;  /* Grün */
}

.item-icon.verschickt {
    color: #8b5cf6;  /* Lila */
}

.item-icon.wto {
    color: #dc2626 !important;  /* Rot */
}

/* Dropdown Item Corners */
#startseiteHerstellerDropdownList > div:first-child {
    border-radius: 10px 10px 0 0;
}
#startseiteHerstellerDropdownList > div:last-child {
    border-radius: 0 0 10px 10px;
    border-bottom: none !important;
}
/* ═══════════════════════════════════════════════════════════════════════════════
 * DIENSTLEISTER-MODUS (dl-mode)
 * Body bekommt .dl-mode wenn User ein DL ist → versteckt S&Z-interne UI
 * ═══════════════════════════════════════════════════════════════════════════════ */

/* Alles mit dl-hidden wird im DL-Modus ausgeblendet */
.dl-mode .dl-hidden {
    display: none !important;
}

/* Alles mit dl-only wird NUR im DL-Modus angezeigt */
.dl-only {
    display: none !important;
}
.dl-mode .dl-only {
    display: block !important;
}
.dl-mode .dl-only-flex {
    display: flex !important;
}
.dl-only-flex {
    display: none !important;
}

/* DL: Sidebar Header anpassen */
.dl-mode .sidebar-header-subtitle {
    content: 'Dienstleister-Portal';
}

/* DL: Auftrag-Bearbeiten readonly-Felder */
.dl-mode .dl-readonly input,
.dl-mode .dl-readonly select,
.dl-mode .dl-readonly textarea {
    pointer-events: none;
    opacity: 0.7;
    background: #f1f5f9;
}

/* DL Werkstattbericht Section */
.dl-werkstatt-section {
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border: 2px solid #fb923c;
    border-radius: 12px;
}
.dl-werkstatt-section .section-header {
    background: rgba(255,255,255,0.7);
    border-color: #fb923c;
}
.badge-dl-header {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    color: white;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}
