/* Modern Racing-Inspired Automotive Design */

:root {
    /* Racing Colors */
    --racing-black: #0a0a0a;
    --racing-dark: #1a1a1a;
    --racing-gray: #2d2d2d;
    --racing-silver: #c0c0c0;
    --racing-silver-light: #e8e8e8;
    --racing-orange: #ff6b00;
    --racing-orange-light: #ff8c42;
    --racing-orange-dark: #cc5500;
    --racing-green: #00ff41;
    --racing-red: #ff0000;
    --racing-yellow: #ffd700;
    
    /* Brand Colors */
    --primary-dark: #1a1a1a;
    --primary-darker: #0a0a0a;
    --secondary-light: #f5f5f5;
    --secondary-lighter: #ffffff;
    --accent: #adb5bd;
    --border-color: #e0e0e0;
    --text-dark: #1a1a1a;
    --text-light: #6c757d;
    
    /* Responsive breakpoints */
    --mobile-table-min-width: 600px;
}


/* ============================================= */
/* SCHLICHTES & SERIÖSES DESIGN (theme-serios)  */
/* Komplettes Redesign für professionellen Look */
/* ============================================= */

/* Basis-Einstellungen */
.theme-serios {
    --serios-primary: #2563eb;
    --serios-primary-dark: #1d4ed8;
    --serios-accent: #f97316;
    --serios-bg: #f8fafc;
    --serios-card-bg: #ffffff;
    --serios-text: #1e293b;
    --serios-text-muted: #64748b;
    --serios-border: #e2e8f0;
    --serios-sidebar-bg: #0f172a;
    --serios-sidebar-text: #e2e8f0;
}

/* Sidebar komplett neu */
.theme-serios .sidebar {
    background: var(--serios-sidebar-bg) !important;
    border-right: 1px solid #1e293b !important;
    box-shadow: none !important;
}

.theme-serios .sidebar-racing-pattern,
.theme-serios .content-background-pattern,
.theme-serios .racing-flag-pattern {
    display: none !important;
}

.theme-serios .sidebar-main-logo {
    filter: grayscale(30%) brightness(1.1) !important;
    margin: 0 !important;
}

/* Navigation Links */
.theme-serios .nav-link {
    color: var(--serios-sidebar-text) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    margin: 2px 8px !important;
    padding: 0.75rem 1rem !important;
    border-left: none !important;
    transition: background-color 0.2s ease !important;
}

.theme-serios .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .nav-link::before {
    display: none !important;
}

.theme-serios .nav-link.active {
    background: var(--serios-accent) !important;
    color: #ffffff !important;
    border-left: none !important;
    box-shadow: none !important;
}

/* Main Content Area */
.theme-serios main {
    background: var(--serios-bg) !important;
}

.theme-serios .content {
    background: var(--serios-bg) !important;
}

/* Top Row / Header */
.theme-serios .top-row {
    background: var(--serios-card-bg) !important;
    border-bottom: 1px solid var(--serios-border) !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
    padding: 0.75rem 1.5rem !important;
}

.theme-serios .brand-title {
    color: var(--serios-text) !important;
    font-size: 1.5rem !important;
    text-shadow: none !important;
}

.theme-serios .brand-silver,
.theme-serios .brand-orange {
    text-shadow: none !important;
}

.theme-serios .brand-gear-icon,
.theme-serios .racing-flag,
.theme-serios .racing-speed,
.theme-serios .top-row-racing-elements {
    display: none !important;
}

/* Typography */
.theme-serios h1,
.theme-serios h2,
.theme-serios h3,
.theme-serios h4,
.theme-serios h5,
.theme-serios h6 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: var(--serios-text) !important;
    font-weight: 600 !important;
}

/* Cards - Komplett neu */
.theme-serios .card {
    background: var(--serios-card-bg) !important;
    border: 1px solid var(--serios-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: box-shadow 0.2s ease !important;
}

.theme-serios .card::before {
    display: none !important;
}

.theme-serios .card:hover {
    transform: none !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08) !important;
    border-color: var(--serios-border) !important;
}

.theme-serios .card-header {
    background: var(--serios-card-bg) !important;
    border-bottom: 1px solid var(--serios-border) !important;
    color: var(--serios-text) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 600 !important;
    padding: 1rem 1.25rem !important;
}

.theme-serios .card-body {
    padding: 1.25rem !important;
}

/* Buttons - Schlicht und modern */
.theme-serios .btn {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
    padding: 0.5rem 1rem !important;
}

.theme-serios .btn::before {
    display: none !important;
}

.theme-serios .btn:hover::before {
    display: none !important;
}

.theme-serios .btn:hover {
    transform: none !important;
}

.theme-serios .btn-primary {
    background: var(--serios-accent) !important;
    border-color: var(--serios-accent) !important;
    color: #ffffff !important;
}

.theme-serios .btn-primary:hover {
    background: #ea580c !important;
    border-color: #ea580c !important;
    box-shadow: none !important;
}

.theme-serios .btn-secondary {
    background: #64748b !important;
    border-color: #64748b !important;
    color: #ffffff !important;
}

.theme-serios .btn-secondary:hover {
    background: #475569 !important;
    border-color: #475569 !important;
}

.theme-serios .btn-outline-primary {
    color: var(--serios-accent) !important;
    border-color: var(--serios-accent) !important;
    background: transparent !important;
}

