.table-widget-container {
    max-width: 1200px;
}

.filters {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    padding: 12px;
    flex-wrap: wrap;
}

.stage-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    width: 100%;
}

.stage-btn {
    background: transparent;
    color: #141414;
    text-transform: uppercase;
    border: 2px solid rgba(140, 117, 3, 1);
    padding: 10px 15px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, color 0.3s;
    font-size: 14px;
}

.stage-btn:hover {
    background: rgba(140, 117, 3, 1);
    color: #fff;
}

.stage-btn.active {
    background: rgba(140, 117, 3, 1);
    color: #fff;
}

.filter-container {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: space-between;
    width: 100%;
}

.filter-inputs {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
}

.filter-group {
    width: 200px;
    margin-bottom: 0;
}

.filter-group label.hidden {
    display: none;
}

.filter-group select, .filter-group input {
    width: 100%;
    padding: 10px;
    font-weight: 600;
    text-transform: uppercase;
    border: 2px solid rgba(140, 117, 3, 1);
    font-size: 14px;
}

.filter-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.filters button {
    background: transparent;
    color: #141414;
    text-transform: uppercase;
    border: 2px solid rgba(140, 117, 3, 1);
    padding: 8px 18px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
}

.filters button:hover {
    background: rgba(140, 117, 3, 1);
    color: #fff;
}

#apply-filters {
    background: #15371b;
    border: none;
    color: #fff;
}

#apply-filters:hover {
    background: rgba(0, 25, 0, 1);
    color: #fff;
}

.results-info {
    margin-bottom: 15px;
    padding: 0 12px;
    font-weight: 500;
    color: #7f8c8d;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    table-layout: fixed;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    width: 20%;
}

th {
    background-color: #15371b;
    color: white;
    position: sticky;
    top: 0;
    cursor: pointer;
}

th:hover {
    background-color: rgba(0, 25, 0, 1);
}

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

tr:hover {
    background-color: rgb(42 109 54 / 30%);
}

.status-sold {
    color: #e42f2f;
    font-weight: 600;
}

.status-available {
    color: #27ae60;
    font-weight: 600;
}

.status-contract {
    color: #FFC001;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 30px;
    color: #7f8c8d;
    font-style: italic;
}

.sort-toggle-btn.active {
    background: rgba(140, 117, 3, 1);
    color: #fff;
}
.sort-toggle-btn .arrow {
    font-size: 18px;
}

/* Loading Spinner */
.loading-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #15371b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

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

.loading-text {
    color: #7f8c8d;
    font-size: 16px;
    font-weight: 500;
}

.hidden {
    display: none !important;
}
@media (max-width: 768px) {
    .filter-container {
        justify-content: center;
    }
    .filters {
        align-items: stretch;
        border-radius: 0;
        margin-bottom: 10px
    }
    .filter-group {
        width: 140px;
    }
    .filter-group select {
        padding: 8px;
        font-size: 12px;
    }
    .filters button {
        padding: 8px 12px;
        font-size: 12px;
        width: 140px;
    }        
    .sort-toggle-btn .arrow {
        font-size: 12px;
    }
    .results-info {
        padding: 0 5px;
    }
    th, td {
        padding: 5px;
        font-size: 12px;
    }
    .table-container {
        width: 100%;
        overflow-x: auto;
    }
    table {
        width: 100%;
        min-width: 330px;
    }
            
    .table-widget-container {
        margin: 0;
        padding: 0;
    }
}