/* 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;
    --carbon-top: #1a1d23;
    --carbon-bottom: #14171c;
    --carbon-surface-image:
        radial-gradient(circle at 18% 18%, rgba(255, 107, 0, 0.14) 0%, rgba(255, 107, 0, 0.05) 18%, transparent 36%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.045) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.16) 50%, rgba(0, 0, 0, 0.16) 75%, transparent 75%, transparent 100%),
        linear-gradient(45deg, rgba(255, 255, 255, 0.03) 25%, transparent 25%, transparent 50%, rgba(0, 0, 0, 0.22) 50%, rgba(0, 0, 0, 0.22) 75%, transparent 75%, transparent 100%),
        linear-gradient(180deg, var(--carbon-top) 0%, var(--carbon-bottom) 100%);
    --carbon-surface-size: auto, 18px 18px, 18px 18px, auto;
    --carbon-surface-position: 0 0, 0 0, 9px 9px, 0 0;
    
    /* 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 schwarz-weiß-grau Design          */
/* Orange nur im Logo beibehalten               */
/* ============================================= */

/* Basis-Einstellungen */
.theme-serios {
    --serios-primary: #111111;
    --serios-primary-dark: #000000;
    --serios-accent: #111111;
    --serios-bg: #ffffff;
    --serios-card-bg: #ffffff;
    --serios-text: #000000;
    --serios-text-muted: #555555;
    --serios-border: #d4d4d4;
    --serios-sidebar-bg: #000000;
    --serios-sidebar-text: #ffffff;
    --nav-active-bg: #111111;
    --nav-active-border: #111111;
    --nav-dashboard-bg: #111111;
    --nav-dashboard-hover-bg: #333333;
    --nav-dashboard-border: #111111;
    --nav-dashboard-shadow: none;

    /* Fast-Track CSS Custom Properties */
    --ft-card-bg: #ffffff;
    --ft-card-color: #222222;
    --ft-card-border: #d4d4d4;
    --ft-kicker-color: #666666;
    --ft-head-h3-color: #000000;
    --ft-head-p-color: #666666;
    --ft-icon-color: #888888;
    --ft-upload-border: rgba(0,0,0,.15);
    --ft-upload-btn-bg: #222222;
    --ft-upload-btn-color: #ffffff;
    --ft-upload-btn-border: #222222;
    --ft-upload-btn-secondary-bg: #ffffff;
    --ft-upload-btn-secondary-color: #222222;
    --ft-upload-btn-secondary-border: #222222;
    --ft-summary-bg: rgba(0,0,0,.04);
    --ft-summary-border: rgba(0,0,0,.12);
    --ft-summary-strong-color: #000000;
    --ft-summary-span-color: #666666;
    --ft-section-bg: rgba(0,0,0,.03);
    --ft-section-border: rgba(0,0,0,.08);
    --ft-section-h4-color: #000000;
    --ft-section-label-color: #555555;
    --ft-action-bg: #ffffff;
    --ft-action-color: #222222;
    --ft-action-border: #222222;
    --ft-action-accent-bg: #222222;
    --ft-action-accent-color: #ffffff;
    --ft-license-note-color: #666666;
    --ft-license-note-bg: rgba(0,0,0,.03);
    --ft-license-note-border: rgba(0,0,0,.08);
    --ft-card-shadow: none;
    --ft-upload-btn-radius: 12px;
    --ft-action-radius: 12px;
    --ft-card-radius: 18px;
}

.theme-oldschool {
    --oldschool-primary: #3b6ea5;
    --oldschool-primary-dark: #2f5f96;
    --oldschool-primary-light: #7098c3;
    --oldschool-accent: #3b6ea5;
    --oldschool-bg: #d7e4f2;
    --oldschool-card-bg: #ffffff;
    --oldschool-text: #1b365d;
    --oldschool-text-muted: #6c7f95;
    --oldschool-border: #9bb7d7;
    --oldschool-sidebar-bg: #e5eef8;
    --oldschool-sidebar-text: #1f4570;
    --nav-active-bg: #3b6ea5;
    --nav-active-border: #2f5f96;
    --nav-dashboard-bg: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%);
    --nav-dashboard-hover-bg: linear-gradient(180deg, #7098c3 0%, #4779ad 100%);
    --nav-dashboard-border: #2f5f96;
    --nav-dashboard-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.18);

    /* Fast-Track CSS Custom Properties — oldschool */
    --ft-card-bg: #ffffff;
    --ft-card-color: #1b365d;
    --ft-card-border: #9bb7d7;
    --ft-kicker-color: #2f5f96;
    --ft-head-h3-color: #1b365d;
    --ft-head-p-color: #587292;
    --ft-icon-color: #2f5f96;
    --ft-upload-border: #9bb7d7;
    --ft-upload-btn-bg: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%);
    --ft-upload-btn-color: #ffffff;
    --ft-upload-btn-border: #2f5f96;
    --ft-upload-btn-secondary-bg: #ffffff;
    --ft-upload-btn-secondary-color: #2f5f96;
    --ft-upload-btn-secondary-border: #6b91b7;
    --ft-summary-bg: #eef4fb;
    --ft-summary-border: #9bb7d7;
    --ft-summary-strong-color: #1b365d;
    --ft-summary-span-color: #587292;
    --ft-section-bg: #eef4fb;
    --ft-section-border: #d4e0ef;
    --ft-section-h4-color: #1b365d;
    --ft-section-label-color: #587292;
    --ft-action-bg: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%);
    --ft-action-color: #ffffff;
    --ft-action-border: #2f5f96;
    --ft-action-accent-bg: linear-gradient(180deg, #ffffff 0%, #d6e4f5 100%);
    --ft-action-accent-color: #2f5f96;
    --ft-license-note-color: #6c7f95;
    --ft-license-note-bg: #eef4fb;
    --ft-license-note-border: #d4e0ef;
    --ft-card-shadow: 0 2px 10px rgba(59,110,165,0.14);
    --ft-upload-btn-radius: 3px;
    --ft-action-radius: 3px;
    --ft-card-radius: 3px;
}

/* OLDSCHOOL 2010er Web-Portal */
.theme-oldschool,
.theme-oldschool button,
.theme-oldschool input,
.theme-oldschool select,
.theme-oldschool textarea {
    font-family: Tahoma, Arial, Verdana, sans-serif !important;
}