.theme-serios .btn-outline-primary:hover {
    background: var(--serios-accent) !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .btn-outline-secondary {
    color: #64748b !important;
    border-color: #cbd5e1 !important;
    background: transparent !important;
}

.theme-serios .btn-outline-secondary:hover {
    background: #f1f5f9 !important;
    color: #334155 !important;
    border-color: #cbd5e1 !important;
}

.theme-serios .btn-outline-danger {
    color: #dc2626 !important;
    border-color: #dc2626 !important;
}

.theme-serios .btn-outline-danger:hover {
    background: #dc2626 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .btn-outline-info {
    color: #0284c7 !important;
    border-color: #0284c7 !important;
}

.theme-serios .btn-outline-info:hover {
    background: #0284c7 !important;
    color: #ffffff !important;
}

.theme-serios .btn-success {
    background: #16a34a !important;
    border-color: #16a34a !important;
}

.theme-serios .btn-success:hover {
    background: #15803d !important;
    border-color: #15803d !important;
}

.theme-serios .btn-danger {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
}

.theme-serios .btn-danger:hover {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

.theme-serios .btn-warning {
    background: #f59e0b !important;
    border-color: #f59e0b !important;
    color: #1e293b !important;
}

.theme-serios .btn-info {
    background: #0284c7 !important;
    border-color: #0284c7 !important;
}

/* Form Controls */
.theme-serios .form-control,
.theme-serios .form-select {
    border: 1px solid var(--serios-border) !important;
    border-radius: 8px !important;
    padding: 0.625rem 0.875rem !important;
    transition: border-color 0.15s ease, box-shadow 0.15s ease !important;
}

.theme-serios .form-control:focus,
.theme-serios .form-select:focus {
    border-color: var(--serios-accent) !important;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15) !important;
}

.theme-serios .form-label {
    font-weight: 500 !important;
    color: var(--serios-text) !important;
    margin-bottom: 0.375rem !important;
}

/* Tables */
.theme-serios .table {
    border-color: var(--serios-border) !important;
}

.theme-serios .table thead th {
    background: #f8fafc !important;
    border-bottom: 1px solid var(--serios-border) !important;
    color: var(--serios-text) !important;
    font-weight: 600 !important;
    text-transform: none !important;
}

.theme-serios .table tbody tr {
    border-bottom: 1px solid var(--serios-border) !important;
}

.theme-serios .table tbody tr:hover {
    background: #f8fafc !important;
}

/* Tabs */
.theme-serios .nav-tabs {
    border-bottom: 1px solid var(--serios-border) !important;
}

.theme-serios .nav-tabs .nav-link {
    border: none !important;
    border-bottom: 2px solid transparent !important;
    color: var(--serios-text-muted) !important;
    background: transparent !important;
    margin: 0 !important;
    padding: 0.75rem 1.25rem !important;
    border-radius: 0 !important;
}

.theme-serios .nav-tabs .nav-link:hover {
    border-bottom-color: var(--serios-border) !important;
    color: var(--serios-text) !important;
    background: transparent !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .nav-tabs .nav-link.active {
    border-bottom-color: var(--serios-accent) !important;
    color: var(--serios-accent) !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Badges */
.theme-serios .badge {
    font-weight: 500 !important;
    border-radius: 6px !important;
    padding: 0.35rem 0.65rem !important;
}

/* Alerts */
.theme-serios .alert {
    border-radius: 8px !important;
    border-width: 1px !important;
}

/* Modals */
.theme-serios .modal-content {
    border: 1px solid var(--serios-border) !important;
    border-radius: 12px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.theme-serios .modal-header {
    background: var(--serios-card-bg) !important;
    border-bottom: 1px solid var(--serios-border) !important;
    border-radius: 12px 12px 0 0 !important;
}

/* Breadcrumbs */
.theme-serios .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
}

.theme-serios .breadcrumb-item a {
    color: var(--serios-accent) !important;
}

/* Spinners */
.theme-serios .spinner-border {
    border-color: var(--serios-accent) !important;
    border-right-color: transparent !important;
}

/* Dropdown */
.theme-serios .dropdown-menu {
    border: 1px solid var(--serios-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* User Emoji Container */
.theme-serios .user-emoji-container {
    border-color: var(--serios-accent) !important;
    background: rgba(249, 115, 22, 0.1) !important;
    box-shadow: none !important;
}

.theme-serios .user-emoji-container:hover {
    transform: none !important;
}

/* Dashboard Cards */
.theme-serios .dashboard-icon {
    filter: none !important;
}

/* Customer Group Header */
.theme-serios .customer-group-header {
    background: #f1f5f9 !important;
    border-left: 3px solid var(--serios-accent) !important;
}

.theme-serios .customer-group-header h6,
.theme-serios .customer-group-header td {
    color: var(--serios-text) !important;
}

/* Fancy Switch für seriöses Design */
.theme-serios .fancy-switch .form-check-input {
    background-color: #cbd5e1 !important;
    border-color: #94a3b8 !important;
}

.theme-serios .fancy-switch .form-check-input:checked {
    background-color: var(--serios-accent) !important;
    border-color: var(--serios-accent) !important;
    box-shadow: none !important;
}

/* Auftrag Document Styles */
.theme-serios .auftragsnummer-box {
    background: var(--serios-accent) !important;
}

.theme-serios .document-header {
    border-bottom-color: var(--serios-accent) !important;
}

/* Print Styles für seriöses Design */
@media print {
    .theme-serios .card {
        box-shadow: none !important;
        border: 1px solid #e2e8f0 !important;
    }
}



/* Modern GarageBuddy design */
.theme-modern {
    background: #f3f4f6;
}

.theme-modern {
    background: #eef1f5 !important;
    color: #1f2937;
}

.theme-modern .sidebar {
    background: #0f172a !important;
    border-right: 2px solid var(--racing-orange) !important;
    box-shadow: none !important;
}

.theme-modern .sidebar-racing-pattern,
.theme-modern .content-background-pattern {
    display: none !important;
}

.theme-modern main {
    background: #eef1f5 !important;
}

.theme-modern .top-row {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}

.theme-modern .brand-title {
    color: #111827;
    text-shadow: none !important;
}

.theme-modern .content {
    background: #f8fafc !important;
}

.theme-modern h1,
.theme-modern h2,
.theme-modern h3,
.theme-modern h4,
.theme-modern h5,
.theme-modern h6 {
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #111827 !important;
}

.theme-modern .card {
    border: 1px solid #e5e7eb !important;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08) !important;
    border-radius: 16px !important;
    background: #ffffff !important;
}

.theme-modern .card::before {
    display: none !important;
}

.theme-modern .card-header {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    color: #111827 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

.theme-modern .nav-link {
    text-transform: none !important;
    letter-spacing: 0 !important;
    color: #e2e8f0 !important;
    border-left: 3px solid transparent;
}

.theme-modern .nav-link.active {
    background-color: rgba(255, 107, 0, 0.18) !important;
    border-left-color: var(--racing-orange);
    box-shadow: none !important;
}

.theme-modern .btn {
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: none !important;
}

.theme-modern .btn-primary {
    background: #ff6b00 !important;
    border-color: #ff6b00 !important;
}

.theme-modern .btn-secondary {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #f5f5f5 0%, #e8e8e8 100%);
    color: var(--text-dark);
    margin: 0;
    padding: 0;
}

/* Headings with Racing Style */
h1, h2, h3, h4, h5, h6 {
    color: var(--racing-black);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Links */
a, .btn-link {
    color: var(--racing-orange);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover, .btn-link:hover {
    color: var(--racing-orange-light);
    text-decoration: none;
    transform: translateX(2px);
}

/* Content Area with Animated Background */
.content {
    padding-top: 1.1rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    min-height: calc(100vh - 3.5rem);
    flex: 1;
    position: relative;
    z-index: 1;
}

.content-background-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
    pointer-events: none;
    background-image: 
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 35px,
            var(--racing-black) 35px,
            var(--racing-black) 70px
        );
    animation: slide-pattern 20s linear infinite;
    z-index: 0;
}

@keyframes slide-pattern {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 100px 100px;
    }
}

h1:focus {
    outline: none;
}

/* Form & Input Styling */
.form-control, .form-control-plaintext {
    border: 2px solid var(--border-color);
    color: var(--text-dark);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--racing-orange);
    box-shadow: 0 0 0 0.2rem rgba(255, 107, 0, 0.25);
    transform: translateY(-1px);
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--racing-green);
}

.invalid {
    outline: 2px solid var(--racing-red);
}

.validation-message {
    color: var(--racing-red);
    font-weight: 600;
}

/* Alerts with Racing Theme */
.alert {
    border-radius: 8px;
    border: 2px solid;
    font-weight: 600;
}

.alert-warning {
    background: linear-gradient(135deg, #fff9e6 0%, #ffeaa7 100%);
    border-color: var(--racing-yellow);
    color: #856404;
}

.alert-danger {
    background: linear-gradient(135deg, #ffe6e6 0%, #ffcccc 100%);
    border-color: var(--racing-red);
    color: #721c24;
}

.alert-info {
    background: linear-gradient(135deg, #e6f3ff 0%, #cce5ff 100%);
    border-color: #64b5f6;
    color: #004085;
}

/* Buttons with Racing Design */
.btn {
    border-radius: 8px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn:hover::before {
    left: 100%;
}

.btn:focus, .btn:active:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 0, 0.5);
}

.btn:active {
    background-color: var(--racing-orange-dark) !important;
    border-color: var(--racing-orange-dark) !important;
    color: white !important;
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border-color: var(--racing-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--racing-orange-light) 0%, var(--racing-orange) 100%);
    border-color: var(--racing-orange-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--racing-silver) 0%, var(--racing-gray) 100%);
    border-color: var(--racing-silver);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border-color: var(--racing-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

/* Outline Buttons */
.btn-outline-primary {
    color: var(--racing-orange);
    border-color: var(--racing-orange);
    border-width: 2px;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border-color: var(--racing-orange);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

.btn-outline-danger {
    color: var(--racing-red);
    border-color: var(--racing-red);
    border-width: 2px;
}

.btn-outline-danger:hover {
    background: linear-gradient(135deg, var(--racing-red) 0%, #cc0000 100%);
    border-color: var(--racing-red);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4);
}

/* Additional Button Variants */
.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
    border-color: #17a2b8;
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.3);
}

.btn-info:hover {
    background: linear-gradient(135deg, #1fc8e3 0%, #17a2b8 100%);
    border-color: #1fc8e3;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(23, 162, 184, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    border-color: #28a745;
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #34ce57 0%, #28a745 100%);
    border-color: #34ce57;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(40, 167, 69, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--racing-red) 0%, #cc0000 100%);
    border-color: var(--racing-red);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #ff3333 0%, var(--racing-red) 100%);
    border-color: #ff3333;
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.5);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    border-color: #ffc107;
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffd54f 0%, #ffc107 100%);
    border-color: #ffd54f;
    color: #000;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.5);
}

.btn-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e2e6ea 100%);
    border-color: #dee2e6;
    color: var(--racing-black);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-light:hover {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: var(--racing-orange);
    color: var(--racing-black);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.2);
}

.btn-dark {
    background: linear-gradient(135deg, var(--racing-black) 0%, var(--racing-dark) 100%);
    border-color: var(--racing-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-dark:hover {
    background: linear-gradient(135deg, var(--racing-dark) 0%, var(--racing-gray) 100%);
    border-color: var(--racing-orange-light);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.4);
}

/* Purple/Violet Badge for Closed Orders */
.bg-purple {
    background: linear-gradient(135deg, #6f42c1 0%, #5a32a3 100%) !important;
    color: white !important;
    border: 2px solid #8a63d2;
    box-shadow: 0 2px 8px rgba(111, 66, 193, 0.3);
}

/* Small Buttons */
.btn-sm {
    border-width: 2px;
}

/* Large Buttons */
.btn-lg {
    border-width: 2px;
}

/* Cards with Racing Style */
.card {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--racing-orange) 0%, var(--racing-yellow) 50%, var(--racing-orange) 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.card:hover::before {
    transform: translateX(0);
}

.card:hover {
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.25);
    transform: translateY(-8px) scale(1.02);
    border-color: var(--racing-orange);
}

.card-header {
    background: linear-gradient(135deg, var(--racing-black) 0%, var(--racing-dark) 100%);
    border-bottom: 3px solid var(--racing-orange);
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Navigation Bar with Racing Design */
.bg-gradient {
    background: #000000 !important;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 1), inset 0 -2px 10px rgba(0, 0, 0, 0.8);
    border-bottom: 2px solid rgba(255, 107, 0, 0.5);
    padding: 0.2rem 0.3rem;
    min-height: auto;
}

.bg-gradient .container-fluid {
    padding: 0;
}

.bg-gradient .navbar-brand {
    padding: 0;
    margin: 0;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: 1px;
    color: white !important;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

.navbar-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 0 15px rgba(255, 107, 0, 0.9));
    transition: all 0.3s ease;
}

.navbar-logo:hover {
    transform: scale(1.15) rotate(5deg);
}

.sidebar-main-logo {
    width: auto;
    max-width: 98%;
    filter: drop-shadow(0 0 35px rgba(255, 107, 0, 1));
    transition: all 0.3s ease;
    margin: -20px 0;
}

.sidebar-main-logo:hover {
    transform: scale(1.05);
}

.brand-text {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    font-size: 1.5rem;
}

/* Dashboard Icons */
.dashboard-icon {
    color: var(--racing-orange);
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    filter: drop-shadow(0 2px 4px rgba(255, 107, 0, 0.3));
}

.card-body:hover .dashboard-icon {
    color: var(--racing-orange-light);
    transform: scale(1.2) rotate(10deg);
    filter: drop-shadow(0 4px 8px rgba(255, 107, 0, 0.5));
}

/* Dashboard Buttons */
.btn-dashboard {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border: 2px solid var(--racing-orange);
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

.btn-dashboard:hover {
    background: linear-gradient(135deg, var(--racing-orange-light) 0%, var(--racing-orange) 100%);
    border-color: var(--racing-orange-light);
    color: white;
    text-decoration: none;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.5);
}

/* Logout Button */
.btn-logout {
    background: linear-gradient(135deg, #f0f0f0 0%, #e0e0e0 100%);
    border: 2px solid var(--racing-black);
    color: var(--racing-black);
    font-weight: 700;
    transition: all 0.3s ease;
    border-radius: 8px;
    padding: 0.7rem 1rem;
}

.btn-logout:hover {
    background: linear-gradient(135deg, var(--racing-red) 0%, #cc0000 100%);
    border-color: var(--racing-red);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.4);
    transform: translateY(-2px);
}

/* Sidebar Navigation Layout with Racing Theme */
.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.sidebar {
    background: linear-gradient(180deg, #000000 0%, #000000 100%) !important;
    border-right: 4px solid var(--racing-orange) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 300px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    box-shadow: 
        4px 0 20px rgba(255, 107, 0, 0.4),
        inset -4px 0 10px rgba(0, 0, 0, 0.8) !important;
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    z-index: 1000 !important;
}

main {
    flex: 1;
    margin-left: 300px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Racing Pattern Background for Sidebar */
.sidebar-racing-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

/* Checkered Flag Pattern */
.racing-flag-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.08;
    background-image: 
        linear-gradient(45deg, #000 25%, transparent 25%),
        linear-gradient(-45deg, #000 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, #000 75%),
        linear-gradient(-45deg, transparent 75%, #000 75%);
    background-size: 40px 40px;
    background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    animation: racing-flag-move 10s linear infinite;
}

@keyframes racing-flag-move {
    0% {
        background-position: 0 0, 0 20px, 20px -20px, -20px 0px;
    }
    100% {
        background-position: 40px 40px, 40px 60px, 60px 20px, 20px 40px;
    }
}

.brand-logo-item {
    position: absolute;
    opacity: 0.12;
    transform: rotate(-15deg);
    animation: float-brand 25s ease-in-out infinite;
}

.brand-logo-item:nth-child(2) { animation-delay: -5s; }
.brand-logo-item:nth-child(3) { animation-delay: -10s; }
.brand-logo-item:nth-child(4) { animation-delay: -15s; }
.brand-logo-item:nth-child(5) { animation-delay: -20s; }

@keyframes float-brand {
    0%, 100% {
        transform: translateY(0) rotate(-15deg) scale(1);
    }
    33% {
        transform: translateY(-25px) rotate(-12deg) scale(1.05);
    }
    66% {
        transform: translateY(-10px) rotate(-18deg) scale(0.95);
    }
}

.brand-logo-text {
    font-size: 2.8rem;
    font-weight: 900;
    color: rgba(255, 107, 0, 0.4);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-family: 'Arial Black', sans-serif;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.5),
        0 0 20px rgba(255, 107, 0, 0.6);
    display: block;
    white-space: nowrap;
}

.racing-icon {
    position: absolute;
    opacity: 0.15;
    font-size: 2.5rem;
    color: var(--racing-orange);
    animation: rotate-racing 20s ease-in-out infinite;
    filter: drop-shadow(0 0 10px rgba(255, 107, 0, 0.8));
}

.racing-icon:nth-child(even) {
    animation: pulse-racing 3s ease-in-out infinite;
}

@keyframes rotate-racing {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

@keyframes pulse-racing {
    0%, 100% {
        opacity: 0.15;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        transform: scale(1.2);
    }
}

/* Navigation Link Styling */
.nav-link-styled {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 8px !important;
    transition: all 0.3s ease !important;
}

.nav-link-styled:hover {
    background: rgba(255, 107, 0, 0.15) !important;
    transform: translateX(5px) !important;
}

.nav-emoji {
    font-size: 1.3rem;
    min-width: 28px;
    text-align: center;
    display: inline-block;
}

.nav-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #e0e0e0;
    white-space: nowrap;
}

.nav-link-styled:hover .nav-text {
    color: #ff6b00;
}

/* Dashboard & Logout Highlight Button */
.nav-highlight-button {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 12px !important;
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%) !important;
    border-radius: 12px !important;
    padding: 0.9rem 1rem !important;
    margin: 0.3rem 0 !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.4) !important;
    border: 2px solid var(--racing-orange-light) !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

.nav-highlight-button:hover {
    transform: translateX(5px) scale(1.02) !important;
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.6) !important;
    background: linear-gradient(135deg, var(--racing-orange-light) 0%, var(--racing-orange) 100%) !important;
}

.nav-highlight-button .nav-emoji {
    font-size: 1.5rem;
    min-width: 32px;
}

.nav-highlight-button .nav-text {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.5px;
    color: white !important;
}

/* Logout Button Specific */
.nav-logout-button {
    background: linear-gradient(135deg, #dc3545 0%, #a71d2a 100%) !important;
    border: 2px solid #ff6b6b !important;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.4) !important;
}

.nav-logout-button:hover {
    background: linear-gradient(135deg, #ff6b6b 0%, #dc3545 100%) !important;
    box-shadow: 0 6px 20px rgba(220, 53, 69, 0.6) !important;
}

/* Settings Button Specific */
.nav-settings-button {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%) !important;
    border: 2px solid #adb5bd !important;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.4) !important;
}

.nav-settings-button:hover {
    background: linear-gradient(135deg, #adb5bd 0%, #6c757d 100%) !important;
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.6) !important;
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.5), transparent);
    margin: 0 1rem;
}

/* Top Row with Racing Design */
.top-row {
    background: #000000 !important;
    border-bottom: 4px solid var(--racing-orange) !important;
    padding: 1.2rem 2rem;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.top-row-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

.top-row-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 20px #ff6b00);
}

.brand-gear-icon {
    font-size: 4rem;
    color: var(--racing-orange);
    filter: drop-shadow(0 0 20px rgba(255, 107, 0, 0.9));
}

.brand-title {
    font-size: 3.5rem;
    font-weight: 900;
    color: #4a4a4a;
    letter-spacing: 2px;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 255, 255, 0.15),
        0 0 30px rgba(255, 255, 255, 0.1);
    font-family: 'Arial Black', sans-serif;
    text-transform: uppercase;
}

.brand-initial {
    font-size: 3.8rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-yellow) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    filter: drop-shadow(2px 2px 4px rgba(255, 107, 0, 0.3));
    margin-right: 2px;
}

.brand-silver {
    font-weight: 900;
    color: #c0c0c0;
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 15px rgba(192, 192, 192, 0.7),
        0 0 25px rgba(255, 255, 255, 0.4);
}

.brand-orange {
    font-weight: 900;
    color: var(--racing-orange);
    text-shadow: 
        2px 2px 4px rgba(0, 0, 0, 0.3),
        0 0 20px rgba(255, 107, 0, 0.8),
        0 0 30px rgba(255, 107, 0, 0.4);
}

.top-row-racing-elements {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.racing-flag {
    font-size: 2.5rem;
    color: var(--racing-orange);
    filter: drop-shadow(0 0 15px rgba(255, 107, 0, 0.7));
}

.racing-speed {
    font-size: 2.5rem;
    color: var(--racing-orange);
    filter: drop-shadow(0 0 15px rgba(255, 107, 0, 0.7));
}

/* Sidebar Navigation Links */
.nav-scrollable {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem 0;
}

.nav-item {
    margin-bottom: 0.5rem;
    padding: 0 1rem;
}

.nav-link {
    color: #e8e8e8 !important;
    padding: 1rem 1.2rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-left: 4px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-link-dokumente {
    font-size: 0.85rem;
    padding: 0.95rem 1.1rem;
    letter-spacing: 0.3px;
}

.nav-link-text-compact {
    line-height: 1.3;
    display: inline-block;
}

.nav-link i {
    font-size: 1.1rem;
    width: 1.2rem;
    flex-shrink: 0;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 107, 0, 0.2), transparent);
    transition: left 0.5s ease;
}

.nav-link:hover::before {
    left: 100%;
}

.nav-link:hover {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%) !important;
    color: #ffffff !important;
    border-left-color: var(--racing-yellow);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.5);
}

