/* Allgemeine Einstellungen */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    color: #333;
    line-height: 1.6;
}

/* Wrapper für mittige Begrenzung */
#main {
    max-width: 80%;
    margin: 0 auto;
    padding: 20px;
}

/* Hauptüberschrift */
h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2.6em;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: capitalize;
}

/* Labels */
label {
    display: block;
    margin: 10px 0 8px;
    font-weight: 600;
    color: #34495e;
    font-size: 1em;
}

/* Eingabefelder und Dropdowns */
input[type="text"], textarea, select, input[type="date"], input[type="file"] {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #d1d8e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input[type="text"]:focus, textarea:focus, select:focus, input[type="date"]:focus, input[type="file"]:focus {
    border-color: #3498db;
    box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
    outline: none;
}

/* Buttons */
button {
    display: block;
    width: 100%;
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:hover {
    background: linear-gradient(145deg, #2980b9, #21618c);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

/* Räume Container */
#rooms-container {
    margin-top: 24px;
    max-width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

table th, table td {
    padding: 14px;
    text-align: left;
    font-size: 1em;
    /*color: #d2d5d8;*/
    color: #2c3e50;
}

table th {
    background: linear-gradient(145deg, #3498db, #2980b9);
    color: #fff;
    font-weight: 600;
    text-transform: uppercase;
}

table tr:nth-child(even) {
    background-color: #f9f9fc;
}

table tr:hover {
    background-color: #eef2f7;
    transition: background 0.3s ease;
}

/* Begrenzung der Spaltenbreite und Umbruch des Textes */
th, td {
    padding: 8px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

td.comment-column {
    max-width: 200px; /* Maximale Breite der Kommentarspalte */
    word-wrap: break-word; /* Umbruch des Textes */
    white-space: normal; /* Ermöglicht den Umbruch des Textes */
}

/* Begrenzung der Spaltenbreite der Aktionsspalte */
td.action-column {
    max-width: 70px; /* Maximale Breite der Aktionsspalte */
    text-align: center; /* Zentrieren der Buttons */
}

/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    overflow: auto; /* Ermöglicht das Scrollen */
}

.popup-content {
    background: #fff;
    padding: 32px 32px 24px 32px;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.18);
    min-width: 340px;
    max-width: 420px;
    margin: auto;
    text-align: center;
}

.popup-content h2 {
    margin-top: 0;
}

.popup-content label {
    display: block;
    margin-top: 10px;
}

.popup-content textarea {
    width: 100%;
    height: 100px;
}

.popup-content button {
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

.popup-content button:hover {
    background-color: #2980b9;
}

.popup-content img {
    margin-top: 10px;
    max-width: 100%; /* Begrenzung der maximalen Breite */
    height: auto; /* Automatische Höhe proportional zur Breite */
}

/* Schließen-Symbol */
.close {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 24px;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease, transform 0.2s ease;
}

.close:hover {
    color: #444;
    transform: rotate(90deg);
}

/* Animationen */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Flex-Container für die Header-Logos und Überschrift */
.header-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px; /* Abstand zwischen Logo und Überschrift */
    margin-bottom: 20px;
    position: relative;
}

/* Logos (links und rechts) */
.logo {
    height: 50px; /* Höhe der Logos anpassen */
    width: auto; /* Automatische Breite proportional zur Höhe */
    object-fit: contain;
    background: none; /* Kein Hintergrund */
}

/* Linkes Logo */
.left-logo {
    position: absolute;
    left: 0;
}

/* Rechtes Logo */
.right-logo {
    position: absolute;
    right: 0;
}

/* Überschrift bleibt mittig */
.header-container h1 {
    flex: 1; /* Nimmt den verbleibenden Platz ein */
    text-align: center;
    margin: 0; /* Entfernt unnötigen Abstand */
    font-size: 2.4em;
    color: #2c3e50;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* Aktionsbuttons */
.action-button {
    display: inline-block;
    width: 30px;
    height: 30px;
    margin: 0 2px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: #f0f0f0;
}

.edit-button {
    color: #3498db;
}

.delete-button {
    color: #e74c3c;
}

/* Begrenzung der Spaltenbreite */
td.school-column, th.school-column {
    max-width: 150px;
}

td.room-column, th.room-column {
    max-width: 100px;
}

td.date-column, th.date-column {
    max-width: 120px;
}

td.whiteboard-column, th.whiteboard-column {
    max-width: 100px;
}

td.auditor-column, th.auditor-column {
    max-width: 150px;
}

td.comment-column, th.comment-column {
    max-width: 200px;
    word-wrap: break-word;
    white-space: normal;
}

td.action-column, th.action-column {
    max-width: 70px;
    text-align: center;
}

/* Responsive Design für mobile Geräte */
@media (max-width: 960px) {
    td.school-column, th.school-column {
        max-width: 100px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.room-column, th.room-column {
        max-width: 50px;
    }

    td.date-column, th.date-column {
        max-width: 50px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.whiteboard-column, th.whiteboard-column {
        max-width: 100px;
    }

    td.auditor-column, th.auditor-column {
        max-width: 80px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.comment-column, th.comment-column {
        min-width: 250px;
        max-width: 350px;
    }
    td.action-column, th.action-column {
        max-width: 100px;
    }
    .logo {
        height: 40px; /* Höhe der Logos verkleinern */
    }

    .header-container {
        gap: 1px; /* Abstand zwischen Logo und Überschrift verkleinern */
    }

    /* Checkbox-Styling für mobile Geräte */
    input[type="checkbox"] {
        width: 20px; /* Breite der Checkbox */
        height: 20px; /* Höhe der Checkbox */
        cursor: pointer; /* Zeiger ändern */
        margin-right: 10px; /* Abstand zum Label */
    }

    /* Datei-Input-Styling für mobile Geräte */
    input[type="file"] {
        cursor: pointer; /* Zeiger ändern */
    }

    /* Buttons für mobile Geräte */
    button {
        display: block;
        width: 100%;
        background: linear-gradient(145deg, #3498db, #2980b9);
        color: #fff;
        border: none;
        padding: 14px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1em;
        font-weight: 600;
        text-transform: uppercase;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        touch-action: manipulation; /* Bessere Berührungsfläche */
    }

    button:hover {
        background: linear-gradient(145deg, #2980b9, #21618c);
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

    /* Popup-Buttons für mobile Geräte */
    .popup-content button {
        margin-top: 10px;
        padding: 14px 20px;
        border: none;
        background-color: #3498db;
        color: #fff;
        cursor: pointer;
        border-radius: 8px;
        font-size: 1.1em;
        font-weight: 600;
        text-transform: uppercase;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        touch-action: manipulation; /* Bessere Berührungsfläche */
    }

    .popup-content button:hover {
        background-color: #2980b9;
    }

           /* Verringern der Seitenabstände für kleinere mobile Geräte */
           body {
            padding: 25px 25px; /* Verringern der Seitenabstände */
            margin: 0; /* Entfernt den Abstand zum Browserrand */
        }
    
        .popup-content {
            padding: 15px; /* Verringern der Seitenabstände im Popup */
        }

        /* Sicherstellen, dass keine zusätzlichen Abstände vorhanden sind */
        #main {
            max-width: 100%; /* Volle Breite nutzen */
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .header-container {
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .logo {
            margin: 0; /* Kein Margin */
            padding: 0; /* Kein Padding */
            background: none; /* Kein Hintergrund */
        }
}

/* Responsive Design für mobile Geräte */
@media (max-width: 768px) {
    td.school-column, th.school-column {
        max-width: 100px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.room-column, th.room-column {
        max-width: 50px;
    }

    td.date-column, th.date-column {
        max-width: 50px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.whiteboard-column, th.whiteboard-column {
        max-width: 100px;
    }

    td.auditor-column, th.auditor-column {
        max-width: 80px;
        display: table-cell; /* Versteckt die Datumsspalte */
    }

    td.comment-column, th.comment-column {
        min-width: 250px;
        max-width: 350px;
    }
    td.action-column, th.action-column {
        max-width: 100px;
    }
    .logo {
        height: 40px; /* Höhe der Logos verkleinern */
    }

    .header-container {
        gap: 1px; /* Abstand zwischen Logo und Überschrift verkleinern */
    }

    /* Checkbox-Styling für mobile Geräte */
    input[type="checkbox"] {
        width: 20px; /* Breite der Checkbox */
        height: 20px; /* Höhe der Checkbox */
        cursor: pointer; /* Zeiger ändern */
        margin-right: 10px; /* Abstand zum Label */
    }

    /* Datei-Input-Styling für mobile Geräte */
    input[type="file"] {
        cursor: pointer; /* Zeiger ändern */
    }

    /* Buttons für mobile Geräte */
    button {
        display: block;
        width: 100%;
        background: linear-gradient(145deg, #3498db, #2980b9);
        color: #fff;
        border: none;
        padding: 14px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 1.1em;
        font-weight: 600;
        text-transform: uppercase;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        touch-action: manipulation; /* Bessere Berührungsfläche */
    }

    button:hover {
        background: linear-gradient(145deg, #2980b9, #21618c);
        transform: translateY(-3px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
    }

    /* Popup-Buttons für mobile Geräte */
    .popup-content button {
        margin-top: 10px;
        padding: 14px 20px;
        border: none;
        background-color: #3498db;
        color: #fff;
        cursor: pointer;
        border-radius: 8px;
        font-size: 1.1em;
        font-weight: 600;
        text-transform: uppercase;
        transition: all 0.3s ease;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
        touch-action: manipulation; /* Bessere Berührungsfläche */
    }

    .popup-content button:hover {
        background-color: #2980b9;
    }

           /* Verringern der Seitenabstände für kleinere mobile Geräte */
           body {
            padding: 15px 15px; /* Verringern der Seitenabstände */
            margin: 0; /* Entfernt den Abstand zum Browserrand */
        }
    
        .popup-content {
            padding: 15px; /* Verringern der Seitenabstände im Popup */
        }

        /* Sicherstellen, dass keine zusätzlichen Abstände vorhanden sind */
        #main {
            max-width: 100%; /* Volle Breite nutzen */
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .header-container {
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .logo {
            margin: 0; /* Kein Margin */
            padding: 0; /* Kein Padding */
            background: none; /* Kein Hintergrund */
        }
}

/* Responsive Design für mobile Geräte */
@media (max-width: 576px) {
    td.school-column, th.school-column {
        max-width: 100px;
        display: none; /* Versteckt die Datumsspalte */
    }

    td.room-column, th.room-column {
        max-width: 50px;
    }

    td.date-column, th.date-column {
        max-width: 50px;
        display: none; /* Versteckt die Datumsspalte */
    }

    td.whiteboard-column, th.whiteboard-column {
        max-width: 100px;
    }

    td.auditor-column, th.auditor-column {
        max-width: 80px;
        display: none; /* Versteckt die Datumsspalte */
    }

    td.comment-column, th.comment-column {
        min-width: 250px;
        max-width: 350px;
    }
    td.action-column, th.action-column {
        max-width: 100px;
    }
    .logo {
        height: 40px; /* Höhe der Logos verkleinern */
    }

    .header-container {
        gap: 1px; /* Abstand zwischen Logo und Überschrift verkleinern */
    }

        /* Checkbox-Styling für kleinere mobile Geräte */
        input[type="checkbox"] {
            width: 20px; /* Breite der Checkbox */
            height: 20px; /* Höhe der Checkbox */
            cursor: pointer; /* Zeiger ändern */
            margin-right: 10px; /* Abstand zum Label */
        }
    
        /* Datei-Input-Styling für kleinere mobile Geräte */
        input[type="file"] {
            cursor: pointer; /* Zeiger ändern */
        }
    
        /* Buttons für kleinere mobile Geräte */
        button {
            display: block;
            width: 100%;
            background: linear-gradient(145deg, #3498db, #2980b9);
            color: #fff;
            border: none;
            padding: 14px;
            border-radius: 8px;
            cursor: pointer;
            font-size: 1.1em;
            font-weight: 600;
            text-transform: uppercase;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            touch-action: manipulation; /* Bessere Berührungsfläche */
        }
    
        button:hover {
            background: linear-gradient(145deg, #2980b9, #21618c);
            transform: translateY(-3px);
            box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
        }
    
        /* Popup-Buttons für kleinere mobile Geräte */
        .popup-content button {
            margin-top: 10px;
            padding: 14px 20px;
            border: none;
            background-color: #3498db;
            color: #fff;
            cursor: pointer;
            border-radius: 8px;
            font-size: 1.1em;
            font-weight: 600;
            text-transform: uppercase;
            transition: all 0.3s ease;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
            touch-action: manipulation; /* Bessere Berührungsfläche */
        }
    
        .popup-content button:hover {
            background-color: #2980b9;
        }

        /* Verringern der Seitenabstände für kleinere mobile Geräte */
        body {
            padding: 15px 15px; /* Verringern der Seitenabstände */
            margin: 0; /* Entfernt den Abstand zum Browserrand */
        }
    
        .popup-content {
            padding: 15px; /* Verringern der Seitenabstände im Popup */
        }

        /* Sicherstellen, dass keine zusätzlichen Abstände vorhanden sind */
        #main {
            max-width: 100%; /* Volle Breite nutzen */
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .header-container {
            padding: 0; /* Kein Padding */
            margin: 0; /* Kein Margin */
        }

        .logo {
            margin: 0; /* Kein Margin */
            padding: 0; /* Kein Padding */
            background: none; /* Kein Hintergrund */
        }

}

/* Passwort-Popup */
.password-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 1); /* Weißer Hintergrund */
    justify-content: center;
    align-items: flex-start; /* Oben zentrieren */
    padding-top: 100px; /* Abstand von oben */
    z-index: 1000; /* Über allen anderen Elementen */
}

.password-popup-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.password-popup-content h2 {
    margin-top: 0;
}

.password-popup-content input {
    width: 100%;
    padding: 14px;
    margin-top: 10px;
    margin-bottom: 20px;
    border: 1px solid #d1d8e0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
    background: #ffffff;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.password-popup-content button {
    padding: 14px 20px;
    border: none;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.password-popup-content button:hover {
    background-color: #2980b9;
}

/* Bestätigungs-Popup */
#confirm-popup, #loading-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
    overflow: auto; /* Ermöglicht das Scrollen */
}

#confirm-popup .popup-content, #loading-popup .popup-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    animation: scaleIn 0.3s ease;
    text-align: center;
}

#confirm-popup .popup-content button, #loading-popup .popup-content button {
    margin-top: 10px;
    padding: 10px 20px;
    border: none;
    background-color: #3498db;
    color: #fff;
    cursor: pointer;
    border-radius: 4px;
}

#confirm-popup .popup-content button:hover, #loading-popup .popup-content button:hover {
    background-color: #2980b9;
}

/* Dark Mode */
@media (prefers-color-scheme: dark) {
    body {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    #main {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    h1 {
        color: #ffffff;
    }

    label {
        color: #b0b0b0;
    }

    input[type="text"], textarea, select, input[type="date"], input[type="file"] {
        background: #2e2e2e;
        color: #e0e0e0;
        border: 1px solid #444444;
    }

    input[type="text"]:focus, textarea:focus, select:focus, input[type="date"]:focus, input[type="file"]:focus {
        border-color: #3498db;
        box-shadow: 0 0 8px rgba(187, 134, 252, 0.3);
    }

    button {
        background: linear-gradient(145deg, #3498db, #2980b9);
        color: #fff;
    }

    button:hover {
        background: linear-gradient(145deg, #2980b9, #3498db);
    }

    table {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    table th, table td {
        color: #d2d5d8;
    }

    table th {
        background: linear-gradient(145deg, #3498db, #2980b9);
        color: #fff;
    }

    table tr:nth-child(even) {
        background-color: #2e2e2e;
    }

    table tr:hover {
        background-color: #3e3e3e;
    }

    .popup {
        background: rgba(0, 0, 0, 0.9);
    }

    .popup-content {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .popup-content button {
        background-color: #3498db;
    }

    .popup-content button:hover {
        background-color: #2980b9;
    }

    .close {
        color: #bbb;
    }

    .close:hover {
        color: #fff;
    }

    .password-popup {
        background: rgba(0, 0, 0, 0.9);
    }

    .password-popup-content {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    .password-popup-content button {
        background-color: #3498db;
    }

    .password-popup-content button:hover {
        background-color: #2980b9;
    }

    #confirm-popup .popup-content, #loading-popup .popup-content {
        background: #1e1e1e;
        color: #e0e0e0;
    }

    #confirm-popup .popup-content button, #loading-popup .popup-content button {
        background-color: #3498db;
    }

    #confirm-popup .popup-content button:hover, #loading-popup .popup-content button:hover {
        background-color: #2980b9;
    }

    /* Invertieren des Logos im Dark Mode */
    .right-logo {
        filter: invert(1);
    }
    /* Invertieren des rechten Logos im Dark Mode */
    .right-logo {
        filter: invert(1);
    }
}