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

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background: #f4f4f4;
}

header {
    background: #007bff;
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 70px;
}

#burger-menu {
    display: block;
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 10px;
    z-index: 2000; /* Höherer z-index, um Überlappungen zu vermeiden */
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto; /* Sicherstellen, dass Klicks/Touch erkannt werden */
}

#sidebar {
    position: fixed;
    top: 70px;
    left: -250px;
    width: 250px;
    height: calc(100% - 70px);
    background: #333;
    color: white;
    transition: left 0.3s ease;
    z-index: 2001; /* Höher als andere Elemente */
    overflow-y: auto;
}

#sidebar.active {
    left: 0;
    display: block !important;
}

#sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000; /* Unter Sidebar, über Header */
}

/* Sicherstellen, dass main nicht überlappt */
main {
    padding: 90px 20px 20px;
    min-height: 100vh;
    position: relative;
    z-index: 1001; /* Unter Sidebar und Overlay */
}

/* Rest von styles.css bleibt unverändert */

#sidebar ul {
    list-style: none;
    padding: 20px;
}

#sidebar ul li {
    margin: 10px 0;
}

#sidebar ul li a {
    color: white;
    text-decoration: none;
    display: block;
    padding: 10px;
}

#sidebar ul li a:hover {
    background: #444;
}

form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    z-index: 1002;
    position: relative;
    padding: 10px;
}

input, select, button, canvas {
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    pointer-events: auto;
    z-index: 1002;
    background: white;
    cursor: text;
}

select, button {
    cursor: pointer;
}

input[type="file"] {
    cursor: pointer;
    padding: 5px;
}

canvas {
    border: 1px solid #333;
    cursor: crosshair;
	touch-action: none;
}

button[type="submit"] {
    background: #007bff;
    color: white;
    cursor: pointer;
}

button[type="submit"]:hover {
    background: #0056b3;
}

#trips, #vehicles, #fuel, #users {
    position: relative;
    z-index: 1002;
    padding: 20px;
}

.warning {
    color: red;
    font-weight: bold;
}

.hidden {
    display: none;
}

.tracking-vehicle {
    display: none;
    background: #e0f7fa;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #b2ebf2;
    font-weight: bold;
}
.tracking-vehicle.active {
    display: block;
    color: green;
}

#tracking-vehicle-id {
    margin: 10px 0;
    padding: 5px;
    width: 200px;
}

#login {
    display: none; /* Standardmäßig ausgeblendet */
    z-index: 1002;
    position: relative;
    padding: 20px;
    background: white;
    max-width: 400px;
    margin: 0 auto;
}

#login:not(.hidden) {
    display: block !important;
}

@media (min-width: 768px) {
    #burger-menu {
        display: none;
    }
    #sidebar {
        left: 0;
        width: 200px;
        z-index: 1003;
    }
    main {
        margin-left: 200px; /* Platz für Sidebar auf PC */
        padding: 90px 20px 20px;
    }
}