 body {
    font-family: Arial;
    margin: 20px;
}

/* ------------------------
Desktop
------------------------ */

#main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

#main-nav > ul {
    display: flex;
    gap: 10px;
}

#main-nav li {
    position: relative;
}

#main-nav a {
    display: block;
    padding: 10px 15px;
    text-decoration: none;
    color: #333;
    border-radius: 6px;
    white-space: nowrap;
    transition: all .2s ease;
}

#main-nav a:hover {
    background: #f0f0f0;
}

#main-nav a.active {
    background: #2563eb;
    color: #fff;
}

/* Dropdown */

#main-nav li ul {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,.15);
    z-index: 1000;
}

#main-nav li:hover > ul {
    display: block;
}

/* ------------------------
Mobile Button
------------------------ */

.menu-toggle {
    display: none;
    padding: 10px 15px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* ------------------------
Mobile Layout
------------------------ */

@media (max-width: 768px) {

    .menu-toggle {
        display: block;
        margin-bottom: 10px;
    }

    #main-nav {
        display: none;
        width: 100%;
    }

    #main-nav.open {
        display: block;
    }

    #main-nav > ul {
        flex-direction: column;
        gap: 0;
    }

    #main-nav li {
        width: 100%;
    }

    #main-nav li ul {
        display: block;
        position: static;
        box-shadow: none;
        background: #f8f8f8;
        margin-left: 15px;
        border-left: 3px solid #ddd;
    }

    #main-nav a {
        border-radius: 0;
    }
}


.success {
    background: #d1fae5;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #10b981;
}

.error {
    background: #fee2e2;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ef4444;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px;
}

table {
    width: 100%;
}

.task-card {
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    background: #fff;
}

.btn {
    display: inline-block;
    padding: 12px 20px;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    border-radius: 8px;
}

.badge {
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: bold;
}

.badge-open {
    background: #a8ccff;
    color: #030866;
}
.badge-inprogress {
    background: #f8ff7c;
    color: #2e2e2e;
}

.badge-done {
    background: #d1e7dd;
    color: #0f5132;
}

.badge-problem {
    background: #ffc67c;
    color: #412e00;
}

.badge-cancelled {
    background: #f8d7da;
    color: #842029;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
}

.action-button {
    display: block;
    text-align: center;
    text-decoration: none;
    padding: 14px;
    border-radius: 10px;
    color: white;
    font-weight: bold;
}

.action-button.blue {
    background: #0d6efd;
}

.action-button.yellow {
    background: #f9fd0d;
    color: black;
}

.action-button.green {
    background: #198754;
}

.action-button.orange {
    background: #fd7e14;
}
.action-button.red {
    background: #fd1414;
}

.mobile-action {
    display: block;
    width: 100%;
    text-align: center;
    background: #0d6efd;
    color: white;
    text-decoration: none;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 10px;
    font-size: 18px;
}

.mobile-action.green {
    background: #198754;
}

.mobile-action.orange {
    background: #fd7e14;
}

.mobile-action.red {
    background: #dc3545;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

.filter-form input,
.filter-form select,
.filter-form button {
    min-height: 44px;
}

.task-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(420px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.section-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}
.container-card {
    background: #dff6fe;
    border: 3px solid #2f00ff;
}

.task-done, .container-done {
    background: #d1e7dd;
    border: 2px solid #198754;
}
.task-problem, .container-problem {
    background: #ffc67c;
    border: 2px solid #fd7e14;
}
.task-stopped {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.section-card h2 {
    margin-top: 0;
    margin-bottom: 15px;
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
}

.autocomplete-item { 
    padding: 10px;
    cursor: pointer;
}

.autocomplete-item:hover {
    background: #f5f5f5;
}

.camera-button {
    display: block;
    width: 100%;
    text-align: center;
    padding: 20px;
    background: #0d6efd;
    color: white;
    border-radius: 10px;
    font-size: 20px;
    cursor: pointer;
}

nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
}

nav a.active {
    background: #0d6efd;
    color: white;
    border-radius: 8px;
}

.burger-menu {
    display: none;
}

.history-entry {
    padding: 10px;
    border-bottom: 1px solid #eee;
    margin-bottom: 10px;
}

.subline {
    background-color: #cbc4ff;
    color:#0d6efd;
}


#startup-modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}

#startup-modal .modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

#startup-modal button {
    margin-top: 20px;
    padding: 10px 20px;
    cursor: pointer;
}

/* ------------------------
Slider-Button für 
iOS anpassen
------------------------ */

.completion-slider {
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}


@media (max-width: 768px) {

    body {
        font-size: 18px;
    }

    .burger-menu {
        display: block;
        width: 100%;
        padding: 12px;
        font-size: 18px;
        border: none;
        background: #0d6efd;
        color: white;
        border-radius: 8px;
        margin-bottom: 10px;
    }

    nav {
        display: none;
    }

    nav.open {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    input,
    select,
    button {
        width: 100%;
        min-height: 48px;
        margin-bottom: 10px;
        box-sizing: border-box;
    }

    table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .filter-form {
        flex-direction: column;
    }

    .task-grid {
        grid-template-columns: 1fr;
    }

}