.theme-oldschool .sidebar {
    background: linear-gradient(180deg, #edf4fb 0%, #d3e1ef 100%) !important;
    border-right: 1px solid #8ba8c7 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 2px 0 8px rgba(59,110,165,0.12) !important;
}

.theme-oldschool .sidebar-racing-pattern,
.theme-oldschool .content-background-pattern,
.theme-oldschool .racing-flag-pattern {
    display: none !important;
}

.theme-oldschool .sidebar-main-logo {
    margin: 0 !important;
    filter: saturate(0.92) contrast(1.02) !important;
}

.theme-oldschool .nav-link,
.theme-oldschool .nav-sub-link {
    color: var(--oldschool-sidebar-text) !important;
    border: 1px solid transparent !important;
    border-radius: 3px !important;
    margin: 2px 8px !important;
    padding: 0.65rem 0.9rem !important;
    text-shadow: 0 1px 0 rgba(255,255,255,0.7) !important;
}

.theme-oldschool .nav-link:hover,
.theme-oldschool .nav-sub-link:hover {
    background: linear-gradient(180deg, #ffffff 0%, #dbe8f6 100%) !important;
    border-color: #94b0cf !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.95), 0 1px 2px rgba(59,110,165,0.12) !important;
}

.theme-oldschool .nav-link.active,
.theme-oldschool .nav-sub-link.active,
.theme-oldschool .nav-highlight-button {
    background: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%) !important;
    color: #ffffff !important;
    border-color: #2f5f96 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.18) !important;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.25) !important;
}

.theme-oldschool .nav-divider { border-color: #b8cade !important; }
.theme-oldschool .nav-section-label,
.theme-oldschool .nav-category-header,
.theme-oldschool .nav-category-label,
.theme-oldschool .nav-text,
.theme-oldschool .nav-sub-link {
    color: #42688f !important;
}

.theme-oldschool .nav-chevron { border-color: #6287af !important; }
.theme-oldschool .nav-sub-dot { background: #6287af !important; }

.theme-oldschool main,
.theme-oldschool .content {
    background: linear-gradient(180deg, #edf4fb 0%, #d7e4f2 100%) !important;
}

.theme-oldschool .top-row,
.theme-oldschool .sidebar .top-row {
    background: linear-gradient(180deg, #fdfefe 0%, #d6e4f5 100%) !important;
    border-bottom: 1px solid #8ba8c7 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9), 0 1px 3px rgba(59,110,165,0.12) !important;
    color: var(--oldschool-text) !important;
}

.theme-oldschool .brand-title,
.theme-oldschool .brand-silver-flat,
.theme-oldschool .brand-gray {
    color: #1b365d !important;
    -webkit-text-fill-color: #1b365d !important;
    text-shadow: 0 1px 0 rgba(255,255,255,0.75) !important;
}

.theme-oldschool .brand-orange {
    color: #3b6ea5 !important;
    -webkit-text-fill-color: #3b6ea5 !important;
}

.theme-oldschool h1,
.theme-oldschool h2,
.theme-oldschool h3,
.theme-oldschool h4,
.theme-oldschool h5,
.theme-oldschool h6 {
    color: var(--oldschool-text) !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-family: Arial, Helvetica, sans-serif !important;
}

.theme-oldschool .card,
.theme-oldschool .dash-widget,
.theme-oldschool .kpi-card,
.theme-oldschool .overdue-card,
.theme-oldschool .kalender-widget .card {
    background: #ffffff !important;
    border: 1px solid #9bb7d7 !important;
    border-radius: 3px !important;
    box-shadow: 0 2px 8px rgba(59,110,165,0.14) !important;
}

.theme-oldschool .card:hover {
    transform: none !important;
    box-shadow: 0 2px 10px rgba(59,110,165,0.18) !important;
}

.theme-oldschool .card-header,
.theme-oldschool .dash-widget-header,
.theme-oldschool .kalender-widget .card-header {
    background: linear-gradient(180deg, #f8fbff 0%, #d8e6f6 100%) !important;
    color: var(--oldschool-text) !important;
    border-bottom: 1px solid #9bb7d7 !important;
    font-weight: 700 !important;
}

.theme-oldschool .btn,
.theme-oldschool .quick-action,
.theme-oldschool .dashboard-highlight-button {
    border-radius: 3px !important;
    font-weight: 700 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.25), 0 1px 2px rgba(0,0,0,0.18) !important;
}

.theme-oldschool .btn-primary,
.theme-oldschool .btn-purple,
.theme-oldschool .quick-action,
.theme-oldschool .dashboard-highlight-button,
.theme-oldschool .btn-save-all {
    background: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%) !important;
    border-color: #2f5f96 !important;
    color: #ffffff !important;
    text-shadow: 0 -1px 0 rgba(0,0,0,0.25) !important;
}

.theme-oldschool .btn-primary:hover,
.theme-oldschool .btn-purple:hover,
.theme-oldschool .quick-action:hover,
.theme-oldschool .dashboard-highlight-button:hover,
.theme-oldschool .btn-save-all:hover {
    background: linear-gradient(180deg, #7098c3 0%, #4779ad 100%) !important;
    border-color: #2f5f96 !important;
    color: #ffffff !important;
}

.theme-oldschool .btn-outline-primary,
.theme-oldschool .btn-outline-secondary,
.theme-oldschool .btn-outline-danger,
.theme-oldschool .btn-outline-info,
.theme-oldschool .btn-outline-success {
    background: linear-gradient(180deg, #ffffff 0%, #d7e5f5 100%) !important;
    color: #1b365d !important;
    border-color: #7f9db9 !important;
}

.theme-oldschool .btn-outline-primary:hover,
.theme-oldschool .btn-outline-secondary:hover,
.theme-oldschool .btn-outline-danger:hover,
.theme-oldschool .btn-outline-info:hover,
.theme-oldschool .btn-outline-success:hover {
    background: linear-gradient(180deg, #ffffff 0%, #c8dbf1 100%) !important;
    color: #1b365d !important;
    border-color: #5f84ad !important;
}

.theme-oldschool .form-control,
.theme-oldschool .form-select,
.theme-oldschool textarea,
.theme-oldschool input:not([type="checkbox"]):not([type="radio"]),
.theme-oldschool select,
.theme-oldschool .input-group-text {
    background: #fdfefe !important;
    color: #1b365d !important;
    border-color: #7f9db9 !important;
    border-radius: 2px !important;
    box-shadow: inset 0 1px 1px rgba(0,0,0,0.06) !important;
}

.theme-oldschool .form-control:focus,
.theme-oldschool .form-select:focus,
.theme-oldschool textarea:focus,
.theme-oldschool input:focus,
.theme-oldschool select:focus {
    border-color: #3b6ea5 !important;
    box-shadow: 0 0 0 2px rgba(59,110,165,0.16) !important;
}

.theme-oldschool .form-label,
.theme-oldschool label,
.theme-oldschool strong,
.theme-oldschool p,
.theme-oldschool li,
.theme-oldschool dt,
.theme-oldschool dd,
.theme-oldschool small {
    color: #1b365d !important;
}

.theme-oldschool .text-muted,
.theme-oldschool .text-body-secondary,
.theme-oldschool .text-secondary,
.theme-oldschool .form-text {
    color: #6c7f95 !important;
}

.theme-oldschool .table {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1b365d;
    --bs-table-border-color: #d4e0ef;
    color: #1b365d !important;
}

.theme-oldschool .table > :not(caption) > * > * {
    background-color: #ffffff !important;
    color: #1b365d !important;
    border-bottom-color: #d4e0ef !important;
}

.theme-oldschool .table-light,
.theme-oldschool thead.table-light th,
.theme-oldschool .table thead th {
    background: linear-gradient(180deg, #f5f9fe 0%, #dce8f6 100%) !important;
    color: #1b365d !important;
    border-color: #b7cde6 !important;
}

.theme-oldschool .table-hover > tbody > tr:hover > * {
    background: #eef4fb !important;
    color: #1b365d !important;
}

.theme-oldschool .alert {
    border-radius: 3px !important;
    border-width: 1px !important;
}

.theme-oldschool .alert-info {
    background: #eef4fb !important;
    border-color: #9bb7d7 !important;
    color: #1b365d !important;
}

.theme-oldschool .alert-success {
    background: #f2f8ff !important;
    border-color: #9bb7d7 !important;
    color: #1b365d !important;
}

.theme-oldschool .badge.bg-info,
.theme-oldschool .badge.bg-primary,
.theme-oldschool .badge.bg-secondary {
    background: #3b6ea5 !important;
    color: #ffffff !important;
}

.theme-oldschool .modal-content,
.theme-oldschool .dropdown-menu,
.theme-oldschool .list-group-item,
.theme-oldschool .offcanvas {
    background: #ffffff !important;
    color: #1b365d !important;
    border-color: #9bb7d7 !important;
    border-radius: 3px !important;
}

.theme-oldschool .modal-header,
.theme-oldschool .card-footer,
.theme-oldschool .modal-footer,
.theme-oldschool .bg-light {
    background: linear-gradient(180deg, #f8fbff 0%, #d8e6f6 100%) !important;
    color: #1b365d !important;
    border-color: #9bb7d7 !important;
}

/* Teileverwaltung - Gruppe-Header in oldschool */
.theme-oldschool .card-header.teile-gruppen-header,
.theme-oldschool .teile-gruppen-header {
    background: linear-gradient(180deg, #f8fbff 0%, #d8e6f6 100%) !important;
    color: #1b365d !important;
    font-weight: 600 !important;
}

.theme-oldschool .dropdown-item {
    color: #1b365d !important;
}

.theme-oldschool .dropdown-item:hover,
.theme-oldschool .dropdown-item:focus,
.theme-oldschool .dropdown-item.active {
    background: #eef4fb !important;
    color: #1b365d !important;
}

.theme-oldschool .user-info-section,
.theme-oldschool .user-info-section > .text-center {
    background: linear-gradient(180deg, #f8fbff 0%, #d8e6f6 100%) !important;
    color: #1b365d !important;
    border-bottom-color: #9bb7d7 !important;
}

.theme-oldschool .user-info-section .text-white,
.theme-oldschool .user-info-section strong {
    color: #1b365d !important;
}

.theme-oldschool .user-emoji-container {
    background: #ffffff !important;
    border-color: #9bb7d7 !important;
}

/* Sidebar komplett neu */
.theme-serios .sidebar {
    background-color: var(--carbon-top) !important;
    background-image: var(--carbon-surface-image) !important;
    background-size: var(--carbon-surface-size) !important;
    background-position: var(--carbon-surface-position) !important;
    background-repeat: no-repeat, repeat, repeat, no-repeat !important;
    border-right: 1px solid rgba(255,107,0,0.25) !important;
    box-shadow: 2px 0 24px rgba(0,0,0,0.6) !important;
}

.theme-serios .sidebar-racing-pattern,
.theme-serios .content-background-pattern,
.theme-serios .racing-flag-pattern {
    display: none !important;
}

.theme-serios .brand-logo-item,
.theme-serios .brand-logo-icon {
    display: none !important;
}

.theme-serios .sidebar-main-logo {
    margin: 0 !important;
    filter: none !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.08) !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .nav-link::before {
    display: none !important;
}

.theme-serios .nav-link.active {
    background: #333333 !important;
    color: #ffffff !important;
    border-left: none !important;
    box-shadow: none !important;
}

.theme-serios .nav-highlight-button {
    background: #333333 !important;
    border-color: #333333 !important;
    color: #fff !important;
}

.theme-serios .nav-highlight-button:hover {
    background: #444444 !important;
}

.theme-serios .nav-divider {
    border-color: #333 !important;
}

.theme-serios .nav-section-label {
    color: #888 !important;
}

.theme-serios .nav-category-header {
    color: #ccc !important;
}

.theme-serios .nav-chevron {
    border-color: #888 !important;
}

.theme-serios .nav-sub-dot {
    background: #666 !important;
}

.theme-serios .nav-sub-link {
    color: #bbb !important;
}

.theme-serios .nav-sub-link:hover {
    color: #fff !important;
}

.theme-serios .nav-link.active,
.theme-serios .nav-sub-link.active {
    background: var(--racing-orange) !important;
    color: #fff !important;
    border-color: var(--racing-orange) !important;
}

.theme-serios .user-info-section {
    border-bottom-color: rgba(255,255,255,0.1) !important;
}

.theme-serios .badge.bg-info {
    background: #555 !important;
}

/* Main Content Area */
.theme-serios main {
    background: var(--serios-bg) !important;
}

.theme-serios .content {
    background: var(--serios-bg) !important;
}

/* Top Row / Header */
/* Top/Header für alle Themes einheitlich schwarz mit feiner orangefarbener Akzentlinie unten */
.theme-serios .top-row,
.theme-modern .top-row,
.top-row {
    background-color: var(--carbon-top) !important;
    background-image: var(--carbon-surface-image) !important;
    background-size: var(--carbon-surface-size) !important;
    background-position: var(--carbon-surface-position) !important;
    background-repeat: no-repeat, repeat, repeat, no-repeat !important;
    border-bottom: 2px solid var(--racing-orange) !important;
    border-image: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
    padding: 0.75rem 1.5rem !important;
}

.theme-serios .brand-title {
    color: #e8e8e8 !important;
    font-size: 1.5rem !important;
    text-shadow: none !important;
}

.theme-serios .brand-silver {
    color: #c0c0c0 !important;
    text-shadow: none !important;
}

.theme-serios .brand-orange {
    color: #ff6b00 !important;
    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: 8px !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 2px 8px rgba(0, 0, 0, 0.06) !important;
    border-color: var(--serios-border) !important;
}

.theme-serios .card-header {
    background: #fafafa !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-header.bg-dark,
.theme-serios .card-header.bg-primary,
.theme-serios .card-header.bg-secondary,
.theme-serios .card-header.bg-success,
.theme-serios .card-header.bg-info,
.theme-serios .card-header.bg-warning {
    background: #333 !important;
    color: #fff !important;
}

.theme-serios .card-header.bg-danger {
    background: #555 !important;
    color: #fff !important;
}

.theme-serios .card-body {
    padding: 1.25rem !important;
}

/* Buttons - Schwarz-Grau-Weiß */
.theme-serios .btn {
    text-transform: none !important;
    letter-spacing: 0 !important;
    font-weight: 500 !important;
    border-radius: 6px !important;
    box-shadow: none !important;
    transition: all 0.15s ease !important;
    padding: 0.5rem 1rem !important;
}

.theme-serios .btn::before,
.theme-serios .btn:hover::before {
    display: none !important;
}

.theme-serios .btn:hover {
    transform: none !important;
}

.theme-serios .btn-primary {
    background: #333333 !important;
    border-color: #333333 !important;
    color: #ffffff !important;
}

.theme-serios .btn-primary:hover {
    background: #1a1a1a !important;
    border-color: #1a1a1a !important;
    box-shadow: none !important;
}

.theme-serios .btn-secondary {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
    color: #ffffff !important;
}

.theme-serios .btn-secondary:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
}

.theme-serios .btn-outline-primary {
    color: #333333 !important;
    border-color: #333333 !important;
    background: transparent !important;
}

.theme-serios .btn-outline-primary:hover {
    background: #333333 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .btn-outline-secondary {
    color: #6b7280 !important;
    border-color: #d1d5db !important;
    background: transparent !important;
}

.theme-serios .btn-outline-secondary:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.theme-serios .btn-outline-danger {
    color: #555 !important;
    border-color: #555 !important;
}

.theme-serios .btn-outline-danger:hover {
    background: #555 !important;
    color: #ffffff !important;
    transform: none !important;
    box-shadow: none !important;
}

.theme-serios .btn-outline-info {
    color: #555 !important;
    border-color: #555 !important;
}

.theme-serios .btn-outline-info:hover {
    background: #555 !important;
    color: #ffffff !important;
}

.theme-serios .btn-success {
    background: #374151 !important;
    border-color: #374151 !important;
}

.theme-serios .btn-success:hover {
    background: #1f2937 !important;
    border-color: #1f2937 !important;
}

.theme-serios .btn-danger {
    background: #6b7280 !important;
    border-color: #6b7280 !important;
}

.theme-serios .btn-danger:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
}

.theme-serios .btn-warning {
    background: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #1a1a1a !important;
}

.theme-serios .btn-info {
    background: #555 !important;
    border-color: #555 !important;
    color: #fff !important;
}

/* Form Controls */
.theme-serios .form-control,
.theme-serios .form-select {
    border: 1px solid var(--serios-border) !important;
    border-radius: 6px !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: #333333 !important;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1) !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: #f9fafb !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: #f9fafb !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: #ccc !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: #333 !important;
    color: #333 !important;
    background: transparent !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Badges */
.theme-serios .badge {
    font-weight: 500 !important;
    border-radius: 4px !important;
    padding: 0.35rem 0.65rem !important;
}

.theme-serios .badge.bg-primary {
    background: #333 !important;
}

.theme-serios .badge.bg-success {
    background: #555 !important;
}

.theme-serios .badge.bg-warning {
    background: #999 !important;
    color: #1a1a1a !important;
}

/* Alerts */
.theme-serios .alert {
    border-radius: 6px !important;
    border-width: 1px !important;
}

.theme-serios .alert-info {
    background: #f5f5f5 !important;
    border-color: #ddd !important;
    color: #333 !important;
}

.theme-serios .alert-success {
    background: #f5f5f5 !important;
    border-color: #ccc !important;
    color: #333 !important;
}

/* Modals */
.theme-serios .modal-content {
    border: 1px solid var(--serios-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25) !important;
}

.theme-serios .modal-header {
    background: #fafafa !important;
    border-bottom: 1px solid var(--serios-border) !important;
    border-radius: 8px 8px 0 0 !important;
    color: #1a1a1a !important;
}

.theme-serios .modal-header.bg-warning,
.theme-serios .modal-header.bg-danger,
.theme-serios .modal-header.bg-primary,
.theme-serios .modal-header.bg-success {
    background: #333 !important;
    color: #fff !important;
}

/* Teileverwaltung - Gruppe-Header in seriös */
.theme-serios .card-header.teile-gruppen-header {
    background: #f5f5f5 !important;
    color: #333 !important;
    font-weight: 600 !important;
}

/* Breadcrumbs */
.theme-serios .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
}

.theme-serios .breadcrumb-item a {
    color: #555 !important;
}

/* Spinners */
.theme-serios .spinner-border {
    border-color: #333 !important;
    border-right-color: transparent !important;
}

/* Dropdown */
.theme-serios .dropdown-menu {
    border: 1px solid var(--serios-border) !important;
    border-radius: 6px !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
}

/* User Emoji Container */
.theme-serios .user-emoji-container {
    border-color: #666 !important;
    background: rgba(255, 255, 255, 0.05) !important;
    box-shadow: none !important;
}

.theme-serios .user-emoji-container:hover {
    transform: none !important;
}

/* Dashboard Cards */
.theme-serios .dashboard-icon {
    filter: grayscale(100%) !important;
}

/* Customer Group Header */
.theme-serios .customer-group-header {
    background: #f5f5f5 !important;
    border-left: 3px solid #333 !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: #d1d5db !important;
    border-color: #9ca3af !important;
}

.theme-serios .fancy-switch .form-check-input:checked {
    background-color: #333333 !important;
    border-color: #333333 !important;
    box-shadow: none !important;
}

/* Form check / switch */
.theme-serios .form-check-input:checked {
    background-color: #333 !important;
    border-color: #333 !important;
}

/* Links */
.theme-serios a,
.theme-serios .btn-link {
    color: #333 !important;
}

.theme-serios a:hover,
.theme-serios .btn-link:hover {
    color: #000 !important;
    transform: none !important;
}

/* Settings sidebar */
.theme-serios .settings-sidebar-card .card-header {
    background: #333 !important;
    color: #fff !important;
}

/* Image gallery */
.theme-serios .image-gallery-item.current-logo {
    border-color: #333 !important;
    box-shadow: 0 0 10px rgba(0,0,0,0.15) !important;
    background: #fafafa !important;
}

.theme-serios .image-gallery-item:hover {
    border-color: #999 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1) !important;
    transform: none !important;
}

.theme-serios .logo-badge {
    background: #333 !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
}

.theme-serios .logo-badge i {
    animation: none !important;
}

/* Auftrag Document Styles */
.theme-serios .auftragsnummer-box {
    background: #333 !important;
}

.theme-serios .document-header {
    border-bottom-color: #333 !important;
}

/* Sidebar logo bar clean in serios theme */
.theme-serios .sidebar .bg-gradient {
    background: var(--serios-sidebar-bg) !important;
    box-shadow: none !important;
}

/* KalenderWidget btn-purple im seriösen Design */
.theme-serios .btn-purple {
    background: #444 !important;
    border-color: #444 !important;
    color: #fff !important;
}

.theme-serios .btn-purple:hover {
    background: #222 !important;
    border-color: #222 !important;
}

/* bg-purple Badge im seriösen Design */
.theme-serios .bg-purple {
    background: #555 !important;
    border: none !important;
    box-shadow: none !important;
}

/* Quick-Actions im seriösen Design (Dashboard) */
.theme-serios .quick-action {
    border-color: #333 !important;
    background: #fafafa !important;
    color: #1a1a1a !important;
}

/* ── RechnungDetails PDF-Vorschau im seriösen Design ─── */
.theme-serios .rechnung-pdf-header {
    background: linear-gradient(135deg, #111 0%, #1f1f1f 100%) !important;
}
.theme-serios .rechnung-pdf-header .rechnung-pdf-archiv-badge {
    background: rgba(255,255,255,0.06) !important;
    color: #9ca3af !important;
    border-color: rgba(255,255,255,0.12) !important;
}

.theme-serios .quick-action i {
    color: #333 !important;
}

.theme-serios .quick-action:hover {
    background: #333 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.theme-serios .quick-action:hover i {
    color: #fff !important;
}

/* Print Styles für seriöses Design */
@media print {
    .theme-serios .card {
        box-shadow: none !important;
        border: 1px solid #e0e0e0 !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 .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: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f0f2f5;
    color: var(--text-dark);
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Modern Clean Headings */
h1, h2, h3, h4, h5, h6 {
    color: var(--racing-black);
    font-weight: 700;
    text-transform: none;
    letter-spacing: -0.01em;
    line-height: 1.25;
}

/* Links */
a, .btn-link {
    color: var(--racing-orange);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover, .btn-link:hover {
    color: var(--racing-orange-dark);
    text-decoration: none;
    transform: none;
}

/* Content Area – Clean & Airy */
.content {
    padding-top: 1.1rem;
    background: #f0f2f5;
    min-height: calc(100vh - 3.5rem);
    flex: 1;
    position: relative;
    min-width: 0;
}

.content-background-pattern {
    display: none;
}

h1:focus {
    outline: none;
}

/* Form & Input Styling */
.form-control, .form-control-plaintext {
    border: 1.5px solid #e0e3e8;
    border-radius: 14px;
    color: var(--text-dark);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    padding: 0.6rem 1rem;
    background: #fff;
}

.form-control:focus {
    border-color: var(--racing-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
    transform: none;
}

.form-select {
    border-radius: 14px;
    border: 1.5px solid #e0e3e8;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-select:focus {
    border-color: var(--racing-orange);
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.12);
}

/* Validation */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid #28a745;
}

.invalid {
    outline: 2px solid #dc3545;
}

.validation-message {
    color: #dc3545;
    font-weight: 600;
}

/* Required field validation error */
.field-validation-error,
.theme-serios .field-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.25) !important;
    animation: validation-shake 0.4s ease;
}

.field-validation-error-text {
    color: #dc3545;
    font-size: 0.8rem;
    margin-top: 0.25rem;
}

@keyframes validation-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(3px); }
}

/* Alerts – Soft & Rounded */
.alert {
    border-radius: 16px;
    border: none;
    font-weight: 500;
    backdrop-filter: blur(8px);
    padding: 1rem 1.25rem;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.12);
    color: #856404;
}

.alert-danger {
    background: rgba(255, 0, 0, 0.08);
    color: #721c24;
}

.alert-info {
    background: rgba(13, 110, 253, 0.08);
    color: #004085;
}

/* Buttons – Modern, Flowing, Pill-ish */
.btn {
    border-radius: 14px;
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1.5px solid transparent;
    position: relative;
    overflow: hidden;
    padding: 0.5rem 1.15rem;
}

.btn::before {
    display: none;
}

.btn:hover::before {
    display: none;
}

.btn:focus, .btn:active:focus {
    box-shadow: 0 0 0 3px rgba(255, 107, 0, 0.2);
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--racing-orange);
    border-color: var(--racing-orange);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

.btn-primary:hover {
    background: var(--racing-orange-dark);
    border-color: var(--racing-orange-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3);
}

.btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    border-color: #5a6268;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.25);
}

/* Outline Buttons */
.btn-outline-primary {
    color: var(--racing-orange);
    border-color: var(--racing-orange);
    background: transparent;
}

.btn-outline-primary:hover {
    background: var(--racing-orange);
    border-color: var(--racing-orange);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 107, 0, 0.25);
}

.btn-outline-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-outline-danger:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

/* Additional Button Variants */
.btn-info {
    background: #17a2b8;
    border-color: #17a2b8;
    color: white;
}

.btn-info:hover {
    background: #138496;
    border-color: #138496;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(23, 162, 184, 0.25);
}

.btn-success {
    background: #28a745;
    border-color: #28a745;
    color: white;
}

.btn-success:hover {
    background: #218838;
    border-color: #218838;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.25);
}

.btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.25);
}

.btn-warning {
    background: #ffc107;
    border-color: #ffc107;
    color: #000;
}

.btn-warning:hover {
    background: #e0a800;
    border-color: #e0a800;
    color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.btn-light {
    background: #f8f9fa;
    border-color: #e0e3e8;
    color: var(--racing-black);
}

.btn-light:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    color: var(--racing-black);
    transform: translateY(-1px);
}

.btn-dark {
    background: var(--racing-dark);
    border-color: var(--racing-dark);
    color: white;
}

.btn-dark:hover {
    background: var(--racing-black);
    border-color: var(--racing-black);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* 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: 1.5px;
    border-radius: 10px;
    padding: 0.3rem 0.75rem;
    font-size: 0.82rem;
}

/* Large Buttons */
.btn-lg {
    border-width: 1.5px;
    border-radius: 16px;
    padding: 0.65rem 1.5rem;
}

/* Cards – Flowing, Modern, Airy */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.card::before {
    display: none;
}

.card:hover::before {
    display: none;
}

.card:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: transparent;
}

.card-header {
    background: #fafbfc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    color: var(--text-dark);
    font-weight: 600;
    text-transform: none;
    letter-spacing: 0;
    border-radius: 20px 20px 0 0;
    padding: 1rem 1.25rem;
}

/* Ensure headings inside card-headers are always visible */
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: inherit;
}

/* Light/warning background card-headers need dark headings */
.card-header.bg-light h1,
.card-header.bg-light h2,
.card-header.bg-light h3,
.card-header.bg-light h4,
.card-header.bg-light h5,
.card-header.bg-light h6 {
    color: var(--text-dark);
}

.card-header.bg-warning h1,
.card-header.bg-warning h2,
.card-header.bg-warning h3,
.card-header.bg-warning h4,
.card-header.bg-warning h5,
.card-header.bg-warning h6 {
    color: var(--text-dark);
}

/* Navigation Bar – Clean */
.bg-gradient {
    background: #0d0d0d !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    border-bottom: none;
    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: 700;
    letter-spacing: 0;
    color: white !important;
    text-transform: none;
    transition: color 0.2s ease;
}

.navbar-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0 0 8px rgba(255, 107, 0, 0.4));
    transition: filter 0.2s ease;
}

.navbar-logo:hover {
    filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.6));
}

.sidebar-main-logo {
    width: auto;
    max-width: 90%;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 0 12px rgba(255, 107, 0, 0.5));
    transition: filter 0.2s ease;
    margin: 0;
    display: block;
}

.sidebar-main-logo:hover {
    filter: drop-shadow(0 0 18px rgba(255, 107, 0, 0.7));
}

/* Sidebar-Proportionen bewusst zugunsten des Firmenlogos priorisieren. */
.sidebar .top-row {
    min-height: 140px;
    padding: 0.75rem 0.5rem !important;
}

.sidebar .sidebar-main-logo {
    width: auto;
    max-width: 95%;
    height: 120px !important;
    max-height: 120px !important;
}

.sidebar .user-emoji-container {
    width: 60px !important;
    height: 60px !important;
}

.brand-text {
    color: var(--racing-orange);
    font-weight: 700;
    font-size: 1.5rem;
}

/* Dashboard Icons */
.dashboard-icon {
    color: var(--racing-orange);
    font-weight: 700;
    font-size: 1.3rem;
    margin-right: 0.5rem;
    transition: color 0.2s ease;
    filter: none;
}

.card-body:hover .dashboard-icon {
    color: var(--racing-orange-dark);
    transform: none;
    filter: none;
}

/* Dashboard Buttons */
.btn-dashboard {
    background: var(--racing-orange);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.7rem 1.5rem;
    transition: all 0.25s ease;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-transform: none;
    letter-spacing: 0;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

.btn-dashboard:hover {
    background: var(--racing-orange-dark);
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.3);
}

/* Logout Button */
.btn-logout {
    background: #f5f5f5;
    border: 1.5px solid #dee2e6;
    color: var(--racing-black);
    font-weight: 600;
    transition: all 0.2s ease;
    border-radius: 14px;
    padding: 0.7rem 1rem;
}

.btn-logout:hover {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
    box-shadow: 0 2px 10px rgba(220, 53, 69, 0.25);
    transform: translateY(-1px);
}

/* Sidebar Navigation Layout with Racing Theme */
.page {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
}

.sidebar {
    background-color: var(--carbon-top) !important;
    background-image: var(--carbon-surface-image) !important;
    background-size: var(--carbon-surface-size) !important;
    background-position: var(--carbon-surface-position) !important;
    background-repeat: no-repeat, repeat, repeat, no-repeat !important;
    border-right: 1px solid rgba(255,107,0,0.25) !important;
    display: flex !important;
    flex-direction: column !important;
    width: 300px !important;
    height: 100vh !important;
    min-height: 100vh !important;
    overflow-y: auto !important;
    box-shadow: 2px 0 24px rgba(0,0,0,0.6) !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;
}

/* Sidebar Background Pattern – Hidden */
.sidebar-racing-pattern {
    display: none;
}

/* Mobile Hamburger Button */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 3000;
    width: 44px;
    height: 44px;
    background: #e8521a;
    border: none;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
    background: #c94210;
}

.mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger → X animation when open */
.mobile-menu-btn.active span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}
.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.mobile-menu-btn.active span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Application windows must always cover the navigation and its backdrop. */
body .modal,
body .modal.show.d-block {
    z-index: 100000 !important;
}

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

    /* Push top-row text right so it doesn't overlap the hamburger */
    .top-row {
        padding-left: 68px !important;
    }
}

.racing-flag-pattern {
    display: none;
}

.brand-logo-item {
    display: none;
}

.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; }

.brand-logo-text {
    display: none;
}

.racing-icon {
    display: none;
}

/* Navigation Link Styling */
.nav-link-styled {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 12px !important;
    transition: background 0.2s ease, color 0.2s ease !important;
}

.nav-link-styled:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    transform: none !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: var(--racing-orange) !important;
    border-radius: 14px !important;
    padding: 0.9rem 1rem !important;
    margin: 0.3rem 0 !important;
    box-shadow: 0 2px 10px rgba(255, 107, 0, 0.2) !important;
    border: none !important;
    transition: background 0.2s ease, box-shadow 0.2s ease !important;
    text-decoration: none !important;
    cursor: pointer !important;
}

/* Dashboard NavLink */
.dashboard-highlight-button {
    background: var(--racing-orange) !important;
    border: 2px solid var(--racing-orange) !important;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35) !important;
}

/* ============================================= */
/* Anwendungsthemes: Hell / Dunkel / Seriös       */
/* ============================================= */
.theme-dunkel {
    --app-bg: #0d0f13;
    --app-card: #111418;
    --app-text: #f3f4f6;
    --app-muted: #9ca3af;
    --app-border: rgba(255,255,255,0.08);
    --app-primary: var(--racing-orange);
    --app-primary-light: var(--racing-orange-light);
}

.theme-hell {
    --app-bg: #f4f5f7;
    --app-card: #ffffff;
    --app-text: #1f2937;
    --app-muted: #6b7280;
    --app-border: rgba(255,107,0,0.35);
    --app-primary: var(--racing-orange);
    --app-primary-light: var(--racing-orange-light);
}

.theme-serios {
    --app-bg: #f3f4f6;
    --app-card: #ffffff;
    --app-text: #111827;
    --app-muted: #6b7280;
    --app-border: #d1d5db;
    --app-primary: #374151;
    --app-primary-light: #4b5563;
}

.theme-hell main,
.theme-dunkel main,
.theme-serios main,
.theme-hell .content,
.theme-dunkel .content,
.theme-serios .content {
    background: var(--app-bg) !important;
}

