/* Windows-Ã¤hnliches Design fÃ¼r Aufgabenmanagement */
/* Freundliche, runde und glÃ¤serne Fenster */
/* Farbschema angepasst an Frank Schmidt GmbH Logo */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 80px 20px 450px 20px; /* Standard Padding */
    /* Dezenter blauer Gradient */
    background: linear-gradient(135deg, #e8f4f8 0%, #d4e9f7 30%, #c8e3f5 60%, #f0f4f8 100%);
    color: #2c3e50;
    min-height: 100vh;
    position: relative;
}

/* Spezielle Styles für Dashboard-Ansicht (index.php) */
body.dashboard-view {
    padding: 150px 20px 450px 20px; /* Padding-top erhöht für Header + Controls */
    height: 100vh; /* Volle Höhe */
    overflow: hidden; /* Scrollen im Body verhindern */
    box-sizing: border-box;
}

/* Logo als deutlich sichtbarer Hintergrund */
body::before {
    content: '';
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background-image: url('logo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.25;
    z-index: 0;
    pointer-events: none;
}

/* Sicherstellen, dass Inhalte Ã¼ber dem Logo liegen */
body > * {
    position: relative;
    z-index: 1;
}

/* Login Container Styles */
.login-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.25);
    padding: 40px;
    width: 400px;
    max-width: 90%;
    text-align: center;
    transition: all 0.3s ease;
}

.login-container:hover {
    box-shadow: 0 12px 40px 0 rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.5);
}

.login-container h1 {
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 2em;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: #2c3e50;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
}

.login-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 15px;
    padding: 12px 30px;
    color: #ffffff;
    font-weight: bold;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    box-sizing: border-box;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.login-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.8);
}

.error {
    color: #e74c3c;
    margin-top: 15px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(255,255,255,0.5);
    background: rgba(231, 76, 60, 0.1);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(231, 76, 60, 0.3);
}

/* Uhr und Datum im Header */
.clock-display {
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    text-align: center;
    margin-right: 20px;
}

.clock-time {
    font-size: 1.5em;
    font-weight: bold;
    color: #ffffff;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    line-height: 1;
    margin-bottom: 2px;
}

.clock-date {
    font-size: 0.8em;
    color: #ffffff;
    font-weight: 500;
}

/* Header Styles */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #34495e 0%, #2c3e50 100%);
    color: #ffffff;
    padding: 10px 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    border: 2px solid rgba(52, 152, 219, 0.3);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.header-week-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.header h1 {
    margin: 0;
    flex: 1;
    text-align: center;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.3);
    font-size: clamp(1em, 1.6vw, 2em);
    white-space: nowrap;
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}

.logout-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    border: 2px solid rgba(52, 152, 219, 0.5);
}

.logout-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

/* Fixierte Controls Bar */
.controls-bar {
    position: fixed;
    top: 80px; /* Header Höhe + Padding */
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.8); /* Leicht transparent */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 20px;
    z-index: 900; /* Unter Header (1000), über Pools */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

#pools-container {
    position: absolute;
    top: 150px; /* Unter Controls */
    bottom: 86px; /* Abstand zur fixierten Fußzeile */
    left: 20px;
    right: 20px;
    display: flex;
    gap: 1vw; /* Lücke etwas verkleinern für mehr Platz */
    justify-content: space-between; /* Gleichmäßig verteilen */
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: auto;
    padding-bottom: 24px;
    align-items: stretch; /* Pools auf volle Höhe strecken */
}

#pools-container::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

#pools-container::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}

#pools-container::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.45);
    border-radius: 4px;
}

#pools-container::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.72);
}

.pool {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.2);
    padding: 15px; /* Padding etwas reduzieren */
    flex: 1; /* Nimmt verfügbaren Platz ein */
    min-width: 0; /* Erlaubt Schrumpfen unter Inhalt-Breite */
    display: flex;
    flex-direction: column;
    height: 100%; /* Volle Höhe des Containers */
    box-sizing: border-box;
    overflow: hidden; /* Pool selbst scrollt nicht */
    transition: all 0.3s ease;
}

.pool h2 {
    flex-shrink: 0; /* Header schrumpft nicht */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #2c3e50;
    border-bottom: 3px solid rgba(52, 152, 219, 0.5);
    padding-bottom: 8px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.1);
}

/* Buttons im Pool Header fixieren */
.pool .create-route-btn,
.pool .print-pool-btn,
.pool .table-view-btn {
    flex-shrink: 0;
    margin-bottom: 10px;
}

.pool:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(52, 152, 219, 0.35);
    border-color: rgba(52, 152, 219, 0.5);
}

.pool.pool-active-list {
    background: rgba(255, 255, 255, 0.8);
    border-style: solid;
    border-width: 1px;
    border-color: rgba(52, 152, 219, 0.28);
    box-shadow: 0 4px 16px rgba(52, 152, 219, 0.12);
    flex: 1.6;
}

.pool.pool-active-list:hover {
    transform: none;
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.16);
}

.pool.pool-active-list .task-list {
    display: grid;
    gap: 8px;
    padding-right: 0;
}

.pool.pool-active-list .active-inline-source-hidden {
    display: none !important;
}

.active-inline-table-container {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
    gap: 10px;
}

.active-inline-table-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.active-inline-search {
    width: min(420px, 100%);
    padding: 8px 10px;
    border: 1px solid rgba(52, 152, 219, 0.35);
    border-radius: 8px;
    background: #fff;
    color: #1f2d3a;
}

.active-inline-table-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    border: 1px solid rgba(52, 152, 219, 0.22);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.88);
}

.active-inline-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.active-inline-table th,
.active-inline-table td {
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
    padding: 8px 10px;
    text-align: left;
    vertical-align: top;
}

.active-inline-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #ecf4fb;
    color: #2b3e50;
    font-size: 0.84rem;
    letter-spacing: 0.01em;
}

.active-inline-title {
    font-weight: 700;
    color: #1f2d3a;
}

.active-inline-subtitle {
    font-size: 0.82rem;
    color: #4c6278;
    margin-top: 2px;
}

.active-inline-workspace-btn {
    border: 1px solid rgba(52, 152, 219, 0.5);
    background: linear-gradient(180deg, #3b82b5 0%, #2f6f9b 100%);
    color: #fff;
    border-radius: 7px;
    padding: 6px 10px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.82rem;
}

.active-inline-workspace-btn:hover {
    background: linear-gradient(180deg, #4f95c6 0%, #347caa 100%);
}

.task.task-company-hb {
    background: #fce7e7;
    color: #7f1d1d;
}

.task.task-active-row {
    background: #ffffff;
    border-left: 4px solid #3498db;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    margin-bottom: 0;
}

.task.task-active-row.task-company-hb {
    background: linear-gradient(135deg, #fef2f2 0%, #fecaca 100%);
    border-left-color: #b91c1c;
    box-shadow: 0 2px 8px rgba(185, 28, 28, 0.2);
}

.pool[data-pool="Aktive"] .task[data-company="HB"],
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-content,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-title,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-bezeichnung,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-assignee,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-address,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-created,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-confirmation,
.pool[data-pool="Aktive"] .task[data-company="HB"] .task-actions {
    background: #fee2e2 !important;
    color: #7f1d1d !important;
}

.pool[data-pool="Aktive"] .task[data-company="HB"] {
    border: 2px solid #dc2626 !important;
    border-left: 6px solid #b91c1c !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.5), 0 2px 10px rgba(220, 38, 38, 0.22) !important;
    outline: 2px solid #dc2626 !important;
    outline-offset: 1px !important;
}

.pool[data-pool="Aktive"] .task[data-company="HB"] .task-bezeichnung {
    background: linear-gradient(135deg, #fecaca 0%, #fda4af 100%) !important;
    color: #7f1d1d !important;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(185, 28, 28, 0.18);
    font-weight: 600;
}

.pool[data-pool="Aktive"] .task.task-company-hb .task-actions button {
    background: rgba(255,255,255,0.8) !important;
    color: #7f1d1d !important;
}

.task.task-active-row .task-content {
    display: grid;
    grid-template-columns: 2fr 1.2fr 1.4fr;
    gap: 8px 14px;
    align-items: start;
}

.task.task-active-row .task-title,
.task.task-active-row .task-bezeichnung {
    grid-column: 1;
}

.task.task-active-row .task-assignee,
.task.task-active-row .task-created,
.task.task-active-row .task-confirmation {
    grid-column: 2;
}

.task.task-active-row .task-address,
.task.task-active-row .task-datetime,
.task.task-active-row .task-duration {
    grid-column: 3;
}

.task.task-active-row .task-actions {
    margin-top: 8px;
    justify-content: flex-end;
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    visibility: visible !important;
    opacity: 1 !important;
}

.pool-manager-form {
    max-width: 760px;
}

.pool-manager-create-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
}

.pool-manager-list {
    display: grid;
    gap: 8px;
}

.pool-manager-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
}

.pool-manager-item span {
    font-weight: 600;
    color: #1f2937;
}

@media (max-width: 1200px) {
    .task.task-active-row .task-content {
        grid-template-columns: 1fr;
    }

    .task.task-active-row .task-title,
    .task.task-active-row .task-bezeichnung,
    .task.task-active-row .task-assignee,
    .task.task-active-row .task-created,
    .task.task-active-row .task-confirmation,
    .task.task-active-row .task-address,
    .task.task-active-row .task-datetime,
    .task.task-active-row .task-duration {
        grid-column: auto;
    }

    .pool-manager-create-row {
        grid-template-columns: 1fr;
    }
}

.pool h2 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #2c3e50;
    border-bottom: 3px solid rgba(52, 152, 219, 0.5);
    padding-bottom: 8px;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.1);
}

.task-list {
    flex: 1; /* Nimmt restlichen Platz ein */
    overflow-y: auto; /* Scrollt vertikal */
    min-height: 0; /* Firefox Fix */
    padding-right: 5px; /* Platz für Scrollbar */
}

/* Scrollbar Styling */
.task-list::-webkit-scrollbar {
    width: 8px;
}
.task-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}
.task-list::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 4px;
}
.task-list::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}

.task {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-left: 4px solid rgba(52, 152, 219, 0.6);
    border-radius: 10px;
    padding: 10px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.3s ease;
    color: #2c3e50;
    font-weight: 500;
}

.tasks-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.task-clickable {
    cursor: pointer;
}

.task-clickable:hover {
    transform: translateY(-2px) scale(1.01);
}

.empty-task-board {
    grid-column: 1 / -1;
    background: rgba(255, 255, 255, 0.7);
    border: 1px dashed rgba(52, 152, 219, 0.35);
    border-radius: 14px;
    padding: 22px;
    text-align: center;
    color: #5d6d7e;
    font-weight: 600;
}

.task:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.02);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border-left-color: rgba(52, 152, 219, 1);
}

.global-add-task-btn.is-active {
    background: linear-gradient(180deg, #2563eb 0%, #1e40af 100%);
    color: #fff;
}

.assignment-view-container {
    position: absolute;
    top: 150px;
    bottom: 86px;
    left: 20px;
    right: 20px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(52, 152, 219, 0.28);
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 10px 28px rgba(52, 152, 219, 0.2);
}

.mobile-only-assigned-tasks-btn {
    display: none;
}

.mobile-explorer-nav {
    display: none;
}

.mobile-landscape-explorer {
    display: none;
}

.assigned-tasks-mobile-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9900;
}

.assigned-tasks-mobile-backdrop.is-open {
    display: block;
}

