:root {
    /* Service-Highlighting Farben */
    --highlight-91-t: #BFFFFF; --highlight-91-t-text: black; --highlight-91-n: #FF34FF; --highlight-91-n-text: white;
    --highlight-80-t: #00db03; --highlight-80-t-text: white; --highlight-80-n: #009129; --highlight-80-n-text: white;
    --highlight-70-t: #CFE6E6; --highlight-70-t-text: black; --highlight-70-n: #4B7575; --highlight-70-n-text: white;
    --highlight-79-t: #CDFFFF; --highlight-79-t-text: black; --highlight-79-n: #00c1bb; --highlight-79-n-text: white;
    --highlight-78-t: #9587f2; --highlight-78-t-text: black; --highlight-78-n: #FF34FF; --highlight-78-n-text: white;
    --highlight-60-t: #FFDEBF; --highlight-60-t-text: black; --highlight-60-n: #FFB017; --highlight-60-n-text: white;
    --highlight-61-t: #A9A9FF; --highlight-61-t-text: black; --highlight-61-n: #2121C9; --highlight-61-n-text: white;
    --highlight-62-t: #FFBFDF; --highlight-62-t-text: black; --highlight-62-n: #ED1286; --highlight-62-n-text: white;
    
    /* Qualifikation Farben */
    --quali-rs-bg: rgba(255, 255, 255, 0.9); --quali-rs-text: #dc3545; --quali-rs-border: rgba(220, 53, 69, 0.4);
    --quali-ra-bg: rgba(255, 255, 255, 0.9); --quali-ra-text: #007bff; --quali-ra-border: rgba(0, 123, 255, 0.4);
    --quali-nfs-bg: rgba(0, 123, 255, 0.95); --quali-nfs-text: white; --quali-nfs-border: rgba(0, 123, 255, 0.6);
    --quali-ref-bg: rgba(0, 123, 255, 0.95); --quali-ref-text: yellow; --quali-ref-border: rgba(0, 123, 255, 0.6);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: url('rd_bg1.jpg') no-repeat center center fixed;
    background-size: cover;
    min-height: 100vh;
    color: #333;
}

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

.header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.logo {
    height: 60px;
}

