* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #3b82f6;
    --primary-dark: #2563eb;
    --primary-light: #60a5fa;
    --secondary-color: #1e40af;
    --success-color: #10b981;
    --success-light: #34d399;
    --danger-color: #ef4444;
    --danger-light: #f87171;
    --warning-color: #f59e0b;
    --warning-light: #fbbf24;
    --bg-color: #f8fafc;
    --bg-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: #ffffff;
    --card-shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --card-shadow-hover: 0 10px 25px rgba(0, 0, 0, 0.1), 0 4px 6px rgba(0, 0, 0, 0.05);
    --text-color: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --border-color: #e2e8f0;
    --border-radius: 12px;
    --border-radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Inter', Oxygen, Ubuntu, Cantarell, sans-serif;
    background: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(139, 92, 246, 0.05) 0px, transparent 50%);
    color: var(--text-color);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    padding-bottom: 0; /* Chat ist jetzt im Tab */
}

/* Chat-Fixed nicht mehr vorhanden, daher entfernt */

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

/* Karte-Tab ausnehmen */
#karte .container {
    padding: 20px;
}

.main-header {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 50%, #1e40af 100%);
    color: white;
    padding: 12px 20px;
    border-radius: var(--border-radius-lg);
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3), 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.header-main-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    position: relative;
    z-index: 1;
}

.header-left {
    flex-shrink: 0;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.brand-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.brand-title {
    font-size: 1.5rem;
    margin: 0;
    font-weight: 900;
    color: white;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    line-height: 1.2;
}

.user-info {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.95);
}

.header-center {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
}

.header-stats-compact {
    display: flex;
    align-items: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.15);
    padding: 8px 16px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-icon-small {
    font-size: 1.3rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-label-small {
    font-size: 0.65rem;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    line-height: 1;
}

.stat-value-compact {
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    white-space: nowrap;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255, 255, 255, 0.3);
    margin: 0 4px;
}

.stat-item-time {
    min-width: 140px;
}

.time-display-compact {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.weekday-compact {
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.9;
}

.date-compact {
    font-size: 0.7rem;
    opacity: 0.85;
}

.time-compact {
    font-size: 0.85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.progress-bar-compact {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill-compact {
    height: 100%;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.7));
    transition: width 0.2s ease-out;
    box-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
}

.header-right {
    flex-shrink: 0;
}

.header-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon-control {
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    backdrop-filter: blur(10px);
}

.btn-icon-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.btn-icon-control .btn-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.btn-skip-compact {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
}

.btn-skip-compact:hover {
    background: rgba(245, 158, 11, 0.4);
}

.btn-logout-compact {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-logout-compact:hover {
    background: rgba(239, 68, 68, 0.3);
}

.speed-controls-compact {
    display: flex;
    gap: 4px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-speed-compact {
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    min-width: 36px;
    backdrop-filter: blur(10px);
}

.btn-speed-compact:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
}

.btn-speed-compact.active {
    background: rgba(255, 255, 255, 0.4);
    color: var(--primary-dark);
    font-weight: 800;
    box-shadow: 0 2px 8px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

/* Legacy Support */
.header-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.header-stats .stat-card {
    background: rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--border-radius);
    padding: 8px 12px !important;
    transition: all 0.2s ease-out;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: var(--transition);
}

.header-stats .stat-card:hover {
    background: rgba(255, 255, 255, 0.3) !important;
}

.header-stats .stat-icon {
    font-size: 1.4rem !important;
    line-height: 1;
}

.header-stats .stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.header-stats .stat-label {
    font-size: 0.7rem !important;
    opacity: 0.85;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.header-stats .stat-value {
    font-size: 1.1rem !important;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
    transition: all 0.2s ease-out;
    will-change: contents;
}

.stat-card-time {
    min-width: 160px;
}

.time-display {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.date-display {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 500;
}

.clock-display {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#time-display {
    font-size: 1.1rem;
    font-weight: bold;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    line-height: 1;
}

.day-progress-text {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 4px;
}

.progress-bar-mini {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 4px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    transition: width 0.2s ease-out;
    will-change: width;
}

.stat-card-controls {
    min-width: 150px;
}

.controls-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.btn-control {
    width: 100%;
    padding: 6px 12px;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 0.75rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all 0.3s;
    cursor: pointer;
}

.btn-control:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-text {
    font-weight: 500;
}

.btn-skip {
    background: rgba(245, 158, 11, 0.3);
    border-color: rgba(245, 158, 11, 0.5);
}

.btn-skip:hover {
    background: rgba(245, 158, 11, 0.4);
}

.speed-controls {
    display: flex;
    gap: 4px;
    justify-content: center;
}

.btn-speed {
    padding: 7px 14px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    min-width: 44px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-speed:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-speed.active {
    background: rgba(255, 255, 255, 0.5);
    color: var(--primary-dark);
    font-weight: 800;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3);
    transform: scale(1.05);
}

.time-progress {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

#day-progress-text {
    font-size: 0.85rem;
    opacity: 0.8;
}

.progress-bar-mini {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
    overflow: hidden;
}

.progress-bar-mini .progress-fill {
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    transition: width 0.3s ease;
}

.stat-controls {
    display: flex;
    flex-direction: row;
    gap: 10px;
    align-items: center;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
    white-space: nowrap;
}

.main-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 24px;
    padding: 6px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.98) 100%);
    border-radius: var(--border-radius-lg);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
    position: sticky;
    top: 20px;
    z-index: 100;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.nav-icons-only {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    overflow-x: auto;
    padding: 2px;
    scrollbar-width: thin;
    scrollbar-color: rgba(59, 130, 246, 0.3) transparent;
}

.nav-group {
    display: flex;
    gap: 4px;
    align-items: center;
}

.nav-separator {
    width: 1px;
    height: 32px;
    background: linear-gradient(180deg, transparent, var(--border-color), transparent);
    margin: 0 4px;
    opacity: 0.5;
}

.nav-icons-only::-webkit-scrollbar {
    height: 4px;
}

.nav-icons-only::-webkit-scrollbar-track {
    background: transparent;
}

.nav-icons-only::-webkit-scrollbar-thumb {
    background: rgba(59, 130, 246, 0.3);
    border-radius: 2px;
}

.nav-icons-only::-webkit-scrollbar-thumb:hover {
    background: rgba(59, 130, 246, 0.5);
}

.tab-btn-icon {
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    color: var(--text-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    position: relative;
    flex-shrink: 0;
}

.tab-btn-icon .tab-icon {
    font-size: 1.4rem;
    line-height: 1;
    display: block;
}

.tab-btn-icon:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    transform: translateY(-2px);
}

.tab-btn-icon.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.2), rgba(59, 130, 246, 0.15));
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.tab-btn-icon.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 70%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 3px 3px 0 0;
    box-shadow: 0 -2px 8px rgba(59, 130, 246, 0.4);
}

