@lipme/vue-blast-viewer 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/.vscode/extensions.json +3 -0
  2. package/index.html +13 -0
  3. package/lipme-vue-blast-viewer-1.0.0.tgz +0 -0
  4. package/lipme-vue-blast-viewer-1.0.1.tgz +0 -0
  5. package/lipme-vue-blast-viewer-1.0.2.tgz +0 -0
  6. package/lipme-vue-blast-viewer-1.0.3.tgz +0 -0
  7. package/package.json +5 -5
  8. package/src/App.vue +548 -0
  9. package/src/assets/hero.png +0 -0
  10. package/src/assets/vite.svg +1 -0
  11. package/src/assets/vue.svg +1 -0
  12. package/src/components/BlastAlignmentDetails.vue +581 -0
  13. package/src/components/BlastGraphicViewer.vue +477 -0
  14. package/src/components/BlastHeader.vue +259 -0
  15. package/src/components/BlastHitTable.vue +669 -0
  16. package/src/components/BlastViewer.vue +232 -0
  17. package/src/main.ts +5 -0
  18. package/src/mockData.ts +457 -0
  19. package/src/style.css +258 -0
  20. package/src/types.ts +59 -0
  21. package/tsconfig.app.json +14 -0
  22. package/tsconfig.json +28 -0
  23. package/vite.config.ts +24 -0
  24. package/vue-blast-viewer-1.0.0.tgz +0 -0
  25. package/dist/src/App.vue.d.ts +0 -3
  26. package/dist/src/components/BlastAlignmentDetails.vue.d.ts +0 -10
  27. package/dist/src/components/BlastGraphicViewer.vue.d.ts +0 -12
  28. package/dist/src/components/BlastHeader.vue.d.ts +0 -11
  29. package/dist/src/components/BlastHitTable.vue.d.ts +0 -13
  30. package/dist/src/components/BlastViewer.vue.d.ts +0 -10
  31. package/dist/src/main.d.ts +0 -0
  32. package/dist/src/mockData.d.ts +0 -3
  33. package/dist/src/types.d.ts +0 -53
  34. package/dist/vue-blast-viewer.css +0 -2
  35. package/dist/vue-blast-viewer.js +0 -670
  36. package/dist/vue-blast-viewer.umd.cjs +0 -2
  37. /package/{dist → public}/favicon.svg +0 -0
  38. /package/{dist → public}/icons.svg +0 -0
  39. /package/{dist/src/index.d.ts → src/index.ts} +0 -0