.assigned-tasks-mobile-modal {
    display: none;
    position: fixed;
    inset: 0;
    margin: auto;
    width: min(92vw, 560px);
    max-height: min(84dvh, 760px);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.24);
    z-index: 9901;
    flex-direction: column;
    overflow: hidden;
}

.assigned-tasks-mobile-modal.is-open {
    display: flex;
}

@media (max-width: 768px) {
    .mobile-only-assigned-tasks-btn {
        display: inline-flex;
    }

    .mobile-explorer-nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding: 8px 0 10px;
        margin: 0 0 8px;
        position: sticky;
        top: 122px;
        z-index: 950;
        scrollbar-width: none;
    }

    .mobile-explorer-nav::-webkit-scrollbar {
        display: none;
    }

    .mobile-explorer-chip {
        flex: 0 0 auto;
        border: 1px solid rgba(37, 99, 235, 0.22);
        border-radius: 999px;
        padding: 8px 12px;
        background: rgba(255, 255, 255, 0.94);
        color: #0f172a;
        font-weight: 700;
        font-size: 0.9rem;
        box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
        white-space: nowrap;
    }

    .mobile-explorer-chip.is-active {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        color: #fff;
        border-color: rgba(52, 152, 219, 0.9);
    }

    .controls-bar {
        position: sticky;
        top: 86px;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        padding: 8px 10px;
    }

    .controls-bar::-webkit-scrollbar {
        display: none;
    }

    .controls-bar .global-add-task-btn,
    .controls-bar .admin-link,
    .controls-bar .manage-access-btn,
    .controls-bar .module-link {
        margin: 4px 6px 4px 0;
    }

    #pools-container {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding-bottom: 12px;
        overflow: visible;
    }

    .pool {
        width: 100%;
        max-width: 100%;
        border-radius: 16px;
        padding: 10px 12px;
        min-height: auto;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    }

    .pool h2 {
        position: relative;
        top: auto;
        background: transparent;
        padding: 0 0 8px;
        margin: 0 0 8px;
        border-bottom: 1px solid rgba(37, 99, 235, 0.16);
    }

    .task {
        padding: 8px 10px;
        border-radius: 12px;
    }

    .task-title {
        font-size: 0.95rem;
        line-height: 1.25;
    }

}

@media (max-width: 920px) and (orientation: landscape) {
    .mobile-explorer-nav {
        display: none;
    }

    .mobile-only-assigned-tasks-btn {
        display: none;
    }

    .mobile-landscape-explorer {
        display: grid;
        grid-template-columns: 120px minmax(0, 1fr);
        gap: 10px;
        padding: 8px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(52, 152, 219, 0.2);
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
        margin-bottom: 12px;
        min-height: calc(100dvh - 220px);
    }

    .mobile-landscape-sidebar {
        display: flex;
        flex-direction: column;
        gap: 8px;
        padding: 6px;
        border-right: 1px solid rgba(52, 152, 219, 0.16);
    }

    .mobile-landscape-nav-btn {
        border: 1px solid rgba(52, 152, 219, 0.2);
        background: #f8fbff;
        color: #0f172a;
        border-radius: 10px;
        padding: 8px 6px;
        font-size: 0.8rem;
        font-weight: 700;
        text-align: center;
    }

    .mobile-landscape-nav-btn.is-active {
        background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
        color: #fff;
        border-color: rgba(52, 152, 219, 0.9);
    }

    .mobile-landscape-content {
        min-width: 0;
        overflow: auto;
        padding: 4px 2px 2px;
    }

    .mobile-landscape-panel {
        display: none;
        height: 100%;
    }

    .mobile-landscape-panel.is-active {
        display: block;
    }

    .mobile-landscape-panel h3 {
        margin: 0 0 8px;
        color: #1f3f66;
        font-size: 1rem;
    }

    .mobile-landscape-panel-list {
        display: grid;
        gap: 8px;
    }

    .mobile-landscape-panel-card {
        display: grid;
        gap: 2px;
        padding: 8px 10px;
        background: rgba(248, 250, 252, 0.96);
        border: 1px solid rgba(52, 152, 219, 0.16);
        border-radius: 10px;
    }

    .mobile-landscape-panel-card strong {
        color: #0f172a;
        font-size: 0.9rem;
    }

    .mobile-landscape-panel-card span {
        color: #64748b;
        font-size: 0.82rem;
        line-height: 1.25;
    }

    .assigned-tasks-mobile-backdrop {
        display: none;
    }

    .assigned-tasks-mobile-modal {
        display: none;
    }
}

.assigned-tasks-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.assigned-tasks-mobile-header h3 {
    margin: 0;
    font-size: 1.02rem;
}

.assigned-tasks-mobile-content {
    padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
    overflow: auto;
    display: grid;
    gap: 10px;
}

.assigned-task-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(52, 152, 219, 0.22);
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.96);
}

.assigned-task-card-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.assigned-task-card-title {
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.assigned-task-card-bezeichnung {
    color: #475569;
    font-size: 0.95rem;
    line-height: 1.3;
}

.assigned-task-card-meta {
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.assigned-task-card .assigned-task-card-meta a,
.task-address a,
.assignment-task-address a {
    color: #0f766e;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1.5px;
    text-underline-offset: 2px;
}

.assigned-task-card .assigned-task-card-meta a:hover,
.task-address a:hover,
.assignment-task-address a:hover {
    color: #0f766e;
    text-decoration-thickness: 2px;
}

.task-address,
.assignment-task-address {
    margin-top: 2px;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(15, 118, 110, 0.08);
    border: 1px solid rgba(15, 118, 110, 0.18);
    color: #0f172a;
    font-size: 0.9rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.assigned-task-card-actions {
    display: flex;
    align-items: center;
}

.assignment-view-header h2 {
    margin: 0 0 6px;
    color: #1f3f66;
}

.assignment-view-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.assignment-close-btn {
    width: 36px;
    height: 36px;
}

.assignment-view-header p {
    margin: 0 0 14px;
    color: #46607f;
}

.assignment-view-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.assignment-week-label {
    font-weight: 700;
    color: #1f3f66;
    min-width: 130px;
    text-align: center;
}

.assignment-view-hint {
    margin: 0 0 12px;
    color: #46607f;
}

.assignment-week-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(220px, 1fr));
    gap: 12px;
}

.assignment-day-card {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 12px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.assignment-day-card h3 {
    margin: 0 0 10px;
    color: #1f3f66;
    display: flex;
    justify-content: space-between;
}

.assignment-empty {
    color: #60738c;
    font-style: italic;
}

.assignment-task-list {
    display: grid;
    gap: 8px;
}

.assignment-task-item {
    border: 1px solid rgba(52, 152, 219, 0.24);
    border-radius: 10px;
    background: #f9fcff;
    padding: 8px;
}

.assignment-task-title {
    font-weight: 700;
    color: #1f2d3a;
}

.assignment-task-desc,
.assignment-task-meta,
.assignment-task-colleagues {
    color: #3d4f65;
    font-size: 0.86rem;
    margin-top: 4px;
}

.assignment-task-item .active-inline-workspace-btn {
    margin-top: 8px;
}

.assignment-workspace-note {
    margin-top: 8px;
    font-size: 0.82rem;
    color: #9a3412;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 7px;
    padding: 5px 7px;
    display: inline-block;
}

@media (max-width: 1400px) {
    .assignment-week-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 900px) {
    .assignment-view-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .assignment-week-label {
        text-align: left;
    }

    .assignment-week-grid {
        grid-template-columns: repeat(1, minmax(220px, 1fr));
    }
}

@media (max-width: 700px) and (orientation: portrait) {
    .assignment-view-container {
        position: fixed;
        inset: 0;
        z-index: 15000;
        width: 100vw;
        height: 100dvh;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;
        margin: 0;
        border-radius: 0;
        border: none;
        box-shadow: none;
        background: #f5f9ff;
        -webkit-backdrop-filter: none;
        backdrop-filter: none;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 10px calc(10px + env(safe-area-inset-bottom, 0px));
        overflow: auto;
    }

    .assignment-view-header h2 {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .assignment-view-hint {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .assignment-week-label {
        font-size: 1rem;
        text-align: center;
        background: rgba(255, 255, 255, 0.85);
        border: 1px solid rgba(52, 152, 219, 0.24);
        border-radius: 8px;
        padding: 7px 10px;
    }

    .assignment-view-toolbar .table-view-btn {
        width: 100%;
        min-height: 42px;
        font-size: 0.92rem;
        line-height: 1.2;
    }

    .assignment-day-card {
        min-height: 0;
        padding: 10px;
    }

    .assignment-day-card h3 {
        font-size: 1rem;
    }

    .assignment-task-title {
        font-size: 0.98rem;
        line-height: 1.35;
    }

    .assignment-task-desc,
    .assignment-task-meta,
    .assignment-task-colleagues {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .assignment-task-item .active-inline-workspace-btn {
        width: 100%;
        min-height: 40px;
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .assignment-workspace-note {
        display: block;
        font-size: 0.88rem;
        line-height: 1.3;
        padding: 7px 8px;
    }
}

.task-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 10px;
    justify-content: flex-end;
}

.task-actions button,
.task-workspace-btn {
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.35);
    background: rgba(255, 255, 255, 0.92);
    cursor: pointer;
}

.task-workspace-btn {
    background: linear-gradient(135deg, #1abc9c 0%, #16a085 100%);
    color: #fff;
}

.workspace-hint {
    display: block;
    margin-top: 6px;
    color: #5d6d7e;
    font-size: 12px;
}

.workspace-checkbox-list {
    max-height: 280px;
    overflow: auto;
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.85);
    padding: 6px;
}

.workspace-checkbox-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.workspace-checkbox-item:hover {
    background: rgba(52, 152, 219, 0.08);
}

.workspace-checkbox-item input[type="checkbox"],
.form-group .workspace-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
    padding: 0;
    border: 1px solid rgba(52, 152, 219, 0.5);
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    cursor: pointer;
}

.workspace-select-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    border: 1px solid rgba(52, 152, 219, 0.22);
    background: rgba(255, 255, 255, 0.92);
    color: #2c3e50;
    cursor: pointer;
    margin-bottom: 6px;
    text-align: left;
}

.workspace-select-item:hover {
    background: rgba(52, 152, 219, 0.08);
}

.workspace-select-item.is-selected {
    border-color: rgba(26, 188, 156, 0.75);
    background: rgba(26, 188, 156, 0.12);
}

.workspace-select-check {
    width: 18px;
    min-width: 18px;
    height: 18px;
    border-radius: 4px;
    border: 1px solid rgba(52, 152, 219, 0.45);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    color: #16a085;
    background: #fff;
}

.task-workspace-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.72);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    padding: 20px;
}

.task-workspace-modal {
    width: min(1200px, 96vw);
    max-height: 92vh;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 22px;
    box-shadow: 0 24px 90px rgba(15, 23, 42, 0.38);
    display: flex;
    flex-direction: column;
}

.task-workspace-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.task-workspace-header h3 {
    margin: 0;
}

.workspace-close-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: none;
    background: rgba(15, 23, 42, 0.08);
    font-size: 24px;
    cursor: pointer;
}

.workspace-mode-buttons {
    display: flex;
    gap: 10px;
    padding: 0 24px 8px;
    flex-wrap: wrap;
}

.workspace-mode-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(248, 250, 252, 0.95);
    color: #1f2937;
    border-radius: 999px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-mode-btn.is-active {
    background: linear-gradient(135deg, #16a085 0%, #0f766e 100%);
    color: #fff;
    border-color: transparent;
}

.task-workspace-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    padding: 20px 24px 24px;
    overflow: auto;
}

