/* --- TRACKER MODERN STYLES --- */
#trackerTable {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 6px; 
    margin-top: 10px;
}

#trackerTable th {
    text-align: left;
    padding: 10px 15px;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 1px;
}

#trackerTable tr.signing-row {
    background: var(--card-bg);
    transition: all 0.2s ease;
}

#trackerTable tr.signing-row:hover {
    background: rgba(56, 189, 248, 0.04);
    transform: translateX(4px);
}

#trackerTable td {
    padding: 12px 15px;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    font-size: 0.85rem;
}

/* Kanten abrunden */
#trackerTable td:first-child { border-left: 1px solid var(--border-color); border-radius: 8px 0 0 8px; }
#trackerTable td:last-child { border-right: 1px solid var(--border-color); border-radius: 0 8px 8px 0; }

/* Neue Signings Markierung */
.is-new td:first-child {
    border-left: 3px solid var(--accent-color) !important;
}

/* --- FILTER BAR & CUSTOM DROPDOWNS --- */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 20px;
    background: var(--card-bg);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    position: relative; 
    z-index: 10;
}

/* Gemeinsames Styling für alle Filter-Elemente */
.filter-grid input, 
.filter-grid select, 
.ms-header {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.8rem;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    height: 40px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
}

.filter-grid input:focus, 
.ms-header:hover { 
    border-color: var(--accent-color); 
}

/* Custom Multiselect Container */
.custom-multiselect {
    position: relative;
    width: 100%;
}

/* Der "Button" des Dropdowns */
.ms-header {
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 25px;
    position: relative;
}

/* Kleiner Pfeil nach unten */
.ms-header::after {
    content: '▼';
    font-size: 0.6rem;
    position: absolute;
    right: 10px;
    opacity: 0.5;
}

/* Die schwebende Liste */
.ms-list {
    display: none;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    width: 220px; 
    background: #1a1a1a; 
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
}

.ms-list.active {
    display: block;
}

/* Suche im Dropdown */
.ms-search {
    margin-bottom: 10px !important;
    height: 32px !important;
    font-size: 0.75rem !important;
    background: #000 !important;
}

/* Scrollbereich für Optionen */
.ms-options {
    max-height: 250px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-color) transparent;
}

.ms-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 4px;
    cursor: pointer;
    font-size: 0.8rem;
    border-radius: 4px;
    transition: background 0.1s;
}

.ms-options label:hover {
    background: rgba(255, 255, 255, 0.05);
}

.ms-options input[type="checkbox"] {
    width: 14px;
    height: 14px;
    cursor: pointer;
    accent-color: var(--accent-color);
}

/* --- RESPONSIVE / MOBILE --- */
@media (max-width: 768px) {
    #trackerTable th { display: none; }
    #trackerTable td { display: block; width: 100%; border: none !important; padding: 5px 15px; }
    #trackerTable td:first-child { padding-top: 15px; font-weight: bold; color: var(--accent-color); }
    #trackerTable td:last-child { padding-bottom: 15px; border-bottom: 1px solid var(--border-color) !important; }
    .td-date { font-size: 0.7rem; opacity: 0.6; }

    /* Filter auf Mobile */
    .filter-grid {
        grid-template-columns: 1fr 1fr;
    }

    .ms-list {
        width: 100%;
        position: fixed; 
        right: 5%;
        width: 90%;
        top: 20%;
    }
}

@media (max-width: 480px) {
    .filter-grid {
        grid-template-columns: 1fr; 
    }
}