.nav-link.active {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%) !important;
    color: #ffffff !important;
    font-weight: 700;
    border-left-color: var(--racing-yellow);
    box-shadow: 
        inset 4px 0 0 var(--racing-yellow),
        0 4px 15px rgba(255, 107, 0, 0.6);
}

/* Parts Status Badges with Racing Theme */
.part-number-badge {
    display: inline-block;
    padding: 0.4rem 0.9rem;
    font-weight: 700;
    font-size: 0.9rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-ordered {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    color: #fff;
    border: 2px solid var(--racing-yellow);
    box-shadow: 0 4px 10px rgba(255, 107, 0, 0.3);
}

.status-delivered {
    background: linear-gradient(135deg, var(--racing-green) 0%, #00cc33 100%);
    color: #000;
    border: 2px solid #00ff41;
    box-shadow: 0 4px 10px rgba(0, 255, 65, 0.3);
}

/* Tab Navigation with Racing Design */
.nav-tabs {
    border-bottom: 3px solid var(--racing-orange);
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: 2px solid transparent;
    border-radius: 8px 8px 0 0;
    color: var(--racing-black) !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1.8rem;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.nav-tabs .nav-link:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-3px);
    border-color: var(--racing-orange);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.2);
}

.nav-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    color: white !important;
    border-color: var(--racing-orange);
    border-bottom-color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
}