@@ -0,0 +1,669 @@
1
+ <script setup lang="ts">
2
+ import { ref, computed } from 'vue';
3
+ import type { BlastSearch, BlastHit } from '../types';
4
+
5
+ const props = defineProps<{
6
+ searchData: BlastSearch;
7
+ isProtein: boolean;
8
+ subjectLink?: string;
9
+ }>();
10
+
11
+ const emit = defineEmits<{
12
+ (e: 'select-hit', hitNum: number): void;
13
+ }>();
14
+
15
+ // State
16
+ const searchQuery = ref('');
17
+ const sortBy = ref<'totalScore' | 'maxScore' | 'coverage' | 'evalue' | 'identity'>('totalScore');
18
+ const sortOrder = ref<'asc' | 'desc'>('desc');
19
+ const currentPage = ref(1);
20
+ const itemsPerPage = ref(10);
21
+ const expandedHits = ref<Record<number, boolean>>({});
22
+
23
+ // Helper: Calculate merged query coverage for a hit
24
+ const calculateCoverage = (hit: BlastHit, queryLen: number): number => {
25
+ // Merge intervals
26
+ const intervals = hit.hsps.map(hsp => [
27
+ Math.min(hsp.query_from, hsp.query_to),
28
+ Math.max(hsp.query_from, hsp.query_to)
29
+ ]).sort((a, b) => a[0] - b[0]);
30
+
31
+ if (intervals.length === 0) return 0;
32
+
33
+ const merged = [intervals[0]];
34
+ for (let i = 1; i < intervals.length; i++) {
35
+ const prev = merged[merged.length - 1];
36
+ const curr = intervals[i];
37
+ if (curr[0] <= prev[1]) {
38
+ // Overlap
39
+ prev[1] = Math.max(prev[1], curr[1]);
40
+ } else {
41
+ merged.push(curr);
42
+ }
43
+ }
44
+
45
+ const coveredLen = merged.reduce((sum, interval) => sum + (interval[1] - interval[0] + 1), 0);
46
+ return Math.round((coveredLen / queryLen) * 100);
47
+ };
48
+
49
+ // Helper: Get summary metrics for a hit
50
+ const getHitMetrics = (hit: BlastHit) => {
51
+ let totalScore = 0;
52
+ let maxScore = 0;
53
+ let minEvalue = Infinity;
54
+ let maxIdent = 0;
55
+
56
+ hit.hsps.forEach(hsp => {
57
+ totalScore += hsp.bit_score;
58
+ if (hsp.bit_score > maxScore) maxScore = hsp.bit_score;
59
+ if (hsp.evalue < minEvalue) minEvalue = hsp.evalue;
60
+
61
+ const identPercent = (hsp.identity / hsp.align_len) * 100;
62
+ if (identPercent > maxIdent) maxIdent = identPercent;
63
+ });
64
+
65
+ return {
66
+ totalScore,
67
+ maxScore,
68
+ evalue: minEvalue,
69
+ identity: Math.round(maxIdent * 10) / 10,
70
+ coverage: calculateCoverage(hit, props.searchData.query_len)
71
+ };
72
+ };
73
+
74
+ // Map each hit to include computed metrics for easy sorting & filtering
75
+ const processedHits = computed(() => {
76
+ return props.searchData.hits.map(hit => {
77
+ const metrics = getHitMetrics(hit);
78
+ const mainDesc = hit.description[0];
79
+ return {
80
+ raw: hit,
81
+ num: hit.num,
82
+ title: mainDesc.title,
83
+ accession: mainDesc.accession,
84
+ id: mainDesc.id,
85
+ taxid: mainDesc.taxid,
86
+ len: hit.len,
87
+ ...metrics
88
+ };
89
+ });
90
+ });
91
+
92
+ // Filtered Hits
93
+ const filteredHits = computed(() => {
94
+ const query = searchQuery.value.toLowerCase().trim();
95
+ if (!query) return processedHits.value;
96
+
97
+ return processedHits.value.filter(hit =>
98
+ hit.title.toLowerCase().includes(query) ||
99
+ hit.accession.toLowerCase().includes(query)
100
+ );
101
+ });
102
+
103
+ // Sorted Hits
104
+ const sortedHits = computed(() => {
105
+ return [...filteredHits.value].sort((a, b) => {
106
+ let fieldA: any = a[sortBy.value];
107
+ let fieldB: any = b[sortBy.value];
108
+
109
+ // Handle special E-value sorting (lowest is best, 0 is best)
110
+ if (sortBy.value === 'evalue') {
111
+ if (fieldA === fieldB) return 0;
112
+ // Convert to comparison
113
+ const multiplier = sortOrder.value === 'asc' ? 1 : -1;
114
+ return (fieldA - fieldB) * multiplier;
115
+ }
116
+
117
+ if (fieldA < fieldB) return sortOrder.value === 'asc' ? -1 : 1;
118
+ if (fieldA > fieldB) return sortOrder.value === 'asc' ? 1 : -1;
119
+ return 0;
120
+ });
121
+ });
122
+
123
+ // Paginated Hits
124
+ const paginatedHits = computed(() => {
125
+ const start = (currentPage.value - 1) * itemsPerPage.value;
126
+ const end = start + itemsPerPage.value;
127
+ return sortedHits.value.slice(start, end);
128
+ });
129
+
130
+ const totalPages = computed(() => {
131
+ return Math.ceil(sortedHits.value.length / itemsPerPage.value) || 1;
132
+ });
133
+
134
+ // Methods
135
+ const handleSort = (field: 'totalScore' | 'maxScore' | 'coverage' | 'evalue' | 'identity') => {
136
+ if (sortBy.value === field) {
137
+ // Toggle order
138
+ sortOrder.value = sortOrder.value === 'asc' ? 'desc' : 'asc';
139
+ } else {
140
+ sortBy.value = field;
141
+ // Default to desc for everything except evalue
142
+ sortOrder.value = field === 'evalue' ? 'asc' : 'desc';
143
+ }
144
+ currentPage.value = 1; // Reset to page 1
145
+ };
146
+
147
+ const toggleExpand = (hitNum: number) => {
148
+ expandedHits.value[hitNum] = !expandedHits.value[hitNum];
149
+ };
150
+
151
+ const selectHit = (hitNum: number) => {
152
+ emit('select-hit', hitNum);
153
+ };
154
+
155
+ const formatEvalue = (val: number) => {
156
+ if (val === 0) return '0.0';
157
+ if (val < 0.001) return val.toExponential(2);
158
+ return val.toFixed(4);
159
+ };
160
+
161
+ const getSubjectLink = (accession: string) => {
162
+ if (props.subjectLink) {
163
+ return props.subjectLink.replace('{accession}', accession);
164
+ }
165
+ const db = props.isProtein ? 'protein' : 'nucleotide';
166
+ return `https://www.ncbi.nlm.nih.gov/${db}/${accession}`;
167
+ };
168
+
169
+ const exportToTSV = () => {
170
+ const headers = ['Description', 'Accession', 'Max Score', 'Total Score', 'Query Cover (%)', 'E-value', 'Identity (%)', 'Length'];
171
+
172
+ const rows = filteredHits.value.map(hit => [
173
+ hit.title.replace(/\t/g, ' '), // escape tabs in titles
174
+ hit.accession,
175
+ hit.maxScore.toFixed(1),
176
+ hit.totalScore.toFixed(1),
177
+ `${hit.coverage}%`,
178
+ hit.evalue === 0 ? '0.0' : hit.evalue.toString(),
179
+ `${hit.identity}%`,
180
+ hit.len.toString()
181
+ ]);
182
+
183
+ const tsvContent = [headers.join('\t'), ...rows.map(row => row.join('\t'))].join('\n');
184
+ const blob = new Blob([tsvContent], { type: 'text/tab-separated-values;charset=utf-8;' });
185
+ const url = URL.createObjectURL(blob);
186
+ const link = document.createElement('a');
187
+ link.setAttribute('href', url);
188
+
189
+ const queryName = props.searchData.query_id || 'blast_results';
190
+ link.setAttribute('download', `${queryName}_hits.tsv`);
191
+ link.style.visibility = 'hidden';
192
+ document.body.appendChild(link);
193
+ link.click();
194
+ document.body.removeChild(link);
195
+ };
196
+ </script>
197
+
198
+ <template>
199
+ <div class="blast-hit-table glass-panel fade-in">
200
+ <div class="table-controls">
201
+ <div class="title-group">
202
+ <h2>Sequences Producing Significant Alignments</h2>
203
+ <span class="results-count">{{ filteredHits.length }} / {{ searchData.hits.length }} hits</span>
204
+ </div>
205
+ <div class="controls-right">
206
+ <button class="btn btn-secondary btn-sm export-btn" @click="exportToTSV" title="Export current filtered hits to TSV">
207
+ 📥 Export TSV
208
+ </button>
209
+ <div class="search-box">
210
+ <input
211
+ v-model="searchQuery"
212
+ type="text"
213
+ placeholder="Filter by description or accession..."
214
+ class="input-text filter-input"
215
+ @input="currentPage = 1"
216
+ />
217
+ <span v-if="searchQuery" class="clear-search" @click="searchQuery = ''; currentPage = 1">✕</span>
218
+ </div>
219
+ </div>
220
+ </div>
221
+
222
+ <div class="table-container">
223
+ <table>
224
+ <thead>
225
+ <tr>
226
+ <th class="expand-col"></th>
227
+ <th class="desc-col">Description</th>
228
+ <th class="acc-col">Accession</th>
229
+ <th class="sortable" :class="{ 'active-sort': sortBy === 'maxScore', [sortOrder]: sortBy === 'maxScore' }" @click="handleSort('maxScore')">Max Score</th>
230
+ <th class="sortable" :class="{ 'active-sort': sortBy === 'totalScore', [sortOrder]: sortBy === 'totalScore' }" @click="handleSort('totalScore')">Total Score</th>
231
+ <th class="sortable" :class="{ 'active-sort': sortBy === 'coverage', [sortOrder]: sortBy === 'coverage' }" @click="handleSort('coverage')">Query Cover</th>
232
+ <th class="sortable" :class="{ 'active-sort': sortBy === 'evalue', [sortOrder]: sortBy === 'evalue' }" @click="handleSort('evalue')">E-value</th>
233
+ <th class="sortable" :class="{ 'active-sort': sortBy === 'identity', [sortOrder]: sortBy === 'identity' }" @click="handleSort('identity')">Ident (%)</th>
234
+ <th class="action-col">Alignment</th>
235
+ </tr>
236
+ </thead>
237
+ <tbody>
238
+ <template v-for="hit in paginatedHits" :key="hit.num">
239
+ <!-- Main Row -->
240
+ <tr class="main-row" :class="{ 'expanded': expandedHits[hit.num] }">
241
+ <td class="expand-cell" @click="toggleExpand(hit.num)">
242
+ <span class="chevron" :class="{ 'open': expandedHits[hit.num] }">▶</span>
243
+ </td>
244
+ <td class="desc-cell" @click="toggleExpand(hit.num)">
245
+ <div class="desc-title" :title="hit.title">{{ hit.title }}</div>
246
+ <div class="desc-meta" v-if="hit.taxid">Tax ID: {{ hit.taxid }} | Length: {{ hit.len }}</div>
247
+ </td>
248
+ <td class="acc-cell sequence-font">
249
+ <a :href="getSubjectLink(hit.accession)" target="_blank" class="acc-link">{{ hit.accession }}</a>
250
+ </td>
251
+ <td class="numeric-cell sequence-font">{{ hit.maxScore.toFixed(1) }}</td>
252
+ <td class="numeric-cell sequence-font">{{ hit.totalScore.toFixed(1) }}</td>
253
+ <td class="numeric-cell sequence-font">{{ hit.coverage }}%</td>
254
+ <td class="numeric-cell sequence-font">{{ formatEvalue(hit.evalue) }}</td>
255
+ <td class="numeric-cell sequence-font">{{ hit.identity }}%</td>
256
+ <td class="action-cell">
257
+ <button class="btn btn-secondary btn-sm" @click="selectHit(hit.num)">
258
+ View
259
+ </button>
260
+ </td>
261
+ </tr>
262
+
263
+ <!-- Expanded Row for HSP details -->
264
+ <tr v-if="expandedHits[hit.num]" class="expand-row">
265
+ <td colspan="9" class="expanded-container">
266
+ <div class="hsp-summary-box">
267
+ <div class="hsp-summary-title">High-scoring Segment Pairs (HSPs) details for this hit:</div>
268
+ <div class="hsp-grid">
269
+ <div
270
+ v-for="hsp in hit.raw.hsps"
271
+ :key="hsp.num"
272
+ class="hsp-item-card"
273
+ >
274
+ <div class="hsp-card-header">
275
+ <span class="hsp-badge">HSP {{ hsp.num }}</span>
276
+ <button class="btn btn-primary btn-xs" @click="selectHit(hit.num)">
277
+ Alignments Detail
278
+ </button>
279
+ </div>
280
+ <div class="hsp-card-body">
281
+ <div class="hsp-detail-row">
282
+ <span class="hsp-det-lbl">Bit Score:</span>
283
+ <span class="hsp-det-val sequence-font">{{ hsp.bit_score.toFixed(1) }}</span>
284
+ </div>
285
+ <div class="hsp-detail-row">
286
+ <span class="hsp-det-lbl">E-value:</span>
287
+ <span class="hsp-det-val sequence-font">{{ formatEvalue(hsp.evalue) }}</span>
288
+ </div>
289
+ <div class="hsp-detail-row">
290
+ <span class="hsp-det-lbl">Identities:</span>
291
+ <span class="hsp-det-val sequence-font">
292
+ {{ hsp.identity }} / {{ hsp.align_len }} ({{ Math.round((hsp.identity / hsp.align_len) * 100) }}%)
293
+ </span>
294
+ </div>
295
+ <div class="hsp-detail-row" v-if="hsp.gaps > 0">
296
+ <span class="hsp-det-lbl">Gaps:</span>
297
+ <span class="hsp-det-val sequence-font">{{ hsp.gaps }}</span>
298
+ </div>
299
+ <div class="hsp-detail-row">
300
+ <span class="hsp-det-lbl">Query Coordinates:</span>
301
+ <span class="hsp-det-val sequence-font">{{ hsp.query_from }} to {{ hsp.query_to }}</span>
302
+ </div>
303
+ <div class="hsp-detail-row">
304
+ <span class="hsp-det-lbl">Subject Coordinates:</span>
305
+ <span class="hsp-det-val sequence-font">{{ hsp.hit_from }} to {{ hsp.hit_to }}</span>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </div>
310
+ </div>
311
+ </td>
312
+ </tr>
313
+ </template>
314
+
315
+ <tr v-if="filteredHits.length === 0">
316
+ <td colspan="9" class="empty-cell">
317
+ No matching hits found for "{{ searchQuery }}"
318
+ </td>
319
+ </tr>
320
+ </tbody>
321
+ </table>
322
+ </div>
323
+
324
+ <!-- Pagination Controls -->
325
+ <div v-if="totalPages > 1" class="pagination">
326
+ <button
327
+ class="btn btn-secondary btn-pagination"
328
+ :disabled="currentPage === 1"
329
+ @click="currentPage--"
330
+ >
331
+ ◀ Prev
332
+ </button>
333
+ <span class="page-indicator">
334
+ Page <strong>{{ currentPage }}</strong> of <strong>{{ totalPages }}</strong>
335
+ </span>
336
+ <button
337
+ class="btn btn-secondary btn-pagination"
338
+ :disabled="currentPage === totalPages"
339
+ @click="currentPage++"
340
+ >
341
+ Next ▶
342
+ </button>
343
+ </div>
344
+ </div>
345
+ </template>
346
+
347
+ <style scoped>
348
+ .blast-hit-table {
349
+ padding: 1.5rem;
350
+ margin-bottom: 2rem;
351
+ display: flex;
352
+ flex-direction: column;
353
+ gap: 1.25rem;
354
+ }
355
+
356
+ .table-controls {
357
+ display: flex;
358
+ justify-content: space-between;
359
+ align-items: center;
360
+ flex-wrap: wrap;
361
+ gap: 1rem;
362
+ }
363
+
364
+ .controls-right {
365
+ display: flex;
366
+ align-items: center;
367
+ gap: 0.75rem;
368
+ flex-wrap: wrap;
369
+ }
370
+
371
+ .export-btn {
372
+ display: flex;
373
+ align-items: center;
374
+ gap: 0.35rem;
375
+ height: 38px;
376
+ background: var(--bg-overlay-1);
377
+ border: 1px solid var(--border-color);
378
+ }
379
+
380
+ .export-btn:hover {
381
+ background: var(--bg-overlay-2);
382
+ }
383
+
384
+ .title-group h2 {
385
+ font-size: 1.15rem;
386
+ font-weight: 600;
387
+ }
388
+
389
+ .results-count {
390
+ font-size: 0.8rem;
391
+ color: var(--text-secondary);
392
+ }
393
+
394
+ .search-box {
395
+ position: relative;
396
+ width: 100%;
397
+ max-width: 320px;
398
+ }
399
+
400
+ .filter-input {
401
+ width: 100%;
402
+ padding-right: 2.2rem;
403
+ }
404
+
405
+ .clear-search {
406
+ position: absolute;
407
+ right: 0.75rem;
408
+ top: 50%;
409
+ transform: translateY(-50%);
410
+ cursor: pointer;
411
+ color: var(--text-secondary);
412
+ font-size: 0.85rem;
413
+ transition: color var(--transition-fast);
414
+ }
415
+
416
+ .clear-search:hover {
417
+ color: var(--text-primary);
418
+ }
419
+
420
+ .table-container {
421
+ width: 100%;
422
+ overflow-x: auto;
423
+ border-radius: var(--radius-sm);
424
+ background: var(--bg-depth-light);
425
+ border: 1px solid var(--bg-overlay-hover);
426
+ }
427
+
428
+ table {
429
+ width: 100%;
430
+ border-collapse: collapse;
431
+ text-align: left;
432
+ font-size: 0.85rem;
433
+ }
434
+
435
+ th {
436
+ background: var(--bg-depth);
437
+ font-weight: 600;
438
+ color: var(--text-secondary);
439
+ padding: 0.75rem 1rem;
440
+ border-bottom: 1px solid var(--border-color);
441
+ user-select: none;
442
+ font-size: 0.75rem;
443
+ text-transform: uppercase;
444
+ letter-spacing: 0.05em;
445
+ }
446
+
447
+ th.sortable {
448
+ cursor: pointer;
449
+ transition: color var(--transition-fast), background-color var(--transition-fast);
450
+ }
451
+
452
+ th.sortable:hover {
453
+ color: var(--text-primary);
454
+ background: var(--bg-overlay-hover);
455
+ }
456
+
457
+ th.active-sort {
458
+ color: var(--color-primary);
459
+ }
460
+
461
+ th.active-sort::after {
462
+ content: ' ▾';
463
+ font-weight: 900;
464
+ }
465
+
466
+ th.active-sort.asc::after {
467
+ content: ' ▴';
468
+ }
469
+
470
+ td {
471
+ padding: 0.75rem 1rem;
472
+ border-bottom: 1px solid var(--border-color);
473
+ vertical-align: middle;
474
+ }
475
+
476
+ .main-row {
477
+ transition: background-color var(--transition-fast);
478
+ }
479
+
480
+ .main-row:hover {
481
+ background: var(--bg-overlay-hover);
482
+ }
483
+
484
+ .main-row.expanded {
485
+ background: var(--color-primary-glow);
486
+ }
487
+
488
+ .expand-cell {
489
+ width: 36px;
490
+ text-align: center;
491
+ cursor: pointer;
492
+ }
493
+
494
+ .chevron {
495
+ display: inline-block;
496
+ font-size: 0.65rem;
497
+ transition: transform var(--transition-fast);
498
+ color: var(--text-secondary);
499
+ }
500
+
501
+ .chevron.open {
502
+ transform: rotate(90deg);
503
+ color: var(--color-primary);
504
+ }
505
+
506
+ .desc-cell {
507
+ cursor: pointer;
508
+ max-width: 350px;
509
+ }
510
+
511
+ .desc-title {
512
+ font-weight: 600;
513
+ color: var(--text-primary);
514
+ overflow: hidden;
515
+ text-overflow: ellipsis;
516
+ white-space: nowrap;
517
+ }
518
+
519
+ .desc-meta {
520
+ font-size: 0.75rem;
521
+ color: var(--text-muted);
522
+ margin-top: 0.15rem;
523
+ }
524
+
525
+ .acc-link {
526
+ color: var(--color-primary);
527
+ text-decoration: none;
528
+ font-weight: 500;
529
+ border-bottom: 1px dashed rgba(59, 130, 246, 0.3);
530
+ transition: border-color var(--transition-fast);
531
+ }
532
+
533
+ .acc-link:hover {
534
+ border-bottom-color: var(--color-primary);
535
+ }
536
+
537
+ .numeric-cell {
538
+ font-weight: 500;
539
+ }
540
+
541
+ .action-col {
542
+ width: 90px;
543
+ text-align: center;
544
+ }
545
+
546
+ .btn-xs {
547
+ font-size: 0.7rem;
548
+ padding: 0.25rem 0.5rem;
549
+ border-radius: 4px;
550
+ }
551
+
552
+ .btn-sm {
553
+ font-size: 0.75rem;
554
+ padding: 0.35rem 0.75rem;
555
+ border-radius: 4px;
556
+ }
557
+
558
+ .expand-row {
559
+ background: rgba(0, 0, 0, 0.2);
560
+ }
561
+
562
+ .expanded-container {
563
+ padding: 1.25rem;
564
+ border-left: 2px solid var(--color-primary);
565
+ }
566
+
567
+ .hsp-summary-box {
568
+ display: flex;
569
+ flex-direction: column;
570
+ gap: 0.75rem;
571
+ }
572
+
573
+ .hsp-summary-title {
574
+ font-weight: 600;
575
+ font-size: 0.8rem;
576
+ color: var(--text-secondary);
577
+ }
578
+
579
+ .hsp-grid {
580
+ display: grid;
581
+ grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
582
+ gap: 0.75rem;
583
+ }
584
+
585
+ .hsp-item-card {
586
+ background: rgba(255, 255, 255, 0.02);
587
+ border: 1px solid var(--border-color);
588
+ border-radius: var(--radius-sm);
589
+ padding: 0.75rem;
590
+ display: flex;
591
+ flex-direction: column;
592
+ gap: 0.5rem;
593
+ }
594
+
595
+ .hsp-card-header {
596
+ display: flex;
597
+ justify-content: space-between;
598
+ align-items: center;
599
+ border-bottom: 1px solid var(--border-color);
600
+ padding-bottom: 0.35rem;
601
+ }
602
+
603
+ .hsp-badge {
604
+ font-family: var(--font-mono);
605
+ font-weight: 600;
606
+ font-size: 0.75rem;
607
+ color: var(--text-primary);
608
+ }
609
+
610
+ .hsp-card-body {
611
+ display: flex;
612
+ flex-direction: column;
613
+ gap: 0.25rem;
614
+ font-size: 0.8rem;
615
+ }
616
+
617
+ .hsp-detail-row {
618
+ display: flex;
619
+ justify-content: space-between;
620
+ }
621
+
622
+ .hsp-det-lbl {
623
+ color: var(--text-secondary);
624
+ }
625
+
626
+ .hsp-det-val {
627
+ font-weight: 500;
628
+ color: var(--text-primary);
629
+ }
630
+
631
+ .empty-cell {
632
+ text-align: center;
633
+ padding: 2rem;
634
+ color: var(--text-secondary);
635
+ font-style: italic;
636
+ }
637
+
638
+ .pagination {
639
+ display: flex;
640
+ justify-content: center;
641
+ align-items: center;
642
+ gap: 1.5rem;
643
+ font-size: 0.85rem;
644
+ margin-top: 0.5rem;
645
+ }
646
+
647
+ .btn-pagination {
648
+ padding: 0.4rem 0.8rem;
649
+ font-size: 0.8rem;
650
+ }
651
+
652
+ .page-indicator {
653
+ color: var(--text-secondary);
654
+ }
655
+
656
+ .page-indicator strong {
657
+ color: var(--text-primary);
658
+ }
659
+
660
+ @media (max-width: 1024px) {
661
+ .table-controls {
662
+ flex-direction: column;
663
+ align-items: flex-start;
664
+ }
665
+ .search-box {
666
+ max-width: 100%;
667
+ }
668
+ }
669
+ </style>