.task-workspace-overview-body,
.task-workspace-section-body {
    grid-template-columns: 1fr;
}

.task-workspace-modal-detail {
    width: min(1100px, 96vw);
}

.task-workspace-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.workspace-back-btn,
.workspace-section-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-back-btn {
    background: rgba(15, 23, 42, 0.08);
    color: #1f2937;
}

.workspace-section-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(41, 128, 185, 0.24);
}

.workspace-start-card,
.workspace-section-panel,
.workspace-start-taskmeta {
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 20px;
    padding: 20px;
}

.workspace-start-card {
    display: grid;
    gap: 14px;
    align-content: start;
}

.workspace-start-actions {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.workspace-start-taskmeta {
    display: grid;
    gap: 12px;
}

.workspace-start-meta-item {
    display: grid;
    gap: 4px;
}

.workspace-start-meta-item strong,
.workspace-section-header h4 {
    margin: 0;
}

.workspace-section-header {
    display: grid;
    gap: 4px;
}

.workspace-section-header p {
    margin: 0;
    color: #4b5563;
}

.workspace-sort-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 6px;
}

.workspace-diary-export-date {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    border-radius: 999px;
    padding: 10px 14px;
    font: inherit;
    min-width: 170px;
}

.workspace-sort-btn {
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: #1f2937;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 700;
    cursor: pointer;
}

.workspace-sort-btn.is-active {
    background: linear-gradient(135deg, #16a085 0%, #0f766e 100%);
    color: #fff;
    border-color: transparent;
}

.workspace-chat-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(84px, 84px));
    gap: 8px;
    margin-top: 10px;
}

.workspace-chat-thumb {
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    width: 84px;
    height: 84px;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.workspace-chat-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.workspace-chat-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10020;
}

.workspace-chat-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.82);
}

.workspace-chat-lightbox-panel {
    position: absolute;
    inset: 20px;
    display: grid;
    grid-template-columns: 56px 1fr 56px;
    align-items: center;
    gap: 14px;
}

.workspace-chat-lightbox-figure {
    margin: 0;
    display: grid;
    gap: 10px;
    justify-items: center;
}

.workspace-chat-lightbox-figure img {
    max-width: min(92vw, 1100px);
    max-height: 78vh;
    object-fit: contain;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
    background: rgba(255, 255, 255, 0.04);
}

.workspace-chat-lightbox-figure figcaption {
    color: #fff;
    text-align: center;
    max-width: min(92vw, 1100px);
}

.workspace-chat-lightbox-close,
.workspace-chat-lightbox-nav {
    width: 56px;
    height: 56px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 28px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.25);
}

.workspace-chat-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 1;
}

@media (max-width: 900px) {
    .workspace-chat-lightbox-panel {
        inset: 12px;
        grid-template-columns: 44px 1fr 44px;
    }

    .workspace-chat-lightbox-close,
    .workspace-chat-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 24px;
    }
}

.workspace-column {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.workspace-form {
    display: grid;
    gap: 10px;
}

#workspace-todo-text {
    min-height: 48px;
    padding: 12px 14px;
    font-size: 17px;
    line-height: 1.3;
}

.workspace-diary-fields {
    display: none;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.workspace-signature-wrap {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    background: rgba(15, 23, 42, 0.03);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.workspace-signature-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}

.workspace-signature-card {
    display: grid;
    gap: 8px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.92);
}

.workspace-signature-card span {
    font-size: 13px;
    color: #334155;
}

.workspace-signature-canvas {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    border: 1px dashed rgba(15, 23, 42, 0.35);
    background: #ffffff;
    touch-action: none;
}

.workspace-signature-grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}

.workspace-signature-chip {
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.92);
    padding: 8px;
}

.workspace-signature-chip strong {
    display: block;
    font-size: 12px;
    margin-bottom: 6px;
    color: #334155;
}

.workspace-signature-chip img {
    width: 100%;
    height: 72px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #ffffff;
}

.photo-preview-list,
.workspace-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 10px;
}

.photo-preview-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 10px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.workspace-chat-photo-preview-list {
    grid-template-columns: repeat(auto-fill, minmax(44px, 44px));
    gap: 8px;
}

.workspace-chat-photo-preview-list .chat-photo-preview-item {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
    overflow: hidden;
    background: transparent;
    border: 1px solid rgba(15, 23, 42, 0.12);
}

.workspace-chat-photo-preview-list .chat-photo-preview-thumb {
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
}

.workspace-chat-photo-preview-list .chat-photo-preview-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.workspace-chat-photo-preview-list .chat-photo-preview-item .photo-remove-btn {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 16px;
    height: 16px;
    font-size: 11px;
    line-height: 1;
    background: rgba(17, 24, 39, 0.78);
    color: #fff;
}

.photo-remove-btn {
    border: none;
    background: rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    width: 24px;
    height: 24px;
    cursor: pointer;
}

.workspace-photo-grid img,
.workspace-entry .workspace-photo-grid img {
    width: 100%;
    height: 96px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.workspace-entry-meta {
    margin-top: 6px;
    font-size: 13px;
    color: #4b5563;
}

.workspace-inline-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.workspace-entry-list {
    display: grid;
    gap: 10px;
}

.workspace-checklist-log {
    margin-top: 8px;
    display: grid;
    gap: 4px;
    padding-top: 8px;
    border-top: 1px dashed rgba(15, 23, 42, 0.14);
    color: #4b5563;
    font-size: 12px;
}

.workspace-checklist-log-entry {
    line-height: 1.35;
}

.workspace-todo,
.workspace-checklist-item {
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 14px;
}

.workspace-checklist-group {
    display: grid;
    gap: 10px;
}

.workspace-checklist-group h5 {
    margin: 0;
    font-size: 14px;
    color: #0f172a;
}

.workspace-checklist-done-section {
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.88);
    padding: 10px;
}

.workspace-checklist-done-section summary {
    cursor: pointer;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
}

.workspace-checklist-done-section[open] summary {
    margin-bottom: 10px;
}

.workspace-todo-row,
.workspace-checklist-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.workspace-todo-done,
.workspace-checklist-item-done {
    opacity: 0.82;
    border-left: 4px solid #16a085;
}

.workspace-entry,
.workspace-document {
    background: rgba(248, 250, 252, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 16px;
    padding: 14px;
}

.workspace-entry-chat {
    border-left: 4px solid #16a085;
}

.workspace-entry-appointment {
    border-left: 4px solid #2980b9;
}

.workspace-entry-diary {
    border-left: 4px solid #d35400;
}

.workspace-entry strong,
.workspace-document strong {
    display: block;
    margin-bottom: 6px;
}

@media (max-width: 900px) {
    .task-workspace-overlay {
        padding: 0;
        align-items: stretch;
        justify-content: flex-start;
    }

    .task-workspace-modal {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        border-radius: 0;
    }

    .task-workspace-header {
        padding: 16px 16px 12px;
        gap: 10px;
        position: sticky;
        top: 0;
        z-index: 3;
        background: rgba(255, 255, 255, 0.98);
        flex-wrap: wrap;
    }

    .task-workspace-header h3 {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .task-workspace-header p {
        font-size: 0.92rem;
        line-height: 1.35;
    }

    .task-workspace-header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .task-workspace-body {
        grid-template-columns: 1fr;
        padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
    }

    .workspace-start-actions {
        grid-template-columns: 1fr;
    }

    .workspace-section-btn,
    .workspace-back-btn,
    .workspace-sort-btn,
    .workspace-diary-export-date,
    .workspace-form button,
    .workspace-form input,
    .workspace-form select,
    .workspace-form textarea {
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .workspace-section-btn,
    .workspace-back-btn {
        justify-content: center;
        text-align: center;
    }

    .workspace-sort-buttons {
        flex-direction: column;
    }

    .workspace-inline-fields {
        grid-template-columns: 1fr;
    }

    .workspace-signature-form-grid {
        grid-template-columns: 1fr;
    }

    .workspace-form {
        gap: 8px;
    }

    .workspace-form input,
    .workspace-form textarea,
    .workspace-form select,
    .workspace-form button,
    .workspace-signature-card button {
        min-height: 44px;
        font-size: 16px;
    }

    .workspace-section-panel,
    .workspace-start-card,
    .workspace-start-taskmeta,
    .workspace-entry,
    .workspace-document,
    .workspace-todo,
    .workspace-checklist-item {
        padding: 14px;
    }

    .workspace-chat-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
        gap: 6px;
    }

    .workspace-chat-thumb {
        width: 100%;
        height: auto;
        aspect-ratio: 1 / 1;
    }

    .workspace-photo-grid img,
    .workspace-entry .workspace-photo-grid img {
        height: 88px;
    }

    .workspace-entry,
    .workspace-document {
        overflow-wrap: anywhere;
    }
}

@media (max-width: 480px) {
    .task-workspace-header {
        padding: 14px 12px 10px;
    }

    .task-workspace-body {
        padding: 12px 12px calc(16px + env(safe-area-inset-bottom));
    }

    .workspace-section-header h4 {
        font-size: 1rem;
    }

    .workspace-section-header p,
    .workspace-entry-meta {
        font-size: 0.9rem;
    }
}

.task.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.05);
}

/* Button Styles */
.global-add-task-btn, .admin-link, .manage-access-btn, .module-link {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(52, 152, 219, 0.5);
    border-radius: 15px;
    padding: 10px 20px;
    margin: 10px 5px;
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.global-add-task-btn:hover, .admin-link:hover, .manage-access-btn:hover, .module-link:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    border-color: rgba(52, 152, 219, 0.8);
}