/* Legacy Support für alte Tab-Buttons */
.tab-btn {
    padding: 10px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-light);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    position: relative;
}

.tab-icon {
    font-size: 1.1rem;
    line-height: 1;
}

.tab-text {
    font-weight: 500;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    transform: translateY(-1px);
}

.tab-btn.active {
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.1));
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(59, 130, 246, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.tab-btn.active::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px 2px 0 0;
    box-shadow: 0 -2px 8px rgba(59, 130, 246, 0.4);
}

/* Dropdown Menu */
.dropdown-menu {
    position: relative;
}

.dropdown-toggle {
    position: relative;
}

.dropdown-arrow {
    font-size: 0.7rem;
    margin-left: 4px;
    transition: transform 0.3s;
}

.dropdown-menu.active .dropdown-arrow {
    transform: rotate(180deg);
}

.dropdown-content {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.15), 0 4px 8px rgba(0, 0, 0, 0.1);
    min-width: 260px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 10000;
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
    max-width: 90vw;
}

.dropdown-menu.active .dropdown-content {
    max-height: 600px;
    opacity: 1;
    visibility: visible;
    padding: 4px;
    overflow-y: auto;
}

.dropdown-section {
    padding: 4px 0;
}

.dropdown-section-title {
    padding: 8px 18px 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-light);
    opacity: 0.7;
}

.dropdown-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 8px;
    opacity: 0.5;
}

.dropdown-item {
    width: 100%;
    padding: 14px 18px;
    background: transparent;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-color);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 12px;
    text-align: left;
    font-weight: 500;
}

.dropdown-item:hover {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    color: var(--primary-color);
    transform: translateX(4px);
    padding-left: 22px;
}

.dropdown-item .tab-icon {
    font-size: 1rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.dropdown-item {
    position: relative;
}

.chat-badge {
    margin-left: auto;
    background: var(--danger-color);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
    line-height: 1.4;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

.tab-btn:focus,
.dropdown-item:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tab-btn:focus-visible,
.dropdown-item:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.tab-content {
    display: none;
}

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

/* Tab-Optimierungen - Grid Layouts für alle Tabs */
#privatleben, #akquise, #personal, #finanzen, #wartung, #versicherungen, #account, #statistik {
    max-width: 1400px;
    margin: 0 auto;
}

/* Details-Elemente Styling (für alle Tabs) */
details {
    margin-top: 12px;
}

details summary {
    cursor: pointer;
    font-weight: bold;
    color: var(--primary-color);
    padding: 8px 12px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    list-style: none;
    transition: all 0.2s ease;
    user-select: none;
}

details summary::-webkit-details-marker {
    display: none;
}

details summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s ease;
    font-size: 0.8rem;
}

details[open] summary::before {
    transform: rotate(90deg);
}

details summary:hover {
    background: rgba(59, 130, 246, 0.15);
}

details[open] summary {
    border-radius: 6px 6px 0 0;
    margin-bottom: 8px;
}

/* Responsive Grid-Anpassungen */
@media (max-width: 768px) {
    /* Privatleben */
    #privatleben > div[style*="grid-template-columns"],
    #akquise > div[style*="grid-template-columns"],
    #personal > div[style*="grid-template-columns"],
    #finanzen > div[style*="grid-template-columns"],
    #wartung > div[style*="grid-template-columns"],
    #versicherungen > div[style*="grid-template-columns"],
    #account > div[style*="grid-template-columns"],
    #statistik > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Cards mit Grid-Layout */
    .card > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    /* Aufträge Tab - Filter kompakt */
    #auftraege .card.compact-card > div[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }
    
    #auftraege .card.compact-card > div[style*="grid-template-columns"] > div:last-child {
        margin-top: 12px;
    }
}

/* Karte und Chat ausnehmen */
.tab-content:not(#karte) .card:not(.chat-container):not(.chat-fixed) {
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.card {
    background: var(--card-bg);
    padding: 16px 20px;
    border-radius: var(--border-radius);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Karte-Tab ausnehmen */
#karte .card {
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    transform: translateY(-1px);
    border-color: rgba(59, 130, 246, 0.15);
}

.card:hover::before {
    transform: scaleX(1);
}

.card h2 {
    margin-bottom: 10px;
    color: var(--text-color);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1.3;
}

.compact-card h2 {
    margin-bottom: 6px;
    font-size: 1.1rem;
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    letter-spacing: -0.01em;
    line-height: 1.4;
}

.card h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.4;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.quick-stats {
    display: flex;
    gap: 16px;
    margin-top: 12px;
}

.quick-stat {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.quick-stat-label {
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}

.quick-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
}

.todo-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.todo-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.todo-item:last-child {
    border-bottom: none;
}

.todo-item:hover {
    background: rgba(59, 130, 246, 0.04);
    padding-left: 6px;
    border-radius: 6px;
}

.todo-checkbox {
    font-size: 1.1rem;
    color: var(--text-light);
    min-width: 20px;
    text-align: center;
    transition: all 0.2s ease;
}

.todo-item.completed .todo-checkbox {
    color: var(--success-color);
    font-weight: bold;
}

.todo-text {
    flex: 1;
    color: var(--text-color);
    font-size: 0.9rem;
    transition: all 0.2s ease;
    line-height: 1.4;
}

.todo-item.completed .todo-text {
    color: var(--text-light);
}

.todo-list {
    list-style: none;
    padding: 0;
}

.todo-list li {
    padding: 10px;
    margin-bottom: 8px;
    background: var(--bg-color);
    border-radius: 6px;
    border-left: 4px solid var(--primary-color);
}

.job-list, .vehicle-list, .market-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 14px;
}

.job-card, .vehicle-card, .market-card {
    background: var(--card-bg);
    padding: 14px 16px;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
}

.job-card:hover, .vehicle-card:hover, .market-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border-color: rgba(59, 130, 246, 0.2);
}

/* Verhindere Hover-Effekte auf interaktive Elemente innerhalb der Cards */
.vehicle-card button,
.market-card button,
.vehicle-card select,
.vehicle-card input {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.vehicle-card:hover button,
.market-card:hover button {
    transform: none;
}

.job-card-active {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05), var(--card-bg));
}

.job-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 2px solid var(--border-color);
}