.header h1 {
    font-size: 2.2rem;
    margin: 0;
    font-weight: 600;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.subtitle {
    opacity: 0.95;
    font-size: 1rem;
    margin-top: 8px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.controls {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.button-group {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
}

.filter-container {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f1f3f4;
}

.filter-container.show {
    display: block;
}

.filter-section {
    margin-bottom: 25px;
}

.filter-title {
    font-weight: 600;
    margin-bottom: 15px;
    color: #495057;
    font-size: 1.1rem;
}

.filter-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.filter-checkbox {
    display: none;
}

.filter-label {
    display: block;
    padding: 12px 16px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s ease;
    font-weight: 500;
    user-select: none;
}

.filter-checkbox:checked + .filter-label {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.filter-label:hover {
    border-color: #007bff;
}

.table-container {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    margin-top: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.table-wrapper {
    overflow-x: auto;
}

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

th, td {
    padding: 16px 12px;
    text-align: left;
    border-bottom: 1px solid #f1f3f4;
}

th {
    background: rgba(248, 249, 250, 0.9);
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
}

tr:hover {
    background: rgba(248, 249, 250, 0.5);
}

.saturday, .sunday { 
    color: #dc3545; 
    font-weight: 600; 
}

/* Service-Highlighting mit CSS Custom Properties */
.highlight-rw-91-t { background: var(--highlight-91-t); color: var(--highlight-91-t-text); }
.highlight-rw-91-n { background: var(--highlight-91-n); color: var(--highlight-91-n-text); }
.highlight-rw-80-t { background: var(--highlight-80-t); color: var(--highlight-80-t-text); }
.highlight-rw-80-n { background: var(--highlight-80-n); color: var(--highlight-80-n-text); }
.highlight-rw-70-t { background: var(--highlight-70-t); color: var(--highlight-70-t-text); }
.highlight-rw-70-n { background: var(--highlight-70-n); color: var(--highlight-70-n-text); }
.highlight-rw-79-t { background: var(--highlight-79-t); color: var(--highlight-79-t-text); }
.highlight-rw-79-n { background: var(--highlight-79-n); color: var(--highlight-79-n-text); }
.highlight-rw-78-t { background: var(--highlight-78-t); color: var(--highlight-78-t-text); }
.highlight-rw-78-n { background: var(--highlight-78-n); color: var(--highlight-78-n-text); }
.highlight-rw-60-t { background: var(--highlight-60-t); color: var(--highlight-60-t-text); }
.highlight-rw-60-n { background: var(--highlight-60-n); color: var(--highlight-60-n-text); }
.highlight-rw-61-t { background: var(--highlight-61-t); color: var(--highlight-61-t-text); }
.highlight-rw-61-n { background: var(--highlight-61-n); color: var(--highlight-61-n-text); }
.highlight-rw-62-t { background: var(--highlight-62-t); color: var(--highlight-62-t-text); }
.highlight-rw-62-n { background: var(--highlight-62-n); color: var(--highlight-62-n-text); }

/* Qualifikationen mit CSS Custom Properties */
.quali-rs, .quali-rs100, .quali-ra, .quali-nfs, .quali-ref {
    backdrop-filter: blur(10px) !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    font-weight: 700 !important;
    text-align: center !important;
    margin: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle !important;
}

.quali-rs, .quali-rs100 {
    background: var(--quali-rs-bg) !important;
    color: var(--quali-rs-text) !important;
    border: 1px solid var(--quali-rs-border) !important;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.2) !important;
}

.quali-ra {
    background: var(--quali-ra-bg) !important;
    color: var(--quali-ra-text) !important;
    border: 1px solid var(--quali-ra-border) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.2) !important;
}

.quali-nfs {
    background: var(--quali-nfs-bg) !important;
    color: var(--quali-nfs-text) !important;
    border: 1px solid var(--quali-nfs-border) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.quali-ref {
    background: var(--quali-ref-bg) !important;
    color: var(--quali-ref-text) !important;
    border: 1px solid var(--quali-ref-border) !important;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.3) !important;
}

.loading {
    display: none;
    text-align: center;
    padding: 40px;
    color: #6c757d;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.loading.show {
    display: block;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.no-data {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.stats {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 20px;
    background: rgba(248, 249, 250, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 8px;
}

.stats-item {
    font-weight: 600;
    color: #495057;
}

.quick-search-section {
    margin-bottom: 20px;
}

.quick-search-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #495057;
    font-size: 1.1rem;
}

.quick-search-wrapper {
    position: relative;
    display: block;
}

.quick-search-input {
    width: 100%;
    padding: 12px 45px 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
}

.quick-search-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.quick-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.quick-search-clear:hover {
    opacity: 1;
}

.quick-search-clear.show {
    display: flex;
}

.quick-search-hint {
    color: #6c757d;
    font-size: 14px;
    margin-top: 5px;
    display: block;
    font-style: italic;
}

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .logo-container {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        height: 50px;
    }

    .header h1 {
        font-size: 2rem;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        padding: 16px 20px;
        font-size: 16px;
        font-weight: 600;
        min-height: 60px;
        border-radius: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        box-sizing: border-box;
        margin-bottom: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        text-align: center;
        line-height: 1.3;
        border: 2px solid #e9ecef;
    }

    .quick-search-input {
        padding: 16px 55px 16px 20px;
        font-size: 18px;
        border-radius: 16px;
        min-height: 60px;
    }

    .quick-search-clear {
        width: 28px;
        height: 28px;
        font-size: 16px;
        right: 15px;
    }

    .quick-search-label {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }

    .quick-search-hint {
        font-size: 15px;
        margin-top: 8px;
    }

    th, td {
        padding: 12px 6px;
        font-size: 16px;
    }

    .stats {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        font-size: 16px;
    }

    table {
        min-width: 600px;
    }

    .table-wrapper {
        -webkit-overflow-scrolling: touch;
    }
}