/* Filter Buttons with Racing Style */
.filter-btn-group .btn {
    border: 2px solid transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.8rem 1.8rem;
    transition: all 0.3s ease;
    border-radius: 8px;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.filter-btn-group .btn:not(.active) {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: var(--racing-black) !important;
    border-color: var(--racing-silver);
}

.filter-btn-group .btn:not(.active):hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    border-color: var(--racing-orange);
}

.filter-btn-group .btn.active {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    color: white !important;
    border-color: var(--racing-orange);
    transform: translateY(-3px);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.5);
}

/* Table Styling with Racing Theme */
.table-responsive::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 5px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border-radius: 5px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--racing-orange-light) 0%, var(--racing-orange) 100%);
}

/* Document Type Headers with Racing Theme */
.document-type-header {
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--racing-black) 0%, var(--racing-dark) 100%) !important;
    border-left: 4px solid var(--racing-orange) !important;
}

.document-type-header:hover {
    transform: translateX(6px);
    background: linear-gradient(135deg, var(--racing-dark) 0%, var(--racing-gray) 100%) !important;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}

/* User Emoji Container with Racing Design */
.user-emoji-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.3) 0%, rgba(255, 107, 0, 0.1) 100%);
    border-radius: 50%;
    border: 4px solid var(--racing-orange);
    box-shadow: 
        0 4px 20px rgba(255, 107, 0, 0.5),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.user-emoji-container:hover {
    transform: scale(1.1) rotate(5deg);
    border-color: var(--racing-yellow);
    box-shadow: 
        0 6px 25px rgba(255, 107, 0, 0.7),
        inset 0 2px 4px rgba(255, 255, 255, 0.3);
}