.theme-dunkel .top-row,
.theme-dunkel .sidebar .top-row,
.theme-dunkel .sidebar {
    background-color: #050608 !important;
    background-image: none !important;
    color: var(--app-text) !important;
}

.theme-hell .top-row,
.theme-hell .sidebar .top-row,
.theme-hell .sidebar {
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%) !important;
    background-color: #ffffff !important;
    background-image: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%) !important;
    color: var(--app-text) !important;
}

.theme-serios .top-row,
.theme-serios .sidebar .top-row,
.theme-serios .sidebar {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: var(--app-text) !important;
}

.theme-hell .sidebar,
.theme-dunkel .sidebar,
.theme-serios .sidebar {
    border-right: 1px solid var(--app-border) !important;
}

.theme-hell .top-row,
.theme-dunkel .top-row,
.theme-serios .top-row {
    border-bottom-color: var(--app-primary) !important;
}

.theme-hell .card,
.theme-hell .dash-widget,
.theme-hell .kpi-card,
.theme-hell .overdue-card,
.theme-hell .kalender-widget .card,
.theme-dunkel .card,
.theme-dunkel .dash-widget,
.theme-dunkel .kpi-card,
.theme-dunkel .overdue-card,
.theme-dunkel .kalender-widget .card,
.theme-serios .card,
.theme-serios .dash-widget,
.theme-serios .kpi-card,
.theme-serios .overdue-card,
.theme-serios .kalender-widget .card {
    background: var(--app-card) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
    box-shadow: 0 6px 24px rgba(15,23,42,0.12) !important;
}

.theme-dunkel .card,
.theme-dunkel .dash-widget,
.theme-dunkel .kpi-card,
.theme-dunkel .overdue-card,
.theme-dunkel .kalender-widget .card {
    box-shadow: 0 10px 30px rgba(0,0,0,0.42) !important;
}

.theme-hell .card-header,
.theme-hell .dash-widget-header,
.theme-hell .kalender-widget .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%) !important;
    color: var(--app-text) !important;
    border-bottom-color: rgba(255,107,0,0.25) !important;
}

.theme-dunkel .card-header,
.theme-dunkel .dash-widget-header,
.theme-dunkel .kalender-widget .card-header {
    background: #050608 !important;
    color: var(--app-text) !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}

.theme-serios .card-header,
.theme-serios .dash-widget-header,
.theme-serios .kalender-widget .card-header {
    background: linear-gradient(180deg, #f8f9fa 0%, #e5e7eb 100%) !important;
    color: var(--app-text) !important;
    border-bottom-color: #d1d5db !important;
}

.theme-hell .btn-primary,
.theme-hell .btn-purple,
.theme-hell .quick-action,
.theme-hell .dashboard-highlight-button,
.theme-hell .nav-link.active,
.theme-hell .nav-sub-link.active {
    background: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
    color: #fff !important;
}

.theme-dunkel .btn-primary,
.theme-dunkel .btn-purple,
.theme-dunkel .quick-action,
.theme-dunkel .dashboard-highlight-button,
.theme-dunkel .nav-link.active,
.theme-dunkel .nav-sub-link.active {
    background: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
    color: #fff !important;
}

.theme-hell .btn-primary:hover,
.theme-hell .btn-purple:hover,
.theme-hell .quick-action:hover,
.theme-hell .dashboard-highlight-button:hover {
    background: var(--racing-orange-light) !important;
    border-color: var(--racing-orange-light) !important;
    color: #fff !important;
}

.theme-dunkel .btn-primary:hover,
.theme-dunkel .btn-purple:hover,
.theme-dunkel .quick-action:hover,
.theme-dunkel .dashboard-highlight-button:hover {
    background: var(--racing-orange-light) !important;
    border-color: var(--racing-orange-light) !important;
    color: #fff !important;
}

.theme-serios .btn-primary,
.theme-serios .btn-purple,
.theme-serios .quick-action,
.theme-serios .dashboard-highlight-button,
.theme-serios .nav-link.active,
.theme-serios .nav-sub-link.active {
    background: #374151 !important;
    border-color: #374151 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.theme-serios .btn-primary:hover,
.theme-serios .btn-purple:hover,
.theme-serios .quick-action:hover,
.theme-serios .dashboard-highlight-button:hover {
    background: #4b5563 !important;
    border-color: #4b5563 !important;
    color: #fff !important;
}

.theme-hell .nav-link,
.theme-hell .nav-sub-link,
.theme-hell .nav-category-header,
.theme-hell .nav-category-label,
.theme-hell .nav-text {
    color: #374151 !important;
}

.theme-dunkel .nav-link,
.theme-dunkel .nav-sub-link,
.theme-dunkel .nav-category-header,
.theme-dunkel .nav-category-label,
.theme-dunkel .nav-text {
    color: #d1d5db !important;
}

.theme-serios .nav-link,
.theme-serios .nav-sub-link,
.theme-serios .nav-category-header,
.theme-serios .nav-category-label,
.theme-serios .nav-text {
    color: #e5e7eb !important;
}

.theme-hell .search-box,
.theme-hell .search-results-dropdown,
.theme-dunkel .search-box,
.theme-dunkel .search-results-dropdown,
.theme-serios .search-box,
.theme-serios .search-results-dropdown {
    background: #ffffff !important;
    border-color: var(--app-border) !important;
    box-shadow: 0 8px 28px rgba(15,23,42,0.14) !important;
}

.theme-dunkel .search-box,
.theme-dunkel .search-results-dropdown {
    background: #111418 !important;
    box-shadow: 0 14px 36px rgba(0,0,0,0.45) !important;
}

.theme-hell .search-box .input-group,
.theme-hell .search-box .input-group > *,
.theme-hell .search-box .form-control,
.theme-hell .search-box .input-group-text,
.theme-dunkel .search-box .input-group,
.theme-dunkel .search-box .input-group > *,
.theme-dunkel .search-box .form-control,
.theme-dunkel .search-box .input-group-text,
.theme-serios .search-box .input-group,
.theme-serios .search-box .input-group > *,
.theme-serios .search-box .form-control,
.theme-serios .search-box .input-group-text {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: var(--app-text) !important;
}

.theme-dunkel .search-box .input-group,
.theme-dunkel .search-box .input-group > *,
.theme-dunkel .search-box .form-control,
.theme-dunkel .search-box .input-group-text {
    background: #111418 !important;
    background-color: #111418 !important;
}

.theme-dunkel .search-results-header {
    background: #181b20 !important;
    color: var(--racing-orange) !important;
    border-color: rgba(255,255,255,0.08) !important;
}

.theme-hell .search-results-header {
    background: #fff3ea !important;
    color: var(--racing-orange) !important;
}

.theme-serios .search-box .btn-outline-secondary {
    background: #374151 !important;
    color: #ffffff !important;
}

.theme-serios .search-results-header {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #d1d5db !important;
}

.theme-hell .search-result-item,
.theme-hell .search-results-footer,
.theme-dunkel .search-result-item,
.theme-dunkel .search-results-footer,
.theme-serios .search-result-item,
.theme-serios .search-results-footer {
    color: var(--app-text) !important;
    background: #ffffff !important;
}

.theme-dunkel .search-result-item,
.theme-dunkel .search-results-footer {
    background: #111418 !important;
}

.dashboard-highlight-button:hover {
    background: var(--racing-orange-light) !important;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35) !important;
    border-color: var(--racing-orange-light) !important;
}

.nav-highlight-button:hover {
    transform: none !important;
    box-shadow: 0 4px 16px rgba(255, 107, 0, 0.35) !important;
    background: var(--racing-orange-dark) !important;
}

.dashboard-highlight-button:hover {
    background: var(--racing-orange-light) !important;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35) !important;
}

.dashboard-highlight-button:active {
    transform: translateY(2px) !important;
    box-shadow: none !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 */
.nav-logout-button {
    background: #dc3545 !important;
    border: 2px solid #dc3545 !important;
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.35) !important;
}

.nav-logout-button:hover {
    background: #c82333 !important;
    border-color: #c82333 !important;
    box-shadow: 0 4px 14px rgba(220, 53, 69, 0.35) !important;
}

.nav-logout-button:active {
    transform: translateY(2px) !important;
    box-shadow: none !important;
}

.theme-serios .dashboard-highlight-button {
    background: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
}

.theme-serios .dashboard-highlight-button:hover {
    background: var(--racing-orange-light) !important;
}

.theme-serios .nav-logout-button {
    background: #dc3545 !important;
    border-color: #dc3545 !important;
}

.theme-serios .nav-logout-button:hover {
    background: #c82333 !important;
}

/* Settings Button Specific */
.nav-settings-button {
    background: #495057 !important;
    border: none !important;
    box-shadow: 0 2px 10px rgba(73, 80, 87, 0.2) !important;
}

.nav-settings-button:hover {
    background: #6c757d !important;
    box-shadow: 0 4px 16px rgba(108, 117, 125, 0.3) !important;
}

.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,107,0,0.3), transparent);
    margin: 0.5rem 1rem;
}

/* ===== Section Labels ===== */
.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 107, 0, 0.7);
    padding: 0.5rem 1.2rem 0.35rem;
    margin-bottom: 0.15rem;
    user-select: none;
}

/* ===== Navigation Category Dropdowns ===== */
.nav-category {
    margin-bottom: 0.2rem;
}

.nav-category-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    background: transparent;
    border: 1px solid transparent; /* Vorbereitung für Hover-Grenzlinie */
    color: rgba(255, 255, 255, 0.75);
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    text-align: left;
}

.nav-category-header:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    border-color: var(--racing-orange) !important; /* Orangene Umrandung bei Hover */
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.15);
}

.nav-cat-icon {
    font-size: 1.1rem;
    min-width: 26px;
    text-align: center;
    transition: none;
}

.nav-category-header:hover .nav-cat-icon {
    transform: none;
}

.nav-category-label {
    flex: 1;
    font-size: 0.82rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.7);
    letter-spacing: 0.3px;
    transition: color 0.25s ease;
}

.nav-category-header:hover .nav-category-label {
    color: #fff;
}

/* Chevron */
.nav-chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-right: 2px solid rgba(255, 255, 255, 0.3);
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transform: rotate(-45deg);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.25s ease;
    margin-left: auto;
    flex-shrink: 0;
}

.nav-category-header:hover .nav-chevron {
    border-color: rgba(255, 255, 255, 0.6);
}

.nav-chevron.expanded {
    transform: rotate(45deg);
    border-color: var(--racing-orange);
}

/* Category items container */
.nav-category-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.25s ease;
    opacity: 0;
    margin-left: 1.1rem;
    padding-left: 0.85rem;
    border-left: 2px solid rgba(255, 255, 255, 0.06);
}

.nav-category-items.show {
    max-height: 500px;
    opacity: 1;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    border-left-color: rgba(255, 107, 0, 0.25);
}

/* ===== Sub-link Items ===== */
.nav-sub-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0.45rem 0.75rem;
    margin: 1px 0;
    border-radius: 10px;
    text-decoration: none !important;
    color: rgba(255, 255, 255, 0.65);
    border: 1px solid transparent; /* Vorbereitung für Hover-Grenzlinie */
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    position: relative;
}

.nav-sub-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--racing-orange-light);
    border-color: var(--racing-orange) !important; /* Dezentere oder vollflächige orange Umrandung */
}

.nav-sub-link.active {
    background: var(--racing-orange);
    color: #fff;
    border-color: var(--racing-orange) !important;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.25);
}

.nav-sub-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    flex-shrink: 0;
    transition: background 0.2s ease;
}

.nav-sub-link:hover .nav-sub-dot {
    background: var(--racing-orange);
}

.nav-sub-link.active .nav-sub-dot {
    background: #fff;
    width: 7px;
    height: 7px;
}

.nav-sub-text {
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-sub-link:hover .nav-sub-text {
    color: var(--racing-orange-light);
    font-weight: 600;
}

.nav-sub-link.active .nav-sub-text {
    color: #fff;
    font-weight: 700;
}

/* Top Row – Clean Header */
.top-row {
    background-color: var(--carbon-top) !important;
    background-image: var(--carbon-surface-image) !important;
    background-size: var(--carbon-surface-size) !important;
    background-position: var(--carbon-surface-position) !important;
    background-repeat: no-repeat, repeat, repeat, no-repeat !important;
    border-bottom: 2px solid var(--racing-orange) !important;
    border-image: none !important;
    padding: 0.8rem 2rem;
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 8px rgba(0,0,0,0.5) !important;
}

.top-row::after {
    display: none !important;
}

.top-row > * {
    position: relative;
    
}

.top-row-brand {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.2rem;
}

.top-row-logo {
    height: 80px;
    width: auto;
    filter: drop-shadow(0 0 20px #ff6b00);
}

.brand-gear-icon {
    font-size: 2.5rem;
    color: var(--racing-orange);
    filter: none;
}

.brand-title {
    font-size: clamp(1.2rem, 2.5vw, 2rem);
    font-weight: 700;
    color: #e8e8e8;
    letter-spacing: 0.03em;
    text-shadow: 0 0 18px rgba(255,107,0,0.2);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    text-transform: none;
}

.brand-initial {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--racing-orange);
    margin-right: 1px;
}

.brand-silver {
    font-weight: 800;
    background: linear-gradient(135deg, #d0d0d0 0%, #ffffff 40%, #a8a8a8 70%, #e0e0e0 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

/* Silver mit Glow */
.brand-silver-flat {
    font-weight: 900;
    background: linear-gradient(135deg, #c0c0c0 0%, #ffffff 40%, #a0a0a0 70%, #e8e8e8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: 0.06em;
    filter: drop-shadow(0 0 8px rgba(192,192,192,0.85)) drop-shadow(0 0 18px rgba(220,220,220,0.55));
}

.brand-gray {
    font-weight: 600;
    color: #b0b0b0;
}

.brand-tld {
    font-weight: 400;
    color: #686868;
    font-size: 0.7em;
    letter-spacing: 0.04em;
}

.brand-icon-wrench {
    display: none;
}

.brand-icon-flip {
    display: none;
}

/* Wrench + Gear combo icon */
.brand-icon-combo {
    display: none;
}

.brand-icon-combo-flip {
    display: none;
}

.brand-icon-left {
    font-size: 1.8rem;
    color: #c8c8c8;
    filter: drop-shadow(0 0 6px rgba(200,200,200,0.8)) drop-shadow(0 0 14px rgba(255,255,255,0.35));
    flex-shrink: 0;
}

.brand-icon-right {
    font-size: 1.8rem;
    color: #ff6b00;
    filter: drop-shadow(0 0 6px rgba(255,107,0,0.9)) drop-shadow(0 0 16px rgba(255,140,66,0.55));
    flex-shrink: 0;
}

.brand-icon-combo svg {
    width: 100%;
    height: 100%;
}

.brand-icon-combo-flip {
    transform: scaleX(-1);
}

.brand-orange {
    font-weight: 800;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c42 50%, #ffb347 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 10px rgba(255,107,0,0.9)) drop-shadow(0 0 22px rgba(255,140,66,0.65));
}

.top-row-racing-elements {
    display: none;
}

.racing-flag {
    display: none;
}

.racing-speed {
    display: none;
}

/* 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: rgba(255, 255, 255, 0.75) !important;
    padding: 0.75rem 1rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease !important;
    border-radius: 12px;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border: 1px solid transparent !important; /* Vorbereitung für Hover-Grenzlinie */
    position: relative;
    overflow: hidden;
}

.nav-link-dokumente {
    font-size: 0.85rem;
    padding: 0.65rem 1rem;
    letter-spacing: 0;
}

.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 {
    display: none;
}

.nav-link:hover::before {
    display: none;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    color: #ffffff !important;
    border-color: var(--racing-orange) !important; /* Orangener Rahmen bei Hover */
    transform: none;
    box-shadow: 0 0 10px rgba(255, 107, 0, 0.2);
}

.nav-link.active {
    background: var(--racing-orange) !important;
    color: #fff !important;
    font-weight: 600;
    border-color: var(--racing-orange) !important;
    box-shadow: 0 4px 14px rgba(255,107,0,0.35) !important;
}

/* Status Badges – Clean */
.part-number-badge {
    display: inline-block;
    padding: 0.35rem 0.85rem;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 20px;
    transition: none;
    text-transform: none;
    letter-spacing: 0;
}

.status-ordered {
    background: var(--racing-orange);
    color: #fff;
    border: none;
    box-shadow: none;
}

.status-delivered {
    background: #28a745;
    color: #fff;
    border: none;
    box-shadow: none;
}

/* Tab Navigation – Clean Underline */
.nav-tabs {
    border-bottom: 1px solid #e0e3e8;
    margin-bottom: 1.5rem;
}

.nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    color: #6c757d !important;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.75rem 1.25rem;
    margin-right: 0.25rem;
    transition: color 0.2s ease, border-color 0.2s ease;
    background: transparent;
}

.nav-tabs .nav-link:hover {
    background: transparent;
    transform: none;
    border-bottom-color: #adb5bd;
    box-shadow: none;
    color: var(--racing-black) !important;
}

.nav-tabs .nav-link.active {
    background: transparent;
    color: var(--racing-orange) !important;
    border-bottom-color: var(--racing-orange);
    transform: none;
    box-shadow: none;
}

/* Filter Buttons – Pill Style */
.filter-btn-group .btn {
    border: 1.5px solid #e0e3e8;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
    padding: 0.55rem 1.25rem;
    transition: all 0.2s ease;
    border-radius: 20px;
    margin-right: 0.4rem;
    margin-bottom: 0.4rem;
}

.filter-btn-group .btn:not(.active) {
    background: #fff;
    color: var(--racing-black) !important;
    border-color: #e0e3e8;
}

.filter-btn-group .btn:not(.active):hover {
    background: #f5f5f5;
    transform: none;
    box-shadow: none;
    border-color: #adb5bd;
}

.filter-btn-group .btn.active {
    background: var(--racing-orange);
    color: white !important;
    border-color: var(--racing-orange);
    transform: none;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.2);
}

/* Scrollbar – Subtle */
.table-responsive::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.table-responsive::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 8px;
}

.table-responsive::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 8px;
}

.table-responsive::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Document Type Headers */
.document-type-header {
    transition: background 0.2s ease;
    background: #1a1a1a !important;
    border-left: 3px solid var(--racing-orange) !important;
    border-radius: 0 12px 12px 0;
}

.document-type-header:hover {
    transform: none;
    background: #2d2d2d !important;
    box-shadow: none;
}

/* User Emoji Container – Clean */
.user-emoji-container {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: rgba(255, 107, 0, 0.08);
    border-radius: 50%;
    border: 2px solid rgba(255, 107, 0, 0.3);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    position: relative;
    overflow: hidden;
}

.user-emoji-container:hover {
    transform: none;
    border-color: var(--racing-orange);
    box-shadow: 0 4px 20px rgba(255, 107, 0, 0.15);
}

.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 – Clean */
.timeline-marker-service {
    background: #0d6efd;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.25);
}

.timeline-marker-reparatur {
    background: var(--racing-orange);
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(255, 107, 0, 0.25);
}

.timeline-service .card {
    border-left: 3px solid #0d6efd;
}

.timeline-reparatur .card {
    border-left: 3px solid var(--racing-orange);
}

/* Service Cards – Subtle Hover */
.card[style*="cursor: pointer"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.1) !important;
}

/* Modal – Clean & Rounded */

.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.modal-header.bg-gradient {
    background: #1a1a1a;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
}