.delete-all-tasks-btn {
    background: linear-gradient(135deg, #c0392b 0%, #8b0000 100%);
    border: 2px solid rgba(192, 57, 43, 0.5);
    color: #ffffff;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px 20px;
    margin: 10px 5px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    display: inline-block;
    cursor: pointer;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.delete-all-tasks-btn:hover {
    background: linear-gradient(135deg, #8b0000 0%, #c0392b 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(192, 57, 43, 0.4);
}

.print-pool-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 2px solid rgba(52, 152, 219, 0.5);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.print-pool-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
}

.table-view-btn {
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    border: 2px solid rgba(155, 89, 182, 0.5);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    margin-left: 5px;
}

.table-view-btn:hover {
    background: linear-gradient(135deg, #8e44ad 0%, #9b59b6 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(155, 89, 182, 0.4);
}

/* Responsive Design - Comprehensive für alle Bildschirmgrößen */

/* 4K und große Monitore (über 1920px) */
@media (min-width: 1921px) {
    body {
        font-size: 1.1em;
        padding: 100px 25px 500px 25px;
    }

    .header h1 {
        font-size: 3em;
    }

    .pool {
        padding: 25px;
        min-height: 350px;
    }

    .task {
        padding: 12px;
        font-size: 1.1em;
    }

    #calendar-container {
        padding: 20px 25px;
        max-height: 450px;
    }

    .calendar-day {
        min-height: 140px;
        padding: 10px;
    }

    .calendar-day-number {
        font-size: 1.5em;
    }
}

/* Desktop (1201px - 1920px) */
@media (min-width: 1201px) and (max-width: 1920px) {
    /* Standardgrößen sind bereits optimiert */
}

/* Kleine Desktop / Große Tablets (1025px - 1200px) */
@media (min-width: 1025px) and (max-width: 1200px) {
    body {
        padding: 90px 20px 450px 20px;
    }

    .header h1 {
        font-size: 2.2em;
    }

    .pool {
        padding: 18px;
        min-height: 280px;
    }

    #calendar-container {
        max-height: 380px;
    }

    .calendar-day {
        min-height: 110px;
    }
}

/* iPad und mittlere Tablets (769px - 1024px) - Desktop-ähnliche Darstellung */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Minimale Anpassungen für iPad, ansonsten Desktop-ähnlich */
    body {
        padding: 80px 20px 450px 20px; /* Wie Desktop */
        font-size: 1em; /* Wie Desktop */
    }

    .header {
        padding: 10px 20px; /* Wie Desktop */
    }

    .header h1 {
        font-size: 2em; /* Wie Desktop */
    }

    #pools-container {
        gap: 2vw; /* Wie Desktop */
        padding-bottom: 20px; /* Wie Desktop */
    }

    .pool {
        padding: 20px; /* Wie Desktop */
        min-height: 300px; /* Wie Desktop */
        flex: 1;
    }

    .pool h2 {
        font-size: 1.2em; /* Wie Desktop */
        margin-bottom: 15px; /* Wie Desktop */
    }

    .task {
        padding: 10px; /* Wie Desktop */
        font-size: 1em; /* Wie Desktop */
    }

    /* Kalender wie Desktop: 7 Tage nebeneinander */
    #calendar-container {
        padding: 15px 20px; /* Wie Desktop */
        max-height: 420px; /* Wie Desktop */
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr); /* Wie Desktop bei >1400px */
        gap: 8px; /* Wie Desktop */
        padding: 25px 10px 0 10px; /* Wie Desktop */
    }

    .calendar-day {
        min-height: 120px; /* Wie Desktop */
        padding: 8px; /* Wie Desktop */
    }

    .calendar-day-number {
        font-size: 1.3em; /* Wie Desktop */
    }

    .calendar-task-badge {
        font-size: 0.75em; /* Wie Desktop */
        padding: 4px 8px; /* Wie Desktop */
    }

    .calendar-task-item {
        font-size: 0.7em; /* Wie Desktop */
        padding: 4px 6px; /* Wie Desktop */
    }

    .calendar-nav-btn {
        padding: 8px 16px; /* Wie Desktop */
        font-size: 1em; /* Wie Desktop */
    }

    .calendar-title {
        font-size: 1.1em; /* Wie Desktop */
    }
}

/* Kleine Tablets und große Smartphones (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
    body {
        padding: 70px 10px 350px 10px;
        font-size: 0.9em;
    }

    body.dashboard-view {
        padding: 140px 10px 350px 10px; /* Angepasst für Controls */
        overflow: auto; /* Auf Mobile wieder scrollen erlauben */
        height: auto;
    }

    .controls-bar {
        top: 70px; /* Angepasst an Header */
        padding: 5px 10px;
    }

    .header {
        padding: 6px 10px;
    }

    .header h1 {
        font-size: 1.5em;
    }

    .clock-display {
        margin-right: 15px;
    }

    .clock-time {
        font-size: 1.2em;
    }

    #pools-container {
        position: static; /* Reset fixed position */
        height: auto;
        flex-direction: column;
        align-items: center;
        gap: 15px;
        padding-bottom: 15px;
        overflow: visible;
    }

    .pool {
        width: 100%;
        max-width: 100%;
        padding: 12px;
        min-height: 200px;
        height: auto; /* Reset height */
        overflow: visible;
    }
    
    .pool h2 {
        position: sticky;
        top: 120px; /* Unter Controls Bar */
        background: rgba(255, 255, 255, 0.9);
        z-index: 10;
        padding: 10px 0;
        margin-top: -10px; /* Ausgleich für Padding */
        border-radius: 10px 10px 0 0;
    }

    .task-list {
        overflow: visible;
        height: auto;
    }

    .pool h2 {
        font-size: 1em;
        margin-bottom: 10px;
    }

    .task {
        padding: 8px;
        font-size: 0.9em;
    }

    /* Kalender für kleine Tablets: 7 Tage */
    #calendar-container {
        padding: 10px;
        max-height: 320px;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 5px;
        padding: 15px 5px 0 5px;
    }

    .calendar-day {
        min-height: 90px;
        padding: 5px;
    }

    .calendar-day-number {
        font-size: 1.1em;
    }

    .calendar-task-badge {
        font-size: 0.65em;
        padding: 3px 5px;
    }

    .calendar-task-item {
        font-size: 0.6em;
        padding: 3px 4px;
    }

    .calendar-nav-btn {
        padding: 5px 10px;
        font-size: 0.85em;
    }

    .calendar-title {
        font-size: 0.9em;
    }
}

/* Smartphones (bis 480px) */
@media (max-width: 480px) {
    body {
        padding: 60px 8px 300px 8px;
        font-size: 0.85em;
    }

    body.dashboard-view {
        padding: 130px 8px 300px 8px; /* Angepasst */
        overflow: auto;
        height: auto;
    }

    .controls-bar {
        top: 80px; /* Header ist höher auf Mobile wegen Umbruch */
        padding: 5px 8px;
    }

    .header {
        padding: 5px 8px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .header-left {
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .header-week-nav {
        width: 100%;
        gap: 6px;
    }

    .header h1 {
        font-size: 1.3em;
        margin-bottom: 0;
    }

    .user-info {
        margin-top: 5px;
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .clock-display {
        margin-right: 0;
        margin-bottom: 0;
    }

    .clock-time {
        font-size: 1em;
    }

    .logout-btn {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    #pools-container {
        position: static;
        height: auto;
        flex-direction: column;
        align-items: center;
        gap: 12px;
        padding-bottom: 12px;
        overflow: visible;
    }

    .pool {
        width: 100%;
        max-width: 100%;
        padding: 10px;
        min-height: 180px;
        height: auto;
        overflow: visible;
    }

    .pool h2 {
        position: sticky;
        top: 130px; /* Unter Controls Bar */
        background: rgba(255, 255, 255, 0.9);
        z-index: 10;
        padding: 10px 0;
        margin-top: -10px;
        border-radius: 10px 10px 0 0;
    }

    .task-list {
        overflow: visible;
        height: auto;
    }

    .pool h2 {
        font-size: 0.95em;
        margin-bottom: 8px;
    }

    .task {
        padding: 6px;
        font-size: 0.85em;
    }

    /* Kalender für Smartphones: 7 Tage, kompakt */
    #calendar-container {
        padding: 8px;
        max-height: 280px;
    }

    .calendar-grid {
        grid-template-columns: repeat(7, 1fr);
        gap: 3px;
        padding: 10px 3px 0 3px;
    }

    .calendar-day {
        min-height: 70px;
        padding: 4px;
    }

    .calendar-day-number {
        font-size: 1em;
    }

    .calendar-task-badge {
        font-size: 0.6em;
        padding: 2px 4px;
    }

    .calendar-task-item {
        font-size: 0.55em;
        padding: 2px 3px;
    }

    .calendar-nav-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .calendar-title {
        font-size: 0.85em;
    }

    .calendar-nav-group {
        gap: 3px;
    }

    /* Modals für kleine Bildschirme anpassen */
    .calendar-modal {
        min-width: 95%;
        padding: 15px;
        max-height: 80vh;
        overflow-y: auto;
    }

    .calendar-modal h3 {
        font-size: 1.2em;
    }

    .form-group input,
    .form-group textarea {
        font-size: 0.9em;
    }

    .btn-primary,
    .btn-secondary {
        padding: 8px 16px;
        font-size: 0.9em;
    }
}

/* Dark mode support fÃ¼r moderne Betriebssysteme */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a1a1a 0%, #2c3e50 50%, #1a1a1a 100%);
        color: #ecf0f1;
    }

    body::before {
        opacity: 0.15;
    }

    .pool {
        background: rgba(44, 62, 80, 0.6);
        border-color: rgba(52, 152, 219, 0.4);
        color: #ecf0f1;
    }

    .pool h2 {
        color: #ecf0f1;
        border-bottom-color: rgba(52, 152, 219, 0.6);
    }

    .task {
        background: rgba(52, 73, 94, 0.6);
        border-color: rgba(52, 152, 219, 0.3);
        border-left-color: rgba(52, 152, 219, 0.7);
        color: #ecf0f1;
    }

    .task:hover {
        background: rgba(52, 73, 94, 0.8);
        border-left-color: rgba(52, 152, 219, 1);
    }

    .login-container {
        background: rgba(44, 62, 80, 0.6);
        border-color: rgba(52, 152, 219, 0.4);
    }

    .login-container h1 {
        color: #ecf0f1;
    }

    .form-group label {
        color: #ecf0f1;
    }

    .form-group input {
        background: rgba(52, 73, 94, 0.6);
        color: #ecf0f1;
        border-color: rgba(52, 152, 219, 0.3);
    }

    .form-group input:focus {
        background: rgba(52, 73, 94, 0.8);
    }
}

/* Footer Styles */
.footer {
    position: fixed;
    bottom: 10px;
    left: 10px;
    font-size: 0.8em;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    z-index: 1000;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.4);
    padding: 5px 10px;
    border-radius: 8px;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(52, 152, 219, 0.2);
}

.floating-backup-actions {
    position: fixed !important;
    right: 18px !important;
    bottom: 18px !important;
    z-index: 12050 !important;
    display: flex !important;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    max-width: min(92vw, 560px);
    pointer-events: auto;
}

.floating-backup-actions .btn {
    white-space: nowrap;
}

.backup-status-message {
    position: fixed !important;
    right: 18px !important;
    bottom: 74px !important;
    z-index: 12050 !important;
    max-width: min(92vw, 560px);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(52, 152, 219, 0.25);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    font-weight: 600;
}

.backup-hint-message {
    position: fixed !important;
    right: 18px !important;
    bottom: 124px !important;
    z-index: 12050 !important;
    max-width: min(92vw, 560px);
    background: rgba(255, 248, 230, 0.96);
    border: 1px solid rgba(221, 156, 44, 0.45);
    border-radius: 10px;
    padding: 8px 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    color: #7a4b00;
    font-size: 0.9rem;
    line-height: 1.35;
    font-weight: 600;
}

@media (max-width: 900px) {
    .floating-backup-actions {
        left: 12px;
        right: 12px;
        bottom: 12px;
        max-width: none;
        justify-content: stretch;
    }

    .floating-backup-actions .btn {
        flex: 1 1 calc(50% - 6px);
        min-width: 180px;
    }

    .backup-status-message {
        left: 12px;
        right: 12px;
        bottom: 66px;
        max-width: none;
    }

    .backup-hint-message {
        left: 12px;
        right: 12px;
        bottom: 112px;
        max-width: none;
    }
}

@media (max-width: 560px) {
    .floating-backup-actions .btn {
        flex: 1 1 100%;
        min-width: 0;
    }

    .backup-status-message {
        bottom: 108px;
    }

    .backup-hint-message {
        bottom: 164px;
    }
}

/* Print Preview Modal Styles */
.print-preview-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.print-preview-content {
    background-color: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    min-width: 600px;
    max-width: 1050px;
    max-height: 720px;
    overflow-y: auto;
    font-size: 12px;
}

.print-preview-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.print-table-container {
    margin-bottom: 20px;
}

.print-table {
    width: 100%;
    border-collapse: collapse;
}

.print-table th, .print-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
}

.print-table th {
    background-color: #3498db;
    color: #ffffff;
}

.print-table tr:nth-child(even) {
    background-color: rgba(52, 152, 219, 0.05);
}