.user-emoji {
    font-size: 3.5rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.profile-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.edit-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 50%;
}

.edit-overlay i {
    color: white;
    font-size: 2rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
}

.user-emoji-container.clickable {
    cursor: pointer;
}

.user-emoji-container.clickable:hover .edit-overlay {
    opacity: 1;
}

/* Timeline with Racing Theme */
.timeline-marker-service {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border: 3px solid var(--racing-orange);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.4);
}

.timeline-marker-reparatur {
    background: linear-gradient(135deg, var(--racing-orange) 0%, var(--racing-orange-dark) 100%);
    border: 3px solid var(--racing-yellow);
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.5);
}

.timeline-service .card {
    border-left: 5px solid #0d6efd;
}

.timeline-reparatur .card {
    border-left: 5px solid var(--racing-orange);
}

/* Service Cards with Racing Hover */
.card[style*="cursor: pointer"]:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 10px 35px rgba(255, 107, 0, 0.3) !important;
}

/* Modal Styling with Racing Theme */
.modal-content {
    border-radius: 12px;
    border: 3px solid var(--racing-orange);
    box-shadow: 0 10px 50px rgba(255, 107, 0, 0.4);
}

.modal-header.bg-gradient {
    background: linear-gradient(135deg, var(--racing-black) 0%, var(--racing-dark) 100%);
    border-bottom: 3px solid var(--racing-orange);
    border-radius: 12px 12px 0 0;
}

