:root {
    --safe-top: env(safe-area-inset-top, 30px);
}

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

/* Basis-Layout */
body {
    margin: 0;
    background: #f3f4f6;
    min-height: 100dvh;
    /* dynamisch für moderne Geräte */
    font-family: Arial, sans-serif;
    box-sizing: border-box;
}

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #0a1c2e;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
    z-index: 1000;
    box-sizing: border-box;
}

.topbar-spacer {
    height: 60px;
}

.sidebar {
    height: 100vh;
    width: 220px;
    background-color: #0f172a;
    position: fixed;
    top: 60px;
    left: 0;
    padding-top: 20px;
    transition: transform 0.3s ease;
}

.sidebar.hidden {
    transform: translateX(-100%);
}

.sidebar.hidden+.content {
    margin-left: 0 !important;
    width: 100% !important;
}

.sidebar a {
    display: block;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    font-size: 16px;
}

.sidebar a:hover {
    background-color: #1e293b;
}

.content {
    width: 100%;
    box-sizing: border-box;
}

.ride-card {
    background-color: white;
    border-radius: 12px;
    padding: 20px;
    margin: 20px auto;
    max-width: 500px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

h2 {
    text-align: center;
    margin-top: 20px;
    font-size: 22px;
    font-weight: bold;
}

/* Button-Stile */
.btn-green {
    background-color: black;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    width: 100%;
    margin-top: 12px;
}

.btn-green:hover {
    background-color: #333;
}

/* Filterbereiche und Tabellen */
.filter-bar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-bar select {
    width: 100%;
    padding: 10px;
    font-size: 16px;
}

.arbeitszeit-table th,
.arbeitszeit-table td {
    font-size: 14px;
    padding: 6px;
}

.arbeitszeit-table th {
    white-space: nowrap;
}

.earnings-table {
    font-size: 14px;
    overflow-x: auto;
}

.earnings-table th,
.earnings-table td {
    text-align: left;
    white-space: nowrap;
    vertical-align: top;
}

/* Buttons */
.btn {
    background-color: #000;
    color: white;
    font-weight: bold;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-size: 16px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
}

.btn:hover {
    background-color: #333;
}

.btn-reset {
    background-color: #6b7280;
}

.btn-reset:hover {
    background-color: #4b5563;
}

/* Einnahmen-Filter */
.earnings-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-bottom: 20px;
    margin-top: 10px;
}

.earnings-filter select,
.earnings-filter input[type="date"] {
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    min-width: 140px;
}

/* Fixierte Kopfzeile */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background-color: #0f172a;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    color: white;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

@media screen and (max-width: 768px) {
    .topbar {
        height: 48px;
    }

    .topbar-spacer {
        height: 48px;
    }

    .topbar span {
        font-size: 18px;
    }

    .sidebar {
        width: 80%;
        top: 48px;
        z-index: 999;
    }

    .sidebar a {
        font-size: 18px;
        padding: 14px 24px;
    }

    .earnings-filter {
        flex-direction: column;
        align-items: stretch;
    }

    .earnings-filter select,
    .earnings-filter input[type="date"],
    .earnings-filter .btn,
    .earnings-filter .btn-reset {
        width: 100%;
    }

    .btn-green {
        font-size: 18px;
        padding: 16px;
    }

    .ride-card {
        font-size: 16px;
        padding: 20px;
        margin: 15px auto;
        width: calc(100% - 40px);
    }

    h2 {
        font-size: 20px;
    }
}