/* User Info Section – Carbon-Glas mit orange Akzentlinie */
.user-info-section {
    background: rgba(20,20,20,0.45);
    border-bottom: 1px solid rgba(255,107,0,0.25);
    margin: 0;
    padding: 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.login-container {
    position: relative;
    isolation: isolate;
    padding: clamp(1rem, 4vw, 4rem);
    gap: clamp(1.5rem, 5vw, 5rem);
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 18% 20%, rgba(255,107,0,0.26), transparent 28%),
        linear-gradient(90deg, rgba(10,12,16,0.88) 0%, rgba(10,12,16,0.58) 46%, rgba(10,12,16,0.22) 100%);
    pointer-events: none;
}

.login-container::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image:
        linear-gradient(45deg, rgba(255,255,255,0.035) 25%, transparent 25%, transparent 75%, rgba(255,255,255,0.035) 75%),
        linear-gradient(45deg, rgba(0,0,0,0.25) 25%, transparent 25%, transparent 75%, rgba(0,0,0,0.25) 75%);
    background-size: 18px 18px;
    background-position: 0 0, 9px 9px;
    opacity: 0.55;
    pointer-events: none;
}

.login-container.has-image-background::after {
    display: none;
}

.login-container.has-image-background::before {
    background: linear-gradient(90deg, rgba(10,12,16,0.72) 0%, rgba(10,12,16,0.42) 46%, rgba(10,12,16,0.12) 100%);
}

.login-background-logo {
    position: absolute;
    top: 50%;
    left: 50% !important;
    transform: translate(-50%, -50%);
    width: min(72vw, 960px) !important;
    max-width: 960px !important;
    height: auto;
    opacity: 0.24 !important;
    z-index: 1 !important;
    pointer-events: none;
    filter: grayscale(0.15) contrast(1.12) saturate(1.05);
}

.login-background-logo img {
    width: 100%;
    height: auto;
    filter: drop-shadow(0 0 44px rgba(255,107,0,0.72)) drop-shadow(0 22px 70px rgba(0,0,0,0.62)) !important;
}

.login-visual-panel {
    max-width: 620px;
    color: #ffffff;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

.login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.75rem;
    border: 1px solid rgba(255,107,0,0.42);
    border-radius: 999px;
    background: rgba(255,107,0,0.12);
    color: #ffb47a;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.login-visual-title {
    margin: 1.2rem 0 0.8rem;
    font-size: clamp(2.3rem, 5vw, 5rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.06em;
}

.login-visual-title span {
    color: #ff6b00;
}

.login-visual-text {
    max-width: 520px;
    color: #d1d5db;
    font-size: clamp(1rem, 1.35vw, 1.18rem);
    line-height: 1.6;
}

.login-feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.login-feature {
    padding: 0.9rem;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 16px;
    background: rgba(255,255,255,0.075);
    backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
}

.login-feature i {
    display: block;
    color: #ff8c42;
    font-size: 1.25rem;
    margin-bottom: 0.45rem;
}

.login-feature strong {
    display: block;
    color: #ffffff;
    font-size: 0.9rem;
}

.login-feature small {
    color: #aeb6c2;
}

.login-form-wrapper {
    width: min(100%, 455px);
    position: relative;
    z-index: 2;
}

.login-card {
    border: 1px solid rgba(255,107,0,0.45) !important;
    border-radius: 26px !important;
    background: linear-gradient(180deg, rgba(255,255,255,0.97) 0%, rgba(248,250,252,0.96) 100%) !important;
    box-shadow: 0 30px 80px rgba(0,0,0,0.48), 0 0 0 1px rgba(255,255,255,0.35) inset, 0 0 38px rgba(255,107,0,0.16) !important;
    backdrop-filter: blur(22px);
    overflow: hidden;
}

.login-card::before {
    content: '';
    display: block;
    height: 6px;
    background: linear-gradient(90deg, #111827 0%, #ff6b00 42%, #ff8c42 68%, #111827 100%);
}

.login-card .card-body {
    padding: clamp(1.35rem, 3vw, 2rem) !important;
}

.login-logo {
    width: 96px;
    height: auto;
    filter: drop-shadow(0 8px 18px rgba(255,107,0,0.18));
}

.login-card .card-title {
    color: #0f172a;
    font-weight: 900;
    letter-spacing: -0.04em;
    font-size: 2rem;
}

.login-card p {
    color: #4b5563;
}

.login-card .form-label {
    color: #111827;
    font-weight: 700;
    font-size: 0.88rem;
}

.login-card .form-control {
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    color: #111827;
    box-shadow: none;
}

.login-card .form-control:focus {
    border-color: #ff6b00;
    box-shadow: 0 0 0 0.22rem rgba(255,107,0,0.14);
}

.login-card .btn-primary {
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #ff6b00 0%, #ff8c42 55%, #f97316 100%);
    font-weight: 800;
    box-shadow: 0 14px 30px rgba(255,107,0,0.34);
}

.login-card .btn-primary:hover {
    filter: brightness(1.04);
    transform: translateY(-1px);
}

.login-card .btn-link {
    color: #374151;
    font-weight: 700;
    padding-left: 0;
}

.login-register-box {
    background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%) !important;
    border: 1px solid rgba(255,107,0,0.28) !important;
    border-radius: 16px !important;
}

.login-register-box .btn-secondary {
    background: #374151;
    border-color: #374151;
    border-radius: 12px;
    font-weight: 700;
}

.field-validation-error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.22rem rgba(220,53,69,0.12) !important;
}

@media (max-width: 991.98px) {
    .login-container {
        justify-content: center !important;
        align-items: center !important;
        padding: 5.5rem 1rem 1.25rem;
    }

    .login-container::before {
        background:
            radial-gradient(circle at 50% 0%, rgba(255,107,0,0.24), transparent 36%),
            linear-gradient(180deg, rgba(10,12,16,0.72), rgba(10,12,16,0.58));
    }

    .login-visual-panel {
        display: none;
    }

    .login-form-wrapper {
        width: min(100%, 430px);
    }
}

@media (max-width: 575.98px) {
    .login-container {
        min-height: 100svh !important;
        padding-inline: 0.8rem;
    }

    .login-card {
        border-radius: 22px !important;
    }

    .login-logo {
        width: 82px;
    }

    .login-card .card-title {
        font-size: 1.7rem;
    }
}

/* Responsive Design */

/* ============================================================
   RESPONSIVE LAYOUT — Single source of truth
   Breakpoints:
     Mobile  : max-width 640px   (phones)
      Compact : 641px – 1280px    (tablets and smaller laptops)
      Desktop : 1281px+           (large laptop/desktop)
   ============================================================ */

