/* ============================================
   表格样式
   ============================================ */

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

/* 结果检查表格滚动容器 */
#subtab-result-table > div {
    box-sizing: border-box;
}

#subtab-result-table .data-table {
    table-layout: auto;
    white-space: nowrap;
}

#subtab-result-table .data-table th,
#subtab-result-table .data-table td {
    white-space: nowrap;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
}

/* 结果检查表格：冻结首列，便于横向滚动查看 */
#subtab-result-table .data-table th:first-child,
#subtab-result-table .data-table td:first-child {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #fff;
}

#subtab-result-table .data-table thead th:first-child {
    z-index: 3;
    background: #fafafa;
}

#subtab-result-table .data-table td:first-child {
    box-shadow: 1px 0 0 rgba(0, 0, 0, 0.06);
}

.results-scroll-hint {
    position: sticky;
    right: 8px;
    bottom: 8px;
    margin-left: auto;
    width: fit-content;
    padding: 6px 10px;
    font-size: 12px;
    color: #666;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--border-color);
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    pointer-events: none;
    z-index: 4;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.data-table th {
    background: #fafafa;
    font-weight: 600;
    color: var(--text-secondary);
    position: relative;
}

.data-table tbody tr:hover {
    background: #f5f5f5;
}

.data-table .actions {
    white-space: nowrap;
}

.data-table .actions .btn {
    margin-right: 4px;
}

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

.filter-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 10px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.filter-toggle:hover {
    color: var(--primary-color);
}

.filter-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-top: none;
    padding: 8px;
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

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

.col-filter {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
}

.col-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

.number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