/* User Info Section */
.user-info-section {
    background: linear-gradient(135deg, rgba(26, 26, 26, 0.4) 0%, rgba(10, 10, 10, 0.6) 100%);
    border-bottom: 2px solid var(--racing-orange);
    margin: 0;
    padding: 0;
}

.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    background: linear-gradient(135deg, var(--racing-black) 0%, var(--racing-dark) 100%);
    position: relative;
    overflow: hidden;
    margin-left: auto;
}

.login-background-logo {
    position: absolute;
    top: 50%;
    left: 30%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 1400px;
    height: auto;
    opacity: 0.15;
    z-index: 1;
    pointer-events: none;
}

.login-background-logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 100px rgba(255, 107, 0, 0.6));
}

.login-form-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 450px;
}

.login-logo {
    max-width: 280px;
    width: 100%;
    height: auto;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 0 30px rgba(255, 107, 0, 1));
}

.login-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 249, 250, 0.95) 100%);
    border: 3px solid var(--racing-orange);
    border-radius: 16px;
    box-shadow: 0 10px 50px rgba(255, 107, 0, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 10;
    max-height: 95vh;
    overflow-y: auto;
}

.login-card .card-body {
    padding: 2rem 3rem !important;
}

.login-card h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.login-card p {
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.login-card .form-label {
    font-size: 0.9rem;
    margin-bottom: 0.4rem;
}

.login-card .form-control-lg {
    padding: 0.6rem 0.8rem;
    font-size: 1rem;
}

.login-card .btn-lg {
    padding: 0.7rem 1rem;
    font-size: 1rem;
}

.login-card hr {
    margin: 1.5rem 0;
}

/* Background selector */
.background-selector-wrapper {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 1000;
}

.background-selector-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    border: 2px solid var(--racing-orange);
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
}

