/** * Unified Dark/Light Mode System für MYP Platform * =============================================== * * Konsolidiert alle Theme-Inkonsistenzen in einer einheitlichen Implementierung * Ersetzt: input.css, components.css, professional-theme.css Dark Mode-Teile * * Author: Till Tomczak - MYP Team * Zweck: Behebung aller UI Dark/Light Mode Inkonsistenzen */ /* ===== UNIFIED CSS VARIABLES SYSTEM ===== */ :root { /* === MERCEDES-BENZ BRAND COLORS === */ --mb-primary: #0073ce; --mb-primary-dark: #005a9f; --mb-primary-light: #1e88e5; --mb-secondary: #00adef; --mb-black: #000000; --mb-white: #ffffff; --mb-silver: #c4c4c4; --mb-gray: #666666; /* === LIGHT MODE FOUNDATION === */ --bg-primary: #ffffff; --bg-secondary: #f8fafc; --bg-tertiary: #f1f5f9; --bg-card: #ffffff; --bg-surface: #fefefe; --bg-overlay: rgba(255, 255, 255, 0.95); --bg-modal: rgba(255, 255, 255, 0.98); --bg-input: #ffffff; --bg-input-focus: #ffffff; /* === TEXT COLORS LIGHT === */ --text-primary: #111827; --text-secondary: #374151; --text-tertiary: #6b7280; --text-muted: #9ca3af; --text-accent: var(--mb-primary); --text-on-primary: var(--mb-white); --text-success: #059669; --text-warning: #d97706; --text-error: #dc2626; /* === BORDER COLORS LIGHT === */ --border-primary: #e5e7eb; --border-secondary: #d1d5db; --border-focus: var(--mb-primary); --border-error: #f87171; --border-success: #34d399; /* === SHADOWS LIGHT === */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1); --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.25); /* === GLASSMORPHISM LIGHT === */ --glass-bg: rgba(255, 255, 255, 0.8); --glass-border: rgba(255, 255, 255, 0.2); --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.08); --glass-blur: blur(16px); /* === INTERACTIVE STATES LIGHT === */ --hover-bg: rgba(0, 115, 206, 0.04); --active-bg: rgba(0, 115, 206, 0.08); --focus-ring: 0 0 0 3px rgba(0, 115, 206, 0.1); /* === GRADIENTS LIGHT === */ --gradient-primary: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%); --gradient-card: linear-gradient(135deg, #ffffff 0%, #fcfcfd 100%); --gradient-modal: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%); --gradient-button: linear-gradient(135deg, var(--mb-primary) 0%, var(--mb-primary-dark) 100%); } /* ===== DARK MODE OVERRIDES ===== */ .dark { /* === DARK MODE FOUNDATION === */ --bg-primary: #000000; --bg-secondary: #0f0f0f; --bg-tertiary: #1f1f1f; --bg-card: #1a1a1a; --bg-surface: #151515; --bg-overlay: rgba(0, 0, 0, 0.95); --bg-modal: rgba(26, 26, 26, 0.98); --bg-input: #1a1a1a; --bg-input-focus: #222222; /* === TEXT COLORS DARK === */ --text-primary: #ffffff; --text-secondary: #f1f5f9; --text-tertiary: #e2e8f0; --text-muted: #cbd5e1; --text-accent: #ffffff; --text-on-primary: #000000; --text-success: #22c55e; --text-warning: #fbbf24; --text-error: #f87171; /* === BORDER COLORS DARK === */ --border-primary: #2d2d2d; --border-secondary: #404040; --border-focus: #ffffff; --border-error: #f87171; --border-success: #22c55e; /* === SHADOWS DARK === */ --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3); --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4); --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5); --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6); --shadow-modal: 0 25px 50px -12px rgba(0, 0, 0, 0.7); /* === GLASSMORPHISM DARK === */ --glass-bg: rgba(26, 26, 26, 0.85); --glass-border: rgba(255, 255, 255, 0.15); --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.5); --glass-blur: blur(16px); /* === INTERACTIVE STATES DARK === */ --hover-bg: rgba(255, 255, 255, 0.08); --active-bg: rgba(255, 255, 255, 0.12); --focus-ring: 0 0 0 3px rgba(255, 255, 255, 0.2); /* === GRADIENTS DARK === */ --gradient-primary: linear-gradient(135deg, #000000 0%, #0f0f0f 100%); --gradient-card: linear-gradient(135deg, #1a1a1a 0%, #151515 100%); --gradient-modal: linear-gradient(135deg, #1f1f1f 0%, #1a1a1a 100%); --gradient-button: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%); } /* ===== UNIFIED COMPONENT STYLES ===== */ /* === OPTIMIZED ROUNDED BORDERS (Performance-optimiert) === */ .btn, .form-input, input, textarea, select, button { border-radius: 12px; } .card, .modal, .glass-card, .mercedes-modal { border-radius: 20px; } .badge, .btn-sm { border-radius: 16px; } .avatar, .profile-image { border-radius: 50%; } /* === OPTIMIZED SPACING (Nur bei Bedarf verwenden) === */ .spacing-xs { margin: 0.25rem; padding: 0.25rem; } .spacing-sm { margin: 0.5rem; padding: 0.5rem; } .spacing-md { margin: 1rem; padding: 1rem; } /* === BUTTONS === */ .btn { @apply inline-flex items-center justify-center px-4 py-2 text-sm font-medium; background: var(--bg-card); color: var(--text-primary); border: 1px solid var(--border-primary); box-shadow: var(--shadow-sm); transition: background-color 0.15s ease, box-shadow 0.15s ease; } .btn:hover { background: var(--hover-bg); box-shadow: var(--shadow-md); } .btn:focus { outline: none; box-shadow: var(--focus-ring); } .btn-primary { background: var(--gradient-button); color: var(--text-on-primary); border: none; } .btn-primary:hover { background: var(--mb-primary-dark); transform: translateY(-1px); } .dark .btn-primary { background: var(--gradient-button); color: var(--text-on-primary); } .dark .btn-primary:hover { background: #f0f0f0; } /* === CARDS === */ .card { background: var(--gradient-card); border: 1px solid var(--border-primary); box-shadow: var(--shadow-lg); backdrop-filter: var(--glass-blur); transition: box-shadow 0.2s ease; padding: 1.25rem; } .card:hover { box-shadow: var(--shadow-xl); } .glass-card { background: var(--glass-bg); border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); backdrop-filter: var(--glass-blur); padding: 1.25rem; } /* === MODALS === */ .modal-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.5); backdrop-filter: blur(8px); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 1rem; cursor: pointer; } .modal-overlay.hidden { display: none !important; } .dark .modal-overlay { background: rgba(0, 0, 0, 0.7); } .modal { background: var(--gradient-modal); border: 1px solid var(--border-primary); border-radius: 20px; box-shadow: var(--shadow-modal); backdrop-filter: var(--glass-blur); max-width: 90vw; max-height: 90vh; overflow-y: auto; transform: scale(0.95); opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); cursor: default; } .modal.show { transform: scale(1); opacity: 1; } .modal-header { border-bottom: 1px solid var(--border-primary); color: var(--text-primary); } .modal-body { color: var(--text-secondary); } /* Mercedes Modal Specific Styling */ .mercedes-modal { background: var(--gradient-modal); border: 1px solid var(--border-primary); border-radius: 20px; box-shadow: var(--shadow-modal); backdrop-filter: var(--glass-blur); max-width: 90vw; max-height: 90vh; overflow-y: auto; transform: scale(0.95); opacity: 0; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); scrollbar-width: thin; scrollbar-color: rgba(0, 115, 206, 0.2) transparent; cursor: default; } .mercedes-modal.show { transform: scale(1); opacity: 1; } .mercedes-modal::-webkit-scrollbar { width: 8px; } .mercedes-modal::-webkit-scrollbar-track { background: transparent; border-radius: 4px; } .mercedes-modal::-webkit-scrollbar-thumb { background: rgba(0, 115, 206, 0.2); border-radius: 4px; transition: all 0.3s ease; } .mercedes-modal::-webkit-scrollbar-thumb:hover { background: rgba(0, 115, 206, 0.4); } .dark .mercedes-modal::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); } .dark .mercedes-modal::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.4); } /* Modal Animation Classes */ .modal-enter { opacity: 0; transform: scale(0.9) translateY(-20px); } .modal-enter-active { opacity: 1; transform: scale(1) translateY(0); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .modal-exit { opacity: 1; transform: scale(1) translateY(0); } .modal-exit-active { opacity: 0; transform: scale(0.9) translateY(-20px); transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1); } /* Modal Overlay Click-to-Close Functionality */ .modal-overlay[data-closable="true"] { cursor: pointer; } .modal-overlay[data-closable="true"] .mercedes-modal { cursor: default; } /* === FORM ELEMENTS === */ .form-input, input, textarea, select { @apply w-full; background: var(--bg-input); border: 2px solid var(--border-primary); color: var(--text-primary); padding: 1rem 1.25rem; border-radius: 16px; margin: 0.5rem 0; transition: all 0.15s ease; font-size: 0.95rem; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); } .form-input:focus, input:focus, textarea:focus, select:focus { outline: none; border-color: var(--border-focus); background: var(--bg-input-focus); box-shadow: var(--focus-ring), 0 4px 12px rgba(0, 0, 0, 0.1); transform: translateY(-1px); } .form-input::placeholder, input::placeholder, textarea::placeholder { color: var(--text-muted); font-style: italic; } /* Dark Mode Input Spezifika */ .dark .form-input, .dark input, .dark textarea, .dark select { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); border-color: var(--border-primary); } .dark .form-input:focus, .dark input:focus, .dark textarea:focus, .dark select:focus { box-shadow: var(--focus-ring), 0 4px 16px rgba(0, 0, 0, 0.4); border-color: var(--border-focus); } .form-label, label { @apply block text-sm font-semibold; color: var(--text-secondary); margin-bottom: 0.75rem; margin-top: 1.25rem; } /* === NAVIGATION === */ .nav-item { @apply px-4 py-2; color: var(--text-secondary); transition: background-color 0.15s ease, color 0.15s ease; } .nav-item:hover { background: var(--hover-bg); color: var(--text-primary); } .nav-item.active { background: var(--active-bg); color: var(--text-accent); } /* === ALERTS === */ .alert { @apply border; background: var(--bg-card); border-color: var(--border-primary); border-radius: 16px !important; padding: 1.25rem; margin: 1rem 0; } .alert-info { background: rgba(0, 115, 206, 0.1); border-color: var(--mb-primary); color: var(--mb-primary); } .dark .alert-info { background: rgba(0, 115, 206, 0.2); color: var(--mb-white); } .alert-success { background: rgba(5, 150, 105, 0.1); border-color: var(--text-success); color: var(--text-success); } .alert-warning { background: rgba(217, 119, 6, 0.1); border-color: var(--text-warning); color: var(--text-warning); } .alert-error { background: rgba(220, 38, 38, 0.1); border-color: var(--text-error); color: var(--text-error); } /* === TABLES === */ .table { @apply w-full border-collapse; border-radius: 16px !important; overflow: hidden; margin: 1rem 0; } .table th { @apply text-left text-sm font-medium uppercase tracking-wider; background: var(--bg-tertiary); color: var(--text-tertiary); border-bottom: 1px solid var(--border-primary); padding: 1rem 1.5rem; } .table td { @apply text-sm; color: var(--text-secondary); border-bottom: 1px solid var(--border-primary); padding: 1rem 1.5rem; } .table tbody tr:hover { background: var(--hover-bg); } /* === TOOLTIPS === */ .tooltip { @apply absolute z-50 text-sm shadow-lg; background: var(--bg-modal); color: var(--text-primary); border: 1px solid var(--border-primary); backdrop-filter: var(--glass-blur); border-radius: 12px !important; padding: 0.75rem 1rem; margin: 0.25rem; } /* === BADGES & STATUS === */ .badge { @apply inline-flex items-center text-xs font-medium; background: var(--bg-tertiary); color: var(--text-secondary); border-radius: 16px !important; padding: 0.5rem 0.75rem; margin: 0.25rem; } .badge-primary { background: var(--mb-primary); color: var(--mb-white); } .badge-success { background: var(--text-success); color: var(--mb-white); } .badge-warning { background: var(--text-warning); color: var(--mb-white); } .badge-error { background: var(--text-error); color: var(--mb-white); } /* === LOADING STATES === */ .loading { @apply animate-pulse; background: var(--bg-tertiary); } .spinner { @apply animate-spin rounded-full; border: 2px solid var(--border-primary); border-top-color: var(--text-accent); } /* === RESPONSIVE UTILITIES === */ @media (max-width: 768px) { .modal { margin: 1rem; max-width: calc(100% - 2rem); border-radius: 16px !important; } .card { border-radius: 16px !important; margin: 0.5rem; padding: 1rem; } .btn { @apply text-xs; padding: 0.5rem 1rem; margin: 0.125rem; } .form-input { padding: 0.75rem 1rem; margin: 0.25rem 0; } .nav-item { padding: 0.5rem 0.75rem; margin: 0.125rem; } } /* === ACCESSIBILITY IMPROVEMENTS === */ @media (prefers-reduced-motion: reduce) { * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; } } /* === HIGH CONTRAST MODE === */ @media (prefers-contrast: high) { :root { --border-primary: #000000; --text-primary: #000000; } .dark { --border-primary: #ffffff; --text-primary: #ffffff; } } /* === PRINT STYLES === */ @media print { .modal-overlay, .tooltip, .btn { display: none !important; } .card { box-shadow: none; border: 1px solid #000000; } } /* === LEGACY COMPATIBILITY === */ .glass-modal { @extend .modal; @extend .glass-card; } .mb-dashboard-card { @extend .card; } .btn-professional { @extend .btn-primary; } .input-professional { @extend .form-input; } /* === CSS CUSTOM PROPERTIES FALLBACKS === */ .no-css-vars .btn-primary { background: #0073ce; color: #ffffff; } .no-css-vars .dark .btn-primary { background: #ffffff; color: #000000; } /* === OPTIMIZED THEME TRANSITION === */ html { transition: background-color 0.3s ease; } body { transition: color 0.3s ease, background-color 0.3s ease; } /* === ENHANCED DARK MODE CONTRAST === */ .dark .btn-primary { background: var(--gradient-button); color: var(--text-on-primary); box-shadow: 0 4px 14px 0 rgba(255, 255, 255, 0.1); } .dark .btn-primary:hover { background: #f5f5f5; box-shadow: 0 6px 20px 0 rgba(255, 255, 255, 0.15); } .dark .card { border: 1px solid var(--border-primary); box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.05); } .dark .form-input { border: 1px solid var(--border-primary); background: var(--bg-card); } .dark .form-input:focus { border-color: var(--border-focus); box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1); } .dark .alert-info { background: rgba(0, 115, 206, 0.15); border-color: var(--mb-primary); color: #60a5fa; } .dark .alert-success { background: rgba(34, 197, 94, 0.15); border-color: var(--text-success); color: #4ade80; } .dark .alert-warning { background: rgba(251, 191, 36, 0.15); border-color: var(--text-warning); color: #fbbf24; } .dark .alert-error { background: rgba(248, 113, 113, 0.15); border-color: var(--text-error); color: #f87171; } /* === UTILITY CLASSES === */ .theme-transition { transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); } .focus-visible:focus { outline: 2px solid var(--border-focus); outline-offset: 2px; } .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }