/* --- Table, Filter, and Sorting Styles --- */
.table-container {
    max-height: 70vh;
    overflow-y: auto;
    overflow-x: auto;
}

.table-container thead th {
    position: sticky;
    top: 0;
    background-color: #f9fafb;
    z-index: 10;
}

.th-sticky .flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.filter-btn {
    padding: 2px 4px;
    border-radius: 4px;
    margin-left: 8px;
}

.filter-btn.active {
    color: #2563eb;
    background-color: #dbeafe;
}

#filter-dropdown,
#filter-dropdown-gl,
#filter-dropdown-trades,
#filter-dropdown-region,
#filter-dropdown-security-master {
    position: absolute;
    display: none;
    background-color: white;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 30;
    padding: 0.75rem;
    min-width: 200px;
}

#filter-dropdown-content,
#filter-dropdown-gl-content,
#filter-dropdown-trades-content,
#filter-dropdown-region-content,
#filter-dropdown-security-master-content {
    max-height: 250px;
    overflow-y: auto;
    margin-bottom: 0.5rem;
}

.filter-dropdown-item {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
}

.filter-dropdown-item label {
    margin-left: 0.5rem;
    font-weight: normal;
    color: #374151;
    cursor: pointer;
}

.filter-actions {
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.editable-input,
.header-filter {
    border: none;
    background-color: transparent;
    width: 100%;
    padding: 0.1rem 0.25rem;
    border-radius: 4px;
}

.header-filter {
    border: 1px solid #d1d5db;
}

.editable-input:focus,
.header-filter:focus {
    outline: 1px solid #3b82f6;
    background-color: #eff6ff;
}

.th-sticky {
    position: sticky;
    top: 0;
    z-index: 12;
    background-color: #f9fafb;
}

.td-sticky {
    position: sticky;
    z-index: 11;
    background-color: white;
}

.td-sticky:has(.editable-input:focus) {
    z-index: 20;
}

th[data-sortable="true"]:hover {
    background-color: #e5e7eb;
}

.sort-icon .fa-sort-up,
.sort-icon .fa-sort-down {
    color: #2563eb;
}

.th-sticky-1,
.td-sticky-1 {
    left: 0;
    z-index: 13;
}

.th-sticky-2,
.td-sticky-2 {
    left: 50px;
    z-index: 12;
}

.th-sticky-3,
.td-sticky-3 {
    left: 220px;
}

.th-sticky-4,
.td-sticky-4 {
    left: 350px;
}

