{#each columns as col}
toggleSort(col.key)} class="flex items-center gap-1 {col.flex || col.width || ''} px-1 hover:text-[var(--text)] transition-colors text-left" > {col.label} {#if sortKey === col.key}
{sortOrder === 'asc' ? '↑' : '↓'}
{/if}
{/each}
{#each sortedItems() as doc}
handleClick(doc)} class="flex items-center gap-1 px-2 py-1.5 w-full text-left border-b border-[var(--border)]/30 hover:bg-[var(--surface)] transition-colors group {selectedId === doc.id ? 'bg-[var(--accent)]/5 border-l-2 border-l-[var(--accent)]' : ''}" >
{doc.title || '제목 없음'}
{doc.ai_domain?.replace('Industrial_Safety/', 'IS/') || '-'}
{doc.document_type || doc.file_format?.toUpperCase() || '-'}
{formatSize(doc.file_size)}
{formatDate(doc.created_at)}
{/each}