/* Spaltenbreiten fÃ¼r Drucktabelle */
.print-table th:first-child, .print-table td:first-child {
    width: auto;
    white-space: nowrap;
    text-align: left;
}
.print-table th:nth-child(2), .print-table td:nth-child(2) {
    width: 200px;
}
.print-table th:nth-child(n+3), .print-table td:nth-child(n+3) {
    width: 100px;
    text-align: center;
}
.print-table td {
    word-wrap: break-word;
    white-space: normal;
}

.print-modal-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.print-modal-buttons button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-family: inherit;
}

.print-modal-buttons button:first-child {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.print-modal-buttons button:first-child:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
}

.print-modal-buttons button:last-child {
    background-color: #95a5a6;
    color: white;
}

/* Print Styles */
@media print {
    @page {
        size: portrait;
        margin: 1cm;
    }
    body * {
        visibility: hidden;
    }
    .print-preview-content,
    .print-preview-content * {
        visibility: visible;
    }
    .print-preview-modal {
        position: static;
        background: none;
        display: block;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0;
    }
    .print-preview-content {
        position: static;
        background: white;
        box-shadow: none;
        border: none;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        page-break-inside: avoid;
        page-break-after: avoid;
    }
    .print-table {
        font-size: 12px;
        width: 100%;
        table-layout: auto;
        page-break-inside: auto;
    }
    .print-table th, .print-table td {
        padding: 1px 2px;
    }
    .print-modal-buttons {
        display: none;
    }
    /* Footer nach der Tabelle */
    .print-footer {
        position: relative;
        margin-top: 20px;
        font-size: 12px;
        color: #666;
        font-family: Arial, sans-serif;
        text-align: center;
    }
}

/* ============================================
   KALENDER STYLES - Fix am unteren Bildschirmrand
   ============================================ */

#calendar-container {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 2px solid rgba(52, 152, 219, 0.3);
    border-radius: 15px 15px 0 0;
    box-shadow: 0 -4px 20px rgba(52, 152, 219, 0.2);
    z-index: 1001;
    padding: 15px 20px;
    height: auto;
    overflow: hidden;
    max-height: 420px;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 0 10px;
}

.calendar-nav-group {
    display: flex;
    gap: 5px;
    align-items: center;
}

.calendar-title {
    font-size: 1.1em;
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.1);
}

.calendar-nav-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 2px solid rgba(52, 152, 219, 0.5);
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.calendar-nav-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.calendar-nav-btn-small {
    padding: 8px 12px;
    font-size: 0.9em;
}

.calendar-nav-btn-today {
    padding: 8px 24px;
}

.calendar-grid-container {
    overflow-x: hidden;
    cursor: grab;
}

.calendar-grid-container:active {
    cursor: grabbing;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(14, 1fr);
    gap: 8px;
    padding: 25px 10px 0 10px; /* Platz fÃ¼r KW-Anzeige oben */
}

.calendar-day {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    padding: 8px;
    min-height: 120px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    position: relative;
}

.calendar-week-number {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 3px 10px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
    white-space: nowrap;
    z-index: 10;
}

.calendar-day:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.6);
}

.calendar-day.today {
    background: rgba(52, 152, 219, 0.15);
    border: 2px solid rgba(52, 152, 219, 0.6);
    border-left: 4px solid rgba(52, 152, 219, 1);
}

.calendar-day.weekend {
    background: rgba(149, 165, 166, 0.1);
}

.calendar-day.holiday {
    background: rgba(231, 76, 60, 0.1);
    border-color: rgba(231, 76, 60, 0.4);
}

.calendar-day.holiday.today {
    background: rgba(231, 76, 60, 0.2);
    border-color: rgba(231, 76, 60, 0.6);
}

.calendar-holiday-badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 1.2em;
    z-index: 5;
}

.calendar-holiday-name {
    font-size: 0.65em;
    color: #e74c3c;
    font-weight: bold;
    text-align: center;
    margin-top: 2px;
}

.calendar-day-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
}

.calendar-day-name {
    font-size: 0.75em;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: bold;
}

.calendar-day-number {
    font-size: 1.3em;
    font-weight: bold;
    color: #2c3e50;
}

.calendar-day-month {
    font-size: 0.7em;
    color: #95a5a6;
}

.calendar-day-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.calendar-day-empty {
    text-align: center;
    color: #95a5a6;
    font-size: 0.75em;
    padding: 10px 5px;
    font-style: italic;
}

.calendar-task-badge {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 0.75em;
    font-weight: bold;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.3);
}

.calendar-task-badge:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(52, 152, 219, 0.5);
}

.calendar-task-preview {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.calendar-task-item {
    background: rgba(52, 152, 219, 0.1);
    border-left: 3px solid rgba(52, 152, 219, 0.6);
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.7em;
    color: #2c3e50;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.calendar-task-item:hover {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: rgba(52, 152, 219, 1);
}

.calendar-task-more {
    font-size: 0.7em;
    color: #7f8c8d;
    text-align: center;
    font-style: italic;
    padding: 2px;
}

.calendar-other-users {
    font-size: 0.65em;
    color: #e74c3c;
    text-align: center;
    font-weight: bold;
    padding: 3px 2px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 4px;
    margin-top: 3px;
}

.user-indicator {
    display: inline-block;
    padding: 2px 4px;
    margin: 0 2px;
    border-radius: 3px;
    color: #ffffff;
    font-weight: bold;
    font-size: 0.6em;
}

/* Kalender Modal Styles */

.calendar-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

.calendar-modal {
    position: fixed;
    bottom: 420px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.25);
    padding: 30px;
    min-width: 400px;
    max-width: 600px;
    height: auto;
    max-height: calc(210px + 6cm);
    overflow: auto;
}

.calendar-modal-large {
    min-width: 600px;
    max-width: 800px;
}

.calendar-modal h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    font-size: 1.5em;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.calendar-modal .form-group {
    margin-bottom: 20px;
}

.calendar-modal .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #2c3e50;
}

.calendar-modal .form-group input,
.calendar-modal .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.7);
    color: #2c3e50;
    font-size: 1em;
    box-sizing: border-box;
    transition: all 0.3s ease;
    font-family: inherit;
}

.calendar-modal .form-group input:focus,
.calendar-modal .form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(52, 152, 219, 0.6);
    box-shadow: 0 0 15px rgba(52, 152, 219, 0.3);
}

.calendar-modal .form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.calendar-modal .form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

.calendar-route-section {
    text-align: center;
    margin: 20px 0;
}

.btn-route {
    background-color: #e67e22;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 1em;
    transition: background-color 0.2s;
}

.btn-route:hover {
    background-color: #d35400;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    border: 2px solid rgba(52, 152, 219, 0.5);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: rgba(149, 165, 166, 0.8);
    border: 2px solid rgba(127, 140, 141, 0.5);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background: rgba(127, 140, 141, 0.9);
    transform: translateY(-2px);
}

.btn-icon {
    background: transparent;
    border: none;
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    transform: scale(1.2);
}

/* Kalender Task List Styles */

.calendar-task-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    max-height: 400px;
    overflow-y: auto;
}

.calendar-task-list-item {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-left: 4px solid rgba(52, 152, 219, 0.6);
    border-radius: 10px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
}

.calendar-task-list-item:hover {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(52, 152, 219, 0.4);
    border-left-color: rgba(52, 152, 219, 1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.calendar-task-list-content {
    display: flex;
    gap: 15px;
    flex: 1;
}

.calendar-task-list-time {
    font-size: 1.2em;
    font-weight: bold;
    color: #3498db;
    min-width: 60px;
}

.calendar-task-list-details {
    flex: 1;
}

.calendar-task-list-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.calendar-task-list-desc {
    font-size: 0.9em;
    color: #7f8c8d;
    margin-bottom: 3px;
}

.calendar-task-list-address {
    font-size: 0.85em;
    color: #3498db;
}

.calendar-task-list-actions {
    display: flex;
    gap: 5px;
}

/* Responsive Design fÃ¼r Kalender - 14 Tage auf allen Bildschirmen */

@media (max-width: 1400px) {
    #calendar-container {
        max-height: 320px;
    }

    body {
        padding-bottom: 480px;
    }
}

@media (max-width: 768px) {
    .calendar-grid {
        gap: 3px;
    }

    .calendar-day {
        min-height: 80px;
        padding: 4px;
    }

    .calendar-day-number {
        font-size: 1em;
    }

    .calendar-task-badge {
        font-size: 0.6em;
        padding: 2px 4px;
    }

    .calendar-task-item {
        font-size: 0.55em;
        padding: 2px 3px;
    }

    .calendar-nav-btn {
        padding: 4px 8px;
        font-size: 0.8em;
    }

    .calendar-title {
        font-size: 0.85em;
    }

    #calendar-container {
        padding: 8px;
        max-height: 280px;
    }

    .calendar-modal {
        min-width: 90%;
        padding: 20px;
    }

    body {
        padding-bottom: 450px;
    }
}

/* Benutzer-Legende */
.calendar-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.user-legend {
    display: flex;
    gap: 15px;
    align-items: center;
    flex-wrap: wrap;
}

.legend-title {
    font-weight: bold;
    color: #2c3e50;
    margin-right: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85em;
    color: #2c3e50;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

/* Benutzer-Zuweisung im Modal */
.user-assignment-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 8px;
}

.user-checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-checkbox-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.user-checkbox-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.user-color-indicator {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    border: 2px solid rgba(255, 255, 255, 0.8);
}

/* Benachrichtigungen */
.calendar-notifications {
    margin-bottom: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    border-radius: 10px;
    border-left: 4px solid;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideIn 0.3s ease;
}

.notification-urgent {
    background: rgba(231, 76, 60, 0.15);
    border-left-color: #e74c3c;
    animation: pulse 2s infinite;
}

.notification-warning {
    background: rgba(243, 156, 18, 0.15);
    border-left-color: #f39c12;
    animation: pulse 3s infinite;
}

.notification-info {
    background: rgba(52, 152, 219, 0.15);
    border-left-color: #3498db;
}

.notification-time {
    font-weight: bold;
    font-size: 0.9em;
    min-width: 120px;
}

.notification-title {
    flex: 1;
    font-size: 0.9em;
}

.notification-close {
    background: transparent;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #7f8c8d;
    transition: all 0.2s ease;
}

.notification-close:hover {
    color: #2c3e50;
    transform: scale(1.2);
}

/* Termin-Dringlichkeit Klassen */
.task-past {
    opacity: 0.6;
    text-decoration: line-through;
}

.task-urgent-1h {
    animation: pulse 1.5s infinite;
    background: rgba(231, 76, 60, 0.2) !important;
    border-left-color: #e74c3c !important;
    font-weight: bold;
}

.task-urgent-6h {
    animation: pulse 2.5s infinite;
    background: rgba(243, 156, 18, 0.2) !important;
    border-left-color: #f39c12 !important;
}

.task-upcoming-24h {
    background: rgba(241, 196, 15, 0.15) !important;
    border-left-color: #f1c40f !important;
}

/* Pulsier-Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 0 15px 5px rgba(231, 76, 60, 0);
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Benutzer-Info in Task-Liste */
.calendar-task-list-users {
    font-size: 0.8em;
    color: #7f8c8d;
    margin-top: 5px;
    font-style: italic;
}

