body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    color: #333;
}

h1 {
    text-align: center;
    padding: 20px;
    margin: 0;
}

.table-container {
    overflow-x: auto;
    margin: 0 10px;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    min-width: 50px;
    height: 50px;
    white-space: nowrap;
    cursor: pointer;
}

.vertikal {
    writing-mode: vertical-lr;
    transform: rotate(180deg);
}

@media (max-width: 768px) {
    .vertikal {
        writing-mode: vertical-lr;
        transform: rotate(180deg);
    }
    th, td {
        font-size: 14px;
    }
}

.none { background-color: #FFFFFF; }
.yes { background-color: #08e608; }
.no { background-color: #b10721; }
.from_12 { background-color: #6A5ACD; }
.from_125 { background-color: #F0E68C; }
.from_13 { background-color: #a80fd6; }
.from_135 { background-color: #cf9187; }
.from_14 { background-color: #20B2AA; }
.from_145 { background-color: #FFD700; }
.from_15 { background-color: #87CEEB; }
.from_16 { background-color: #4682B4; }
.from_17 { background-color: #5F9EA0; }
.from_18 { background-color: #4169E1; }

.wochenstart { border-left: 3px solid black; }

.legend {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    margin: 10px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 5px;
}

.login-container {
    width: 80%;
    max-width: 400px;
    padding: 40px;
    margin: 100px auto;
    border: 1px solid #ccc;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-form {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.login-form label {
    margin-bottom: 5px;
    font-weight: bold;
}

.login-form input {
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-form button {
    padding: 10px;
    background-color: #007BFF;
    color: white;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-form button:hover {
    background-color: #0056b3;
}

.error {
    color: #f44336;
    margin-bottom: 15px;
}

.dashboard-container {
    text-align: center;
    margin-top: 50px;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-buttons button {
    margin: 3px;
    padding: 8px 15px;
    background-color: #007BFF;
    color: white;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 100px;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.dashboard-buttons button:hover {
    background-color: #0056b3;
}

.logout-button {
    margin: 3px;
    padding: 8px 15px;
    background-color: #f44336;
    color: white;
    margin-top: 10px;
    border-radius: 5px;
    cursor: pointer;
    width: 80px;
    transition: background-color 0.3s ease;
    font-size: 12px;
}

.logout-button:hover {
    background-color: #c62828;
}

.object-container {
    width: 100%;
    overflow-x: auto;
    margin: 20px auto;
    padding: 10px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

table a {
    text-decoration: none;
}

table a:hover {
    text-decoration: none;
}

th, td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: center;
    vertical-align: middle;
    white-space: normal;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
}

th {
    background-color: #f4f4f4;
    min-width: 120px;
    max-width: 200px;
}

td {
    min-width: 100px;
    max-width: 180px;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

tr:hover {
    background-color: #f1f1f1;
}

.bodyobjectdetails {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    background-color: #f4f4f4;
}

.dashboard-details {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    background-color: #f4f4f4;
}

.dashboard-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.fc-event .event-info {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding-left: 0.5rem;
    text-wrap: wrap;
}

.details-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 600px;
}

.calendardetails {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    display: flex;
    justify-content: center;
    min-height: 90vh;
    background-color: #f4f4f4;
}

.calendar-container {
    text-align: center;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
    overflow: auto;
}

.logo {
    width: 250px;
    height: auto;
    margin-bottom: 20px;
}

.welcome-section h1 {
    text-align: center;
    padding: 20px;
    margin: 0;
}

.subheading {
    text-align: center;
    font-size: 0.9em;
}

.upcoming-features {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.upcoming-features h2 {
    color: #007BFF;
}

.upcoming-features p {
    font-size: 0.8em;
}

h3 {
    font-size: 24px;
    color: #333;
    text-align: center;
    padding: 10px 0;
    margin: 0;
}

.subheading p {
    font-size: 18px;
    text-align: center;
    color: #666;
}

.status-open {
    background-color: #98FB98;
    color: black;
}

.status-assigned {
    background-color: #87CEEB;
    color: black;
}

.status-being-cleaned {
    background-color: #FFFF00;
    color: black;
}

.status-finished {
    background-color: #D3D3D3;
    color: black;
}

.status-invoiced {
    background-color: #FFA500;
    color: black;
}

.status-occupied {
    background-color: #B22222;
    color: black;
}

/* Dark Mode */
.bg-boxdark-2 .table-container {
    background-color: #2b2828;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.bg-boxdark-2 .table-container tr:nth-child(even), 
.bg-boxdark-2 .table-container th {
    background-color: #555252;
}

.bg-boxdark-2 .table-container tr:hover {
    background-color: #3c3a3a;
}

.bg-boxdark-2 .table-container td {
    color: #fcfbfb;
}

.bg-boxdark-2 .table-container td.yes,
.bg-boxdark-2 .table-container td.from_145,
.bg-boxdark-2 .table-container td.from_125,
.bg-boxdark-2 .table-container td.from_13 {
    color: #000000 !important;
}

.bg-boxdark-2 .table-container td.from_16,
.bg-boxdark-2 .table-container td.from_17,
.bg-boxdark-2 .table-container td.from_18 {
    color: #000000 !important;
}

@media (max-width: 1439px) {
    #timeline tr td:nth-child(n+2), 
    #timeline tr th:nth-child(n+2) {
        min-width: 3.5rem !important;
        width: 6rem !important;
        max-width: 6rem !important;
    }
    #timeline tr th:nth-child(n+2) {
        padding-left: 0.6rem !important;
        padding-right: 0.6rem !important;
    }
}

.table-container::-webkit-scrollbar, 
.object-container::-webkit-scrollbar {
    width: 8px;
}

.table-container::-webkit-scrollbar-track, 
.object-container::-webkit-scrollbar-track {
    background-color: #f1f1f1;
}

.table-container::-webkit-scrollbar-thumb, 
.object-container::-webkit-scrollbar-thumb {
    background-color: #888;
    border-radius: 4px;
}

.table-container::-webkit-scrollbar-thumb:hover, 
.object-container::-webkit-scrollbar-thumb:hover {
    background-color: #555;
}

.object-table-wrapper {
    width: 100%;
    overflow: auto;
    margin: 0 0px;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 975px) {
    .object-table-wrapper {
        width: 100%;
        overflow: auto;
        margin: 0 0px;
        -webkit-overflow-scrolling: touch;
    }

    .object-container {
        width: 100vw;
        overflow-x: auto;
        margin: 20px auto;
        padding: 10px;
        background-color: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    .fc-event .event-info {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        padding-left: 0.2rem;
        font-size: 0.5rem;
        text-wrap: wrap;
    }
}

.planner-table tbody tr td:nth-child(2) {
    min-width: 6rem;
    width: 6rem;
    max-width: 6rem;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.planner-table thead tr th:nth-child(2) {
    min-width: 9rem;
    width: 9rem;
    max-width: 9rem;
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

.planner-table th {
    min-width: 100px;
}

.planner-table .duplicate-obj {
    background-color: #FF6766 !important;
    color: #EFF4FB !important;
}

.bg-powder-blue {
    background-color: rgb(176, 224, 230);
}

.dark-bg-powder-blue {
    background-color: rgb(150, 190, 195);
}

[x-cloak] {
    display: none !important;
}

.text-danger {
    color: #dc3545;
}

.xdsoft_calendar table {
    width: 100%;
    table-layout: fixed;
}

@media (max-width: 768px) {
    .legend-item {
        display: flex;
        align-items: center;
        margin-right: 20px;
        font-size: 0.5rem;
    }

    .legend-color {
        width: 0.3rem;
        height: 0.3rem;
        margin-right: 5px;
    }

    .fc .fc-button {
        border: 1px solid transparent;
        border-radius: 0.25em;
        display: inline-block;
        font-size: 0.5em;
        font-weight: 100;
        line-height: 1.5;
        padding: 0.6em 1em;
        text-align: center;
        user-select: none;
        vertical-align: middle;
    }

    .fc .fc-toolbar-title {
        font-size: 0.75em;
        font-weight: 600;
        margin: 0px;
    }
}

.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1;
    background-color: white;
    will-change: transform;
}

.sticky-column {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: white;
    min-width: 90px;
    max-width: 90px;
    width: 50px;
    padding: 5px;
    will-change: transform;
}

.sticky-header.sticky-column {
    z-index: 3;
    background-color: inherit;
    box-shadow: 1px 1px 0 rgba(0,0,0,0.1);
}

.bg-boxdark-2 .sticky-header,
.bg-boxdark-2 .sticky-column {
    background-color: #2b2828;
    border-color: #555252;
}

.bg-boxdark-2 .table-container {
    scrollbar-color: #555 #2b2828;
}

.status-open, .status-assigned, .status-being-cleaned, 
.status-finished, .status-invoiced, .status-occupied,
.from_12, .from_125, .from_13, .from_135, .from_14, 
.from_145, .from_15, .from_16, .from_17, .from_18 {
    backface-visibility: hidden;
    transform: translateZ(0);
}

@media (max-width: 768px) {
    .legend {
        gap: 10px;
        justify-content: flex-start;
        overflow-x: auto;
    }
    
    .legend-item {
        flex-shrink: 0;
        margin-right: 10px;
    }
}

td:focus {
    outline: 2px solid #007BFF;
    outline-offset: -2px;
}

td[tabindex]:focus {
    background-color: rgba(0, 123, 255, 0.1);
}

.table-container {
    contain: layout style paint;
    scroll-behavior: smooth;
}

@media (max-width: 768px) {
    .table-container {
        height: calc(100dvh - 200px);
        font-size: 12px;
    }
    
    .sticky-column {
        min-width: 60px;
        max-width: 60px;
        font-size: 10px;
    }
}

/* ==============================
   Leisure Planner – Scoped CSS
   ============================== */

.planner {
    max-width: 900px;
    margin: 40px auto;
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.1);
    font-family: Arial, sans-serif;
}

.planner h2 {
    margin-top: 0;
    text-align: center;
}

.planner p {
    text-align: center;
    color: #666;
}

.planner .day {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-bottom: 1px solid #eee;
}

.planner .day:last-child {
    border-bottom: none;
}

/* Select-Element mit Statusfarben */
select.status {
    appearance: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    border-radius: 999px;
    padding: 8px 14px;
    font-weight: bold;
    border: 1px solid #ddd;
    cursor: pointer;
    min-width: 140px;
    text-align: center;
}

/* Statusfarben für Select */
select.status.available { 
    background-color: #08e608 !important; 
    color: #000 !important; 
}

select.status.unavailable { 
    background-color: #b10721 !important; 
    color: #fff !important; 
}

select.status.from_12 { 
    background-color: #6A5ACD !important; 
    color: #fff !important; 
}

select.status.from_12_30 { 
    background-color: #F0E68C !important; 
    color: #000 !important; 
}

select.status.from_13 { 
    background-color: #a80fd6 !important; 
    color: #fff !important; 
}

select.status.from_13_30 { 
    background-color: #cf9187 !important; 
    color: #000 !important; 
}

select.status.from_14 { 
    background-color: #20B2AA !important; 
    color: #000 !important; 
}

select.status.from_15 { 
    background-color: #87CEEB !important; 
    color: #000 !important; 
}

select.status.from_16 { 
    background-color: #4682B4 !important; 
    color: #fff !important; 
}

select.status.from_17 { 
    background-color: #5F9EA0 !important; 
    color: #fff !important; 
}

select.status.from_18 { 
    background-color: #4169E1 !important; 
    color: #fff !important; 
}

/* Dropdown-Optionen */
select.status option {
    background: #fff !important;
    color: #000 !important;
    padding: 8px;
}

/* Status-Badge (Span neben Select) */
.planner .status {
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: bold;
    min-width: 120px;
    text-align: center;
}

.status.available { background: #08e608; color:#000; }
.status.unavailable { background: #b10721; color:#fff; }
.status.from_12 { background: #6A5ACD; color:#fff; }
.status.from_12_30 { background: #F0E68C; color:#000; }
.status.from_13 { background: #a80fd6; color:#fff; }
.status.from_13_30 { background: #cf9187; color:#000; }
.status.from_14 { background: #20B2AA; color:#000; }
.status.from_15 { background: #87CEEB; color:#000; }
.status.from_16 { background: #4682B4; color:#fff; }
.status.from_17 { background: #5F9EA0; color:#fff; }
.status.from_18 { background: #4169E1; color:#fff; }

/* Mobile */
@media (max-width: 768px) {
    .planner .day {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    select.status {
        width: 100%;
    }
}