.table-responsive {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 500px;
    position: relative;
}

.table-responsive table thead th {
    position: sticky;
    top: 0;
    background: var(--bs-body-bg);
    z-index: 1;
    /* Add a subtle border to make the header more distinct */
    border-bottom: 2px solid var(--bs-border-color);
}

.error-row {
    background-color: var(--bs-danger-bg-subtle);
}

.editable-cell {
    cursor: pointer;
}

.editable-cell:hover {
    background-color: var(--bs-primary-bg-subtle);
}

.loading {
    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;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
}

/* Error table styling */
.table-danger thead th {
    background-color: var(--bs-danger);
    color: var(--bs-light);
    border-bottom: 2px solid var(--bs-danger-border-subtle);
}

.table-danger tbody td {
    background-color: var(--bs-danger-bg-subtle);
    color: var(--bs-danger-text);
}

.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease-out;
}