.workbook-preview-wrap {
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    overflow: hidden;
}

.preview-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem;
}

.preview-scroller {
    max-height: 460px;
    overflow: auto;
}

.preview-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 0.9rem;
}

.preview-table th,
.preview-table td {
    border-right: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
    padding: 0.35rem 0.5rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 34px;
}

.preview-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #fff;
}

.preview-table .index-col {
    position: sticky;
    left: 0;
    z-index: 3;
    background: #fff;
    width: 76px;
    min-width: 76px;
    max-width: 76px;
}

.preview-table .header-cell {
    background: #f8fafc;
    font-weight: 600;
}

.preview-table tr.duplicate-row td {
    background: #fff8e1;
}

.preview-table tr.remove-row td {
    background: #fde8e8;
}

.preview-table .key-col {
    outline: 1px solid #f59e0b;
    outline-offset: -1px;
}

.sheet-pill {
    border: 1px solid #ced4da;
    border-radius: 999px;
    background: #fff;
    color: #374151;
    padding: 0.25rem 0.7rem;
    font-size: 0.82rem;
}

.sheet-pill.active {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.5rem;
}

.small-note {
    font-size: 0.82rem;
    color: #6c757d;
}

@media (max-width: 767px) {
    .preview-scroller {
        max-height: 340px;
    }

    .preview-table {
        font-size: 0.82rem;
    }
}