.background-menu {
    width: 250px;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
    margin-top: 0.5rem;
}

/* Mobile responsive for login */
@media (max-width: 640px) {
    .login-container {
        padding: 1rem 0.5rem;
    }
    
    .login-form-wrapper {
        max-width: 100%;
        width: 100%;
    }
    
    .login-card .card-body {
        padding: 1.5rem 1rem !important;
    }
    
    .login-logo {
        max-width: 180px !important;
    }
    
    .login-card h1 {
        font-size: 1.5rem !important;
    }
    
    .login-card p {
        font-size: 0.85rem !important;
    }
    
    .login-card .form-control-lg {
        padding: 0.5rem 0.7rem;
        font-size: 0.95rem;
    }
    
    .login-card .btn-lg {
        padding: 0.6rem 0.9rem;
        font-size: 0.95rem;
    }
    
    .login-background-logo {
        left: 50%;
        width: 100%;
        max-width: 600px;
        opacity: 0.08;
    }
    
    .background-selector-wrapper {
        bottom: 10px;
        left: 10px;
    }
    
    .background-selector-btn {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .background-menu {
        width: calc(100vw - 80px);
        max-width: 280px;
    }
}

/* Tablet responsive for login */
@media (min-width: 641px) and (max-width: 1024px) {
    .login-form-wrapper {
        max-width: 450px;
    }
    
    .login-card .card-body {
        padding: 2rem 2rem !important;
    }
    
    .login-logo {
        max-width: 220px;
    }
}

/* Responsive Design */

/* Mobile First - Small Devices (Phones) */
@media (max-width: 640px) {
    /* Sidebar collapses completely on mobile */
    .sidebar {
        position: fixed !important;
        left: -300px !important;
        width: 300px !important;
        height: 100vh !important;
        transition: left 0.3s ease !important;
        z-index: 2000 !important;
    }
    
    .navbar-toggler:checked ~ .sidebar {
        left: 0 !important;
    }
    
    /* Overlay for sidebar */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .navbar-toggler:checked ~ .sidebar-overlay {
        display: block;
        opacity: 1;
    }
    
    main {
        margin-left: 0 !important;
        width: 100% !important;
    }
    
    /* Top row adjustments */
    .top-row {
        padding: 0.8rem 1rem !important;
    }
    
    .top-row-brand {
        flex-direction: column;
        gap: 0.5rem !important;
    }
    
    .brand-title {
        font-size: 1.8rem !important;
    }
    
    .top-row-logo {
        height: 50px !important;
    }
    
    .brand-gear-icon {
        font-size: 2rem !important;
    }
    
    .top-row-racing-elements {
        display: none;
    }
    
    /* Sidebar logo adjustments */
    .sidebar-main-logo {
        height: 120px !important;
        margin: -10px 0 !important;
    }
    
    /* User emoji container */
    .user-emoji-container {
        width: 70px !important;
        height: 70px !important;
    }
    
    .user-emoji {
        font-size: 2.5rem !important;
    }
    
    /* Cards stack vertically */
    .row > [class*="col-"] {
        margin-bottom: 1rem;
    }
    
    /* Forms */
    .card-body {
        padding: 1rem !important;
    }
    
    /* Tables - Enable horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 600px;
    }
    
    /* Buttons stack on mobile */
    .d-flex.gap-2 {
        flex-direction: column !important;
    }
    
    .d-flex.gap-2 > * {
        width: 100% !important;
    }
    
    /* Login page mobile */
    .login-container {
        padding: 1rem !important;
        justify-content: center !important;
    }
    
    .login-container > .col-md-5,
    .login-container > .col-lg-4,
    .login-container > div[class*="col-"] {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 1rem !important;
    }
    
    .login-card .card-body {
        padding: 1.5rem !important;
    }
    
    .login-logo {
        max-width: 200px !important;
    }
    
    .login-background-logo {
        width: 100%;
        left: 50%;
    }
    
    /* Filter buttons wrap */
    .filter-btn-group {
        display: flex;
        flex-wrap: wrap;
    }
    
    .filter-btn-group .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.5rem);
    }
    
    /* Modal adjustments */
    .modal-dialog {
        margin: 0.5rem;
    }
}

/* Tablet Devices */
@media (min-width: 641px) and (max-width: 1024px) {
    .sidebar {
        width: 250px !important;
    }
    
    main {
        margin-left: 250px !important;
    }
    
    .brand-title {
        font-size: 2.5rem !important;
    }
    
    .top-row-logo {
        height: 65px !important;
    }
    
    .sidebar-main-logo {
        height: 150px !important;
    }
    
    /* Forms adjust for tablet */
    .row > .col-md-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Tables - Optimize for tablet */
    table {
        font-size: 0.9rem;
    }
    
    th, td {
        padding: 0.5rem !important;
    }
    
    /* Overlay for sidebar on tablet */
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        display: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .navbar-toggler:checked ~ .sidebar-overlay {
        display: block;
        opacity: 1;
    }
}

/* Desktop and Large Screens */
@media (min-width: 1025px) {
    /* Sidebar visible by default */
    .navbar-toggler {
        display: none !important;
    }
    
    .sidebar {
        width: 300px !important;
    }
    
    main {
        margin-left: 300px !important;
    }
    
    /* Hide overlay on desktop */
    .sidebar-overlay {
        display: none !important;
    }
}