.job-route {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.route-point {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.route-icon {
    font-size: 1.5rem;
}

.route-city {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    white-space: nowrap;
}

.route-line {
    flex: 1;
    height: 3px;
    background: var(--border-color);
    border-radius: 2px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.route-distance {
    background: var(--card-bg);
    padding: 2px 8px;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 500;
}

.route-progress {
    height: 100%;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s;
}

.job-status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.job-profitability {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
}

.profit-excellent {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success-color);
}

.profit-good {
    background: rgba(37, 99, 235, 0.15);
    color: var(--primary-color);
}

.profit-ok {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.profit-bad {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.job-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.job-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.job-stat {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
}

.job-stat-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.job-stat-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.job-stat-label {
    font-size: 0.75rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.job-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.highlight-success {
    color: var(--success-color) !important;
}

.job-progress-section {
    margin-top: 8px;
}

.job-progress-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.job-progress-percent {
    font-weight: 600;
    color: var(--primary-color);
}

.progress-bar-large {
    width: 100%;
    height: 12px;
    background: var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.progress-bar-large .progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.3s;
}

.job-deadline-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    background: var(--bg-color);
    border-radius: 8px;
    font-size: 0.9rem;
}

.deadline-label {
    color: var(--text-light);
}

.deadline-value {
    font-weight: 600;
}

.deadline-ok {
    color: var(--success-color);
}

.deadline-warning {
    color: var(--warning-color);
}

.deadline-urgent {
    color: var(--danger-color);
}

.job-warning {
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 8px;
    color: var(--danger-color);
    font-size: 0.9rem;
    text-align: center;
}

.job-card-footer {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.filter-select {
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
}

.filter-select:hover {
    border-color: var(--primary-color);
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.9rem;
    white-space: nowrap;
}

.filter-checkbox:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.05);
}

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

.filter-checkbox span {
    user-select: none;
    color: var(--text-color);
    font-weight: 500;
}

.empty-state {
    grid-column: 1/-1;
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

.empty-state p {
    margin: 8px 0;
}

/* Auth Modal - Modern Design */
#auth-modal {
    background: #1a1a1a;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    align-items: flex-end;
    justify-content: center;
    z-index: 10000;
    overflow: hidden;
    padding-bottom: 10vh;
}

#auth-modal.active {
    display: flex;
}

.auth-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 0;
    background-image: url('../der-spediteur.png');
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    background-attachment: fixed;
}

.auth-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1) 0%, rgba(0, 0, 0, 0.3) 50%, rgba(0, 0, 0, 0.5) 100%);
    backdrop-filter: blur(1px);
    z-index: 1;
}

.auth-background-shapes {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    left: -100px;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    right: -50px;
    animation-delay: 5s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    top: 50%;
    right: 10%;
    animation-delay: 10s;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.auth-modal-content {
    max-width: 450px;
    width: 90%;
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 24px;
    padding: 40px;
    box-shadow: none !important;
    position: relative;
    z-index: 10;
    animation: slideUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
    margin-bottom: 10vh;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-header {
    text-align: center;
    margin-bottom: 32px;
}


.auth-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.3);
}

.auth-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 500;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 4px;
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.auth-tab-btn {
    flex: 1;
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.9);
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
}

.auth-tab-btn.active {
    background: rgba(255, 255, 255, 0.98) !important;
    color: var(--primary-color) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3) !important;
    text-shadow: none !important;
}

.auth-tab-btn:hover:not(.active) {
    color: rgba(255, 255, 255, 1);
    background: rgba(255, 255, 255, 0.15);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
}

.auth-form {
    display: none;
    flex-direction: column;
    gap: 20px;
}

.auth-form.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.auth-form#faq-form {
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 8px;
}

.auth-form#faq-form::-webkit-scrollbar {
    width: 6px;
}

.auth-form#faq-form::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.auth-form#faq-form::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.auth-form#faq-form::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.auth-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.auth-label {
    font-size: 14px;
    font-weight: 600;
    color: #ffffff !important;
    margin-bottom: 4px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 1), -1px -1px 2px rgba(0, 0, 0, 0.8);
    background: rgba(0, 0, 0, 0.4) !important;
    padding: 4px 8px;
    border-radius: 6px;
    display: inline-block;
    backdrop-filter: blur(6px);
}

.auth-input {
    padding: 14px 16px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1e293b !important;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2) !important;
}

.auth-input::placeholder {
    color: var(--text-lighter);
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.2) !important, 0 4px 12px rgba(0, 0, 0, 0.25) !important;
    transform: translateY(-1px);
    background: #ffffff !important;
}

.auth-input:hover {
    border-color: var(--primary-light);
}

.auth-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 12px;
    margin-top: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: var(--primary-color) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4) !important;
}

.auth-submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.auth-submit-btn:hover::before {
    left: 100%;
}

.auth-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.5) !important;
    background: var(--primary-dark) !important;
}

.btn-icon {
    font-size: 18px;
    transition: transform 0.3s;
}

.auth-submit-btn:hover .btn-icon {
    transform: translateX(4px);
}