/* ---------- Mobile (phones ≤ 640px) ---------- */
@media (max-width: 640px) {

    .content.px-4 {
        padding-right: 1rem !important;
        padding-left: 1rem !important;
    }

    /* Sidebar: hidden off-screen, slides in when .sidebar-open */
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        transition: left 0.3s ease !important;
        z-index: 2000 !important;
    }

    .sidebar.sidebar-open {
        left: 0 !important;
    }

    /* Semi-transparent backdrop */
    .sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.55) !important;
        z-index: 1999 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Content fills the whole screen — no sidebar offset */
    main {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Top-bar: leave room for hamburger button */
    main > .top-row {
        padding: 0.75rem 1rem 0.75rem 68px !important;
    }

    .top-row-brand {
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }

    /* Auf Mobile das Zahnrad ausblenden – Einstellungen sind im Sidebar-Menü */
    .brand-icon-left,
    .brand-icon-right {
        display: none !important;
    }

    /* Hamburger-Button (position:fixed, left:12px) – Titel rechts daneben */
    .brand-title {
        font-size: 1.2rem !important;
        margin-left: 0;
        text-align: left;
    }

    .top-row-racing-elements {
        display: none;
    }

    /* Sidebar internals */
    .sidebar-main-logo {
        height: 100px !important;
        margin: 0 !important;
    }

    .user-emoji-container {
        width: 64px !important;
        height: 64px !important;
    }

    .user-emoji {
        font-size: 2.2rem !important;
    }

    /* Cards */
    .card-body {
        padding: 0.875rem !important;
    }

    /* Tables – horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-responsive > table {
        min-width: 560px;
    }

    /* Button groups stack vertically */
    .btn-action-group {
        flex-direction: column !important;
        width: 100% !important;
    }

    .btn-action-group > * {
        width: 100% !important;
    }

    /* Filter pill buttons wrap */
    .filter-btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .filter-btn-group .btn {
        flex: 1 1 auto;
        min-width: calc(50% - 0.4rem);
    }

    /* Modals: full-width, scrollable body */
    .modal {
        padding: 0.5rem 0;
        overflow-y: auto;
    }

    .modal-dialog {
        margin: 0.5rem auto !important;
        max-width: calc(100vw - 1rem) !important;
        width: calc(100vw - 1rem) !important;
        max-height: calc(100dvh - 1rem);
    }

    .modal-content {
        border-radius: 12px !important;
        display: flex;
        flex-direction: column;
        max-height: calc(100dvh - 1rem);
        overflow: hidden;
    }

    .modal-body {
        padding: 1rem !important;
        flex: 1 1 auto;
        min-height: 0;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .modal-header {
        padding: 0.875rem 1rem !important;
        flex: 0 0 auto;
    }

    .modal-footer {
        padding: 0.75rem 1rem !important;
        flex: 0 0 auto;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .modal-footer .btn {
        flex: 1 1 auto;
        min-width: 110px;
    }
}

/* ---------- Compact screens (641px – 1280px) ---------- */
@media (min-width: 641px) and (max-width: 1280px) {

    /* Sidebar: slide-in just like mobile */
    .sidebar {
        position: fixed !important;
        left: -280px !important;
        width: 280px !important;
        height: 100vh !important;
        transition: left 0.3s ease !important;
        z-index: 2000 !important;
    }

    .sidebar.sidebar-open {
        left: 0 !important;
    }

    /* Semi-transparent backdrop */
    .sidebar-overlay {
        position: fixed !important;
        inset: 0 !important;
        background: rgba(0, 0, 0, 0.55) !important;
        z-index: 1999 !important;
        display: none !important;
        opacity: 0 !important;
        transition: opacity 0.3s ease !important;
    }

    .sidebar-overlay.active {
        display: block !important;
        opacity: 1 !important;
    }

    /* Content fills screen */
    main {
        margin-left: 0 !important;
        width: 100% !important;
        min-width: 0 !important;
    }

    /* Top-bar: leave room for hamburger */
    main > .top-row {
        padding: 0.875rem 1.5rem 0.875rem 72px !important;
    }

    .brand-title {
        font-size: 1.5rem !important;
    }

    .sidebar-main-logo {
        height: 130px !important;
    }

    /* Tables */
    table {
        font-size: 0.9rem;
    }

    th, td {
        padding: 0.5rem 0.6rem !important;
    }

    /* Modals: constrained but not cramped */
    .modal-dialog {
        max-width: 680px !important;
    }

    .modal-body {
        max-height: 70vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ---------- Desktop (1281px+) ---------- */
@media (min-width: 1281px) {

    /* Hamburger hidden — sidebar always visible */
    .mobile-menu-btn {
        display: none !important;
    }

    .sidebar {
        position: fixed !important;
        left: 0 !important;
        width: 300px !important;
    }

    main {
        margin-left: 300px !important;
    }

    .sidebar-overlay {
        display: none !important;
    }

    /* Restore normal top-row padding */
    main > .top-row {
        padding: 0.8rem 2rem !important;
    }
}

/* Extra Large Screens */
@media (min-width: 1400px) {
    .container-fluid {
        max-width: 1320px;
        margin: 0 auto;
    }
    
    .brand-title {
        font-size: 2.5rem !important;
    }

    .top-row-logo {
        height: 70px !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;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: #dc3545;
    border-top: none;
    color: white;
    padding: 0.6rem 1.25rem;
    border-radius: 12px 12px 0 0;
}

/* 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: 1px solid #e8eaed;
        border-radius: 16px;
        padding: 1rem;
        margin-bottom: 1rem;
        background: white;
        box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    }

    .mobile-card-item .card-label {
        font-weight: 600;
        color: var(--racing-orange);
        display: block;
        margin-bottom: 0.25rem;
        text-transform: none;
        font-size: 0.75rem;
        letter-spacing: 0;
    }
    
    .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) {
    /* Full-width standalone buttons on mobile */
    .d-grid .btn,
    .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.25rem;
    }

    /* Form labels more prominent on mobile */
    .form-label {
        font-weight: 600;
        font-size: 0.9rem;
    }

    /* Larger form inputs for touch — prevents iOS auto-zoom */
    .form-control,
    .form-select {
        font-size: 16px !important;
        min-height: 44px;
    }
}

/* 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;
}

/* ============================================================
   Marke Search Dropdown
   ============================================================ */
.marke-search-dropdown {
    position: relative;
}

.marke-input-wrapper {
    position: relative;
}

.marke-input-wrapper .form-control {
    padding-right: 2rem;
}

.marke-clear-btn {
    position: absolute;
    right: 0.5rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 0;
    color: #999;
    cursor: pointer;
    line-height: 1;
    font-size: 1rem;
}

.marke-clear-btn:hover {
    color: #333;
}

.marke-dropdown-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12);
    z-index: 9999;
    max-height: 240px;
    overflow-y: auto;
}

.marke-dropdown-item {
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.12s;
}

.marke-dropdown-item:hover,
.marke-dropdown-item.active {
    background: #fff3eb;
    color: var(--racing-orange, #e8521a);
    font-weight: 600;
}

.marke-dropdown-empty {
    padding: 0.6rem 0.875rem;
    color: #888;
    font-size: 0.875rem;
    font-style: italic;
}

.marke-dropdown-add {
    width: 100%;
    border: 0;
    border-bottom: 1px solid #f1f1f1;
    background: #fff;
    color: var(--racing-orange, #e8521a);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.6rem 0.875rem;
    position: sticky;
    top: 0;
    text-align: left;
    z-index: 1;
}

.marke-dropdown-add:hover:not(:disabled) {
    background: #fff3eb;
}

.marke-dropdown-add:disabled {
    cursor: default;
    opacity: 0.7;
}

.theme-serios .marke-dropdown-item:hover,
.theme-serios .marke-dropdown-item.active {
    background: #f0f0f0;
    color: #1a1a1a;
}

/* ============================================================
   HELLES DESIGN (theme-hell)
   Weißer Hintergrund, dunkle Schrift, dezente Orange-Akzente
   ============================================================ */

/* Basis-Einstellungen */
.theme-hell {
    --hell-bg: #ffffff;
    --hell-surface: #f8f9fa;
    --hell-surface-hover: #f0f0f0;
    --hell-card-bg: #ffffff;
    --hell-text: #1a1a1a;
    --hell-text-secondary: #6b7280;
    --hell-text-muted: #9ca3af;
    --hell-border: #e5e7eb;
    --hell-sidebar-bg: #f8f9fa;
    --hell-sidebar-text: #374151;
    --hell-accent: #ff6b00;
    --hell-accent-light: #fff3eb;
}

/* Page-Hintergrund hell */
.theme-hell .page {
    background: #f5f5f5 !important;
}

/* Main Content */
.theme-hell main {
    background: #f5f5f5 !important;
}

.theme-hell .content-background-pattern,
.theme-hell .sidebar-racing-pattern,
.theme-hell .racing-flag-pattern {
    display: none !important;
}

/* Top Row */
.theme-hell .top-row {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
}

.theme-hell .brand-title,
.theme-hell .brand-silver-flat,
.theme-hell .brand-gray,
.theme-hell .brand-orange,
.theme-hell .brand-tld {
    color: #1a1a1a !important;
}

.theme-hell .brand-icon-left,
.theme-hell .brand-icon-right {
    color: #ff6b00 !important;
}

/* Sidebar */
.theme-hell .sidebar {
    background: #ffffff !important;
    background-image: none !important;
    border-right: 1px solid #e5e7eb !important;
    box-shadow: 2px 0 12px rgba(0,0,0,0.04) !important;
}

.theme-hell .nav-link {
    color: #374151 !important;
    border-left: 3px solid transparent !important;
}

.theme-hell .nav-link:hover {
    background: #f3f4f6 !important;
    color: #ff6b00 !important;
    border-left-color: #ff6b00 !important;
}

.theme-hell .nav-link.active {
    background: #fff3eb !important;
    color: #ff6b00 !important;
    border-left-color: #ff6b00 !important;
    font-weight: 700 !important;
}

.theme-hell .nav-highlight-button {
    background: linear-gradient(135deg, #ff6b00, #ff8c42) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(255,107,0,0.25) !important;
}

.theme-hell .nav-highlight-button:hover {
    box-shadow: 0 4px 14px rgba(255,107,0,0.35) !important;
    transform: translateY(-1px) !important;
}

.theme-hell .nav-divider {
    border-top-color: #e5e7eb !important;
}

.theme-hell .nav-section-label,
.theme-hell .nav-category-header {
    color: #9ca3af !important;
}

.theme-hell .nav-chevron {
    color: #9ca3af !important;
}

.theme-hell .nav-sub-dot {
    background: #d1d5db !important;
}

.theme-hell .nav-link-category {
    color: #374151 !important;
}

/* Sidebar Logo Bereich */
.theme-hell .brand-logo-item,
.theme-hell .brand-logo-icon {
    opacity: 0.7 !important;
}

/* Dashboard - Hell Overrides */
.theme-hell .dash-page::before {
    background: #f5f5f5 !important;
    background-image: none !important;
    opacity: 1 !important;
}

.theme-hell .dash-page::after {
    display: none !important;
}

.theme-hell .dash-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 60%, #ffffff 100%) !important;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04) !important;
}

.theme-hell .dash-hero::before {
    background: linear-gradient(90deg, #ff6b00 0%, #ff8c42 50%, #ddd 100%) !important;
}

.theme-hell .dash-hero-greeting {
    color: #6b7280 !important;
}

.theme-hell .dash-hero-title {
    color: #1a1a1a !important;
}

.theme-hell .dash-hero-title .name-highlight {
    background: linear-gradient(90deg, #ff6b00, #ff8c42) !important;
    -webkit-background-clip: text !important;
    background-clip: text !important;
}

.theme-hell .dash-hero-sub {
    color: #9ca3af !important;
}

.theme-hell .dash-hero-btn {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    color: #6b7280 !important;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04) !important;
}

.theme-hell .dash-hero-btn:hover {
    background: #f3f4f6 !important;
    color: #374151 !important;
}

.theme-hell .dash-hero-btn-accent {
    background: #fff3eb !important;
    border-color: #ff6b00 !important;
    color: #ff6b00 !important;
}

.theme-hell .dash-hero-btn-accent:hover {
    background: #ff6b00 !important;
    color: #fff !important;
}

/* KPI Cards */
.theme-hell .kpi-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.theme-hell .kpi-card:hover {
    box-shadow: 0 4px 16px rgba(255,107,0,0.12) !important;
}

.theme-hell .kpi-icon-orange { background: linear-gradient(135deg, #ff6b00, #ff8c42) !important; color: #fff !important; }
.theme-hell .kpi-icon-green  { background: linear-gradient(135deg, #16a34a, #22c55e) !important; color: #fff !important; }
.theme-hell .kpi-icon-red    { background: linear-gradient(135deg, #dc2626, #ef4444) !important; color: #fff !important; }
.theme-hell .kpi-icon-cyan   { background: linear-gradient(135deg, #0891b2, #06b6d4) !important; color: #fff !important; }
.theme-hell .kpi-icon-purple { background: linear-gradient(135deg, #7c3aed, #a855f7) !important; color: #fff !important; }

.theme-hell .kpi-value {
    color: #1a1a1a !important;
}

.theme-hell .kpi-label {
    color: #6b7280 !important;
}

.theme-hell .kpi-sub {
    color: #9ca3af !important;
}

/* Quick Actions */
.theme-hell .quick-action {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.theme-hell .quick-action i {
    color: #ff6b00 !important;
}

.theme-hell .quick-action:hover {
    background: linear-gradient(135deg, #ff6b00, #ff8c42) !important;
    border-color: #ff6b00 !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(255,107,0,0.3) !important;
}

.theme-hell .quick-action:hover i {
    color: #fff !important;
}

/* Dashboard Widgets */
.theme-hell .dash-widget {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.theme-hell .dash-widget-header {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%) !important;
    border-bottom: 1px solid #f0f0f0 !important;
}

.theme-hell .dash-widget-title {
    color: #1a1a1a !important;
}

.theme-hell .dash-widget-link {
    color: #6b7280 !important;
    background: #f3f4f6 !important;
    border-color: #e5e7eb !important;
}

.theme-hell .dash-widget-link:hover {
    background: #e5e7eb !important;
    color: #374151 !important;
}

.theme-hell .dash-widget-stats {
    border-bottom-color: #f0f0f0 !important;
    background: #fafafa !important;
}

.theme-hell .dash-stat-cell + .dash-stat-cell {
    border-left-color: #f0f0f0 !important;
}

.theme-hell .dash-stat-val {
    color: #1a1a1a !important;
}

.theme-hell .dash-stat-lbl {
    color: #9ca3af !important;
}

.theme-hell .dash-list-item {
    border-bottom-color: #f3f4f6 !important;
}

.theme-hell .dash-list-item:hover {
    background: #fafafa !important;
}

.theme-hell .dash-list-title {
    color: #1a1a1a !important;
}

.theme-hell .dash-list-sub {
    color: #9ca3af !important;
}

.theme-hell .dash-list-amount {
    color: #1a1a1a !important;
}

.theme-hell .dash-list-date {
    color: #9ca3af !important;
}

.theme-hell .dash-empty {
    color: #9ca3af !important;
}

/* Überfällige Rechnungen */
.theme-hell .overdue-card {
    background: #ffffff !important;
    border-color: #fca5a5 !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04) !important;
}

.theme-hell .overdue-header {
    background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%) !important;
    border-bottom-color: #fecaca !important;
}

.theme-hell .overdue-header > div {
    color: #991b1b !important;
}

/* Widget Icons in Hell */
.theme-hell .wicon-orange { background: rgba(255,107,0,0.12) !important; color: #ff6b00 !important; border-color: rgba(255,107,0,0.2) !important; }
.theme-hell .wicon-green  { background: rgba(22,163,74,0.1) !important; color: #16a34a !important; border-color: rgba(22,163,74,0.15) !important; }
.theme-hell .wicon-red    { background: rgba(239,68,68,0.1) !important; color: #dc2626 !important; border-color: rgba(239,68,68,0.15) !important; }
.theme-hell .wicon-cyan   { background: rgba(6,182,212,0.1) !important; color: #0891b2 !important; border-color: rgba(6,182,212,0.15) !important; }
.theme-hell .wicon-amber  { background: rgba(245,158,11,0.1) !important; color: #d97706 !important; border-color: rgba(245,158,11,0.15) !important; }

/* Seiten-Header in Hell */
.theme-hell .page-header {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.theme-hell .page-header h1, .theme-hell .page-header h2, .theme-hell .page-header h3 {
    color: #1a1a1a !important;
}

.theme-hell .page-header p {
    color: #6b7280 !important;
}

/* Karten allgemein */
.theme-hell .card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04) !important;
}

.theme-hell .card-header {
    background: #fafafa !important;
    border-bottom-color: #e5e7eb !important;
    color: #1a1a1a !important;
}

.theme-hell .card-body {
    color: #374151 !important;
}

.theme-hell .card-footer {
    background: #fafafa !important;
    border-top-color: #e5e7eb !important;
}

/* Tabellen */
.theme-hell .table {
    color: #374151 !important;
}

.theme-hell .table thead th {
    background: #f8f9fa !important;
    color: #6b7280 !important;
    border-bottom-color: #e5e7eb !important;
}

.theme-hell .table td {
    border-top-color: #f0f0f0 !important;
}

.theme-hell .table-hover tbody tr:hover {
    background: #f8f9fa !important;
}

/* Formulare */
.theme-hell .form-control,
.theme-hell .form-select {
    background: #ffffff !important;
    border-color: #d1d5db !important;
    color: #1a1a1a !important;
}

.theme-hell .form-control:focus,
.theme-hell .form-select:focus {
    border-color: #ff6b00 !important;
    box-shadow: 0 0 0 3px rgba(255,107,0,0.12) !important;
}

.theme-hell .form-label {
    color: #374151 !important;
}

/* Input Groups */
.theme-hell .input-group-text {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
    color: #6b7280 !important;
}

/* Buttons general */
.theme-hell .btn-primary {
    background: linear-gradient(135deg, #ff6b00, #ff8c42) !important;
    border: none !important;
    color: #ffffff !important;
}

.theme-hell .btn-outline-primary {
    border-color: #ff6b00 !important;
    color: #ff6b00 !important;
}

.theme-hell .btn-outline-primary:hover {
    background: #ff6b00 !important;
    color: #fff !important;
}

/* Alerts */
.theme-hell .alert {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    color: #374151 !important;
}

/* Breadcrumb */
.theme-hell .breadcrumb {
    background: transparent !important;
}

.theme-hell .breadcrumb-item {
    color: #6b7280 !important;
}

.theme-hell .breadcrumb-item.active {
    color: #1a1a1a !important;
}

.theme-hell .breadcrumb-item a {
    color: #ff6b00 !important;
}

/* Badges in Hell */
.theme-hell .bg-warning { background: #fbbf24 !important; color: #1a1a1a !important; }

.theme-hell .text-muted {
    color: #9ca3af !important;
}

/* Hover cards (z.B. Kunden, Fahrzeuge) */
.theme-hell .hover-card {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.theme-hell .hover-card:hover {
    border-color: #ff6b00 !important;
    box-shadow: 0 4px 16px rgba(255,107,0,0.1) !important;
}

/* Modal */
.theme-hell .modal-content {
    background: #ffffff !important;
    border: none !important;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}

.theme-hell .modal-header {
    background: #fafafa !important;
    border-bottom-color: #e5e7eb !important;
    color: #1a1a1a !important;
}

.theme-hell .modal-body {
    color: #374151 !important;
}

.theme-hell .modal-footer {
    background: #fafafa !important;
    border-top-color: #e5e7eb !important;
}

.theme-hell .btn-close {
    filter: none !important;
    opacity: 0.5 !important;
}

/* Global Search in Hell */
.theme-hell .global-search-container {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05) !important;
}

.theme-hell .global-search-input {
    background: #f8f9fa !important;
    border-color: #e5e7eb !important;
    color: #1a1a1a !important;
}

.theme-hell .global-search-input::placeholder {
    color: #9ca3af !important;
}

/* Offcanvas / Dropdown in Hell */
.theme-hell .dropdown-menu {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.08) !important;
}

.theme-hell .dropdown-item {
    color: #374151 !important;
}

.theme-hell .dropdown-item:hover {
    background: #f3f4f6 !important;
    color: #ff6b00 !important;
}

/* Footer / Legal links */
.theme-hell .nav-legal-link {
    color: #9ca3af !important;
}

.theme-hell .nav-legal-link:hover {
    color: #6b7280 !important;
}

/* KalenderWidget in Hell */
.theme-hell .kalender-widget {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.theme-hell .monat-table th {
    color: #6b7280 !important;
}

.theme-hell .monat-table td {
    color: #374151 !important;
}

.theme-hell .monat-table td:hover {
    background: #f3f4f6 !important;
}

/* tabs and nav pills */
.theme-hell .nav-tabs {
    border-bottom-color: #e5e7eb !important;
}

.theme-hell .nav-tabs .nav-link {
    color: #6b7280 !important;
    background: transparent !important;
    border: none !important;
}

.theme-hell .nav-tabs .nav-link.active {
    color: #ff6b00 !important;
    border-bottom: 2px solid #ff6b00 !important;
    background: transparent !important;
}

/* Einstellungen section styling */
.theme-hell .settings-section {
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.theme-hell .settings-section-header {
    border-bottom-color: #f0f0f0 !important;
}

/* Scrollbar in Hell */
.theme-hell ::-webkit-scrollbar-track {
    background: #f0f0f0 !important;
}

.theme-hell ::-webkit-scrollbar-thumb {
    background: #ccc !important;
}

/* Datatable/Paginator */
.theme-hell .page-link {
    color: #374151 !important;
    background: #ffffff !important;
    border-color: #e5e7eb !important;
}

.theme-hell .page-item.active .page-link {
    background: #ff6b00 !important;
    border-color: #ff6b00 !important;
    color: #fff !important;
}

/* Progress bars */
.theme-hell .progress {
    background: #e5e7eb !important;
}

.theme-hell .progress-bar {
    background: linear-gradient(90deg, #ff6b00, #ff8c42) !important;
}

/* ============================================================
   MISSING GLOBAL CLASSES
   ============================================================ */

/* theme-standard: Default theme (racing/orange) — applies the base styles,
   acts as an explicit class so the ThemeClass switch in MainLayout always
   resolves to a known class name. */
.theme-standard {
    /* inherits all base styles; no overrides needed */
}

/* nav-legal-link: Footer links in the sidebar */
.nav-legal-link {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.35);
    text-decoration: none;
    transition: color 0.2s ease;
}

.nav-legal-link:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.theme-serios .nav-legal-link {
    color: rgba(255, 255, 255, 0.3) !important;
}

.theme-serios .nav-legal-link:hover {
    color: rgba(255, 255, 255, 0.6) !important;
}

/* btn-purple: Global accent button — used in KalenderWidget and Auftragsverwaltung */
.btn-purple {
    background-color: var(--racing-orange);
    color: #fff;
    border: 2px solid var(--racing-orange);
}

.btn-purple:hover,
.btn-purple:focus {
    background-color: var(--racing-orange-light);
    border-color: var(--racing-orange-light);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 107, 0, 0.35);
}

.btn-purple:active {
    transform: translateY(2px);
    box-shadow: none;
}

.btn-outline-purple {
    color: var(--racing-orange);
    border-color: var(--racing-orange);
    background: transparent;
}

.btn-outline-purple:hover {
    background: var(--racing-orange);
    color: #fff;
}

.theme-serios .btn-purple {
    background-color: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
}

.theme-serios .btn-purple:hover {
    background-color: var(--racing-orange-light) !important;
    border-color: var(--racing-orange-light) !important;
}

.theme-serios .btn-purple:active {
    transform: translateY(2px);
    box-shadow: none !important;
}

/* Marken-Liste in Einstellungen */
.marken-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 0.4rem;
    max-height: 320px;
    overflow-y: auto;
    padding: 0.25rem;
}

.marken-list-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    font-size: 0.85rem;
}

.marken-list-item:hover {
    background: #fff3eb;
    border-color: var(--racing-orange, #e8521a);
}

.theme-serios .marken-list-item:hover {
    background: #f0f0f0;
    border-color: #555;
}


@media (hover: none) and (pointer: coarse) {
    /* Increase tap target sizes for buttons only */
    .btn {
        min-height: 44px;
    }

    /* Disable hover effects on touch devices */
    .card:hover {
        transform: none;
    }
}

/* ============================================================
   COMPONENT-LEVEL RESPONSIVE RULES (Mobile ≤ 640px)
   All component tweaks are consolidated here to avoid
   cascade conflicts from duplicate media blocks.
   ============================================================ */
@media (max-width: 640px) {

    /* --- Grid --- */
    .row {
        margin-left: 0;
        margin-right: 0;
    }

    .row > * {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    /* Bootstrap col-md/lg force to full-width on phones */
    .col-md-6, .col-md-4, .col-md-8,
    .col-lg-4, .col-lg-6, .col-lg-8 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* --- Navigation tabs --- */
    .nav-tabs {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        border-bottom: 1px solid #e0e3e8;
    }

    .nav-tabs .nav-link {
        flex: 0 0 auto;
        white-space: nowrap;
        padding: 0.6rem 0.9rem;
        font-size: 0.85rem;
    }

    /* --- Cards --- */
    .card {
        margin-bottom: 1rem;
    }

    .card-header {
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }

    .card-header.d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    /* --- Typography --- */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.1rem !important; }
    h5 { font-size: 1rem !important; }
    .lead { font-size: 1rem !important; }

    /* --- Legal pages --- */
    .legal-page .card-body { padding: 1rem !important; }
    .legal-page h2 { font-size: 1.3rem !important; }
    .legal-page h5 { font-size: 0.95rem !important; }
    .legal-page p, .legal-page li { font-size: 0.875rem; line-height: 1.55; }
    .legal-page ul { padding-left: 1rem; }
    .legal-page .text-muted.mb-4 { font-size: 0.8rem; }
}

/* Compact screen supplement */
@media (min-width: 641px) and (max-width: 1280px) {
    .legal-page p,
    .legal-page li {
        font-size: 0.9rem;
    }

    /* Sidebar-Logo auf Tablet etwas kleiner */
    .sidebar-main-logo {
        height: 90px !important;
        max-height: 90px !important;
    }

    /* Dokument-Seiten auf Tablet: Padding reduzieren */
    .auftrag-document {
        padding: 1.5rem !important;
    }
}

/* Mobile: Dokument-Seiten (Rechnung, KV, Auftrag) */
@media (max-width: 640px) {
    .auftrag-document,
    #rechnung-print-area,
    #kv-print-area,
    #auftrag-print-area {
        padding: 1rem !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        max-width: 100% !important;
    }

    /* Document data stays readable instead of being squeezed into two columns. */
    .auftrag-document .col-6,
    #rechnung-print-area .col-6,
    #kv-print-area .col-6,
    #auftrag-print-area .col-6 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .auftrag-document .table,
    #rechnung-print-area .table,
    #kv-print-area .table,
    #auftrag-print-area .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        min-width: 560px;
    }

    .document-totals {
        width: min(300px, 100%) !important;
    }

    .no-print.d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    .no-print .btn-group {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .no-print .btn-group > .btn {
        flex: 1 1 auto;
        border-radius: 0.375rem !important;
    }

    /* Signatur-Boxen auf mobil stacken */
    .signature-row-mobile {
        flex-direction: column !important;
        gap: 1rem !important;
    }

    /* KalenderWidget: Kompakt-Header auf Mobil */
    .kalender-widget-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    /* KalenderWidget: Navigation stacked */
    .kalender-widget .card-header .d-flex.align-items-center.gap-1 {
        flex-wrap: wrap;
        gap: 0.3rem !important;
    }

    .kalender-widget .card-header > .d-flex.justify-content-between {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .kalender-widget .legend-bar {
        flex-wrap: wrap;
        gap: 0.4rem 0.75rem !important;
    }

    .kalender-widget .legend-bar .ms-auto {
        margin-left: 0 !important;
    }

    .kalender-widget .woche-scroll,
    .kalender-widget .monat-scroll {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }

    .calendar-add-button {
        min-width: 44px;
        min-height: 44px;
    }

    .search-result-item .flex-grow-1 {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .reifen-groesse .reifen-separator {
        display: none !important;
    }

    .vehicle-cards-container,
    .customer-cards-container,
    .table-responsive[style*="max-height"] {
        max-height: none !important;
        overflow-y: visible !important;
    }

    .termin-add-button {
        min-width: 44px;
        min-height: 44px;
    }

    /* KalenderWidget: Monatsansicht Tabellenheader */
    .monat-table th {
        font-size: 0.7rem !important;
        padding: 0.2rem !important;
    }

    /* KalenderWidget Höhe auf Mobil reduzieren */
    .kalender-widget {
        height: auto !important;
        min-height: 300px;
    }

    /* Quick-Actions auf Dashboard: 2-spaltig */
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Buttons in Modals + Actions immer touch-freundlich */
    .btn {
        min-height: 44px;
        padding-top: 0.55rem;
        padding-bottom: 0.55rem;
    }

    /* Firmenverwaltung / Einstellungen: Tabellen-Header nicht umbrechen */
    th {
        white-space: nowrap;
    }

    /* Badges auf mobil etwas größer */
    .badge {
        font-size: 0.75rem !important;
        padding: 0.35em 0.6em !important;
    }

    /* Seiten-Titel auf mobile kleiner */
    .page-title {
        font-size: 1.4rem !important;
    }
}

/* Legal Pages (base) */
.legal-page {
    overflow-wrap: break-word;
    word-break: break-word;
}

.legal-page ul {
    padding-left: 1.25rem;
}

.legal-page p,
.legal-page li {
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Print Styles */
@media print {
    .sidebar,
    .top-row,
    .btn,
    .mobile-menu-btn {
        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;
    }
}

/* Finale Theme-Overrides: müssen am Ende stehen */
.theme-dunkel main, .theme-dunkel .content { background: #0d0f13 !important; }
.theme-dunkel .top-row, .theme-dunkel .sidebar, .theme-dunkel .sidebar .top-row {
    background-color: #050608 !important;
    background-image: none !important;
    color: #f3f4f6 !important;
}
.theme-dunkel .page .top-row,
.theme-dunkel .page .sidebar,
.theme-dunkel .page .sidebar .top-row,
.theme-dunkel .sidebar.sidebar,
.theme-dunkel .top-row.top-row {
    background-color: #050608 !important;
    background-image: none !important;
    color: #f3f4f6 !important;
}
.theme-dunkel .card, .theme-dunkel .kpi-card, .theme-dunkel .dash-widget, .theme-dunkel .overdue-card, .theme-dunkel .kalender-widget .card {
    background: #111418 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.08) !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.42) !important;
}
.theme-dunkel .card-header, .theme-dunkel .dash-widget-header, .theme-dunkel .kalender-widget .card-header {
    background: #050608 !important;
    color: #f3f4f6 !important;
}
.theme-dunkel .btn-primary, .theme-dunkel .btn-purple, .theme-dunkel .quick-action, .theme-dunkel .dashboard-highlight-button, .theme-dunkel .nav-link.active, .theme-dunkel .nav-sub-link.active {
    background: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
    color: #fff !important;
}
.theme-dunkel,
.theme-dunkel main,
.theme-dunkel .content,
.theme-dunkel .card-body,
.theme-dunkel .modal-body,
.theme-dunkel .offcanvas-body {
    color: #f3f4f6 !important;
}
.theme-dunkel .nav-link, .theme-dunkel .nav-sub-link, .theme-dunkel .nav-category-header, .theme-dunkel .nav-category-label, .theme-dunkel .nav-text { color: #d1d5db !important; }
.theme-dunkel .search-box, .theme-dunkel .search-results-dropdown { background: #111418 !important; border-color: rgba(255,255,255,0.08) !important; }
.theme-dunkel .search-box .input-group, .theme-dunkel .search-box .input-group > *, .theme-dunkel .search-box .form-control, .theme-dunkel .search-box .input-group-text { background: #111418 !important; color: #f3f4f6 !important; }
.theme-dunkel h1,
.theme-dunkel h2,
.theme-dunkel h3,
.theme-dunkel h4,
.theme-dunkel h5,
.theme-dunkel h6,
.theme-dunkel .card-title,
.theme-dunkel .card-text,
.theme-dunkel p,
.theme-dunkel li,
.theme-dunkel dt,
.theme-dunkel dd,
.theme-dunkel label,
.theme-dunkel .form-label,
.theme-dunkel .form-check-label,
.theme-dunkel .col-form-label,
.theme-dunkel strong,
.theme-dunkel span,
.theme-dunkel small {
    color: #f3f4f6;
}
.theme-dunkel .text-muted,
.theme-dunkel .text-body-secondary,
.theme-dunkel .text-body,
.theme-dunkel .text-body-emphasis,
.theme-dunkel .text-secondary,
.theme-dunkel .text-dark,
.theme-dunkel .text-black,
.theme-dunkel .link-dark,
.theme-dunkel .form-text,
.theme-dunkel small.text-muted,
.theme-dunkel .text-black-50,
.theme-dunkel .text-body-tertiary {
    color: #b6c0cc !important;
}
.theme-dunkel .text-dark,
.theme-dunkel .text-black,
.theme-dunkel .link-dark,
.theme-dunkel .text-body,
.theme-dunkel .text-body-emphasis {
    color: #f3f4f6 !important;
}
.theme-dunkel .form-control,
.theme-dunkel .form-select,
.theme-dunkel textarea,
.theme-dunkel input:not([type="checkbox"]):not([type="radio"]),
.theme-dunkel select {
    background: #0b0d10 !important;
    background-color: #0b0d10 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.12) !important;
}
.theme-dunkel .form-select,
.theme-dunkel select {
    color-scheme: dark;
}
.theme-dunkel .form-select option,
.theme-dunkel select option,
.theme-dunkel .form-select optgroup,
.theme-dunkel select optgroup {
    background: #0b0d10 !important;
    background-color: #0b0d10 !important;
    color: #f3f4f6 !important;
}
.theme-dunkel .form-control:focus,
.theme-dunkel .form-select:focus,
.theme-dunkel textarea:focus,
.theme-dunkel input:focus,
.theme-dunkel select:focus {
    background: #0f1216 !important;
    background-color: #0f1216 !important;
    color: #ffffff !important;
    border-color: rgba(255,107,0,0.45) !important;
    box-shadow: 0 0 0 0.2rem rgba(255,107,0,0.15) !important;
}
.theme-dunkel .form-control::placeholder,
.theme-dunkel textarea::placeholder,
.theme-dunkel input::placeholder {
    color: #94a3b8 !important;
    opacity: 1 !important;
}
.theme-dunkel .form-control:disabled,
.theme-dunkel .form-select:disabled,
.theme-dunkel input:disabled,
.theme-dunkel textarea:disabled {
    background: #111418 !important;
    color: #cbd5e1 !important;
    opacity: 1 !important;
}
.theme-dunkel .input-group-text {
    background: #0b0d10 !important;
    color: #d1d5db !important;
    border-color: rgba(255,255,255,0.12) !important;
}
.theme-dunkel .table {
    --bs-table-bg: #111418;
    --bs-table-color: #f3f4f6;
    --bs-table-border-color: rgba(255,255,255,0.08);
    color: #f3f4f6 !important;
}
.theme-dunkel .table > :not(caption) > * > * {
    background-color: #111418 !important;
    color: #f3f4f6 !important;
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
.theme-dunkel .table-hover > tbody > tr:hover > * {
    background-color: #101216 !important;
    color: #ffffff !important;
}
.theme-dunkel .table-light,
.theme-dunkel .table-light > th,
.theme-dunkel .table-light > td,
.theme-dunkel thead.table-light th {
    background: #050608 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.theme-dunkel .dropdown-menu,
.theme-dunkel .modal-content,
.theme-dunkel .offcanvas,
.theme-dunkel .list-group-item {
    background: #111418 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.theme-dunkel .dropdown-item {
    color: #f3f4f6 !important;
}
.theme-dunkel .dropdown-item:hover,
.theme-dunkel .dropdown-item:focus,
.theme-dunkel .dropdown-item.active,
.theme-dunkel .dropdown-item:active {
    background: #181b20 !important;
    color: #ffffff !important;
}
.theme-dunkel .badge.bg-light,
.theme-dunkel .badge.text-dark,
.theme-dunkel .bg-light.text-dark,
.theme-dunkel .bg-warning.text-dark,
.theme-dunkel .bg-info.text-dark,
.theme-dunkel .btn-warning.text-dark,
.theme-dunkel .btn-info.text-dark {
    color: #111827 !important;
}
.theme-dunkel .modal-header,
.theme-dunkel .modal-footer,
.theme-dunkel .card-footer,
.theme-dunkel .bg-light,
.theme-dunkel .table-light {
    background: #050608 !important;
    background-color: #050608 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.08) !important;
}
.theme-dunkel .btn-close {
    filter: invert(1) grayscale(100%) brightness(180%) !important;
    opacity: 0.9 !important;
}
.theme-dunkel .btn-outline-primary,
.theme-dunkel .btn-outline-secondary,
.theme-dunkel .btn-outline-success,
.theme-dunkel .btn-outline-danger,
.theme-dunkel .btn-outline-warning,
.theme-dunkel .btn-outline-info,
.theme-dunkel .btn-outline-light,
.theme-dunkel .btn-outline-dark {
    background: transparent !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.22) !important;
}
.theme-dunkel .btn-outline-primary:hover,
.theme-dunkel .btn-outline-secondary:hover,
.theme-dunkel .btn-outline-success:hover,
.theme-dunkel .btn-outline-danger:hover,
.theme-dunkel .btn-outline-warning:hover,
.theme-dunkel .btn-outline-info:hover,
.theme-dunkel .btn-outline-light:hover,
.theme-dunkel .btn-outline-dark:hover {
    background: #181b20 !important;
    color: #ffffff !important;
    border-color: rgba(255,107,0,0.45) !important;
}
.theme-dunkel .alert {
    background: #111418 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.12) !important;
}
.theme-dunkel .alert-info { border-color: rgba(14,165,233,0.35) !important; }
.theme-dunkel .alert-success { border-color: rgba(34,197,94,0.35) !important; }
.theme-dunkel .alert-warning { border-color: rgba(245,158,11,0.45) !important; }
.theme-dunkel .alert-danger { border-color: rgba(239,68,68,0.45) !important; }
.theme-dunkel .marke-search-dropdown {
    position: relative;
}
.theme-dunkel .marke-dropdown-list {
    background: #0b0d10 !important;
    color: #f3f4f6 !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    box-shadow: 0 16px 36px rgba(0,0,0,0.55) !important;
}
.theme-dunkel .marke-dropdown-item,
.theme-dunkel .marke-dropdown-empty,
.theme-dunkel .marke-dropdown-add {
    background: #0b0d10 !important;
    color: #f3f4f6 !important;
}
.theme-dunkel .marke-dropdown-item:hover,
.theme-dunkel .marke-dropdown-item.active,
.theme-dunkel .marke-dropdown-add:hover:not(:disabled) {
    background: #181b20 !important;
    color: #ffffff !important;
}
.theme-dunkel .marke-clear-btn {
    color: #d1d5db !important;
}
.theme-dunkel .nav-tabs {
    border-bottom-color: rgba(255,255,255,0.08) !important;
}
.theme-dunkel .nav-tabs .nav-link {
    color: #b6c0cc !important;
    background: transparent !important;
    border-color: transparent !important;
}
.theme-dunkel .nav-tabs .nav-link:hover,
.theme-dunkel .nav-tabs .nav-link.active {
    color: #f3f4f6 !important;
    border-bottom-color: var(--racing-orange) !important;
    background: transparent !important;
}
.theme-dunkel [style*="color: #555"],
.theme-dunkel [style*="color:#555"],
.theme-dunkel [style*="color: #000"],
.theme-dunkel [style*="color:#000"],
.theme-dunkel [style*="color: #111"],
.theme-dunkel [style*="color:#111"],
.theme-dunkel [style*="color: #222"],
.theme-dunkel [style*="color:#222"],
.theme-dunkel [style*="color: #333"],
.theme-dunkel [style*="color:#333"],
.theme-dunkel [style*="color: #444"],
.theme-dunkel [style*="color:#444"],
.theme-dunkel [style*="color: #666"],
.theme-dunkel [style*="color:#666"],
.theme-dunkel [style*="color: #6c757d"],
.theme-dunkel [style*="color:#6c757d"],
.theme-dunkel [style*="color: #888"],
.theme-dunkel [style*="color:#888"],
.theme-dunkel [style*="color: #999"],
.theme-dunkel [style*="color:#999"],
.theme-dunkel [style*="color: #aaa"],
.theme-dunkel [style*="color:#aaa"],
.theme-dunkel [style*="color: #bbb"],
.theme-dunkel [style*="color:#bbb"],
.theme-dunkel [style*="color: #ccc"],
.theme-dunkel [style*="color:#ccc"],
.theme-dunkel [style*="color: #ddd"],
.theme-dunkel [style*="color:#ddd"] {
    color: #cbd5e1 !important;
}
.theme-dunkel [style*="background: #f8f9fa"],
.theme-dunkel [style*="background:#f8f9fa"],
.theme-dunkel [style*="background-color: #f8f9fa"],
.theme-dunkel [style*="background-color:#f8f9fa"],
.theme-dunkel [style*="background: #fafafa"],
.theme-dunkel [style*="background:#fafafa"],
.theme-dunkel [style*="background: #fff8"],
.theme-dunkel [style*="background:#fff8"],
.theme-dunkel [style*="background-color: #fff8"],
.theme-dunkel [style*="background-color:#fff8"],
.theme-dunkel [style*="background: #ffffff"],
.theme-dunkel [style*="background:#ffffff"],
.theme-dunkel [style*="background: #fff"],
.theme-dunkel [style*="background:#fff"] {
    background: #111418 !important;
    background-color: #111418 !important;
    color: #f3f4f6 !important;
    border-color: rgba(255,255,255,0.12) !important;
}
.theme-dunkel .auftrag-document,
.theme-dunkel #rechnung-print-area,
.theme-dunkel #kv-print-area,
.theme-dunkel #auftrag-print-area {
    background: #ffffff !important;
    background-color: #ffffff !important;
    color: #222222 !important;
}
.theme-dunkel .auftrag-document [style*="background: #ffffff"],
.theme-dunkel .auftrag-document [style*="background:#ffffff"],
.theme-dunkel .auftrag-document [style*="background: #fff"],
.theme-dunkel .auftrag-document [style*="background:#fff"] {
    background: #ffffff !important;
    background-color: #ffffff !important;
}
.theme-dunkel .auftrag-document [style*="background: #f8f9fa"],
.theme-dunkel .auftrag-document [style*="background:#f8f9fa"],
.theme-dunkel .auftrag-document [style*="background-color: #f8f9fa"],
.theme-dunkel .auftrag-document [style*="background-color:#f8f9fa"] {
    background: #f8f9fa !important;
    background-color: #f8f9fa !important;
}
.theme-dunkel .auftrag-document [style*="background: #fff8"],
.theme-dunkel .auftrag-document [style*="background:#fff8"],
.theme-dunkel .auftrag-document [style*="background-color: #fff8"],
.theme-dunkel .auftrag-document [style*="background-color:#fff8"] {
    background: #fff8f2 !important;
    background-color: #fff8f2 !important;
}
.theme-dunkel .auftrag-document [style*="color: #333"],
.theme-dunkel .auftrag-document [style*="color:#333"] { color: #333333 !important; }
.theme-dunkel .auftrag-document [style*="color: #555"],
.theme-dunkel .auftrag-document [style*="color:#555"] { color: #555555 !important; }
.theme-dunkel .auftrag-document [style*="color: #666"],
.theme-dunkel .auftrag-document [style*="color:#666"] { color: #666666 !important; }
.theme-dunkel .auftrag-document [style*="color: #888"],
.theme-dunkel .auftrag-document [style*="color:#888"] { color: #888888 !important; }
.theme-dunkel .auftrag-document [style*="color: #999"],
.theme-dunkel .auftrag-document [style*="color:#999"] { color: #999999 !important; }
.theme-hell main, .theme-hell .content { background: #f4f5f7 !important; }
.theme-hell .top-row, .theme-hell .sidebar, .theme-hell .sidebar .top-row {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1f2937 !important;
}
.theme-hell .page .top-row,
.theme-hell .page .sidebar,
.theme-hell .page .sidebar .top-row,
.theme-hell .sidebar.sidebar,
.theme-hell .top-row.top-row {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #1f2937 !important;
}
.theme-hell .card, .theme-hell .kpi-card, .theme-hell .dash-widget, .theme-hell .overdue-card, .theme-hell .kalender-widget .card {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: rgba(255,107,0,0.35) !important;
    box-shadow: 0 6px 24px rgba(15,23,42,0.12) !important;
}
.theme-hell .card-header, .theme-hell .dash-widget-header, .theme-hell .kalender-widget .card-header {
    background: linear-gradient(180deg, #ffffff 0%, #f0f2f5 100%) !important;
    color: #1f2937 !important;
}
.theme-hell .btn-primary, .theme-hell .btn-purple, .theme-hell .quick-action, .theme-hell .dashboard-highlight-button, .theme-hell .nav-link.active, .theme-hell .nav-sub-link.active {
    background: var(--racing-orange) !important;
    border-color: var(--racing-orange) !important;
    color: #fff !important;
}
.theme-hell .nav-link, .theme-hell .nav-sub-link, .theme-hell .nav-category-header, .theme-hell .nav-category-label, .theme-hell .nav-text { color: #374151 !important; }
.theme-hell .search-box, .theme-hell .search-results-dropdown { background: #fff !important; border-color: rgba(255,107,0,0.35) !important; }
.theme-hell .search-box .input-group, .theme-hell .search-box .input-group > *, .theme-hell .search-box .form-control, .theme-hell .search-box .input-group-text { background: #fff !important; color: #1f2937 !important; }
.theme-hell,
.theme-hell main,
.theme-hell .content,
.theme-hell .card-body,
.theme-hell .modal-body,
.theme-hell .offcanvas-body {
    color: #1f2937 !important;
}
.theme-hell h1,
.theme-hell h2,
.theme-hell h3,
.theme-hell h4,
.theme-hell h5,
.theme-hell h6,
.theme-hell .card-title,
.theme-hell .card-text,
.theme-hell p,
.theme-hell li,
.theme-hell dt,
.theme-hell dd,
.theme-hell label,
.theme-hell .form-label,
.theme-hell .form-check-label,
.theme-hell .col-form-label,
.theme-hell strong,
.theme-hell small {
    color: #1f2937;
}
.theme-hell .text-muted,
.theme-hell .text-body-secondary,
.theme-hell .text-secondary,
.theme-hell .form-text,
.theme-hell small.text-muted,
.theme-hell .text-black-50,
.theme-hell .text-body-tertiary {
    color: #6b7280 !important;
}
.theme-hell .form-control,
.theme-hell .form-select,
.theme-hell textarea,
.theme-hell input:not([type="checkbox"]):not([type="radio"]),
.theme-hell select,
.theme-hell .input-group-text {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: rgba(255,107,0,0.18) !important;
}
.theme-hell .form-control::placeholder,
.theme-hell textarea::placeholder,
.theme-hell input::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}
.theme-hell .table {
    --bs-table-bg: #ffffff;
    --bs-table-color: #1f2937;
    --bs-table-border-color: #e5e7eb;
    color: #1f2937 !important;
}
.theme-hell .table > :not(caption) > * > * {
    background-color: #ffffff !important;
    color: #1f2937 !important;
    border-bottom-color: #e5e7eb !important;
}
.theme-hell .table-hover > tbody > tr:hover > * {
    background-color: #fff7ed !important;
    color: #111827 !important;
}
.theme-hell .table-light,
.theme-hell .table-light > th,
.theme-hell .table-light > td,
.theme-hell thead.table-light th {
    background: #f8fafc !important;
    color: #1f2937 !important;
    border-color: #e5e7eb !important;
}
.theme-hell .dropdown-menu,
.theme-hell .modal-content,
.theme-hell .offcanvas,
.theme-hell .list-group-item {
    background: #ffffff !important;
    color: #1f2937 !important;
    border-color: #e5e7eb !important;
}
.theme-hell .marke-search-dropdown {
    position: relative;
}
.theme-hell .marke-dropdown-list {
    background: #ffffff !important;
    color: #1f2937 !important;
    border: 1px solid rgba(255,107,0,0.18) !important;
    box-shadow: 0 14px 32px rgba(15,23,42,0.14) !important;
}
.theme-hell .marke-dropdown-item,
.theme-hell .marke-dropdown-empty,
.theme-hell .marke-dropdown-add {
    background: #ffffff !important;
    color: #1f2937 !important;
}
.theme-hell .marke-dropdown-item:hover,
.theme-hell .marke-dropdown-item.active,
.theme-hell .marke-dropdown-add:hover:not(:disabled) {
    background: #fff7ed !important;
    color: #111827 !important;
}
.theme-hell .marke-clear-btn {
    color: #6b7280 !important;
}
.theme-hell .nav-tabs {
    border-bottom-color: #e5e7eb !important;
}
.theme-hell .nav-tabs .nav-link {
    color: #6b7280 !important;
    background: transparent !important;
}
.theme-hell .nav-tabs .nav-link:hover,
.theme-hell .nav-tabs .nav-link.active {
    color: #1f2937 !important;
    border-bottom-color: var(--racing-orange) !important;
    background: transparent !important;
}
.theme-hell [style*="color: #888"],
.theme-hell [style*="color:#888"],
.theme-hell [style*="color: #999"],
.theme-hell [style*="color:#999"],
.theme-hell [style*="color: #aaa"],
.theme-hell [style*="color:#aaa"],
.theme-hell [style*="color: #bbb"],
.theme-hell [style*="color:#bbb"],
.theme-hell [style*="color: #ccc"],
.theme-hell [style*="color:#ccc"],
.theme-hell [style*="color: #ddd"],
.theme-hell [style*="color:#ddd"] {
    color: #6b7280 !important;
}

.theme-oldschool main, .theme-oldschool .content { background: #d7e4f2 !important; }
.theme-oldschool .top-row, .theme-oldschool .sidebar, .theme-oldschool .sidebar .top-row {
    background: linear-gradient(180deg, #fdfefe 0%, #d6e4f5 100%) !important;
    background-color: #e5eef8 !important;
    background-image: none !important;
    color: #1b365d !important;
}
.theme-oldschool .page .top-row,
.theme-oldschool .page .sidebar,
.theme-oldschool .page .sidebar .top-row,
.theme-oldschool .sidebar.sidebar,
.theme-oldschool .top-row.top-row {
    background: linear-gradient(180deg, #fdfefe 0%, #d6e4f5 100%) !important;
    background-color: #e5eef8 !important;
    background-image: none !important;
    color: #1b365d !important;
}
.theme-oldschool .card, .theme-oldschool .kpi-card, .theme-oldschool .dash-widget, .theme-oldschool .overdue-card, .theme-oldschool .kalender-widget .card {
    background: #ffffff !important;
    color: #1b365d !important;
    border-color: #9bb7d7 !important;
    box-shadow: 0 2px 8px rgba(59,110,165,0.14) !important;
}
.theme-oldschool .card-header, .theme-oldschool .dash-widget-header, .theme-oldschool .kalender-widget .card-header {
    background: linear-gradient(180deg, #f8fbff 0%, #d8e6f6 100%) !important;
    color: #1b365d !important;
}
.theme-oldschool .btn-primary, .theme-oldschool .btn-purple, .theme-oldschool .quick-action, .theme-oldschool .dashboard-highlight-button, .theme-oldschool .nav-link.active, .theme-oldschool .nav-sub-link.active {
    background: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%) !important;
    border-color: #2f5f96 !important;
    color: #fff !important;
}
.theme-oldschool .nav-link, .theme-oldschool .nav-sub-link, .theme-oldschool .nav-category-header, .theme-oldschool .nav-category-label, .theme-oldschool .nav-text { color: #42688f !important; }
.theme-oldschool .search-box, .theme-oldschool .search-results-dropdown { background: #fff !important; border-color: #7f9db9 !important; }
.theme-oldschool .search-box .input-group, .theme-oldschool .search-box .input-group > *, .theme-oldschool .search-box .form-control, .theme-oldschool .search-box .input-group-text { background: #fdfefe !important; color: #1b365d !important; }
.theme-oldschool,
.theme-oldschool main,
.theme-oldschool .content,
.theme-oldschool .card-body,
.theme-oldschool .modal-body,
.theme-oldschool .offcanvas-body {
    color: #1b365d !important;
}
.theme-oldschool h1,
.theme-oldschool h2,
.theme-oldschool h3,
.theme-oldschool h4,
.theme-oldschool h5,
.theme-oldschool h6,
.theme-oldschool .card-title,
.theme-oldschool .card-text,
.theme-oldschool p,
.theme-oldschool li,
.theme-oldschool dt,
.theme-oldschool dd,
.theme-oldschool label,
.theme-oldschool .form-label,
.theme-oldschool .form-check-label,
.theme-oldschool .col-form-label,
.theme-oldschool strong,
.theme-oldschool small {
    color: #1b365d;
}
.theme-oldschool .text-muted,
.theme-oldschool .text-body-secondary,
.theme-oldschool .text-secondary,
.theme-oldschool .form-text,
.theme-oldschool small.text-muted,
.theme-oldschool .text-black-50,
.theme-oldschool .text-body-tertiary {
    color: #6c7f95 !important;
}

.theme-serios main, .theme-serios .content { background: #f3f4f6 !important; }
.theme-serios .top-row, .theme-serios .sidebar, .theme-serios .sidebar .top-row {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #111827 !important;
}
.theme-serios .page .top-row,
.theme-serios .page .sidebar,
.theme-serios .page .sidebar .top-row,
.theme-serios .sidebar.sidebar,
.theme-serios .top-row.top-row {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #111827 !important;
}
.theme-serios .card, .theme-serios .kpi-card, .theme-serios .dash-widget, .theme-serios .overdue-card, .theme-serios .kalender-widget .card {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
    box-shadow: 0 6px 24px rgba(15,23,42,0.12) !important;
}
.theme-serios .card-header, .theme-serios .dash-widget-header, .theme-serios .kalender-widget .card-header {
    background: linear-gradient(180deg, #f8f9fa 0%, #e5e7eb 100%) !important;
    color: #111827 !important;
}
.theme-serios .btn-primary, .theme-serios .btn-purple, .theme-serios .quick-action, .theme-serios .dashboard-highlight-button, .theme-serios .nav-link.active, .theme-serios .nav-sub-link.active {
    background: #374151 !important;
    border-color: #374151 !important;
    color: #fff !important;
    box-shadow: none !important;
}
.theme-serios .nav-link, .theme-serios .nav-sub-link, .theme-serios .nav-category-header, .theme-serios .nav-category-label, .theme-serios .nav-text { color: #374151 !important; }
.theme-serios .search-box, .theme-serios .search-results-dropdown { background: #fff !important; border-color: #d1d5db !important; }
.theme-serios .search-box .input-group, .theme-serios .search-box .input-group > *, .theme-serios .search-box .form-control, .theme-serios .search-box .input-group-text { background: #fff !important; color: #111827 !important; }
.theme-serios,
.theme-serios main,
.theme-serios .content,
.theme-serios .card-body,
.theme-serios .modal-body,
.theme-serios .offcanvas-body {
    color: #111827 !important;
}
.theme-serios h1,
.theme-serios h2,
.theme-serios h3,
.theme-serios h4,
.theme-serios h5,
.theme-serios h6,
.theme-serios .card-title,
.theme-serios .card-text,
.theme-serios p,
.theme-serios li,
.theme-serios dt,
.theme-serios dd,
.theme-serios label,
.theme-serios .form-label,
.theme-serios .form-check-label,
.theme-serios .col-form-label,
.theme-serios strong,
.theme-serios small {
    color: #111827;
}
.theme-serios .text-muted,
.theme-serios .text-body-secondary,
.theme-serios .text-secondary,
.theme-serios .form-text,
.theme-serios small.text-muted,
.theme-serios .text-black-50,
.theme-serios .text-body-tertiary {
    color: #4b5563 !important;
}
.theme-serios .form-control,
.theme-serios .form-select,
.theme-serios textarea,
.theme-serios input:not([type="checkbox"]):not([type="radio"]),
.theme-serios select,
.theme-serios .input-group-text {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}
.theme-serios .form-control::placeholder,
.theme-serios textarea::placeholder,
.theme-serios input::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}
.theme-serios .table > :not(caption) > * > * {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-bottom-color: #d1d5db !important;
}
.theme-serios .table-hover > tbody > tr:hover > * {
    background-color: #f3f4f6 !important;
    color: #111827 !important;
}
.theme-serios .table-light,
.theme-serios .table-light > th,
.theme-serios .table-light > td,
.theme-serios thead.table-light th {
    background: #f3f4f6 !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}
.theme-serios .dropdown-menu,
.theme-serios .modal-content,
.theme-serios .offcanvas,
.theme-serios .list-group-item {
    background: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db !important;
}
.theme-serios .marke-search-dropdown {
    position: relative;
}
.theme-serios .marke-dropdown-list {
    background: #ffffff !important;
    color: #111827 !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 14px 32px rgba(15,23,42,0.12) !important;
}
.theme-serios .marke-dropdown-item,
.theme-serios .marke-dropdown-empty,
.theme-serios .marke-dropdown-add {
    background: #ffffff !important;
    color: #111827 !important;
}
.theme-serios .marke-dropdown-item:hover,
.theme-serios .marke-dropdown-item.active,
.theme-serios .marke-dropdown-add:hover:not(:disabled) {
    background: #f3f4f6 !important;
    color: #111827 !important;
}
.theme-serios .marke-clear-btn {
    color: #4b5563 !important;
}
.theme-serios [style*="color: #888"],
.theme-serios [style*="color:#888"],
.theme-serios [style*="color: #999"],
.theme-serios [style*="color:#999"],
.theme-serios [style*="color: #aaa"],
.theme-serios [style*="color:#aaa"],
.theme-serios [style*="color: #bbb"],
.theme-serios [style*="color:#bbb"],
.theme-serios [style*="color: #ccc"],
.theme-serios [style*="color:#ccc"],
.theme-serios [style*="color: #ddd"],
.theme-serios [style*="color:#ddd"] {
    color: #4b5563 !important;
}

.theme-serios .dash-hero-title,
.theme-serios .dash-hero-title .name-highlight {
    color: #111827 !important;
    background: none !important;
    -webkit-text-fill-color: #111827 !important;
    -webkit-background-clip: initial !important;
    background-clip: initial !important;
}

.theme-dunkel .user-info-section,
.theme-dunkel .user-info-section > .text-center {
    background-color: #050608 !important;
    background-image: none !important;
    color: #ffffff !important;
}

.theme-hell .user-info-section,
.theme-hell .user-info-section > .text-center,
.theme-serios .user-info-section,
.theme-serios .user-info-section > .text-center {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #111827 !important;
    box-shadow: none !important;
}

.theme-hell .user-info-section,
.theme-hell .user-info-section > .text-center {
    border-bottom-color: rgba(255,107,0,0.25) !important;
}

.theme-serios .user-info-section,
.theme-serios .user-info-section > .text-center {
    border-bottom-color: #d1d5db !important;
}

.theme-hell .user-info-section .text-white,
.theme-hell .user-info-section strong,
.theme-serios .user-info-section .text-white,
.theme-serios .user-info-section strong {
    color: #111827 !important;
}

.theme-dunkel .user-info-section .text-white,
.theme-dunkel .user-info-section strong {
    color: #ffffff !important;
}

.theme-dunkel .user-emoji-container {
    background: rgba(255,107,0,0.12) !important;
    border-color: rgba(255,107,0,0.35) !important;
}

.theme-dunkel .top-row .brand-silver-flat {
    background: none !important;
    color: #f3f4f6 !important;
    -webkit-text-fill-color: #f3f4f6 !important;
    filter: none !important;
}

.theme-hell .user-emoji-container {
    background: rgba(255,107,0,0.08) !important;
    border-color: rgba(255,107,0,0.35) !important;
}

.theme-serios .user-emoji-container {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}

.theme-hell .top-row .brand-silver-flat,
.theme-serios .top-row .brand-silver-flat {
    background: none !important;
    color: #374151 !important;
    -webkit-text-fill-color: #374151 !important;
    filter: none !important;
}

/* Striktes seriöses Theme: keine Muster, keine Verläufe, keine Akzentfarben. */
.theme-serios,
.theme-serios main,
.theme-serios .content,
.theme-serios .dash-page,
.theme-serios .dashboard-container {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
}

.theme-serios .content-background-pattern,
.theme-serios .sidebar-racing-pattern,
.theme-serios .racing-flag-pattern,
.theme-serios .dash-page::before,
.theme-serios .dash-page::after,
.theme-serios .card::before,
.theme-serios .dash-hero::before {
    display: none !important;
    background: none !important;
    background-image: none !important;
}

.theme-serios .sidebar,
.theme-serios .top-row,
.theme-serios .sidebar .top-row {
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #333333 !important;
    box-shadow: none !important;
}

.theme-serios .brand-title,
.theme-serios .brand-silver,
.theme-serios .brand-silver-flat,
.theme-serios .brand-gray,
.theme-serios .brand-orange,
.theme-serios .brand-tld {
    background: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    filter: none !important;
}

.theme-serios .nav-link,
.theme-serios .nav-sub-link,
.theme-serios .nav-category-header,
.theme-serios .nav-category-label,
.theme-serios .nav-text,
.theme-serios .nav-sub-text,
.theme-serios .nav-section-label {
    color: #ffffff !important;
}

.theme-serios .nav-link:hover,
.theme-serios .nav-sub-link:hover,
.theme-serios .nav-category-header:hover {
    background: #1f1f1f !important;
    background-image: none !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.theme-serios .nav-link.active,
.theme-serios .nav-sub-link.active,
.theme-serios .nav-highlight-button,
.theme-serios .dashboard-highlight-button {
    background: #333333 !important;
    background-color: #333333 !important;
    background-image: none !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.theme-serios .nav-highlight-button:hover,
.theme-serios .dashboard-highlight-button:hover {
    background: #4a4a4a !important;
    background-color: #4a4a4a !important;
    background-image: none !important;
    border-color: #ffffff !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.theme-serios .dashboard-highlight-button,
.theme-serios .nav-logout-button {
    border: 2px solid #ffffff !important;
}

.theme-serios .dashboard-highlight-button:hover,
.theme-serios .nav-logout-button:hover {
    border-color: #ffffff !important;
}

.theme-serios .card,
.theme-serios .dash-widget,
.theme-serios .kpi-card,
.theme-serios .overdue-card,
.theme-serios .kalender-widget .card,
.theme-serios .dash-hero,
.theme-serios .search-box,
.theme-serios .search-results-dropdown,
.theme-serios .dropdown-menu,
.theme-serios .modal-content,
.theme-serios .offcanvas,
.theme-serios .list-group-item {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    border-color: #d4d4d4 !important;
    box-shadow: none !important;
}

.theme-serios .card-header,
.theme-serios .dash-widget-header,
.theme-serios .overdue-header,
.theme-serios .kalender-widget .card-header,
.theme-serios .search-results-header,
.theme-serios .table-light,
.theme-serios thead.table-light th {
    background: #f5f5f5 !important;
    background-color: #f5f5f5 !important;
    background-image: none !important;
    color: #000000 !important;
    border-color: #d4d4d4 !important;
    box-shadow: none !important;
}

.theme-serios .btn-primary,
.theme-serios .btn-purple,
.theme-serios .quick-action,
.theme-serios .dash-hero-btn-accent,
.theme-serios .btn-save-all,
.theme-serios .search-box .btn-outline-secondary {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
    border-color: #111111 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.theme-serios .btn-primary:hover,
.theme-serios .btn-purple:hover,
.theme-serios .quick-action:hover,
.theme-serios .dash-hero-btn-accent:hover,
.theme-serios .btn-save-all:hover,
.theme-serios .search-box .btn-outline-secondary:hover {
    background: #333333 !important;
    background-color: #333333 !important;
    background-image: none !important;
    border-color: #333333 !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.theme-serios .form-control,
.theme-serios .form-select,
.theme-serios textarea,
.theme-serios input:not([type="checkbox"]):not([type="radio"]),
.theme-serios select,
.theme-serios .input-group-text,
.theme-serios .search-box .input-group,
.theme-serios .search-box .input-group > * {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    color: #000000 !important;
    border-color: #d4d4d4 !important;
    box-shadow: none !important;
}

.theme-serios h1,
.theme-serios h2,
.theme-serios h3,
.theme-serios h4,
.theme-serios h5,
.theme-serios h6,
.theme-serios p,
.theme-serios span,
.theme-serios label,
.theme-serios .text-dark,
.theme-serios .text-body,
.theme-serios .dash-hero-title,
.theme-serios .dash-hero-title .name-highlight,
.theme-serios .kpi-value,
.theme-serios .kpi-label,
.theme-serios .dash-widget-title,
.theme-serios .dash-list-title,
.theme-serios .dash-list-amount {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    background-image: none !important;
    text-shadow: none !important;
}

.theme-serios .text-muted,
.theme-serios small,
.theme-serios .dash-hero-greeting,
.theme-serios .dash-hero-sub,
.theme-serios .kpi-sub,
.theme-serios .dash-list-sub,
.theme-serios .dash-list-date,
.theme-serios .dash-stat-lbl,
.theme-serios .dash-empty {
    color: #555555 !important;
}

.theme-serios .sidebar span,
.theme-serios .sidebar small,
.theme-serios .sidebar strong,
.theme-serios .top-row span,
.theme-serios .top-row i {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-serios .kpi-icon-orange,
.theme-serios .kpi-icon-green,
.theme-serios .kpi-icon-red,
.theme-serios .kpi-icon-cyan,
.theme-serios .kpi-icon-purple,
.theme-serios .wicon-orange,
.theme-serios .wicon-green,
.theme-serios .wicon-red,
.theme-serios .wicon-cyan,
.theme-serios .wicon-amber,
.theme-serios .user-emoji-container {
    background: #f5f5f5 !important;
    background-color: #f5f5f5 !important;
    background-image: none !important;
    color: #000000 !important;
    border-color: #d4d4d4 !important;
    box-shadow: none !important;
}

.theme-serios .btn-primary *,
.theme-serios .btn-purple *,
.theme-serios .quick-action *,
.theme-serios .dash-hero-btn-accent *,
.theme-serios .btn-save-all *,
.theme-serios .dashboard-highlight-button *,
.theme-serios .nav-link.active *,
.theme-serios .nav-sub-link.active * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Seriös: finale Kontrastregeln nach Hintergrundfarbe. */
.theme-serios .sidebar,
.theme-serios .sidebar *,
.theme-serios .top-row,
.theme-serios .top-row *,
.theme-serios .nav-scrollable,
.theme-serios .nav-scrollable *,
.theme-serios .nav-highlight-button,
.theme-serios .nav-highlight-button *,
.theme-serios .dashboard-highlight-button,
.theme-serios .dashboard-highlight-button *,
.theme-serios .nav-link.active,
.theme-serios .nav-link.active *,
.theme-serios .nav-sub-link.active,
.theme-serios .nav-sub-link.active *,
.theme-serios .btn-primary,
.theme-serios .btn-primary *,
.theme-serios .btn-purple,
.theme-serios .btn-purple *,
.theme-serios .quick-action,
.theme-serios .quick-action *,
.theme-serios .dash-hero-btn-accent,
.theme-serios .dash-hero-btn-accent *,
.theme-serios .btn-save-all,
.theme-serios .btn-save-all * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
}

.theme-serios .sidebar,
.theme-serios .sidebar .top-row,
.theme-serios .nav-scrollable,
.theme-serios .top-row {
    background: #000000 !important;
    background-color: #000000 !important;
    background-image: none !important;
}

.theme-serios .nav-link:hover,
.theme-serios .nav-sub-link:hover,
.theme-serios .nav-category-header:hover {
    background: #1f1f1f !important;
    background-color: #1f1f1f !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-serios .card,
.theme-serios .card *,
.theme-serios .dash-widget,
.theme-serios .dash-widget *,
.theme-serios .kpi-card,
.theme-serios .kpi-card *,
.theme-serios .overdue-card,
.theme-serios .overdue-card *,
.theme-serios .dash-hero,
.theme-serios .dash-hero *,
.theme-serios .kalender-widget .card,
.theme-serios .kalender-widget .card *,
.theme-serios .search-box,
.theme-serios .search-box *,
.theme-serios .search-results-dropdown,
.theme-serios .search-results-dropdown *,
.theme-serios .dropdown-menu,
.theme-serios .dropdown-menu *,
.theme-serios .modal-content,
.theme-serios .modal-content *,
.theme-serios .offcanvas,
.theme-serios .offcanvas *,
.theme-serios .list-group-item,
.theme-serios .list-group-item *,
.theme-serios .table,
.theme-serios .table *,
.theme-serios .form-control,
.theme-serios .form-select,
.theme-serios .input-group-text {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
}

.theme-serios .card-header,
.theme-serios .card-header *,
.theme-serios .dash-widget-header,
.theme-serios .dash-widget-header *,
.theme-serios .overdue-header,
.theme-serios .overdue-header *,
.theme-serios .kalender-widget .card-header,
.theme-serios .kalender-widget .card-header *,
.theme-serios .search-results-header,
.theme-serios .search-results-header * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.theme-serios .card .text-muted,
.theme-serios .dash-widget .text-muted,
.theme-serios .kpi-card .text-muted,
.theme-serios .overdue-card .text-muted,
.theme-serios .dash-hero .text-muted,
.theme-serios .search-results-dropdown .text-muted,
.theme-serios .table .text-muted,
.theme-serios .dash-hero-greeting,
.theme-serios .dash-hero-sub,
.theme-serios .kpi-sub,
.theme-serios .dash-list-sub,
.theme-serios .dash-list-date,
.theme-serios .dash-stat-lbl,
.theme-serios .dash-empty {
    color: #555555 !important;
    -webkit-text-fill-color: #555555 !important;
}

.theme-serios .card .btn-primary,
.theme-serios .card .btn-primary *,
.theme-serios .card .btn-purple,
.theme-serios .card .btn-purple *,
.theme-serios .dash-widget .quick-action,
.theme-serios .dash-widget .quick-action *,
.theme-serios .dash-hero .dash-hero-btn-accent,
.theme-serios .dash-hero .dash-hero-btn-accent *,
.theme-serios .search-box .btn-outline-secondary,
.theme-serios .search-box .btn-outline-secondary * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-serios .btn-primary,
.theme-serios .btn-primary *,
.theme-serios .btn-secondary,
.theme-serios .btn-secondary *,
.theme-serios .btn-success,
.theme-serios .btn-success *,
.theme-serios .btn-danger,
.theme-serios .btn-danger *,
.theme-serios .btn-info,
.theme-serios .btn-info *,
.theme-serios .btn-dark,
.theme-serios .btn-dark *,
.theme-serios .badge,
.theme-serios .badge * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-serios .btn-warning,
.theme-serios .btn-warning *,
.theme-serios .btn-light,
.theme-serios .btn-light * {
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
}

.theme-serios .top-row .top-row-brand,
.theme-serios .top-row .top-row-brand *,
.theme-serios .top-row .brand-title,
.theme-serios .top-row .brand-title *,
.theme-serios .top-row .brand-silver,
.theme-serios .top-row .brand-silver-flat,
.theme-serios .top-row .brand-gray,
.theme-serios .top-row .brand-orange,
.theme-serios .top-row .brand-tld,
.theme-serios .top-row .brand-icon-left,
.theme-serios .top-row .brand-icon-right {
    background: none !important;
    background-image: none !important;
    background-clip: initial !important;
    -webkit-background-clip: initial !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.theme-serios .top-row .brand-title {
    font-weight: 800 !important;
}

/* Seriös: Brand in der Topbar schwarz, nur GA und BU orange. */
.theme-serios .top-row {
    background: #ffffff !important;
    background-color: #ffffff !important;
    background-image: none !important;
    border-bottom-color: #d4d4d4 !important;
}

.theme-serios .top-row .top-row-brand,
.theme-serios .top-row .brand-title,
.theme-serios .top-row .brand-title *,
.theme-serios .top-row .brand-gray,
.theme-serios .top-row .brand-tld,
.theme-serios .top-row .brand-icon-left,
.theme-serios .top-row .brand-icon-right {
    background: none !important;
    background-image: none !important;
    color: #000000 !important;
    -webkit-text-fill-color: #000000 !important;
    text-shadow: none !important;
    filter: none !important;
    opacity: 1 !important;
}

.theme-serios .top-row .brand-silver-flat,
.theme-serios .top-row .brand-orange {
    background: none !important;
    background-image: none !important;
    color: #ff6b00 !important;
    -webkit-text-fill-color: #ff6b00 !important;
    text-shadow: none !important;
    filter: none !important;
}

.theme-serios .sidebar .nav-link.dashboard-highlight-button,
.theme-serios .sidebar .nav-link.dashboard-highlight-button.active,
.theme-serios .sidebar .nav-logout-button {
    border: 2px solid #ffffff !important;
}

.theme-serios .sidebar .nav-link.dashboard-highlight-button:hover,
.theme-serios .sidebar .nav-link.dashboard-highlight-button.active:hover,
.theme-serios .sidebar .nav-logout-button:hover {
    border-color: #ffffff !important;
}

.theme-serios .ordered-parts-widget .dash-widget-stats,
.theme-serios .ordered-parts-widget .dash-widget-stats * {
    background: #111111 !important;
    background-color: #111111 !important;
    background-image: none !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    border-color: #111111 !important;
}

/* Shared filter controls for order-related overview pages. */
.overview-filter-card {
    border-color: #d4d4d4;
}

.overview-display-filter {
    display: flex;
    overflow: hidden;
    border: 1px solid #111111;
    border-radius: .5rem;
}

.overview-display-filter button {
    flex: 1;
    border: 0;
    padding: .42rem .6rem;
    background: #ffffff;
    color: #111111;
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

.overview-display-filter button + button {
    border-left: 1px solid #111111;
}

.overview-display-filter button.active,
.overview-display-filter button:hover {
    background: #111111 !important;
    color: #ffffff !important;
}

.overview-display-filter button:focus-visible {
    outline: 3px solid rgba(17, 17, 17, .35);
    outline-offset: -3px;
}

/* Theme-specific overrides must follow the generic theme button rules. */
.theme-dunkel .overview-display-filter {
    border-color: #ff6b00 !important;
}

.theme-dunkel .overview-display-filter button {
    background: #111111 !important;
    color: #ff6b00 !important;
}

.theme-dunkel .overview-display-filter button + button {
    border-left-color: #ff6b00 !important;
}

.theme-dunkel .overview-display-filter button.active,
.theme-dunkel .overview-display-filter button:hover {
    background: #ff6b00 !important;
    color: #111111 !important;
}

.theme-hell .overview-display-filter {
    border-color: #ff6b00 !important;
}

.theme-hell .overview-display-filter button {
    background: #ffffff !important;
    color: #ff6b00 !important;
}

.theme-hell .overview-display-filter button + button {
    border-left-color: #ff6b00 !important;
}

.theme-hell .overview-display-filter button.active,
.theme-hell .overview-display-filter button:hover {
    background: #ff6b00 !important;
    color: #ffffff !important;
}

.theme-serios .overview-display-filter {
    border-color: #ff6b00 !important;
}

.theme-serios .overview-display-filter button {
    background: #ffffff !important;
    color: #ff6b00 !important;
    -webkit-text-fill-color: #ff6b00 !important;
}

.theme-serios .overview-display-filter button + button {
    border-left-color: #ff6b00 !important;
}

.theme-serios .overview-display-filter button.active,
.theme-serios .overview-display-filter button:hover {
    background: #111111 !important;
    color: #ff6b00 !important;
    -webkit-text-fill-color: #ff6b00 !important;
}

.theme-oldschool .overview-display-filter {
    border-color: #3b6ea5 !important;
}

.theme-oldschool .overview-display-filter button {
    background: #d7e4f2 !important;
    color: #3b6ea5 !important;
}

.theme-oldschool .overview-display-filter button + button {
    border-left-color: #3b6ea5 !important;
}

.theme-oldschool .overview-display-filter button.active,
.theme-oldschool .overview-display-filter button:hover {
    background: #3b6ea5 !important;
    color: #ffffff !important;
}

/* Sidebar-Proportionen auch nach allen Theme- und Media-Overrides beibehalten. */
.sidebar .top-row {
    min-height: 140px;
    padding: 0.75rem 0.5rem !important;
}

.sidebar .sidebar-main-logo {
    width: auto;
    max-width: 95%;
    height: 120px !important;
    max-height: 120px !important;
}

.sidebar .user-emoji-container {
    width: 60px !important;
    height: 60px !important;
}

.sidebar .user-emoji {
    font-size: 2.25rem !important;
}

/* Auftragserstellung: Pflichtangaben und Positionen klar voneinander trennen. */
.auftrag-create-modal-content {
    border: 1px solid rgba(255, 107, 0, 0.32);
    box-shadow: 0 20px 55px rgba(0, 0, 0, 0.28);
}

.auftrag-create-modal-header {
    align-items: flex-start;
    background: linear-gradient(135deg, rgba(255, 107, 0, 0.14), rgba(255, 140, 66, 0.04));
    border-bottom: 2px solid rgba(255, 107, 0, 0.42);
}

.auftrag-create-subtitle {
    color: var(--text-light, #6c757d);
    font-size: 0.82rem;
    margin-top: 0.2rem;
}

.auftrag-create-modal-body {
    background: #fafafa;
    padding: 1.25rem;
}

.auftrag-create-progress {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.25rem;
    margin-bottom: 1.25rem;
    color: var(--text-light, #6c757d);
    font-size: 0.82rem;
    font-weight: 600;
}

.auftrag-create-progress .active {
    color: var(--racing-orange, #ff6b00);
}

.auftrag-create-section {
    background: #fff;
    border: 1px solid var(--border-color, #e0e0e0);
    border-radius: 12px;
    padding: 1.25rem;
}

.auftrag-create-section-primary {
    border-color: rgba(255, 107, 0, 0.5);
    border-top: 4px solid var(--racing-orange, #ff6b00);
    box-shadow: 0 5px 18px rgba(255, 107, 0, 0.08);
}

.auftrag-create-section-muted {
    background: #fff;
}

.auftrag-section-heading {
    align-items: flex-start;
    border-bottom: 1px solid rgba(255, 107, 0, 0.18);
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
}

.auftrag-section-heading h6 {
    color: var(--text-dark, #1a1a1a);
    font-weight: 700;
    margin: 0.12rem 0 0;
}

.auftrag-section-kicker {
    color: var(--racing-orange-dark, #cc5500);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.auftrag-required-hint {
    background: rgba(255, 107, 0, 0.1);
    border-radius: 99px;
    color: var(--racing-orange-dark, #cc5500);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.55rem;
}

.auftrag-rate-field .form-select,
.auftrag-request-field .form-control {
    border-color: rgba(255, 107, 0, 0.32);
}

.auftrag-positions-section {
    border-top: 4px solid var(--racing-orange, #ff6b00);
}

.auftrag-positions-section .auftragsblatt-table thead th {
    background: #2d2d2d;
    color: #fff;
    font-size: 0.78rem;
    vertical-align: middle;
}

.auftrag-positions-section .auftragsblatt-table tbody tr:hover {
    background: rgba(255, 107, 0, 0.035);
}

.auftrag-positions-section .position-selection {
    border-color: rgba(255, 107, 0, 0.45);
    font-weight: 600;
}

.auftrag-modal-footer {
    background: #fff;
    border-top: 2px solid rgba(255, 107, 0, 0.22);
    gap: 0.5rem;
}

.theme-serios .auftrag-create-modal-header,
.theme-serios .auftrag-create-modal-body {
    background: #fff;
}

.theme-serios .auftrag-create-section-primary,
.theme-serios .auftrag-positions-section {
    border-top-color: #111;
}

.theme-serios .auftrag-section-kicker,
.theme-serios .auftrag-create-progress .active,
.theme-serios .auftrag-required-hint {
    color: #111;
}

.theme-oldschool .auftrag-create-modal-header {
    background: #eef4fb;
    border-bottom-color: #9bb7d7;
}

.theme-oldschool .auftrag-create-modal-body {
    background: #d7e4f2;
}

.theme-oldschool .auftrag-create-section-primary,
.theme-oldschool .auftrag-positions-section {
    border-top-color: #3b6ea5;
}

.theme-oldschool .auftrag-section-kicker,
.theme-oldschool .auftrag-create-progress .active,
.theme-oldschool .auftrag-required-hint {
    color: #2f5f96;
}

@media (max-width: 575.98px) {
    .auftrag-create-modal-body,
    .auftrag-create-section {
        padding: 0.9rem;
    }

    .auftrag-section-heading {
        gap: 0.5rem;
    }

    .auftrag-required-hint {
        white-space: nowrap;
    }
}

/* Erstellungsdialoge gegen pauschale Theme-Overrides isolieren. */
.auftrag-modal {
    max-width: min(96vw, 1800px) !important;
    width: min(96vw, 1800px) !important;
}

.termin-create-modal-content {
    max-width: 1300px;
}

.auftrag-create-modal-content,
.termin-create-modal-content {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

.auftrag-create-modal-content .auftrag-create-modal-header,
.termin-create-modal-content .termin-create-modal-header,
.theme-serios .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-serios .termin-create-modal-content .termin-create-modal-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%) !important;
    color: #ffffff !important;
}

.auftrag-create-modal-content .auftrag-create-modal-header *,
.termin-create-modal-content .termin-create-modal-header *,
.theme-serios .auftrag-create-modal-content .auftrag-create-modal-header *,
.theme-serios .termin-create-modal-content .termin-create-modal-header * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.auftrag-create-modal-content .btn-close,
.termin-create-modal-content .btn-close {
    filter: invert(1);
}

.auftrag-create-modal-content .auftrag-create-section,
.termin-create-modal-content .termin-create-section,
.theme-serios .auftrag-create-modal-content .auftrag-create-section,
.theme-serios .termin-create-modal-content .termin-create-section {
    background: #ffffff !important;
    color: #1a1a1a !important;
}

.auftrag-create-modal-content .auftrag-create-section *,
.termin-create-modal-content .termin-create-section *,
.theme-serios .auftrag-create-modal-content .auftrag-create-section *,
.theme-serios .termin-create-modal-content .termin-create-section * {
    color: #1a1a1a;
    -webkit-text-fill-color: #1a1a1a;
}

.auftrag-create-modal-content .form-control,
.auftrag-create-modal-content .form-select,
.termin-create-modal-content .form-control,
.termin-create-modal-content .form-select {
    background: #ffffff !important;
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.auftrag-create-modal-content .btn,
.termin-create-modal-content .btn {
    -webkit-text-fill-color: currentColor;
}

.auftrag-create-modal-content .btn-primary,
.auftrag-create-modal-content .btn-success,
.auftrag-create-modal-content .btn-danger,
.auftrag-create-modal-content .btn-info,
.termin-create-modal-content .btn-primary,
.termin-create-modal-content .btn-success,
.termin-create-modal-content .btn-danger,
.termin-create-modal-content .btn-purple {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.auftrag-create-modal-content .auftragsblatt-table thead th,
.auftrag-create-modal-content .auftragsblatt-table thead th * {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

@media (min-width: 992px) {
    .auftrag-modal .modal-content {
        min-height: min(88vh, 900px);
    }

    #kalender-termin-modal .modal-dialog {
        max-width: min(94vw, 1300px) !important;
        width: min(94vw, 1300px) !important;
    }
}

/* Erstellungsdialoge folgen dem aktiven Farbsystem statt global überschrieben zu werden. */
.theme-dunkel .auftrag-create-modal-content,
.theme-dunkel .termin-create-modal-content,
.theme-dunkel .auftrag-create-modal-body,
.theme-dunkel .termin-create-modal-body,
.theme-dunkel .auftrag-modal-footer {
    background: #111418 !important;
    color: #f3f4f6 !important;
}

.theme-dunkel .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-dunkel .termin-create-modal-content .termin-create-modal-header {
    background: #ff6b00 !important;
    border-bottom-color: #ff8c42 !important;
}

.theme-dunkel .auftrag-create-modal-content .auftrag-create-section,
.theme-dunkel .termin-create-modal-content .termin-create-section {
    background: #1a1d23 !important;
    border-color: rgba(255, 107, 0, 0.38) !important;
}

.theme-dunkel .auftrag-create-modal-content .auftrag-create-section *,
.theme-dunkel .termin-create-modal-content .termin-create-section *,
.theme-dunkel .auftrag-create-modal-content .auftrag-create-progress,
.theme-dunkel .termin-create-modal-content .termin-create-progress {
    color: #f3f4f6 !important;
    -webkit-text-fill-color: #f3f4f6 !important;
}

.theme-dunkel .auftrag-create-modal-content .form-control,
.theme-dunkel .auftrag-create-modal-content .form-select,
.theme-dunkel .termin-create-modal-content .form-control,
.theme-dunkel .termin-create-modal-content .form-select {
    background: #0b0d10 !important;
    border-color: rgba(255, 107, 0, 0.45) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.theme-dunkel .auftrag-create-modal-content .auftrag-section-kicker,
.theme-dunkel .auftrag-create-modal-content .auftrag-create-progress .active,
.theme-dunkel .termin-create-modal-content .termin-section-kicker,
.theme-dunkel .termin-create-modal-content .termin-create-progress .active {
    color: #ff8c42 !important;
    -webkit-text-fill-color: #ff8c42 !important;
}

.theme-hell .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-hell .termin-create-modal-content .termin-create-modal-header {
    background: #ffffff !important;
    border-bottom-color: #ff6b00 !important;
}

.theme-hell .auftrag-create-modal-content .auftrag-create-modal-header *,
.theme-hell .termin-create-modal-content .termin-create-modal-header * {
    color: #1a1a1a !important;
    -webkit-text-fill-color: #1a1a1a !important;
}

.theme-hell .auftrag-create-modal-content .btn-close,
.theme-hell .termin-create-modal-content .btn-close {
    filter: none;
}

.theme-serios .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-serios .termin-create-modal-content .termin-create-modal-header {
    background: #111111 !important;
}

.theme-serios .auftrag-create-modal-content .auftrag-create-section,
.theme-serios .termin-create-modal-content .termin-create-section {
    border-color: #d4d4d4 !important;
}

.theme-oldschool .auftrag-create-modal-content,
.theme-oldschool .termin-create-modal-content,
.theme-oldschool .auftrag-create-modal-body,
.theme-oldschool .termin-create-modal-body,
.theme-oldschool .auftrag-modal-footer {
    background: #eef4fb !important;
    color: #1b365d !important;
}

.theme-oldschool .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-oldschool .termin-create-modal-content .termin-create-modal-header {
    background: linear-gradient(180deg, #5d88b6 0%, #3b6ea5 100%) !important;
    border-bottom-color: #2f5f96 !important;
}

.theme-oldschool .auftrag-create-modal-content .auftrag-create-section,
.theme-oldschool .termin-create-modal-content .termin-create-section {
    background: #ffffff !important;
    border-color: #9bb7d7 !important;
}

.theme-oldschool .auftrag-create-modal-content .auftrag-create-section *,
.theme-oldschool .termin-create-modal-content .termin-create-section *,
.theme-oldschool .auftrag-create-modal-content .auftrag-create-progress,
.theme-oldschool .termin-create-modal-content .termin-create-progress {
    color: #1b365d !important;
    -webkit-text-fill-color: #1b365d !important;
}

.theme-oldschool .auftrag-create-modal-content .auftrag-section-kicker,
.theme-oldschool .auftrag-create-modal-content .auftrag-create-progress .active,
.theme-oldschool .termin-create-modal-content .termin-section-kicker,
.theme-oldschool .termin-create-modal-content .termin-create-progress .active {
    color: #2f5f96 !important;
    -webkit-text-fill-color: #2f5f96 !important;
}

/* Tablet und Mobil: Dialoge nutzen die verfügbare Breite, Aktionen bleiben erreichbar. */
@media (max-width: 991.98px) {
    .auftrag-modal {
        max-width: calc(100vw - 2rem) !important;
        width: calc(100vw - 2rem) !important;
    }

    #kalender-termin-modal .modal-dialog {
        max-width: calc(100vw - 2rem) !important;
        width: calc(100vw - 2rem) !important;
        margin: 1rem auto !important;
    }

    .auftrag-modal-footer {
        flex-wrap: wrap;
    }

    .auftrag-modal-footer .btn {
        flex: 1 1 calc(50% - 0.25rem);
    }
}

@media (max-width: 575.98px) {
    .auftrag-modal,
    #kalender-termin-modal .modal-dialog {
        max-width: calc(100vw - 1rem) !important;
        width: calc(100vw - 1rem) !important;
        margin: 0.5rem auto !important;
    }

    .auftrag-create-subtitle,
    .termin-create-subtitle {
        display: none;
    }

    .auftrag-modal-footer .btn {
        flex-basis: 100%;
    }
}

/* Seriös: rote Akzente statt Orange, ansonsten neutral schwarz-weiß. */
.theme-serios .auftrag-create-modal-content .auftrag-create-modal-header,
.theme-serios .termin-create-modal-content .termin-create-modal-header {
    border-bottom-color: #b91c1c !important;
}

.theme-serios .auftrag-create-modal-content .auftrag-create-section-primary,
.theme-serios .auftrag-create-modal-content .auftrag-positions-section,
.theme-serios .termin-create-modal-content .termin-create-section-primary,
.theme-serios .termin-create-modal-content .termin-create-section-assignment {
    border-top-color: #b91c1c !important;
}

.theme-serios .auftrag-create-modal-content .auftrag-section-heading,
.theme-serios .termin-create-modal-content .termin-section-heading {
    border-bottom-color: rgba(185, 28, 28, 0.24) !important;
}

.theme-serios .auftrag-create-modal-content .auftrag-section-kicker,
.theme-serios .auftrag-create-modal-content .auftrag-create-progress .active,
.theme-serios .termin-create-modal-content .termin-section-kicker,
.theme-serios .termin-create-modal-content .termin-create-progress .active {
    color: #b91c1c !important;
    -webkit-text-fill-color: #b91c1c !important;
}

.theme-serios .auftrag-create-modal-content .auftrag-required-hint,
.theme-serios .termin-create-modal-content .termin-required-hint {
    background: rgba(185, 28, 28, 0.1) !important;
    color: #991b1b !important;
    -webkit-text-fill-color: #991b1b !important;
}

.theme-serios .auftrag-create-modal-content .form-control:focus,
.theme-serios .auftrag-create-modal-content .form-select:focus,
.theme-serios .termin-create-modal-content .form-control:focus,
.theme-serios .termin-create-modal-content .form-select:focus {
    border-color: #b91c1c !important;
    box-shadow: 0 0 0 0.2rem rgba(185, 28, 28, 0.16) !important;
}

.theme-serios .auftrag-create-modal-content .btn-primary,
.theme-serios .termin-create-modal-content .btn-purple {
    background: #b91c1c !important;
    border-color: #b91c1c !important;
}

.theme-serios .auftrag-create-modal-content .btn-primary:hover,
.theme-serios .termin-create-modal-content .btn-purple:hover {
    background: #991b1b !important;
    border-color: #991b1b !important;
}