/* Dark Mode Support fÃ¼r Kalender */
@media (prefers-color-scheme: dark) {
    #calendar-container {
        background: rgba(44, 62, 80, 0.6);
        border-top-color: rgba(52, 152, 219, 0.4);
    }
    
    .calendar-title {
        color: #ecf0f1;
    }
    
    .calendar-day {
        background: rgba(52, 73, 94, 0.6);
        border-color: rgba(52, 152, 219, 0.3);
        color: #ecf0f1;
    }
    
    .calendar-day:hover {
        background: rgba(52, 73, 94, 0.8);
    }
    
    .calendar-day.today {
        background: rgba(52, 152, 219, 0.25);
    }
    
    .calendar-day-number {
        color: #ecf0f1;
    }
    
    .calendar-task-item {
        background: rgba(52, 152, 219, 0.2);
        color: #ecf0f1;
    }
    
    .calendar-modal {
        background: rgba(44, 62, 80, 0.95);
    }
    
    .calendar-modal h3 {
        color: #ecf0f1;
    }
    
    .calendar-modal .form-group label {
        color: #ecf0f1;
    }
    
    .calendar-modal .form-group input,
    .calendar-modal .form-group textarea {
        background: rgba(52, 73, 94, 0.6);
        color: #ecf0f1;
        border-color: rgba(52, 152, 219, 0.3);
    }
    
    .calendar-task-list-item {
        background: rgba(52, 73, 94, 0.6);
        color: #ecf0f1;
    }
    
    .calendar-task-list-title {
        color: #ecf0f1;
    }
    
    .legend-title,
    .legend-item {
        color: #ecf0f1;
    }
    
    .user-assignment-list {
        background: rgba(52, 73, 94, 0.3);
    }
}

/* ============================================
   ADMIN STYLES - Konsistente Gestaltung
   ============================================ */

.admin-section {
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.2);
    padding: 20px;
    margin: 20px 0;
    transition: all 0.3s ease;
}

.admin-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.admin-switcher {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin: 18px 0 8px;
}

.admin-switch-btn {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.85) 0%, rgba(235, 245, 255, 0.92) 100%);
    border: 2px solid rgba(52, 152, 219, 0.25);
    color: #2c3e50;
    border-radius: 16px;
    padding: 12px 18px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(52, 152, 219, 0.12);
}

.admin-switch-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(52, 152, 219, 0.55);
    box-shadow: 0 8px 22px rgba(52, 152, 219, 0.18);
}

.admin-switch-btn.active {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    border-color: rgba(52, 152, 219, 0.75);
}

.admin-panel {
    display: none;
}

.admin-panel.active {
    display: block;
}

.admin-modal .modal-content {
    width: min(96vw, 1200px);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content.admin-modal-medium {
    max-width: 760px;
}

.modal-content.admin-modal-wide {
    max-width: 1180px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
}

.modal-header h3 {
    margin: 0;
}

.modal-close-btn {
    background: rgba(52, 152, 219, 0.1);
    border: 1px solid rgba(52, 152, 219, 0.25);
    color: #2c3e50;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    font-weight: bold;
    transition: all 0.25s ease;
    flex: 0 0 auto;
}

.modal-close-btn:hover {
    background: rgba(52, 152, 219, 0.18);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.permission-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(52, 152, 219, 0.18);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.25s ease;
    color: #2c3e50;
}

.permission-item:hover {
    background: rgba(255, 255, 255, 0.78);
    border-color: rgba(52, 152, 219, 0.4);
    transform: translateY(-1px);
}

.permission-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #2980b9;
    flex: 0 0 auto;
}

.edit-user-summary {
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 14px;
    padding: 14px 16px;
    margin-bottom: 16px;
    color: #2c3e50;
    line-height: 1.5;
}

.edit-user-summary strong {
    color: #2980b9;
}

.edit-user-summary span {
    display: inline-block;
    margin-top: 3px;
}

.admin-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    border-bottom: 3px solid rgba(52, 152, 219, 0.5);
    padding-bottom: 8px;
    font-weight: bold;
}

.user-list {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
    padding: 15px;
    margin: 15px 0;
    transition: all 0.3s ease;
}

.user-list:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(52, 152, 219, 0.4);
}

.user-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5px;
    border-bottom: 2px solid rgba(52, 152, 219, 0.1);
    transition: all 0.3s ease;
}

.user-item:hover {
    background: rgba(52, 152, 219, 0.05);
    border-radius: 8px;
}

.user-item:last-child {
    border-bottom: none;
}

.user-info {
    flex-grow: 1;
    color: #2c3e50;
}

.user-info strong {
    color: #2980b9;
    font-weight: bold;
}

.user-info small {
    display: block;
    color: #7f8c8d;
    margin-top: 2px;
}

.user-actions {
    display: flex;
    gap: 5px;
    align-items: center;
}

.user-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.user-actions button:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
}

.pool-management {
    margin-top: 20px;
}

.pool-management h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1em;
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.1);
}

.pool-access-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.pool-access-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 1px solid rgba(52, 152, 219, 0.2);
    transition: all 0.3s ease;
}

.pool-access-item:hover {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(52, 152, 219, 0.4);
}

.pool-access-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3498db;
}

.pool-access-item label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
    color: #2c3e50;
}

.pool-access-item strong {
    color: #2980b9;
}

/* ============================================
   WOCHENPLANUNGSMODUL STYLES
   ============================================ */

.weekly-planning {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.planning-table-container {
    flex: 1;
    overflow-x: auto;
    min-width: 0;
}

.planning-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.2);
    overflow: hidden;
}

.planning-table th {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 8px 6px;
    text-align: center;
    font-weight: bold;
    font-size: 0.86rem;
    line-height: 1.2;
    border: 1px solid rgba(52, 152, 219, 0.3);
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
}

.planning-table th.holiday {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Week Navigation */
.week-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.2);
}

.week-navigation span {
    font-weight: bold;
    color: #2c3e50;
    text-shadow: 0 1px 2px rgba(52, 152, 219, 0.1);
}

.nav-btn {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s ease;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    border: 2px solid rgba(52, 152, 219, 0.5);
}

.nav-btn:hover {
    background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.4);
}

.planning-table th:first-child {
    width: 20%;
}

.planning-table th:nth-child(n+2) {
    width: 16%;
}

.planning-table td {
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 6px 7px;
    font-size: 0.84rem;
    line-height: 1.2;
    vertical-align: top;
}

.task-cell {
    background: rgba(52, 152, 219, 0.05);
    font-weight: bold;
    width: fit-content;
}

.task-info {
    color: #2c3e50;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 6px;
}

.task-main-content {
    flex: 1;
    min-width: 0;
}

.task-main-content strong {
    display: block;
    font-size: 0.9rem;
    line-height: 1.15;
    margin-bottom: 2px;
}

.task-main-content small {
    font-size: 0.76rem;
    line-height: 1.2;
}

.task-row-actions-right {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: space-between;
    gap: 6px;
    margin-left: 8px;
    flex-shrink: 0;
    min-height: 38px;
}

.task-row-actions-right .weekly-row-drag-handle {
    align-self: flex-end;
}

.task-row-actions-right .delete-weekly-task-btn {
    align-self: flex-start;
}

/* Drag & Drop Zeilen-Sortierung im Wochenplan */
.weekly-row-drag-handle {
    display: inline-block;
    cursor: grab;
    font-size: 16px;
    color: #aaa;
    margin-right: 0;
    vertical-align: middle;
    line-height: 1;
    user-select: none;
}
.weekly-row-drag-handle:hover {
    color: #3498db;
}
tr.weekly-task-draggable-row {
    cursor: default;
}
tr.weekly-row-dragging {
    opacity: 0.45;
    background: #eaf4fb !important;
}
tr.weekly-row-drop-before td {
    border-top: 3px solid #3498db !important;
}

.assignment-cell {
    background: rgba(255, 255, 255, 0.4);
    min-height: 64px;
    position: relative;
}

.assignment-cell:hover {
    background: rgba(52, 152, 219, 0.1);
    cursor: pointer;
}

.assigned-users {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 3px;
}

.assigned-user {
    background: rgba(52, 152, 219, 0.28);
    color: #1a252f;
    padding: 1px 4px;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-shadow: none;
    box-shadow: none;
    width: fit-content;
    border-left: 2px solid rgba(52, 152, 219, 0.7);
    gap: 4px;
}

.assignment-pool-badge {
    display: inline-flex;
    align-items: center;
    padding: 1px 5px;
    border-radius: 999px;
    font-size: 0.63rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
    color: #fff;
    background: #6c757d;
}

.assignment-pool-badge-red {
    background: #e74c3c;
}

.assignment-pool-badge-yellow {
    background: #f1c40f;
    color: #4a3b00;
}

.assignment-pool-badge-blue {
    background: #3498db;
}

.assignment-pool-badge-purple {
    background: #8e44ad;
}

.assignment-pool-badge-gray {
    background: #6c757d;
}

.remove-user {
    background: transparent;
    border: none;
    color: #95a5a6;
    font-size: 1em;
    cursor: pointer;
    padding: 0;
    margin-left: 3px;
    transition: all 0.2s ease;
    line-height: 1;
}

.remove-user:hover {
    transform: scale(1.2);
    color: #e74c3c;
}

.colleagues-pool {
    width: 240px;
    height: 80vh;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.2);
    padding: 20px;
    transition: all 0.3s ease;
    margin-left: auto;
}

.colleagues-pool:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.colleagues-pool h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    border-bottom: 3px solid rgba(52, 152, 219, 0.5);
    padding-bottom: 8px;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.colleagues-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.colleague {
    background: rgba(52, 152, 219, 0.1);
    border: 2px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
    padding: 3px 6px;
    cursor: move;
    color: #2c3e50;
    font-weight: bold;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    overflow: hidden;
    position: relative;
}

.colleagues-pool .colleague {
    cursor: default;
}

.colleague-name {
    font-weight: bold;
    font-size: 0.78em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    max-width: 100%;
}

.colleagues-pool .colleague-name,
.colleagues-pool .colleague-availability {
    padding-right: 12px;
    box-sizing: border-box;
}

.pool-colleague-drag-handle {
    position: absolute;
    top: 4px;
    right: 6px;
    width: 6px;
    height: 12px;
    cursor: grab;
    color: #7f8c8d;
}

.pool-colleague-drag-handle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 1px;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 5px 0 currentColor;
}

.pool-colleague-drag-handle:hover {
    color: #3498db;
}

.colleague-availability {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1px;
    width: 100%;
}

.availability-indicator {
    font-size: 0.46em;
    padding: 1px 0;
    border-radius: 3px;
    text-align: center;
    flex: 1;
    min-width: 0;
    line-height: 1.4;
}

.available {
    background-color: #27ae60;
    color: white;
}

.unavailable {
    background-color: #e74c3c;
    color: white;
}

.unavailable-yellow {
    background-color: #f1c40f;
    color: black;
}

.unavailable-pink {
    background-color: #ff69b4;
    color: white;
}

.unavailable-red {
    background-color: #e74c3c;
    color: white;
}

.unavailable-green {
    background-color: #27ae60;
    color: white;
}

.unavailable-blue {
    background-color: #3498db;
    color: white;
}

.unavailable-green {
    background-color: #27ae60;
    color: white;
}

.unavailable-red {
    background-color: #e74c3c;
    color: white;
}