.auth-info-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    border-left: 3px solid rgba(59, 130, 246, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-icon {
    font-size: 18px;
    flex-shrink: 0;
}

.auth-info-box p {
    font-size: 13px;
    color: #ffffff;
    margin: 0;
    line-height: 1.5;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

.auth-error {
    color: var(--danger-color);
    font-size: 14px;
    margin: 0;
    min-height: 0;
    padding: 0;
    background: transparent;
    border-radius: 8px;
    border-left: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-error:not(:empty) {
    min-height: auto;
    padding: 10px 14px;
    margin-top: 8px;
    background: rgba(239, 68, 68, 0.25);
    backdrop-filter: blur(10px);
    border-left: 3px solid var(--danger-color);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 1;
    max-height: 200px;
    animation: shake 0.5s;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

.auth-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    text-align: center;
    font-size: 13px;
}

.footer-link {
    color: rgba(59, 130, 246, 0.95) !important;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 4px 8px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
}

.footer-link:hover {
    color: rgba(96, 165, 250, 1) !important;
    background: rgba(0, 0, 0, 0.4);
    text-decoration: none;
}

.footer-separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 10px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

/* FAQ Styles */
.faq-container {
    width: 100%;
}

.faq-item {
    margin-bottom: 12px;
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.faq-item:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

.faq-question {
    width: 100%;
    padding: 16px 20px;
    background: transparent;
    border: none;
    text-align: left;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.faq-question:hover {
    color: rgba(255, 255, 255, 1);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.6);
}

.faq-icon {
    font-size: 20px;
    font-weight: bold;
    color: rgba(59, 130, 246, 0.9);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
    color: rgba(59, 130, 246, 1);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 16px 20px;
}

.faq-answer p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
    background: rgba(0, 0, 0, 0.2);
    padding: 12px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
}

.auth-copyright {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
    border-radius: 8px;
    backdrop-filter: blur(4px);
    z-index: 10001;
    white-space: nowrap;
}

.auth-copyright span {
    display: inline-block;
}

.copyright-symbol {
    font-size: 14px;
    margin: 0 4px;
}

/* Map Styles */
.map-container {
    width: 100%;
    height: 700px;
    background: #f0f4f8;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative;
    z-index: 1;
}

/* Leaflet-Karten z-index reduzieren, damit Dropdown darüber liegt */
.map-container .leaflet-container {
    z-index: 1 !important;
}

.map-container .leaflet-control-container {
    z-index: 2 !important;
}

.map-container .leaflet-pane {
    z-index: 1 !important;
}

.map-container .leaflet-top,
.map-container .leaflet-bottom {
    z-index: 2 !important;
}

/* Marker Animationen */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.city-marker {
    cursor: pointer;
}

.vehicle-marker {
    cursor: pointer;
    z-index: 1000;
}

.route-marker {
    cursor: pointer;
}

.map-svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* Leaflet Marker Styles */
.city-marker {
    background: transparent !important;
    border: none !important;
}

.route-marker {
    background: transparent !important;
    border: none !important;
}

.vehicle-marker {
    background: transparent !important;
    border: none !important;
}

.map-legend {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
}

.legend-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-color);
}

.legend-icon {
    font-size: 1.2rem;
}

.legend-line {
    width: 30px;
    height: 3px;
    background: var(--primary-color);
    border-radius: 2px;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

/* Versicherungen Tab */
.insurance-providers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.highlight-danger {
    color: var(--danger-color);
    font-weight: bold;
}

.highlight-success {
    color: var(--success-color);
    font-weight: bold;
}

/* Account Styles */
.account-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.account-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: var(--bg-color);
    border-radius: 6px;
    transition: all 0.2s ease;
}

.account-field:hover {
    background: rgba(59, 130, 246, 0.03);
}

.account-label {
    font-weight: 600;
    color: var(--text-color);
}

.account-value {
    color: var(--text-light);
}

.account-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}

.account-actions .btn {
    width: auto;
    flex: 1;
    min-width: 150px;
}

.job-card h3, .vehicle-card h3, .market-card h3 {
    margin-bottom: 12px;
    color: var(--primary-color);
}

.job-info, .vehicle-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.6);
    transition: background 0.2s ease;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row:hover {
    background: rgba(59, 130, 246, 0.02);
    margin: 0 -8px;
    padding-left: 8px;
    padding-right: 8px;
    border-radius: 4px;
}

.info-label {
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 500;
}

.info-value {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.9rem;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover {
    background: #059669;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-warning {
    background: var(--warning-color);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.stat-card {
    background: var(--card-bg);
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
    border-top: 4px solid var(--primary-color);
}

.stat-card h3 {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--border-color);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary-color);
    transition: width 0.3s;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 500;
}

.status-active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success-color);
}

.status-idle {
    background: rgba(107, 114, 128, 0.1);
    color: var(--text-light);
}

.status-completed {
    background: rgba(37, 99, 235, 0.1);
    color: var(--primary-color);
}

.staff-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 12px;
}

