- {/* Tab row — horizontally scrollable so 5 tabs stay clean on small phones */}
-
+ {/* Tab row — fixed 5-across grid so every category is visible without
+ horizontal scrolling. Icon-over-label stack keeps each tab compact
+ but tappable on small phones; a count badge floats in the corner. */}
+
{tabs.map(({ key, label, icon: Icon }) => {
const isActive = serviceType === key;
const a = ACCENT[key];
@@ -292,23 +294,19 @@ function LabToolbar({
key={key}
onClick={() => onServiceChange(key)}
className={cn(
- 'relative flex items-center gap-1 sm:gap-1.5 px-2.5 sm:px-3 py-2 rounded-xl font-black text-[11px] sm:text-xs uppercase tracking-wide transition-all duration-150 active:scale-95 flex-1 min-w-fit justify-center whitespace-nowrap',
+ 'relative flex flex-col items-center justify-center gap-1 px-1 py-2 rounded-xl font-black text-[10px] sm:text-xs uppercase tracking-tight sm:tracking-wide transition-all duration-150 active:scale-95',
isActive
? a.active
: 'text-gray-500 bg-white/5 hover:bg-white/10 hover:text-white border border-transparent'
)}
>
-
- {label}
- {/* Count badge */}
- {!isLoading && (
+
+ {label}
+ {/* Count badge — floats top-right so it never widens the tab */}
+ {!isLoading && counts[key] > 0 && (
0
- ? isActive
- ? 'bg-white/25 text-white'
- : 'bg-white/10 text-gray-400'
- : 'bg-white/5 text-gray-600'
+ 'absolute -top-1 -right-1 min-w-[16px] h-[16px] px-1 text-[9px] font-black rounded-full flex items-center justify-center leading-none border border-black/40',
+ isActive ? 'bg-white text-black' : 'bg-white/15 text-gray-300'
)}>
{counts[key]}