/* Extra Large Screens */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }
    
    .brand-title {
        font-size: 4rem !important;
    }
    
    .top-row-logo {
        height: 90px !important;
    }
}

/* Success Animations */
@keyframes success-flash {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 255, 65, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(0, 255, 65, 0);
    }
}

/* Loading Spinner with Racing Theme */
.spinner-border {
    border-color: var(--racing-orange);
    border-right-color: transparent;
}

/* Blazor Error UI */
#blazor-error-ui {
    display: none; /* ← DAS ist der Schlüssel */
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: linear-gradient(135deg, var(--racing-red) 0%, #cc0000 100%);
    border-top: 4px solid var(--racing-yellow);
    color: white;
    padding: 0.6rem 1.25rem;
}

/* Responsive Table Utilities */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 640px) {
    /* Make tables scroll horizontally on mobile */
    .table-responsive table {
        min-width: var(--mobile-table-min-width);
        font-size: 0.85rem;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 0.5rem !important;
        white-space: nowrap;
    }
    
    /* Card tables - Stack on mobile */
    .table-card-mobile {
        display: none;
    }
    
    .mobile-card-list {
        display: block;
    }
    
    .mobile-card-item {
        border: 2px solid var(--border-color);
        border-radius: 8px;
        padding: 1rem;
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-card-item .card-label {
        font-weight: 700;
        color: var(--racing-orange);
        display: block;
        margin-bottom: 0.25rem;
        text-transform: uppercase;
        font-size: 0.75rem;
        letter-spacing: 0.5px;
    }
    
    .mobile-card-item .card-value {
        display: block;
        margin-bottom: 0.75rem;
        color: var(--text-dark);
    }
}

@media (min-width: 641px) {
    .mobile-card-list {
        display: none;
    }
    
    .table-card-mobile {
        display: table;
    }
}

/* Responsive Form Utilities */
@media (max-width: 640px) {
    /* Stack form columns on mobile */
    .row > [class*="col-md-"],
    .row > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 0.5rem;
    }
    
    /* Full-width buttons on mobile */
    .btn:not(.btn-sm) {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        width: 100%;
        border-radius: 8px !important;
        margin-bottom: 0.5rem;
    }
    
    /* Form labels more prominent on mobile */
    .form-label {
        font-weight: 700;
        color: var(--racing-black);
        font-size: 0.9rem;
    }
    
    /* Larger form inputs for touch */
    .form-control,
    .form-select {
        font-size: 16px !important; /* Prevents zoom on iOS */
        min-height: 44px; /* Touch-friendly size */
    }
}

/* Fancy toggle switches */
.fancy-switch .form-check-input {
    width: 3.2rem !important;
    height: 1.6rem !important;
    margin-top: 0.1rem;
    background-color: #2d2d2d !important;
    border: 2px solid rgba(255, 107, 0, 0.4) !important;
    background-image: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    position: relative;
    border-radius: 999px !important;
    transition: all 0.25s ease-in-out;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.35);
    cursor: pointer;
}

.fancy-switch .form-check-input:checked {
    background-color: var(--racing-orange) !important;
    border-color: var(--racing-orange-dark) !important;
    box-shadow: 0 0 12px rgba(255, 107, 0, 0.6);
}

.fancy-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 107, 0, 0.4) !important;
    outline: none !important;
}

.fancy-switch .form-check-input::after {
    content: "" !important;
    position: absolute;
    top: 50%;
    left: 0.15rem;
    width: 1.15rem;
    height: 1.15rem;
    background: #ffffff !important;
    border-radius: 50% !important;
    transform: translateY(-50%);
    transition: all 0.25s ease-in-out;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.fancy-switch .form-check-input:checked::after {
    left: 1.75rem;
}

.fancy-switch .form-check-label {
    font-weight: 600;
    color: #222;
    margin-left: 0.5rem;
    cursor: pointer;
    user-select: none;
}

.theme-serios .fancy-switch .form-check-input {
    background-color: #1f1f1f;
    border-color: rgba(255, 107, 0, 0.35);
}

/* Touch-friendly improvements */
@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes */
    .btn,
    .nav-link,
    button,
    a {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Disable hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover::before {
        left: -100%;
    }
}

/* Responsive Grid Improvements */
@media (max-width: 640px) {
    .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    /* Dashboard cards full width on mobile */
    .col-md-6,
    .col-md-4,
    .col-md-8 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive Navigation Improvements */
@media (max-width: 640px) {
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 3px solid var(--racing-orange);
    }
    
    .nav-tabs .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
    
    /* Filter buttons wrap and fill space */
    .filter-btn-group {
        gap: 0.5rem;
    }
    
    .filter-btn-group .btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }
}

/* Responsive Modal Improvements */
@media (max-width: 640px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }
    
    .modal-content {
        border-radius: 8px;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-header {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

/* Responsive Card Improvements */
@media (max-width: 640px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .card-body {
        padding: 1rem !important;
    }
    
    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    h3 {
        font-size: 1.25rem !important;
    }
    
    h4 {
        font-size: 1.1rem !important;
    }
    
    .lead {
        font-size: 1rem !important;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .top-row,
    .btn,
    .navbar-toggler {
        display: none !important;
    }

    main {
        margin-left: 0 !important;
        width: 100% !important;
    }

    .card {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Entferne Browser-generierte URLs und Links beim Drucken */
    @page {
        margin: 1.5cm;
    }

    a[href]:after {
        content: none !important;
    }

    abbr[title]:after {
        content: none !important;
    }
}