.staff-card {
    background: var(--card-bg);
    padding: 12px 14px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.staff-card:hover {
    border-color: rgba(59, 130, 246, 0.2);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.staff-card h4 {
    margin-bottom: 6px;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.staff-card .info-row {
    padding: 3px 0;
    font-size: 0.85rem;
}

.finance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.finance-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.finance-item:hover {
    background: rgba(59, 130, 246, 0.03);
    border-color: rgba(59, 130, 246, 0.15);
}

.finance-label {
    font-size: 0.9rem;
    color: var(--text-light);
}

.finance-value {
    font-size: 1.5rem;
    font-weight: bold;
}

.finance-value.positive {
    color: var(--success-color);
}

.finance-value.negative {
    color: var(--danger-color);
}

.loan-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.loan-option {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.loan-option h4 {
    margin-bottom: 8px;
    color: var(--primary-color);
}

.loan-option p {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 12px;
}

.loan-item {
    padding: 12px;
    background: var(--bg-color);
    border-radius: 8px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--card-bg);
    padding: 30px;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s;
}

.modal-content h2 {
    margin-bottom: 16px;
    color: var(--primary-color);
}

.modal-content p {
    margin-bottom: 20px;
    line-height: 1.6;
}

.event-option {
    padding: 12px;
    margin-bottom: 10px;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.event-option:hover {
    border-color: var(--primary-color);
    background: rgba(37, 99, 235, 0.1);
}

.event-option h4 {
    margin-bottom: 4px;
    color: var(--primary-color);
}

.event-option p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.condition-bar {
    width: 100%;
    height: 20px;
    background: var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 8px;
}

.condition-fill {
    height: 100%;
    transition: width 0.3s;
}

.condition-good {
    background: var(--success-color);
}

.condition-medium {
    background: var(--warning-color);
}

.condition-bad {
    background: var(--danger-color);
}

.activity-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-top: 16px;
}

.activity-card {
    padding: 16px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.activity-card h4 {
    margin-bottom: 8px;
    color: var(--primary-color);
}

.activity-card p {
    margin: 4px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.vehicle-insurance-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 2px solid var(--border-color);
}

.insurance-label {
    display: block;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.insurance-select {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    background: var(--card-bg);
    color: var(--text-color);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-bottom: 8px;
}

.insurance-select:hover {
    border-color: var(--primary-color);
}

.insurance-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.insurance-description {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0;
    font-style: italic;
}

/* Responsive Design für Icon-only Navbar */
@media (max-width: 1200px) and (min-width: 769px) {
    .nav-icons-only {
        gap: 3px;
    }
    
    .nav-separator {
        height: 24px;
        margin: 0 2px;
    }
    
    .tab-btn-icon {
        min-width: 40px;
        min-height: 40px;
        padding: 8px;
    }
    
    .tab-btn-icon .tab-icon {
        font-size: 1.2rem;
    }
}

@media (max-width: 1200px) {
    .header-main-content {
        flex-wrap: wrap;
        gap: 12px;
    }
    
    .header-center {
        order: 3;
        width: 100%;
    }
    
    .header-stats-compact {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 14px;
    }
    
    .header-main-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .header-left,
    .header-center,
    .header-right {
        width: 100%;
    }
    
    .header-brand {
        justify-content: space-between;
    }
    
    .brand-title {
        font-size: 1.2rem;
    }
    
    .header-stats-compact {
        flex-wrap: wrap;
        gap: 8px;
        padding: 6px 12px;
    }
    
    .stat-item-time {
        min-width: 100%;
        justify-content: center;
    }
    
    .header-controls {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-icons-only {
        gap: 2px;
        padding: 4px;
        overflow-x: auto;
        width: 100%;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        justify-content: flex-start;
    }
    
    .nav-separator {
        display: none; /* Auf sehr kleinen Bildschirmen ausblenden */
    }
    
    .tab-btn-icon {
        min-width: 36px;
        min-height: 36px;
        padding: 6px;
    }
    
    .tab-btn-icon .tab-icon {
        font-size: 1.1rem;
    }
    
    .main-nav {
        padding: 4px;
        position: relative;
        top: 0;
    }
    
    .header-stats {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .stat-card {
        min-width: auto;
    }
    
    .stat-card-controls {
        min-width: auto;
    }
    
    .card {
        padding: 20px;
    }
    
    .dropdown-content {
        right: auto;
        left: 0;
        width: 100%;
    }
    
    .container {
        padding: 12px;
    }

    .header-stats {
        gap: 15px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .tabs {
        overflow-x: auto;
    }

    .job-list, .vehicle-list, .market-list {
        grid-template-columns: 1fr;
    }

    .loan-options {
        grid-template-columns: 1fr;
    }

    .finance-grid {
        grid-template-columns: 1fr;
    }
    
    /* Auth Modal Responsive */
    #auth-modal {
        align-items: flex-end;
        padding-bottom: 5vh;
    }
    
    .auth-modal-content {
        margin-bottom: 5vh;
        padding: 32px 24px;
        max-width: 100%;
        width: 95%;
    }
    
    .auth-background {
        background-size: contain;
        background-position: center top;
    }
}

/* Chat Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 600px;
    max-height: 80vh;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: var(--bg-color);
    border-radius: var(--border-radius);
    margin-bottom: 12px;
    border: 1px solid var(--border-color);
    min-height: 300px;
    scroll-behavior: smooth;
}

.chat-welcome-message {
    text-align: center;
    padding: 24px;
    color: var(--text-light);
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 16px;
}

.chat-motd-message {
    margin-bottom: 16px;
    padding: 0;
    border-radius: var(--border-radius);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(139, 92, 246, 0.1) 100%);
    border: 2px solid var(--primary-color);
    animation: fadeIn 0.4s ease-in;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
}

.chat-motd-content {
    padding: 20px;
}

.chat-motd-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-color);
}

.chat-motd-icon {
    font-size: 2rem;
    line-height: 1;
}

.chat-motd-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.chat-motd-body {
    color: var(--text-color);
    line-height: 1.7;
}

.chat-motd-body p {
    margin-bottom: 12px;
}

.chat-motd-body p:last-of-type {
    margin-bottom: 0;
}

.chat-motd-tips {
    margin-top: 16px;
    padding: 16px;
    background: rgba(59, 130, 246, 0.05);
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

.chat-motd-tips strong {
    display: block;
    margin-bottom: 8px;
    color: var(--primary-dark);
    font-size: 1rem;
}

.chat-motd-tips ul {
    margin-left: 20px;
    margin-top: 8px;
}

.chat-motd-tips li {
    margin-bottom: 6px;
    color: var(--text-color);
}

.chat-motd-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border-color);
    font-weight: 600;
    color: var(--primary-dark);
    text-align: center;
}

.chat-message {
    margin-bottom: 4px;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    animation: fadeIn 0.2s ease-in;
    transition: all 0.2s ease;
    position: relative;
}

.chat-message:hover {
    background: rgba(59, 130, 246, 0.03);
    border-color: rgba(59, 130, 246, 0.2);
}

.chat-message.own-message {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.12), rgba(59, 130, 246, 0.08));
    border-color: rgba(59, 130, 246, 0.25);
    margin-left: auto;
    margin-right: 0;
    max-width: 75%;
}

.chat-message:not(.own-message) {
    max-width: 75%;
}

.chat-message.chat-message-grouped {
    margin-top: 2px;
    padding-top: 4px;
    border-top: none;
    border-radius: 0 0 12px 12px;
}

.chat-message.chat-message-grouped + .chat-message-group-end {
    border-radius: 12px 12px 0 0;
}

.chat-message-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
    font-size: 0.85rem;
    gap: 12px;
}

.chat-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
}

.chat-username {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.chat-username.own-username {
    color: var(--primary-dark);
}

.chat-company {
    font-size: 0.75rem;
    color: var(--text-light);
    font-weight: normal;
    font-style: italic;
}

.chat-timestamp {
    color: var(--text-light);
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
    opacity: 0.7;
}

.chat-message-content {
    color: var(--text-color);
    word-wrap: break-word;
    line-height: 1.6;
    font-size: 0.95rem;
}

.chat-link {
    color: var(--primary-color);
    text-decoration: underline;
    transition: color 0.2s ease;
    word-break: break-all;
}

.chat-link:hover {
    color: var(--primary-dark);
    text-decoration: none;
}

.chat-input-wrapper {
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
    padding: 12px;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

.chat-input-container {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.chat-input {
    flex: 1;
    padding: 10px 14px;
    border: 2px solid var(--border-color);
    border-radius: 20px;
    background: var(--bg-color);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: var(--transition);
}

.chat-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--card-bg);
}

.chat-input:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#chat-send-btn {
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

#chat-send-btn span {
    font-size: 1.2rem;
}

.chat-info {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    font-size: 0.75rem;
    color: var(--text-light);
}

.chat-char-count {
    font-size: 0.75rem;
    transition: color 0.2s ease;
}

.chat-separator {
    color: var(--border-color);
    opacity: 0.5;
}

.chat-status {
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

.chat-status.connected {
    color: #10b981;
}

.chat-status.disconnected {
    color: #ef4444;
}

.chat-status.connecting {
    color: #f59e0b;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: var(--bg-color);
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}

.chat-messages:hover::-webkit-scrollbar-thumb {
    background: var(--primary-color);
}

/* Fixierter Chat am unteren Rand */
.chat-fixed {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--card-bg);
    border-top: 2px solid var(--primary-color);
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    max-height: 400px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
    font-weight: 600;
    font-size: 0.9rem;
    gap: 12px;
    position: relative;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.chat-header:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--secondary-color));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.chat-header-left {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.chat-header-icon {
    font-size: 1.2rem;
}

.chat-header-title {
    font-weight: 600;
}

.chat-user-count {
    font-size: 0.8rem;
    opacity: 0.9;
    font-weight: normal;
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 8px;
    border-radius: 12px;
}

.chat-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-toggle {
    font-size: 0.9rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
    opacity: 0.9;
}

.chat-fixed.collapsed .chat-toggle {
    transform: rotate(-90deg);
}

.chat-new-messages-badge {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 14px;
    min-width: 24px;
    text-align: center;
    line-height: 1.4;
    animation: pulse-badge 2s infinite;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(239, 68, 68, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

@keyframes pulse-badge {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(1.1);
    }
}

.chat-fixed.collapsed .chat-container-fixed {
    display: none;
}

.chat-container-fixed {
    display: flex;
    flex-direction: column;
    height: 350px;
    max-height: 50vh;
    background: var(--card-bg);
}

.chat-container-fixed .chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px 16px;
    background: var(--bg-color);
    min-height: 200px;
}

.chat-container-fixed .chat-input-wrapper {
    padding: 0;
    background: var(--card-bg);
    border-top: 1px solid var(--border-color);
}

.chat-container-fixed .chat-input-container {
    padding: 12px 16px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.chat-container-fixed .chat-input {
    flex: 1;
    padding: 12px 16px;
    font-size: 1rem;
    min-height: 44px;
}

.chat-container-fixed .chat-send-btn {
    padding: 8px 12px;
    font-size: 0.9rem;
    min-width: auto;
    width: auto;
    white-space: nowrap;
    height: 44px;
    flex-shrink: 0;
}

.chat-container-fixed .chat-info {
    padding: 6px 16px;
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem;
}

/* Kompakte Tabellenansicht für Aufträge */
.jobs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.jobs-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.jobs-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    overflow: hidden;
    margin-top: 16px;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.jobs-table thead {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.08));
}

.jobs-table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-color);
    border-bottom: 2px solid rgba(59, 130, 246, 0.2);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.8rem;
}

.jobs-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
    background: var(--card-bg);
}

.jobs-table tbody tr {
    transition: all 0.2s ease;
}

.jobs-table tbody tr:hover {
    background: rgba(59, 130, 246, 0.08);
    transform: translateX(2px);
}

.jobs-table tbody tr:hover td {
    background: rgba(59, 130, 246, 0.08);
}

.jobs-table tbody tr.job-row-disabled {
    opacity: 0.5;
    background: rgba(0, 0, 0, 0.02);
}

.jobs-table tbody tr.job-row-disabled:hover {
    background: rgba(0, 0, 0, 0.03);
    transform: none;
}

.job-route {
    font-weight: 500;
    min-width: 200px;
}

.route-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.route-from,
.route-to {
    font-weight: 600;
    color: var(--text-color);
}

.route-arrow {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 1rem;
}

.job-distance,
.job-cargo {
    color: var(--text-light);
    white-space: nowrap;
    font-size: 0.9rem;
}

.job-payment {
    font-weight: 700;
    color: var(--success-color);
    font-size: 1rem;
}

.job-profit {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.profit-amount {
    font-weight: 600;
}

.job-profit.profit-excellent .profit-amount {
    color: #10b981;
}

.job-profit.profit-good .profit-amount {
    color: #3b82f6;
}

.job-profit.profit-ok .profit-amount {
    color: #f59e0b;
}

.job-profit.profit-bad .profit-amount {
    color: #ef4444;
}

.profit-badge {
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.profit-badge.profit-excellent {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

.profit-badge.profit-good {
    background: rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

.profit-badge.profit-ok {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.profit-badge.profit-bad {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.job-deadline {
    font-weight: 500;
}

.deadline-text {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.85rem;
}

.job-deadline.deadline-urgent .deadline-text {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.1);
    font-weight: 600;
}

.job-deadline.deadline-warning .deadline-text {
    color: #f59e0b;
    background: rgba(245, 158, 11, 0.1);
    font-weight: 600;
}

.job-deadline.deadline-ok .deadline-text {
    color: var(--text-light);
}

.job-action {
    white-space: nowrap;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-sm.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-sm.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
}

.btn-sm.btn-primary:active {
    transform: translateY(0);
}

.text-muted {
    color: var(--text-light);
    font-size: 0.85rem;
}

/* Kompaktere Filter */
.filter-select {
    padding: 6px 10px;
    font-size: 0.85rem;
    border-radius: 6px;
}

.filter-checkbox {
    font-size: 0.85rem;
}

.filter-checkbox span {
    margin-left: 6px;
}

/* Kompaktere allgemeine Styles */
.tab-content {
    padding: 12px;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--text-light);
}

.empty-state p {
    margin: 8px 0;
    font-size: 0.9rem;
}

/* Karte-Tab behält größere Cards */
#karte .card {
    padding: 28px;
    margin-bottom: 24px;
    box-shadow: var(--card-shadow);
}

#karte .compact-card {
    padding: 20px;
    margin-bottom: 20px;
}

/* Leaderboard Styles */
.leaderboard-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.leaderboard-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: var(--bg-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.2s ease;
}

.leaderboard-row:hover {
    background: rgba(59, 130, 246, 0.04);
    border-color: rgba(59, 130, 246, 0.2);
    transform: translateX(2px);
}

.leaderboard-row.current-user {
    background: rgba(59, 130, 246, 0.1);
    border-color: var(--primary-color);
    border-width: 2px;
    font-weight: 600;
}

.leaderboard-rank {
    font-size: 1.1rem;
    font-weight: 700;
    min-width: 32px;
    text-align: center;
    color: var(--primary-color);
}

.leaderboard-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.leaderboard-name {
    font-weight: 600;
    color: var(--text-color);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-you {
    font-size: 0.75rem;
    color: var(--primary-color);
    font-weight: 700;
    background: rgba(59, 130, 246, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
}

.leaderboard-details {
    font-size: 0.8rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}

.leaderboard-value {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 0.95rem;
    white-space: nowrap;
}

/* Version Info - nur im Login-Bildschirm */
.version-info {
    display: none;
}

#auth-modal.active .version-info {
    display: block;
    position: fixed;
    bottom: 20px;
    left: 20px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.95);
    z-index: 10001;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 14px;
    border-radius: 8px;
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    font-weight: 600;
    border: 1px solid rgba(255, 255, 255, 0.2);
    pointer-events: none;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7), 0 0 8px rgba(0, 0, 0, 0.5);
}

/* ============================================
   MOBILE & TABLET OPTIMIERUNGEN
   ============================================ */

/* Touch-Optimierungen für alle Geräte */
* {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
}

button, .btn, .tab-btn-icon, a {
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
}

/* Tablet Optimierungen (768px - 1024px) */
@media (max-width: 1024px) and (min-width: 769px) {
    .container {
        max-width: 100%;
        padding: 16px;
    }
    
    .main-header {
        padding: 12px 16px;
    }
    
    .header-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .card {
        padding: 18px;
    }
    
    /* Navigation kompakter */
    .nav-icons-only {
        gap: 4px;
        padding: 6px;
    }
    
    .tab-btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    
    /* Grid-Layouts anpassen */
    .job-list, .vehicle-list, .market-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    /* Chat optimieren */
    .chat-container {
        height: 500px;
        max-height: 60vh;
    }
}

/* Mobile Geräte (bis 768px) */
@media (max-width: 768px) {
    /* Viewport-Einstellungen */
    html {
        font-size: 14px;
    }
    
    body {
        padding-top: 0;
        padding-bottom: 0;
    }
    
    /* Header optimieren */
    .main-header {
        padding: 8px 10px;
        border-radius: 0;
        margin-bottom: 8px;
        position: sticky;
        top: 0;
        z-index: 999;
    }
    
    .header-main-content {
        flex-direction: row;
        gap: 8px;
        align-items: flex-start;
    }
    
    .header-left {
        flex: 0 0 auto;
        min-width: 0;
    }
    
    .header-center {
        flex: 1;
        min-width: 0;
        display: flex;
        justify-content: flex-end;
    }
    
    .header-right {
        flex: 0 0 auto;
    }
    
    .brand-title {
        font-size: 1rem;
        line-height: 1.2;
    }
    
    .user-info {
        font-size: 0.7rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }
    
    .header-stats-compact {
        flex-wrap: nowrap;
        gap: 4px;
        padding: 6px 8px;
        font-size: 0.75rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-width: 100%;
    }
    
    .stat-item {
        flex-shrink: 0;
        gap: 4px;
    }
    
    .stat-icon-small {
        font-size: 1rem;
    }
    
    .stat-label-small {
        font-size: 0.6rem;
    }
    
    .stat-value-compact {
        font-size: 0.85rem;
    }
    
    .stat-divider {
        height: 20px;
        margin: 0 2px;
    }
    
    .stat-item-time {
        font-size: 0.75rem;
        min-width: 100px;
    }
    
    .time-display-compact {
        gap: 4px;
    }
    
    .weekday-compact,
    .date-compact {
        font-size: 0.6rem;
    }
    
    .time-compact {
        font-size: 0.75rem;
    }
    
    .header-controls {
        gap: 4px;
        flex-wrap: wrap;
    }
    
    .btn-icon-control {
        min-width: 32px;
        min-height: 32px;
        padding: 6px 8px;
        font-size: 0.9rem;
    }
    
    /* Navigation - Mobile Menu */
    .main-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: var(--card-bg);
        border-top: 2px solid var(--primary-color);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        padding: 6px 2px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .main-nav::-webkit-scrollbar {
        display: none; /* Chrome/Safari */
    }
    
    .nav-icons-only {
        display: flex;
        justify-content: flex-start;
        align-items: center;
        gap: 4px;
        width: max-content;
        min-width: 100%;
        padding: 4px 8px;
    }
    
    .nav-separator {
        width: 1px;
        height: 40px;
        background: var(--border-color);
        margin: 0 4px;
        flex-shrink: 0;
    }
    
    .nav-group {
        display: flex;
        gap: 4px;
        flex-shrink: 0;
        align-items: center;
    }
    
    .tab-btn-icon {
        min-width: 48px;
        min-height: 48px;
        padding: 10px;
        border-radius: 12px;
        font-size: 1.2rem;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        flex-shrink: 0;
    }
    
    .tab-btn-icon .tab-icon {
        font-size: 1.4rem;
        line-height: 1;
    }
    
    .tab-btn-icon.active {
        background: var(--primary-color);
        color: white;
        box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
    }
    
    .tab-btn-icon:active {
        transform: scale(0.95);
    }
    
    /* Content-Bereich anpassen */
    .container {
        padding: 10px;
        margin-bottom: 60px; /* Platz für Navigation */
        max-width: 100%;
    }
    
    /* Cards optimieren */
    .card {
        padding: 14px;
        margin-bottom: 10px;
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    }
    
    /* Typografie anpassen */
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    h3 {
        font-size: 1.1rem;
    }
    
    /* Buttons größer für Touch */
    .btn {
        padding: 14px 20px;
        font-size: 1rem;
        min-height: 44px;
        border-radius: 10px;
    }
    
    .btn-sm {
        padding: 10px 16px;
        font-size: 0.9rem;
        min-height: 40px;
    }
    
    /* Input-Felder größer */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="password"],
    select,
    textarea {
        padding: 14px 16px;
        font-size: 16px; /* Verhindert Zoom auf iOS */
        min-height: 44px;
        border-radius: 10px;
    }
    
    /* Grid-Layouts auf 1 Spalte */
    .job-list,
    .vehicle-list,
    .market-list,
    .features-grid,
    .gameplay-grid,
    .showcase-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    /* Modals optimieren */
    .modal {
        padding: 10px;
    }
    
    .modal-content {
        width: 95%;
        max-width: 100%;
        padding: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Chat optimieren */
    #chat.tab-content {
        padding-bottom: 0;
    }
    
    .chat-container {
        height: calc(100vh - 200px);
        max-height: none;
    }
    
    .chat-messages {
        min-height: 300px;
        padding: 12px;
    }
    
    .chat-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 12px;
    }
    
    /* Karte optimieren */
    #karte {
        height: calc(100vh - 150px);
    }
    
    #map {
        height: 100%;
        border-radius: 12px;
    }
    
    /* Release Alert anpassen */
    #release-alert {
        top: 0;
        right: -30px;
        padding: 12px 60px;
        font-size: 14px;
        transform: rotate(20deg);
    }
    
    /* Tab-Content Padding */
    .tab-content {
        padding-bottom: 70px; /* Platz für Navigation */
        min-height: calc(100vh - 120px);
    }
    
    /* Auth Modal optimieren */
    .auth-modal-content {
        width: 95%;
        max-width: 400px;
        padding: 20px 16px;
        margin: 20px auto;
    }
    
    .auth-tabs {
        gap: 4px;
        margin-bottom: 16px;
    }
    
    .auth-tab-btn {
        padding: 10px 14px;
        font-size: 0.9rem;
        flex: 1;
    }
    
    .auth-input-group {
        margin-bottom: 16px;
    }
    
    .auth-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .auth-input {
        font-size: 16px; /* Verhindert Zoom auf iOS */
        padding: 12px 14px;
        min-height: 44px;
    }
    
    .auth-submit-btn {
        width: 100%;
        padding: 14px;
        font-size: 1rem;
        min-height: 48px;
        margin-top: 8px;
    }
    
    /* Dropdown-Menüs */
    .dropdown-content {
        position: fixed;
        left: 10px;
        right: 10px;
        width: auto;
        max-width: calc(100% - 20px);
        max-height: 60vh;
        overflow-y: auto;
    }
    
    /* Statistik-Cards */
    .stat-card {
        padding: 12px;
    }
    
    .stat-value {
        font-size: 1.3rem;
    }
    
    .stat-label {
        font-size: 0.85rem;
    }
    
    /* Job/Vehicle/Market Cards optimieren */
    .job-card,
    .vehicle-card,
    .market-card {
        padding: 14px;
    }
    
    .job-card h3,
    .vehicle-card h3,
    .market-card h3 {
        font-size: 1.1rem;
    }
    
    /* Tabellen responsive */
    table {
        font-size: 0.85rem;
    }
    
    table th,
    table td {
        padding: 8px 6px;
    }
    
    /* Info-Boxen kompakter */
    .info-row {
        flex-direction: column;
        gap: 4px;
    }
    
    .info-label {
        font-size: 0.85rem;
    }
    
    .info-value {
        font-size: 0.9rem;
    }
    
    /* Header-Controls kompakter */
    .header-controls {
        gap: 4px;
    }
    
    .header-controls .btn {
        padding: 6px 10px;
        font-size: 0.8rem;
        min-height: 32px;
    }
    
    /* Scroll-Verhalten verbessern */
    * {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    }
    
    /* Touch-Targets optimieren */
    button,
    .btn,
    .tab-btn-icon,
    .btn-icon-control {
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }
    
    /* Text-Auswahl verbessern */
    ::selection {
        background: rgba(59, 130, 246, 0.3);
    }
    
    /* Scrollbar verstecken aber scrollbar behalten */
    .nav-icons-only::-webkit-scrollbar {
        height: 0;
    }
    
    /* Bessere Lesbarkeit */
    p, span, div {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    /* Modal verbessern */
    .modal {
        padding: 0;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .modal-content {
        width: 100%;
        max-width: 100%;
        margin: 0;
        border-radius: 16px 16px 0 0;
        max-height: calc(100vh - 20px);
    }
    
    /* Toast-Notifications */
    .toast {
        min-width: auto;
        max-width: calc(100% - 20px);
        left: 10px;
        right: 10px;
        font-size: 0.9rem;
        padding: 12px 16px;
    }
}

/* Kleine Smartphones (bis 480px) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .main-header {
        padding: 6px 8px;
    }
    
    .header-main-content {
        gap: 6px;
    }
    
    .brand-title {
        font-size: 0.9rem;
    }
    
    .user-info {
        font-size: 0.65rem;
        max-width: 100px;
    }
    
    .header-stats-compact {
        padding: 4px 6px;
        font-size: 0.7rem;
        gap: 3px;
    }
    
    .stat-item-time {
        min-width: 80px;
        font-size: 0.7rem;
    }
    
    .container {
        padding: 8px;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    h1 {
        font-size: 1.3rem;
    }
    
    h2 {
        font-size: 1.1rem;
    }
    
    h3 {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.95rem;
        min-height: 44px;
    }
    
    .btn-sm {
        padding: 8px 12px;
        font-size: 0.85rem;
        min-height: 36px;
    }
    
    .tab-btn-icon {
        min-width: 44px;
        min-height: 44px;
        padding: 8px;
    }
    
    .tab-btn-icon .tab-icon {
        font-size: 1.2rem;
    }
    
    .main-nav {
        padding: 4px 1px;
    }
    
    .nav-icons-only {
        gap: 2px;
        padding: 2px 4px;
    }
    
    .nav-group {
        gap: 2px;
    }
    
    .nav-separator {
        height: 36px;
        margin: 0 2px;
    }
    
    /* Release Alert kleiner */
    #release-alert {
        padding: 10px 50px;
        font-size: 12px;
        transform: rotate(18deg);
    }
    
    /* Navigation noch kompakter */
    .nav-icons-only {
        padding: 6px 2px;
    }
    
    .nav-group {
        gap: 1px;
    }
    
    /* Modals */
    .modal-content {
        padding: 16px;
    }
    
    /* Chat */
    .chat-messages {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* Auth Modal */
    .auth-modal-content {
        padding: 24px 16px;
    }
    
    .auth-tabs {
        gap: 4px;
    }
    
    .auth-tab-btn {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    /* Kompaktere Cards */
    .job-card,
    .vehicle-card,
    .market-card {
        padding: 12px;
    }
    
    /* Tabellen noch kompakter */
    table {
        font-size: 0.8rem;
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table th,
    table td {
        padding: 6px 4px;
        white-space: nowrap;
    }
    
    /* Modals noch kleiner */
    .modal-content {
        padding: 12px;
        max-height: 95vh;
    }
    
    /* Navigation noch kompakter */
    .nav-icons-only {
        padding: 4px 1px;
    }
    
    .tab-btn-icon {
        min-width: 38px;
        min-height: 38px;
        padding: 5px;
    }
    
    .tab-btn-icon .tab-icon {
        font-size: 1.1rem;
    }
}

/* Landscape-Modus für Mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .main-nav {
        position: relative;
        bottom: auto;
        border-top: none;
        border-bottom: 2px solid var(--primary-color);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }
    
    .container {
        margin-bottom: 0;
    }
    
    .tab-content {
        padding-bottom: 0;
    }
    
    #karte {
        height: calc(100vh - 120px);
    }
    
    .chat-container {
        height: calc(100vh - 150px);
    }
}

/* High-DPI Displays optimieren */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .tab-icon,
    .brand-icon {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode für Mobile (falls unterstützt) */
@media (prefers-color-scheme: dark) {
    /* Wird bereits durch die Dark-Mode-Variablen abgedeckt */
}

/* Reduzierte Animationen für Performance */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print-Styles (optional) */
@media print {
    .main-nav,
    #release-alert,
    .header-controls,
    .btn {
        display: none !important;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .card {
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