.colleague-unavailability {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.unavailability-period {
    font-size: 0.8em;
    color: #7f8c8d;
    background: rgba(255, 255, 255, 0.5);
    padding: 2px 4px;
    border-radius: 4px;
    text-align: center;
}

.pool-above .colleague {
    padding: 5px 10px;
    font-size: 0.9em;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.pool-above .colleague-name {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1em;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    width: 100%;
}

.pool-above .colleague-name button {
    background: transparent;
    border: none;
    color: #e74c3c;
    font-size: 1.2em;
    cursor: pointer;
    padding: 0;
    margin-left: 5px;
}

.pool-above .colleague-name button:hover {
    color: #c0392b;
}

.colleague:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.colleague.dragging {
    opacity: 0.7;
    transform: rotate(2deg) scale(1.05);
}

/* Responsive Design fÃ¼r Wochenplanung */
@media (max-width: 1200px) {
    .weekly-planning {
        flex-direction: column;
    }

    .colleagues-pool {
        width: 100%;
        order: -1;
    }

    .planning-table-container {
        overflow-x: auto;
    }

    .planning-table {
        min-width: 600px;
    }
}

@media (max-width: 768px) {
    .planning-table th,
    .planning-table td {
        padding: 8px 5px;
        font-size: 0.9em;
    }

    .task-cell {
        min-width: 150px;
    }

    .assignment-cell {
        min-height: 60px;
    }

    .assigned-user {
        font-size: 0.8em;
        padding: 4px 6px;
    }

    .colleague {
        padding: 8px 12px;
        font-size: 0.9em;
    }
}

/* ============================================
   POOLS ABOVE TABLE STYLES
   ============================================ */

.pools-above-table {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.pool-above {
    width: 200px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 15px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.2);
    padding: 15px;
    transition: all 0.3s ease;
}

.pool-above:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(52, 152, 219, 0.3);
    border-color: rgba(52, 152, 219, 0.5);
}

.pool-above h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
    border-bottom: 3px solid rgba(52, 152, 219, 0.5);
    padding-bottom: 5px;
    font-weight: bold;
    font-size: 1em;
    text-align: center;
}

.pool-content {
    min-height: 50px;
}

.planning-table-container {
    width: 100%;
    overflow-x: auto;
}

.pools-below-table {
    display: block;
    text-align: center;
    margin-bottom: 20px;
    margin-left: -20px;
    margin-right: -20px;
}

.pool-above {
    display: inline-block;
    margin: 10px;
}

/* Responsive Design fÃ¼r Pools below table */
@media (max-width: 768px) {

    .pools-below-table {
        justify-content: center;
        flex-wrap: wrap;
    }

    .pool-above {
        width: 200px;
    }
}

/* Dark Mode Support fÃ¼r Pools below table */
@media (prefers-color-scheme: dark) {
    .pool-above {
        background: rgba(52, 73, 94, 0.6);
        border-color: rgba(52, 152, 219, 0.4);
    }

    .pool-above h3 {
        color: #ecf0f1;
    }
}

/* ============================================
   WOCHENPLAN STICKY: Fixierte Navigation & Pools
   (ähnlich wie .controls-bar in index.php)
   ============================================ */

/* Body für module-view: kein Body-Scrollen, volle Höhe */
body.module-view {
    padding-top: 290px; /* Wird per JS dynamisch angepasst */
    overflow: hidden;   /* Kein Body-Scrollen – weekly-planning scrollt intern */
    height: 100vh;
    box-sizing: border-box;
}

/* Fixierte Wochennavigation – direkt unter dem Header */
body.module-view .week-navigation {
    position: fixed;
    top: 80px; /* Wird per JS dynamisch angepasst */
    left: 0;
    right: 0;
    z-index: 950;
    margin-bottom: 0;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    border-bottom: 1px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    padding: 8px 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
}

/* Fixierte Pools-Leiste – direkt unter der week-navigation */
body.module-view .pools-above-table {
    position: fixed;
    top: 148px; /* Wird per JS dynamisch angepasst */
    left: 0;
    right: 0;
    z-index: 940;
    margin-bottom: 0;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 2px solid rgba(52, 152, 219, 0.2);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 6px 20px;
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: center;
    align-items: flex-start;
    overflow-x: auto;
    overflow-y: auto;
    max-height: 140px;
}

/* Scrollbar für pools-above-table */
body.module-view .pools-above-table::-webkit-scrollbar {
    height: 4px;
    width: 4px;
}
body.module-view .pools-above-table::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
}
body.module-view .pools-above-table::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.4);
    border-radius: 4px;
}

/* Kompaktere Pool-Boxen in der fixierten Leiste – gleichmäßig über die Breite verteilt */
body.module-view .pools-above-table .pool-above {
    flex: 1 1 0;
    min-width: 120px;
    max-width: 220px;
    padding: 6px 10px;
    border-radius: 10px;
    margin: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    max-height: 128px;   /* Begrenzte Höhe pro Pool */
    overflow-y: auto;    /* Jeder Pool scrollt individuell */
}

body.module-view .pools-above-table .pool-above:hover {
    transform: none; /* Kein Hover-Effekt in fixierter Leiste */
}

/* Sticky Überschrift – bleibt beim Scrollen innerhalb des Pools immer sichtbar */
body.module-view .pools-above-table .pool-above h3 {
    font-size: 0.82em;
    margin-bottom: 4px;
    padding-bottom: 3px;
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    margin-top: 0;
}

body.module-view .pools-above-table .colleagues-list {
    gap: 4px;
}

body.module-view .pools-above-table .colleague {
    padding: 2px 6px;
    font-size: 0.78em;
    gap: 1px;
}

body.module-view .pools-above-table .colleague-name {
    font-size: 0.85em;
}

body.module-view .pools-above-table .colleague-name button {
    font-size: 1em;
    padding: 0 2px;
}

body.module-view .pools-above-table .unavailability-period {
    font-size: 0.68em;
    padding: 1px 3px;
}

/* Hauptinhalt: weekly-planning fixiert unter den Pools – kein eigenes Scrollen */
body.module-view .weekly-planning {
    position: fixed;
    top: 290px;   /* Wird per JS dynamisch angepasst */
    left: 0;
    right: 0;
    bottom: 64px; /* Randabstand zur Fußzeile, damit diese immer lesbar bleibt */
    z-index: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 20px;
    padding-bottom: 22px;
    box-sizing: border-box;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    align-items: stretch;       /* Kinder füllen die volle Höhe aus */
}

/* Planungstabelle: scrollt intern (vertikal + horizontal) */
body.module-view .planning-table-container {
    flex: 1;
    overflow-y: auto;
    overflow-x: auto;
    min-height: 0;              /* Firefox Fix */
    height: 100%;
    box-sizing: border-box;
}

/* Tabellen-Header bleibt beim Scrollen sichtbar (sticky) */
body.module-view .planning-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
}

body.module-view .planning-table thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%); /* Hintergrund explizit setzen */
}

body.module-view .planning-table thead th.holiday {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Kollegen-Pool: scrollt intern (vertikal) */
body.module-view .colleagues-pool {
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 0;              /* Firefox Fix */
    height: 100%;
    flex-shrink: 0;
    box-sizing: border-box;
    margin-left: auto;
}

/* Scrollbar für planning-table-container */
body.module-view .planning-table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
body.module-view .planning-table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}
body.module-view .planning-table-container::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.4);
    border-radius: 4px;
}
body.module-view .planning-table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.7);
}

/* Scrollbar für colleagues-pool */
body.module-view .colleagues-pool::-webkit-scrollbar {
    width: 6px;
}
body.module-view .colleagues-pool::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 4px;
}
body.module-view .colleagues-pool::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.4);
    border-radius: 4px;
}
body.module-view .colleagues-pool::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.7);
}

/* Dark Mode Support für fixierte Leisten */
@media (prefers-color-scheme: dark) {
    body.module-view .week-navigation {
        background: rgba(44, 62, 80, 0.95);
        border-bottom-color: rgba(52, 152, 219, 0.3);
    }

    body.module-view .pools-above-table {
        background: rgba(44, 62, 80, 0.92);
        border-bottom-color: rgba(52, 152, 219, 0.3);
    }

    /* Sticky Überschrift im Dark Mode */
    body.module-view .pools-above-table .pool-above h3 {
        background: rgba(44, 62, 80, 0.98);
        color: #ecf0f1;
    }
}

/* Minimierter Zustand: Navigation + Poolleisten ausblenden */
body.module-view.module-collapsed .week-navigation,
body.module-view.module-collapsed .pools-above-table {
    display: none !important;
}

/* Responsive: Auf kleinen Bildschirmen wieder normaler Fluss */
@media (max-width: 768px) {
    body.module-view {
        padding-top: 90px;
        overflow: auto;
        height: auto;
    }

    body.module-view .week-navigation {
        position: relative;
        top: auto;
        border-radius: 15px;
        margin-bottom: 15px;
    }

    body.module-view .pools-above-table {
        position: relative;
        top: auto;
        max-height: none;
        flex-wrap: wrap;
        border-radius: 0;
        margin-bottom: 15px;
    }

    body.module-view .weekly-planning {
        position: relative;
        top: auto;
        bottom: auto;
        left: auto;
        right: auto;
        overflow: visible;
        padding: 0;
        height: auto;
    }
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 20px;
    border: 2px solid rgba(52, 152, 219, 0.3);
    box-shadow: 0 8px 32px 0 rgba(52, 152, 219, 0.25);
    padding: 30px;
    min-width: 400px;
    max-width: 600px;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #2c3e50;
    text-shadow: 0 2px 4px rgba(52, 152, 219, 0.2);
}

.form-buttons {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* Dark Mode Support fÃ¼r Wochenplanung */
@media (prefers-color-scheme: dark) {
    .planning-table {
        background: rgba(52, 73, 94, 0.6);
        border-color: rgba(52, 152, 219, 0.4);
    }

    .planning-table th {
        background: linear-gradient(135deg, #2980b9 0%, #3498db 100%);
    }

    .task-info {
        color: #ecf0f1;
    }

    .assignment-cell {
        background: rgba(52, 73, 94, 0.4);
    }

    .assignment-cell:hover {
        background: rgba(52, 152, 219, 0.2);
    }

    .colleagues-pool {
        background: rgba(52, 73, 94, 0.6);
        border-color: rgba(52, 152, 219, 0.4);
    }

    .colleagues-pool h3 {
        color: #ecf0f1;
        background: rgba(52, 73, 94, 0.97);
    }

    .colleague {
        background: rgba(52, 152, 219, 0.2);
        border-color: rgba(52, 152, 219, 0.3);
        color: #ecf0f1;
    }

    .colleague:hover {
        background: rgba(52, 152, 219, 0.3);
    }
}

/* Bestätigt Pool: Nur Aufgabenname und Adresse anzeigen */
.pool[data-pool="Bestätigt"] .task-bezeichnung,
.pool[data-pool="Bestätigt"] .task-assignee,
.pool[data-pool="Bestätigt"] .task-duration,
.pool[data-pool="Bestätigt"] .task-confirmation,
.pool[data-pool="Bestätigt"] .task-created {
    display: none;
}

/* Aktive Pool: Minimalistische Darstellung - nur Aufgabenname und Adresse */
.pool[data-pool="Aktive"] .task-bezeichnung,
.pool[data-pool="Aktive"] .task-assignee,
.pool[data-pool="Aktive"] .task-datetime,
.pool[data-pool="Aktive"] .task-confirmation,
.pool[data-pool="Aktive"] .task-created {
    display: none;
}

/* Schriftgröße für Aktive und Bestätigt Pools anpassen - Name max 2 Zeilen */
.pool[data-pool="Aktive"] .task-title,
.pool[data-pool="Bestätigt"] .task-title {
    font-size: 0.85em;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    word-wrap: break-word;
}

.pool[data-pool="Aktive"] .task-address,
.pool[data-pool="Bestätigt"] .task-address {
    font-size: 0.8em;
    line-height: 1.2;
    max-height: 2.4em;
    overflow: hidden;
    word-wrap: break-word;
}

/* HB-Aufgaben rot hervorheben */
.task[data-company="HB"] {
    background: rgba(185, 28, 28, 0.16) !important;
    border-left-color: #991b1b !important;
    color: #7f1d1d !important;
}

.task[data-company="HB"]:hover {
    background: rgba(185, 28, 28, 0.24) !important;
}

.weekly-planning tr.weekly-task-company-hb,
.weekly-planning tr.weekly-task-company-hb td {
    background: #fef2f2 !important;
    color: #7f1d1d !important;
}

.weekly-planning tr.weekly-task-company-hb td.task-cell {
    border-left: 4px solid #991b1b;
}

/* ============================================
   MODAL: Aufgaben für Woche auswählen
   Positionierung am unteren Bildschirmrand
   ============================================ */

/* Spezifisches Styling für das Task-Selection-Modal */
#task-selection-modal {
    align-items: flex-end; /* Am unteren Rand ausrichten */
    padding-bottom: 3cm;  /* Abstand zum unteren Rand */
}

#task-selection-modal .modal-content {
    position: fixed;
    bottom: 3cm;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 600px;
    max-height: calc(100vh - 3cm - 80px); /* Maximalhöhe mit Abstand */
    overflow-y: auto; /* Vertikale Scrollbar bei Bedarf */
    display: flex;
    flex-direction: column;
}

#task-selection-modal #task-list {
    flex: 1;
    overflow-y: auto;
    max-height: calc(100vh - 3cm - 200px); /* Innenraum mit Abstand für Buttons */
    padding-right: 10px;
}

/* Scrollbar für Task-Liste im Modal */
#task-selection-modal #task-list::-webkit-scrollbar {
    width: 8px;
}
#task-selection-modal #task-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05);
    border-radius: 4px;
}
#task-selection-modal #task-list::-webkit-scrollbar-thumb {
    background: rgba(52, 152, 219, 0.5);
    border-radius: 4px;
}
#task-selection-modal #task-list::-webkit-scrollbar-thumb:hover {
    background: rgba(52, 152, 219, 0.8);
}

/* Auswertungstabelle: Aufgaben-Zuteilung */
.task-assignment-report {
    margin-top: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(52, 152, 219, 0.2);
    border-radius: 10px;
}

.task-assignment-report h3 {
    margin: 0 0 10px;
    font-size: 1rem;
    color: #2c3e50;
}

.task-assignment-report-empty {
    color: #5d6d7e;
    font-size: 0.92rem;
}

.task-assignment-report-filter {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.task-assignment-report-filter label {
    font-size: 0.9rem;
    color: #2c3e50;
}

.task-assignment-report-filter select {
    max-width: 420px;
    padding: 6px 8px;
    border: 1px solid rgba(52, 152, 219, 0.35);
    border-radius: 6px;
    background: #fff;
    color: #2c3e50;
}

.task-assignment-report-period {
    margin-bottom: 10px;
    font-size: 0.88rem;
    color: #34495e;
}

.assignment-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.assignment-report-table th,
.assignment-report-table td {
    border: 1px solid rgba(52, 152, 219, 0.2);
    padding: 8px;
    text-align: left;
    vertical-align: top;
}

.assignment-report-table th {
    background: rgba(52, 152, 219, 0.1);
    color: #2c3e50;
}

@media (max-width: 900px) {
    .assignment-report-table {
        font-size: 0.84rem;
    }
}

@media (prefers-color-scheme: dark) {
    .task-assignment-report {
        background: rgba(52, 73, 94, 0.58);
        border-color: rgba(52, 152, 219, 0.35);
    }

    .task-assignment-report h3,
    .task-assignment-report-empty,
    .task-assignment-report-filter label,
    .task-assignment-report-period,
    .assignment-report-table th,
    .assignment-report-table td {
        color: #ecf0f1;
    }

    .task-assignment-report-filter select {
        background: rgba(44, 62, 80, 0.95);
        color: #ecf0f1;
        border-color: rgba(52, 152, 219, 0.4);
    }

    .assignment-report-table th {
        background: rgba(52, 152, 219, 0.28);
    }

    .assignment-report-table th,
    .assignment-report-table td {
        border-color: rgba(52, 152, 219, 0.35);
    }
}

/* Globales Explorer-Layout */
body.explorer-shell-enabled {
    padding: 0 !important;
    overflow: hidden;
    background: linear-gradient(160deg, #edf3fa 0%, #dde9f4 100%);
}

body.explorer-shell-enabled .explorer-original-header {
    display: none !important;
}

body.explorer-shell-enabled .explorer-shell {
    display: grid;
    grid-template-columns: 270px minmax(0, 1fr);
    height: 100vh;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

body.explorer-shell-enabled .explorer-sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    background: linear-gradient(180deg, #27425d 0%, #1e3347 100%);
    border-right: 1px solid rgba(123, 170, 214, 0.45);
    padding: 10px 10px 18px;
    display: grid;
    grid-template-rows: auto auto 1fr;
    gap: 12px;
    align-content: start;
    overflow: auto;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
}

body.explorer-shell-enabled .explorer-sidebar-title {
    color: #dfefff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    padding: 6px 8px;
    border-bottom: 1px solid rgba(123, 170, 214, 0.35);
}

body.explorer-shell-enabled .explorer-sidebar-group {
    display: grid;
    gap: 8px;
    align-content: start;
    padding: 8px 0 2px;
    border-top: 1px solid rgba(123, 170, 214, 0.16);
}

body.explorer-shell-enabled .explorer-sidebar-group-title {
    color: #cfe4fb;
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0 8px;
    opacity: 0.9;
}

body.explorer-shell-enabled .explorer-sidebar-group-body {
    display: grid;
    gap: 7px;
    align-content: start;
}

body.explorer-shell-enabled .explorer-dashboard-title {
    margin-top: 2px;
}

body.explorer-shell-enabled .explorer-dashboard-section {
    display: grid;
    gap: 12px;
    align-content: start;
}

body.explorer-shell-enabled .explorer-dashboard-nav {
    margin-bottom: 8px;
}

body.explorer-shell-enabled .explorer-rest-nav {
    padding-top: 4px;
}

body.explorer-shell-enabled .explorer-nav {
    display: grid;
    gap: 7px;
    align-content: start;
    padding-bottom: 8px;
}

body.explorer-shell-enabled .explorer-nav-item {
    border: 1px solid rgba(129, 171, 209, 0.42);
    background: linear-gradient(180deg, #335d83 0%, #2d4f6d 100%);
    color: #f5fbff;
    border-radius: 8px;
    padding: 9px 10px;
    text-align: left;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
}

body.explorer-shell-enabled .explorer-nav-item:hover {
    background: linear-gradient(180deg, #3c6e98 0%, #2e5678 100%);
    border-color: rgba(172, 210, 245, 0.8);
}

body.explorer-shell-enabled .explorer-nav-item.active {
    background: linear-gradient(180deg, #f5fbff 0%, #e4effa 100%);
    border-color: rgba(73, 126, 180, 0.7);
    color: #1e3a52;
}

body.explorer-shell-enabled .explorer-main {
    overflow: auto;
    padding: 12px 16px;
    padding-bottom: 84px;
    min-width: 0;
    height: 100vh;
}

body.explorer-shell-enabled .explorer-main > :first-child {
    margin-top: 0 !important;
}

body.explorer-shell-enabled .explorer-source-nav {
    display: none !important;
}

body.explorer-shell-enabled .controls-bar,
body.explorer-shell-enabled .week-navigation,
body.explorer-shell-enabled .pools-above-table {
    position: static !important;
    top: auto !important;
}

body.explorer-shell-enabled #pools-container,
body.explorer-shell-enabled #calendar-container,
body.explorer-shell-enabled .weekly-planning {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    max-height: none !important;
}

body.explorer-shell-enabled #pools-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 12px;
    margin: 10px 0 0 0;
    padding: 0 0 14px 0;
    overflow-x: auto;
    overflow-y: hidden;
}

body.explorer-shell-enabled:not(.module-view) #pools-container {
    height: calc(100dvh - 255px);
    max-height: calc(100dvh - 255px);
    min-height: 360px;
    align-items: stretch;
}

body.explorer-shell-enabled:not(.module-view) #pools-container .pool {
    flex: 0 0 clamp(260px, 24vw, 360px);
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

body.explorer-shell-enabled:not(.module-view) #pools-container .task-list {
    overflow-y: auto !important;
    min-height: 0;
}

body.explorer-shell-enabled.explorer-dashboard-mode #pools-container {
    overflow-x: hidden;
    overflow-y: hidden;
}

body.explorer-shell-enabled.explorer-dashboard-mode #pools-container .pool {
    flex: 1 1 100%;
    width: 100%;
    max-width: 100%;
}

body.explorer-shell-enabled.explorer-dashboard-mode #pools-container .pool.pool-active-list {
    flex: 1 1 100%;
}

body.explorer-shell-enabled.explorer-dashboard-mode #pools-container .pool.is-hidden-by-dashboard {
    display: none !important;
}

body.explorer-shell-enabled #calendar-container {
    margin: 10px 0;
    border-radius: 12px;
}

body.explorer-shell-enabled .weekly-planning {
    overflow: hidden !important;
    padding: 10px 0;
    gap: 12px;
}

body.explorer-shell-enabled.module-view .pools-above-table {
    max-height: 190px !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
}

body.explorer-shell-enabled.module-view .pools-above-table .pool-above {
    max-height: 170px !important;
    overflow-y: auto !important;
}

body.explorer-shell-enabled.module-view .weekly-planning {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    height: auto;
    max-height: none;
    min-height: 420px;
}

body.explorer-shell-enabled.module-view .colleagues-pool {
    width: clamp(260px, 22vw, 360px);
    flex: 0 0 clamp(260px, 22vw, 360px);
    margin-left: auto;
}

body.explorer-shell-enabled.module-view {
    padding-top: 0 !important;
    height: 100vh !important;
    overflow: hidden !important;
}

body.explorer-shell-enabled.module-view .planning-table-container,
body.explorer-shell-enabled.module-view .colleagues-pool {
    height: auto !important;
    max-height: none !important;
    min-height: 0;
}

body.explorer-shell-enabled.module-view .planning-table-container {
    flex: 1 1 auto;
    height: var(--module-explorer-table-height, 58vh) !important;
    max-height: var(--module-explorer-table-height, 58vh) !important;
    overflow: auto !important;
    min-width: 0;
}

body.explorer-shell-enabled.module-view .colleagues-pool {
    overflow-y: visible !important;
    overflow-x: hidden !important;
}

body.explorer-shell-enabled .footer {
    position: fixed !important;
    bottom: 10px !important;
    left: 10px !important;
    margin-top: 0 !important;
    z-index: 12000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: none;
}

@media (max-width: 980px) {
    body.explorer-shell-enabled {
        overflow: auto;
    }

    body.explorer-shell-enabled .explorer-shell {
        grid-template-columns: 1fr;
    }

    body.explorer-shell-enabled .explorer-sidebar {
        position: sticky;
        top: 0;
        z-index: 40;
        grid-template-rows: auto;
        max-height: none;
        border-right: none;
        border-bottom: 1px solid rgba(123, 170, 214, 0.45);
    }

    body.explorer-shell-enabled .explorer-nav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.explorer-shell-enabled.module-view .weekly-planning {
        grid-template-columns: 1fr;
        height: auto;
        max-height: none;
        min-height: 0;
        overflow: visible !important;
    }

    body.explorer-shell-enabled.module-view .planning-table-container,
    body.explorer-shell-enabled.module-view .colleagues-pool {
        height: auto !important;
        max-height: none !important;
        min-height: 0;
    }
}
