Naufal Arhab commited on
Commit
e2becea
·
1 Parent(s): cea524b

refactor(ui): declutter card headers, unify insight boxes, and polish responsive filters

Browse files
frontend/src/components/signals/SignalCard.tsx CHANGED
@@ -92,164 +92,192 @@ Forward Anticipation: ${signal.anticipation || levels?.anticipation || ''}`;
92
 
93
  return (
94
  <div
95
- className={`card border transition-all duration-300 flex flex-col justify-between signal-card-container ${
96
  isFreshUpdate ? 'ring-1 ring-accent-blue/50' : ''
97
  } ${
98
- signal.has_spot === false ? 'border-amber-500/40 hover:border-amber-500/60' : ''
99
  } ${glowClass[signal.direction]}`}
100
  >
101
- {/* Card Header */}
102
- <div className="p-3.5 sm:p-5">
103
- <div className="flex items-start justify-between gap-3 mb-2.5 sm:mb-3">
104
- <div className="flex items-center gap-2.5">
105
- {/* Pulse dot */}
106
- <span
107
- className={`w-2.5 h-2.5 rounded-full shrink-0 ${
108
- signal.direction === 'LONG'
109
- ? 'bg-signal-long ' + pulseClass.LONG
110
- : signal.direction === 'SHORT'
111
- ? 'bg-signal-short ' + pulseClass.SHORT
112
- : 'bg-text-muted'
113
- }`}
114
- />
115
- <div>
116
- <div className="flex items-center gap-1.5">
117
- <h3 className="text-sm sm:text-base font-bold font-mono text-text-primary leading-none">
118
- {signal.symbol}
119
- </h3>
120
- {signal.has_spot === false && (
121
- <span className="px-2 py-0.5 rounded-full text-[9px] sm:text-[10px] font-mono font-bold bg-amber-500/20 text-amber-300 border border-amber-500/40 flex items-center gap-1 shrink-0" title="Aset RAWAN BANDAR: Kontrak Perp-Only tanpa pasar Spot riil. Rawan manipulasi wick sweep!">
122
- <AlertTriangle size={10} className="text-amber-400" />
123
- <span>⚠️ RAWAN (Perp Only)</span>
124
- </span>
125
- )}
126
- {signal.has_spot === true && (
127
- <span className="px-2 py-0.5 rounded-full text-[9px] sm:text-[10px] font-mono font-semibold bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1 shrink-0" title="Aset AMAN: Memiliki pasar Spot riil di bursa. Terlindung dari manipulasi mark price bursa.">
128
- <ShieldCheck size={10} className="text-emerald-400" />
129
- <span>🛡️ AMAN (Ada Spot)</span>
130
- </span>
131
- )}
132
- </div>
133
- <p className="text-[11px] sm:text-xs text-text-secondary mt-0.5">{signal.market_condition}</p>
134
  </div>
135
- </div>
136
 
137
- <div className="flex items-center gap-1.5 sm:gap-2 shrink-0">
138
- {isSqueeze && (
139
- <span className="px-1.5 py-0.5 rounded text-[10px] font-mono font-bold bg-amber-500/20 text-amber-400 border border-amber-500/30 flex items-center gap-1 animate-pulse" title="Volatility Squeeze (Breakout Imminent)">
140
- <Zap size={10} />
141
- <span className="hidden xs:inline">Squeeze</span>
 
 
 
 
 
 
 
 
142
  </span>
143
- )}
144
- <Badge variant="blue" size="sm">
145
- {signal.active_timeframe}
146
- </Badge>
147
- <SignalBadge direction={signal.direction} size="sm" />
148
  </div>
149
- </div>
150
 
151
- {/* Distinct Alert Header Banner */}
152
- {signal.has_spot === false && (
153
- <div className="mb-2 px-2.5 sm:px-3 py-1.5 rounded-lg bg-amber-500/10 border border-amber-500/30 text-[11px] sm:text-xs text-amber-200 flex items-center gap-2 font-medium">
154
- <AlertTriangle size={13} className="text-amber-400 shrink-0" />
155
- <span><strong>⚠️ RAWAN BANDAR (Perp Only)</strong>: Koin ini tidak ada di Spot. Setup tetap aktif, namun pasang SL ketat!</span>
156
- </div>
157
- )}
158
- {signal.has_spot === true && (
159
- <div className="mb-2 px-2.5 sm:px-3 py-1 rounded-lg bg-emerald-500/10 border border-emerald-500/20 text-[10px] sm:text-[11px] text-emerald-300 flex items-center gap-1.5 font-medium">
160
- <ShieldCheck size={12} className="text-emerald-400 shrink-0" />
161
- <span><strong>🛡️ AMAN (Spot Backed)</strong>: Pasar spot riil tersedia. Arbitrase harga organik & stabil.</span>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
162
  </div>
163
- )}
164
 
165
- {/* 1-Line Quick Verdict for Instant Clarity */}
166
- {signal.quick_verdict && (
167
- <div className="mb-2 px-2.5 sm:px-3 py-1.5 sm:py-2 rounded-lg bg-bg-elevated/70 border border-border/80 text-[11px] sm:text-xs text-text-primary leading-snug">
168
- <span className="font-bold text-accent-blue mr-1.5 font-mono uppercase text-[9px] sm:text-[10px] tracking-wide">
169
- {signal.action || (signal.direction === 'LONG' ? 'BUY' : signal.direction === 'SHORT' ? 'SELL' : 'WAIT')}:
170
- </span>
171
- {signal.quick_verdict}
172
- </div>
173
- )}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
 
175
- {/* Forward-Looking Anticipation Text */}
176
- {signal.anticipation && signal.anticipation !== signal.quick_verdict && (
177
- <div className="mb-2.5 px-2.5 sm:px-3 py-1.5 rounded-lg bg-accent-blue/10 border border-accent-blue/20 text-xs text-text-primary leading-snug flex items-start gap-1.5">
178
- <span className="font-bold text-accent-blue font-mono text-[9px] sm:text-[10px] uppercase tracking-wide shrink-0">
179
- 🔮 Antisipasi:
180
- </span>
181
- <span className="text-[10px] sm:text-[11px] text-text-secondary leading-snug">{signal.anticipation}</span>
182
- </div>
183
- )}
184
 
185
- {/* Conviction Meter */}
186
- <ConvictionMeter score={signal.conviction} direction={signal.direction} />
 
 
 
 
 
 
 
187
 
188
- {/* Pre-Calculated Trade Levels Box for Instant Action */}
189
- {levels && (
190
- <div className={`mt-3 p-2 sm:p-2.5 rounded-lg border flex items-center justify-between text-xs gap-2 ${
191
- signal.has_spot === false
192
- ? 'bg-amber-950/20 border-amber-500/30'
193
- : 'bg-bg-primary/90 border-border/80'
194
- }`}>
195
- <div className="flex items-center gap-2 sm:gap-2.5 overflow-x-auto no-scrollbar text-[10px] sm:text-[11px] font-mono py-0.5">
196
- <div className="shrink-0">
197
- <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-text-muted block">Entry</span>
198
- <span className="font-bold text-text-primary">{levels.entry_zone}</span>
199
- </div>
200
- <div className="h-4 sm:h-5 w-[1px] bg-border shrink-0" />
201
- <div className="shrink-0">
202
- <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-signal-short block">SL</span>
203
- <span className="font-bold text-signal-short">{levels.stop_loss_str}</span>
204
- </div>
205
- <div className="h-4 sm:h-5 w-[1px] bg-border shrink-0" />
206
- <div className="shrink-0">
207
- <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-signal-long block">TP1</span>
208
- <span className="font-bold text-signal-long">{levels.take_profit_1_str}</span>
209
- </div>
210
- {levels.predicted_target && (
211
- <>
212
- <div className="h-4 sm:h-5 w-[1px] bg-border shrink-0" />
213
- <div className="shrink-0">
214
- <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-amber-400 block flex items-center gap-0.5">
 
215
  <Target size={9} /> Magnet
216
  </span>
217
- <span className="font-bold text-amber-300">{levels.predicted_target}</span>
218
  </div>
219
- </>
220
- )}
221
- <div className="h-4 sm:h-5 w-[1px] bg-border shrink-0" />
222
- <div className="shrink-0">
223
- {signal.has_spot === false ? (
224
- <span className="text-[9px] px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-300 font-bold border border-amber-500/30 flex items-center gap-0.5" title="Koin Perp-Only: Wajib pasang Stop Loss ketat!">
225
- <AlertTriangle size={9} /> SL Ketat!
226
- </span>
227
  ) : (
228
- <span className="text-[9px] px-1.5 py-0.5 rounded bg-emerald-500/20 text-emerald-300 font-bold border border-emerald-500/30 flex items-center gap-0.5" title="Pasar Spot Ada: Risiko manipulasi rendah">
229
- <ShieldCheck size={9} /> Spot OK
230
- </span>
 
231
  )}
232
  </div>
 
 
 
 
 
 
 
 
 
233
  </div>
234
- <button
235
- onClick={handleCopyPlan}
236
- title="Copy Trade Plan"
237
- className="p-1.5 rounded-md hover:bg-bg-elevated border border-border/60 hover:border-border text-text-muted hover:text-text-primary transition-all ml-1 shrink-0 flex items-center gap-1 text-[10px] font-mono active:scale-90"
238
- >
239
- {copied ? <Check size={12} className="text-signal-long" /> : <Copy size={12} />}
240
- <span className="hidden sm:inline">{copied ? 'Copied' : 'Plan'}</span>
241
- </button>
242
- </div>
243
- )}
244
 
245
  {/* Footer row */}
246
- <div className="flex flex-wrap items-center justify-between gap-2 mt-3 pt-2.5 border-t border-border/40">
247
  <div className="flex items-center gap-1 text-[10px] sm:text-[11px] text-text-muted">
248
  <Clock size={11} />
249
  <span>{formatTimeAgo(signal.updated_at)}</span>
250
  </div>
251
 
252
- <div className="flex items-center gap-1.5 sm:gap-2 shrink-0">
253
  <button
254
  onClick={() => {
255
  if (onNavigateToAI) {
@@ -258,7 +286,7 @@ Forward Anticipation: ${signal.anticipation || levels?.anticipation || ''}`;
258
  setShowAIPanel((v) => !v);
259
  }
260
  }}
261
- className="px-2.5 py-1 sm:py-1.5 rounded-lg text-xs font-semibold flex items-center gap-1.5 transition-all shadow-sm active:scale-95 cursor-pointer border bg-gradient-to-r from-purple-500/20 to-blue-500/20 hover:from-purple-500/30 hover:to-blue-500/30 border-purple-500/40 hover:border-purple-400 text-purple-300 hover:text-white"
262
  title="Buka Halaman Tanya AI Khusus untuk Pair Ini"
263
  >
264
  <Sparkles size={11} className="text-purple-400 animate-pulse" />
@@ -270,7 +298,7 @@ Forward Anticipation: ${signal.anticipation || levels?.anticipation || ''}`;
270
  onClick={handleRefresh}
271
  loading={isPending}
272
  icon={<RefreshCw size={11} />}
273
- className="text-xs px-2 sm:px-2.5 py-1 sm:py-1.5"
274
  >
275
  <span className="hidden xs:inline">Refresh</span>
276
  </Button>
@@ -279,7 +307,7 @@ Forward Anticipation: ${signal.anticipation || levels?.anticipation || ''}`;
279
  size="sm"
280
  onClick={() => setExpanded((v) => !v)}
281
  icon={expanded ? <ChevronUp size={11} /> : <ChevronDown size={11} />}
282
- className="text-xs px-2 sm:px-2.5 py-1 sm:py-1.5"
283
  >
284
  {expanded ? 'Hide' : 'Details'}
285
  </Button>
 
92
 
93
  return (
94
  <div
95
+ className={`card border transition-all duration-300 flex flex-col justify-between signal-card-container overflow-hidden rounded-xl ${
96
  isFreshUpdate ? 'ring-1 ring-accent-blue/50' : ''
97
  } ${
98
+ signal.has_spot === false ? 'border-amber-500/30 hover:border-amber-500/50' : 'border-border hover:border-border/80'
99
  } ${glowClass[signal.direction]}`}
100
  >
101
+ {/* Card Content Area */}
102
+ <div className="p-3.5 sm:p-4 flex flex-col flex-1 justify-between">
103
+ <div>
104
+ {/* Header Row 1: Symbol & Core Signal Badge */}
105
+ <div className="flex items-center justify-between gap-2 mb-1.5">
106
+ <div className="flex items-center gap-2 min-w-0">
107
+ {/* Pulse dot */}
108
+ <span
109
+ className={`w-2.5 h-2.5 rounded-full shrink-0 ${
110
+ signal.direction === 'LONG'
111
+ ? 'bg-signal-long ' + pulseClass.LONG
112
+ : signal.direction === 'SHORT'
113
+ ? 'bg-signal-short ' + pulseClass.SHORT
114
+ : 'bg-text-muted'
115
+ }`}
116
+ />
117
+ <h3 className="text-sm sm:text-base font-bold font-mono text-text-primary leading-none truncate">
118
+ {signal.symbol}
119
+ </h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
120
  </div>
 
121
 
122
+ <div className="flex items-center gap-1.5 shrink-0">
123
+ <SignalBadge direction={signal.direction} size="sm" />
124
+ <span
125
+ className={`text-[10px] font-mono font-bold px-1.5 py-0.5 rounded border ${
126
+ signal.conviction >= 6
127
+ ? 'bg-signal-long/15 text-signal-long border-signal-long/30'
128
+ : signal.conviction >= 3
129
+ ? 'bg-accent-blue/15 text-accent-blue border-accent-blue/30'
130
+ : 'bg-bg-elevated text-text-muted border-border'
131
+ }`}
132
+ title={`Conviction: ${signal.conviction}/10`}
133
+ >
134
+ {signal.conviction}/10
135
  </span>
136
+ </div>
 
 
 
 
137
  </div>
 
138
 
139
+ {/* Header Row 2: Market Condition & Micro Status Pills */}
140
+ <div className="flex items-center justify-between gap-2 mb-3 text-[11px] text-text-secondary">
141
+ <span className="truncate capitalize">{signal.market_condition || 'Normal Market'}</span>
142
+ <div className="flex items-center gap-1.5 shrink-0">
143
+ {signal.has_spot === false && (
144
+ <span
145
+ className="px-1.5 py-0.5 rounded text-[10px] font-mono font-bold bg-amber-500/15 text-amber-300 border border-amber-500/30 flex items-center gap-1"
146
+ title="Aset RAWAN BANDAR: Kontrak Perp-Only tanpa pasar Spot riil."
147
+ >
148
+ <AlertTriangle size={10} className="text-amber-400" />
149
+ <span>Perp Only</span>
150
+ </span>
151
+ )}
152
+ {signal.has_spot === true && (
153
+ <span
154
+ className="px-1.5 py-0.5 rounded text-[10px] font-mono font-medium bg-emerald-500/10 text-emerald-400 border border-emerald-500/25 flex items-center gap-1"
155
+ title="Aset AMAN: Pasar Spot riil tersedia."
156
+ >
157
+ <ShieldCheck size={10} className="text-emerald-400" />
158
+ <span>Spot</span>
159
+ </span>
160
+ )}
161
+ {isSqueeze && (
162
+ <span
163
+ className="px-1.5 py-0.5 rounded text-[10px] font-mono font-bold bg-amber-500/20 text-amber-400 border border-amber-500/30 flex items-center gap-1 animate-pulse"
164
+ title="Volatility Squeeze (Breakout Imminent)"
165
+ >
166
+ <Zap size={10} />
167
+ <span>Squeeze</span>
168
+ </span>
169
+ )}
170
+ <Badge variant="blue" size="sm">
171
+ {signal.active_timeframe}
172
+ </Badge>
173
+ </div>
174
  </div>
 
175
 
176
+ {/* Unified Verdict & Insight Box (Consolidated to prevent stacked box clutter) */}
177
+ {(signal.quick_verdict || signal.anticipation || signal.has_spot === false) && (
178
+ <div
179
+ className={`mb-3 p-2.5 rounded-lg border text-xs space-y-1.5 transition-colors ${
180
+ signal.has_spot === false
181
+ ? 'bg-amber-950/20 border-amber-500/30'
182
+ : 'bg-bg-elevated/70 border-border/80'
183
+ }`}
184
+ >
185
+ {/* Action & Verdict */}
186
+ <div className="flex items-start gap-2">
187
+ <span
188
+ className={`font-mono font-bold uppercase text-[9px] sm:text-[10px] px-1.5 py-0.5 rounded shrink-0 tracking-wide ${
189
+ signal.direction === 'LONG'
190
+ ? 'bg-signal-long/20 text-signal-long border border-signal-long/30'
191
+ : signal.direction === 'SHORT'
192
+ ? 'bg-signal-short/20 text-signal-short border border-signal-short/30'
193
+ : 'bg-bg-elevated text-text-muted border border-border'
194
+ }`}
195
+ >
196
+ {signal.action || (signal.direction === 'LONG' ? 'BUY' : signal.direction === 'SHORT' ? 'SELL' : 'WAIT')}
197
+ </span>
198
+ <p className="text-[11px] sm:text-xs text-text-primary font-medium flex-1 leading-snug">
199
+ {signal.quick_verdict || (signal.direction === 'LONG' ? 'Akumulasi beli dengan momentum tinggi' : 'Tekanan jual terkonfirmasi')}
200
+ </p>
201
+ </div>
202
 
203
+ {/* Forward Anticipation (Subtle subtext) */}
204
+ {signal.anticipation && signal.anticipation !== signal.quick_verdict && (
205
+ <div className="flex items-start gap-1.5 text-[10px] sm:text-[11px] text-accent-blue/90 pt-1 border-t border-border/40">
206
+ <span className="font-semibold shrink-0 uppercase font-mono tracking-wider text-[9px]">🔮 Antisipasi:</span>
207
+ <span className="text-text-secondary leading-snug">{signal.anticipation}</span>
208
+ </div>
209
+ )}
 
 
210
 
211
+ {/* Safety Warning Note (Only if Perp-Only) */}
212
+ {signal.has_spot === false && (
213
+ <div className="flex items-center gap-1.5 text-[10px] text-amber-300/90 pt-1 border-t border-amber-500/20 font-medium">
214
+ <AlertTriangle size={11} className="shrink-0 text-amber-400" />
215
+ <span>Koin Perp-Only (tanpa spot). Wajib pasang SL ketat!</span>
216
+ </div>
217
+ )}
218
+ </div>
219
+ )}
220
 
221
+ {/* Conviction Meter */}
222
+ <ConvictionMeter score={signal.conviction} direction={signal.direction} />
223
+
224
+ {/* Pre-Calculated Trade Levels Box */}
225
+ {levels && (
226
+ <div
227
+ className={`mt-3 p-2 sm:p-2.5 rounded-lg border flex items-center justify-between gap-2 ${
228
+ signal.has_spot === false
229
+ ? 'bg-amber-950/15 border-amber-500/25'
230
+ : 'bg-bg-primary/80 border-border/70'
231
+ }`}
232
+ >
233
+ <div className="grid grid-cols-3 sm:grid-cols-4 gap-2 flex-1 min-w-0 font-mono text-[10px] sm:text-[11px]">
234
+ <div className="min-w-0">
235
+ <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-text-muted block">Entry</span>
236
+ <span className="font-bold text-text-primary truncate block">{levels.entry_zone}</span>
237
+ </div>
238
+ <div className="min-w-0">
239
+ <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-signal-short block">SL</span>
240
+ <span className="font-bold text-signal-short truncate block">{levels.stop_loss_str}</span>
241
+ </div>
242
+ <div className="min-w-0">
243
+ <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-signal-long block">TP1</span>
244
+ <span className="font-bold text-signal-long truncate block">{levels.take_profit_1_str}</span>
245
+ </div>
246
+ {levels.predicted_target ? (
247
+ <div className="hidden sm:block min-w-0">
248
+ <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-amber-400 flex items-center gap-0.5 truncate">
249
  <Target size={9} /> Magnet
250
  </span>
251
+ <span className="font-bold text-amber-300 truncate block">{levels.predicted_target}</span>
252
  </div>
 
 
 
 
 
 
 
 
253
  ) : (
254
+ <div className="hidden sm:block min-w-0">
255
+ <span className="text-[8px] sm:text-[9px] uppercase tracking-wider text-text-muted block">R:R</span>
256
+ <span className="font-bold text-text-secondary truncate block">{levels.risk_reward}</span>
257
+ </div>
258
  )}
259
  </div>
260
+
261
+ <button
262
+ onClick={handleCopyPlan}
263
+ title="Copy Trade Plan"
264
+ className="p-1.5 sm:px-2 sm:py-1 rounded-md hover:bg-bg-elevated border border-border/60 hover:border-border text-text-muted hover:text-text-primary transition-all shrink-0 flex items-center gap-1 text-[10px] font-mono active:scale-95"
265
+ >
266
+ {copied ? <Check size={12} className="text-signal-long" /> : <Copy size={12} />}
267
+ <span className="hidden xs:inline">{copied ? 'Copied' : 'Plan'}</span>
268
+ </button>
269
  </div>
270
+ )}
271
+ </div>
 
 
 
 
 
 
 
 
272
 
273
  {/* Footer row */}
274
+ <div className="flex items-center justify-between gap-2 mt-3 pt-2.5 border-t border-border/40">
275
  <div className="flex items-center gap-1 text-[10px] sm:text-[11px] text-text-muted">
276
  <Clock size={11} />
277
  <span>{formatTimeAgo(signal.updated_at)}</span>
278
  </div>
279
 
280
+ <div className="flex items-center gap-1.5 shrink-0">
281
  <button
282
  onClick={() => {
283
  if (onNavigateToAI) {
 
286
  setShowAIPanel((v) => !v);
287
  }
288
  }}
289
+ className="px-2.5 py-1 rounded-lg text-xs font-semibold flex items-center gap-1.5 transition-all shadow-sm active:scale-95 cursor-pointer border bg-gradient-to-r from-purple-500/20 to-blue-500/20 hover:from-purple-500/30 hover:to-blue-500/30 border-purple-500/40 hover:border-purple-400 text-purple-300 hover:text-white"
290
  title="Buka Halaman Tanya AI Khusus untuk Pair Ini"
291
  >
292
  <Sparkles size={11} className="text-purple-400 animate-pulse" />
 
298
  onClick={handleRefresh}
299
  loading={isPending}
300
  icon={<RefreshCw size={11} />}
301
+ className="text-xs px-2 py-1 h-7"
302
  >
303
  <span className="hidden xs:inline">Refresh</span>
304
  </Button>
 
307
  size="sm"
308
  onClick={() => setExpanded((v) => !v)}
309
  icon={expanded ? <ChevronUp size={11} /> : <ChevronDown size={11} />}
310
+ className="text-xs px-2 py-1 h-7"
311
  >
312
  {expanded ? 'Hide' : 'Details'}
313
  </Button>
frontend/src/components/signals/TopTradeBanner.tsx CHANGED
@@ -66,36 +66,48 @@ Forward Anticipation: ${topSignal.anticipation || levels?.anticipation || ''}`;
66
  : 'bg-gradient-to-r from-signal-short/10 via-card to-card border-signal-short/30 shadow-[0_0_25px_rgba(239,68,68,0.12)]'
67
  }`}
68
  >
69
- <div className="flex flex-col lg:flex-row lg:items-center justify-between gap-3.5 sm:gap-4">
70
  {/* Left: Headline & Predictive Anticipation */}
71
  <div className="space-y-2 max-w-xl">
72
- <div className="flex flex-wrap items-center gap-1.5 sm:gap-2">
 
73
  <span
74
  className={`px-2.5 py-1 rounded-lg text-xs font-bold uppercase tracking-wider flex items-center gap-1.5 ${
75
  isLong
76
- ? 'bg-signal-long text-bg-primary'
77
- : 'bg-signal-short text-white'
78
  }`}
79
  >
80
  <Flame size={13} className="animate-bounce" />
81
- TOP SETUP: {topSignal.symbol} {topSignal.direction}
82
  </span>
 
 
 
 
 
 
 
 
 
83
  <span className="font-mono text-xs font-bold text-text-primary px-2 py-0.5 rounded-md bg-bg-elevated border border-border">
84
- Conviction: {topSignal.conviction}/10
85
  </span>
86
- <span className="text-[11px] font-mono text-text-secondary uppercase">
87
- TF: {topSignal.active_timeframe}
 
88
  </span>
 
89
  {topSignal.has_spot === true && (
90
- <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-bold bg-emerald-500/20 text-emerald-300 border border-emerald-500/30 flex items-center gap-1">
91
  <ShieldCheck size={11} className="text-emerald-400" />
92
- 🛡️ AMAN (Ada Spot)
93
  </span>
94
  )}
95
  {topSignal.has_spot === false && (
96
  <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-bold bg-amber-500/20 text-amber-300 border border-amber-500/40 flex items-center gap-1">
97
  <AlertTriangle size={11} className="text-amber-400" />
98
- ⚠️ RAWAN (Perp Only)
99
  </span>
100
  )}
101
  {isSqueeze && (
@@ -113,7 +125,7 @@ Forward Anticipation: ${topSignal.anticipation || levels?.anticipation || ''}`;
113
  {/* Forward-Looking Anticipation Text */}
114
  {topSignal.anticipation && (
115
  <div className="flex items-start gap-1.5 text-xs text-accent-blue bg-accent-blue/10 border border-accent-blue/20 px-2.5 py-1.5 rounded-lg">
116
- <span className="font-semibold shrink-0 text-[11px]">🔮 Antisipasi:</span>
117
  <span className="text-text-primary text-[11px] leading-relaxed">{topSignal.anticipation}</span>
118
  </div>
119
  )}
@@ -125,20 +137,29 @@ Forward Anticipation: ${topSignal.anticipation || levels?.anticipation || ''}`;
125
  </span>
126
  {levels?.predicted_target && (
127
  <>
128
- <span className="hidden sm:inline">•</span>
129
  <span className="flex items-center gap-1 text-text-primary font-mono text-[11px]">
130
  <Target size={12} className="text-amber-400" />
131
  Target Magnet: <span className="text-amber-300 font-bold">{levels.predicted_target}</span>
132
  </span>
133
  </>
134
  )}
 
 
 
 
 
 
 
 
 
135
  </div>
136
  </div>
137
 
138
  {/* Right: Quick Pre-Calculated Levels (Mobile 2x2 Grid / Desktop Inline) */}
139
  {levels ? (
140
- <div className="bg-bg-primary/90 border border-border/80 p-3 sm:p-3.5 rounded-xl backdrop-blur">
141
- <div className="grid grid-cols-2 sm:flex sm:flex-wrap sm:items-center gap-2 sm:gap-3">
142
  <div className="space-y-0.5 pr-2 sm:border-r sm:border-border col-span-2 sm:col-span-1 bg-bg-elevated/40 sm:bg-transparent p-2 sm:p-0 rounded-lg">
143
  <p className="text-[9px] uppercase tracking-wider text-text-muted font-medium">Entry Zone</p>
144
  <p className="font-mono text-xs font-bold text-text-primary">{levels.entry_zone}</p>
 
66
  : 'bg-gradient-to-r from-signal-short/10 via-card to-card border-signal-short/30 shadow-[0_0_25px_rgba(239,68,68,0.12)]'
67
  }`}
68
  >
69
+ <div className="flex flex-col lg:flex-row lg:items-center justify-between gap-4">
70
  {/* Left: Headline & Predictive Anticipation */}
71
  <div className="space-y-2 max-w-xl">
72
+ {/* Header Row: Primary Tag + Metadata Pills */}
73
+ <div className="flex flex-wrap items-center gap-2">
74
  <span
75
  className={`px-2.5 py-1 rounded-lg text-xs font-bold uppercase tracking-wider flex items-center gap-1.5 ${
76
  isLong
77
+ ? 'bg-signal-long text-bg-primary font-mono'
78
+ : 'bg-signal-short text-white font-mono'
79
  }`}
80
  >
81
  <Flame size={13} className="animate-bounce" />
82
+ TOP SETUP: {topSignal.symbol}
83
  </span>
84
+
85
+ <span className={`font-mono text-xs font-bold px-2 py-0.5 rounded-md border ${
86
+ isLong
87
+ ? 'bg-signal-long/20 text-signal-long border-signal-long/40'
88
+ : 'bg-signal-short/20 text-signal-short border-signal-short/40'
89
+ }`}>
90
+ {topSignal.direction}
91
+ </span>
92
+
93
  <span className="font-mono text-xs font-bold text-text-primary px-2 py-0.5 rounded-md bg-bg-elevated border border-border">
94
+ {topSignal.conviction}/10
95
  </span>
96
+
97
+ <span className="text-[11px] font-mono text-text-secondary uppercase px-1.5 py-0.5 rounded bg-bg-elevated border border-border">
98
+ {topSignal.active_timeframe}
99
  </span>
100
+
101
  {topSignal.has_spot === true && (
102
+ <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-medium bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1">
103
  <ShieldCheck size={11} className="text-emerald-400" />
104
+ Spot OK
105
  </span>
106
  )}
107
  {topSignal.has_spot === false && (
108
  <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-bold bg-amber-500/20 text-amber-300 border border-amber-500/40 flex items-center gap-1">
109
  <AlertTriangle size={11} className="text-amber-400" />
110
+ Perp Only
111
  </span>
112
  )}
113
  {isSqueeze && (
 
125
  {/* Forward-Looking Anticipation Text */}
126
  {topSignal.anticipation && (
127
  <div className="flex items-start gap-1.5 text-xs text-accent-blue bg-accent-blue/10 border border-accent-blue/20 px-2.5 py-1.5 rounded-lg">
128
+ <span className="font-semibold shrink-0 text-[11px] font-mono">🔮 Antisipasi:</span>
129
  <span className="text-text-primary text-[11px] leading-relaxed">{topSignal.anticipation}</span>
130
  </div>
131
  )}
 
137
  </span>
138
  {levels?.predicted_target && (
139
  <>
140
+ <span className="hidden sm:inline text-border">•</span>
141
  <span className="flex items-center gap-1 text-text-primary font-mono text-[11px]">
142
  <Target size={12} className="text-amber-400" />
143
  Target Magnet: <span className="text-amber-300 font-bold">{levels.predicted_target}</span>
144
  </span>
145
  </>
146
  )}
147
+ {topSignal.has_spot === false && (
148
+ <>
149
+ <span className="hidden sm:inline text-border">•</span>
150
+ <span className="flex items-center gap-1 text-amber-400 text-[11px] font-medium">
151
+ <AlertTriangle size={12} />
152
+ Perp-Only (Disiplin Stop Loss!)
153
+ </span>
154
+ </>
155
+ )}
156
  </div>
157
  </div>
158
 
159
  {/* Right: Quick Pre-Calculated Levels (Mobile 2x2 Grid / Desktop Inline) */}
160
  {levels ? (
161
+ <div className="bg-bg-primary/90 border border-border/80 p-3 sm:p-3.5 rounded-xl backdrop-blur shrink-0">
162
+ <div className="grid grid-cols-2 sm:flex sm:items-center gap-2 sm:gap-3">
163
  <div className="space-y-0.5 pr-2 sm:border-r sm:border-border col-span-2 sm:col-span-1 bg-bg-elevated/40 sm:bg-transparent p-2 sm:p-0 rounded-lg">
164
  <p className="text-[9px] uppercase tracking-wider text-text-muted font-medium">Entry Zone</p>
165
  <p className="font-mono text-xs font-bold text-text-primary">{levels.entry_zone}</p>
frontend/src/pages/AITerminal.tsx CHANGED
@@ -488,15 +488,15 @@ export function AITerminal({ initialSymbol = 'BTCUSDT' }: AITerminalProps) {
488
  {selectedSymbol}
489
  </h2>
490
  {activeSignal?.has_spot === false && (
491
- <span className="px-2 py-0.5 rounded-full text-[10px] font-mono font-bold bg-amber-500/20 text-amber-300 border border-amber-500/40 flex items-center gap-1 shrink-0" title="Aset RAWAN BANDAR: Kontrak Perp-Only tanpa pasar Spot riil.">
492
  <AlertTriangle size={10} className="text-amber-400" />
493
- ⚠️ RAWAN (Perp Only)
494
  </span>
495
  )}
496
  {activeSignal?.has_spot === true && (
497
- <span className="px-2 py-0.5 rounded-full text-[10px] font-mono font-semibold bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1 shrink-0" title="Aset AMAN: Memiliki pasar Spot riil di bursa.">
498
  <ShieldCheck size={10} className="text-emerald-400" />
499
- 🛡️ AMAN (Ada Spot)
500
  </span>
501
  )}
502
  {activeSignal && (
@@ -587,28 +587,20 @@ export function AITerminal({ initialSymbol = 'BTCUSDT' }: AITerminalProps) {
587
  })}
588
  </div>
589
 
590
- {/* Spot Safety / Bandar Hazard Alert in AI Workspace */}
591
  {activeSignal?.has_spot === false && (
592
  <div className="mx-3 sm:mx-5 mt-3 p-2.5 rounded-xl bg-amber-500/15 border border-amber-500/30 text-xs text-amber-200 flex items-start gap-2.5 shrink-0 shadow-sm animate-fade-in">
593
- <AlertTriangle size={16} className="text-amber-400 shrink-0 mt-0.5" />
594
- <div>
595
  <span className="font-bold text-amber-200">
596
  ⚠️ PERINGATAN RISIKO BANDAR ({selectedSymbol} adalah PERP-ONLY):
597
  </span>
598
  <p className="text-[11px] text-amber-300/90 mt-0.5 leading-relaxed">
599
- Koin ini tidak memiliki pasar Spot di bursa. Rencana trading dan kalkulasi tetap lengkap dianalisa, namun harga rawan dimanipulasi bursa/market maker. Disarankan selalu menggunakan Stop Loss ketat!
600
  </p>
601
  </div>
602
  </div>
603
  )}
604
- {activeSignal?.has_spot === true && (
605
- <div className="mx-3 sm:mx-5 mt-3 px-3 py-1.5 rounded-xl bg-emerald-500/10 border border-emerald-500/20 text-xs text-emerald-300 flex items-center gap-2 shrink-0 animate-fade-in">
606
- <ShieldCheck size={14} className="text-emerald-400 shrink-0" />
607
- <span className="text-[11px] text-emerald-300">
608
- <strong>🛡️ ASET AMAN (Spot Backed):</strong> Memiliki pasar Spot riil di bursa. Arbitrase harga organik & stabil dari manipulasi mark price bursa.
609
- </span>
610
- </div>
611
- )}
612
 
613
  {/* ── Scrollable Chat / AI Conversation View ──────────────────────── */}
614
  <div className="flex-1 overflow-y-auto p-3 sm:p-5 space-y-4 custom-scrollbar">
 
488
  {selectedSymbol}
489
  </h2>
490
  {activeSignal?.has_spot === false && (
491
+ <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-bold bg-amber-500/20 text-amber-300 border border-amber-500/40 flex items-center gap-1 shrink-0" title="Aset RAWAN BANDAR: Kontrak Perp-Only tanpa pasar Spot riil.">
492
  <AlertTriangle size={10} className="text-amber-400" />
493
+ ⚠️ Perp Only
494
  </span>
495
  )}
496
  {activeSignal?.has_spot === true && (
497
+ <span className="px-2 py-0.5 rounded-md text-[10px] font-mono font-medium bg-emerald-500/15 text-emerald-400 border border-emerald-500/30 flex items-center gap-1 shrink-0" title="Aset AMAN: Memiliki pasar Spot riil di bursa.">
498
  <ShieldCheck size={10} className="text-emerald-400" />
499
+ 🛡️ Spot
500
  </span>
501
  )}
502
  {activeSignal && (
 
587
  })}
588
  </div>
589
 
590
+ {/* Spot Safety / Bandar Hazard Alert in AI Workspace (Only warning for Perp-Only) */}
591
  {activeSignal?.has_spot === false && (
592
  <div className="mx-3 sm:mx-5 mt-3 p-2.5 rounded-xl bg-amber-500/15 border border-amber-500/30 text-xs text-amber-200 flex items-start gap-2.5 shrink-0 shadow-sm animate-fade-in">
593
+ <AlertTriangle size={15} className="text-amber-400 shrink-0 mt-0.5" />
594
+ <div className="leading-snug">
595
  <span className="font-bold text-amber-200">
596
  ⚠️ PERINGATAN RISIKO BANDAR ({selectedSymbol} adalah PERP-ONLY):
597
  </span>
598
  <p className="text-[11px] text-amber-300/90 mt-0.5 leading-relaxed">
599
+ Koin ini tidak memiliki pasar Spot di bursa. Analisa tetap lengkap, namun harga rawan dimanipulasi wick sweep. Wajib pasang Stop Loss ketat!
600
  </p>
601
  </div>
602
  </div>
603
  )}
 
 
 
 
 
 
 
 
604
 
605
  {/* ── Scrollable Chat / AI Conversation View ──────────────────────── */}
606
  <div className="flex-1 overflow-y-auto p-3 sm:p-5 space-y-4 custom-scrollbar">
frontend/src/pages/Dashboard.tsx CHANGED
@@ -159,101 +159,25 @@ export function Dashboard({
159
  </div>
160
  )}
161
 
162
- {/* Page title & Quick Filter Pills */}
163
  {!selectedSymbol && (
164
- <div className="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-4 sm:mb-5">
165
- <div>
166
- <h2 className="text-base sm:text-lg font-bold text-text-primary">
167
- Market Conviction Overview
168
- </h2>
169
- <p className="text-[11px] sm:text-xs text-text-secondary mt-0.5">
170
- Menampilkan {displayedSignals.length} dari {allSortedSignals.length} pair aktif
171
- </p>
172
- </div>
173
-
174
- {/* Instant 1-Click Filter Pills and Stable Sorting Toggle */}
175
- <div className="flex flex-wrap items-center gap-2">
176
- <div className="flex items-center gap-1 p-1 rounded-xl bg-bg-elevated border border-border overflow-x-auto no-scrollbar max-w-full">
177
- <button
178
- onClick={() => setFilterMode('ALL')}
179
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
180
- filterMode === 'ALL'
181
- ? 'bg-card text-text-primary shadow-sm font-semibold'
182
- : 'text-text-secondary hover:text-text-primary'
183
- }`}
184
- >
185
- <Layers size={13} />
186
- <span>All ({allSortedSignals.length})</span>
187
- </button>
188
-
189
- <button
190
- onClick={() => setFilterMode('SPOT_ONLY')}
191
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
192
- filterMode === 'SPOT_ONLY'
193
- ? 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 font-semibold'
194
- : 'text-text-secondary hover:text-emerald-400'
195
- }`}
196
- title="Hanya pair yang memiliki pasar Spot riil (Aman dari manipulasi bandar perp-only)"
197
- >
198
- <ShieldCheck size={13} className="text-emerald-400" />
199
- <span>🛡️ Aman ({spotCount})</span>
200
- </button>
201
-
202
- <button
203
- onClick={() => setFilterMode('PERP_ONLY')}
204
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
205
- filterMode === 'PERP_ONLY'
206
- ? 'bg-amber-500/20 text-amber-300 border border-amber-500/40 font-semibold'
207
- : 'text-text-secondary hover:text-amber-400'
208
- }`}
209
- title="Hanya pair PERP-ONLY tanpa pasar Spot (Rawan manipulasi bandar)"
210
- >
211
- <AlertTriangle size={13} className="text-amber-400" />
212
- <span>⚠️ Rawan ({perpOnlyCount})</span>
213
- </button>
214
-
215
- <button
216
- onClick={() => setFilterMode('HOT')}
217
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
218
- filterMode === 'HOT'
219
- ? 'bg-amber-500/20 text-amber-400 border border-amber-500/30 font-semibold'
220
- : 'text-text-secondary hover:text-amber-400'
221
- }`}
222
- >
223
- <Flame size={13} className={hotCount > 0 ? 'text-amber-400' : ''} />
224
- <span>Ready ≥4 ({hotCount})</span>
225
- </button>
226
-
227
- <button
228
- onClick={() => setFilterMode('LONG')}
229
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
230
- filterMode === 'LONG'
231
- ? 'bg-signal-long/20 text-signal-long border border-signal-long/30 font-semibold'
232
- : 'text-text-secondary hover:text-signal-long'
233
- }`}
234
- >
235
- <ArrowUpRight size={13} />
236
- <span>Longs ({longCount})</span>
237
- </button>
238
-
239
- <button
240
- onClick={() => setFilterMode('SHORT')}
241
- className={`flex items-center gap-1.5 px-2.5 sm:px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
242
- filterMode === 'SHORT'
243
- ? 'bg-signal-short/20 text-signal-short border border-signal-short/30 font-semibold'
244
- : 'text-text-secondary hover:text-signal-short'
245
- }`}
246
- >
247
- <ArrowDownRight size={13} />
248
- <span>Shorts ({shortCount})</span>
249
- </button>
250
  </div>
251
 
252
  {/* Stable Layout Toggle (Zero-Jumping Mode) */}
253
  <button
254
  type="button"
255
  onClick={() => setSortMode((prev) => (prev === 'STABLE' ? 'CONVICTION' : 'STABLE'))}
256
- className="px-2.5 py-1.5 rounded-xl text-xs font-medium border border-border bg-bg-elevated hover:bg-bg-card text-text-secondary hover:text-text-primary flex items-center gap-1.5 transition-all shadow-sm shrink-0"
257
  title={sortMode === 'STABLE' ? 'Posisi kartu stabil (A-Z, kartu tidak loncat-loncat)' : 'Diurutkan berdasarkan skor keyakinan tertinggi'}
258
  >
259
  <span className="text-[10px] text-text-muted hidden xs:inline">Tata Letak:</span>
@@ -262,6 +186,83 @@ export function Dashboard({
262
  </span>
263
  </button>
264
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
265
  </div>
266
  )}
267
 
 
159
  </div>
160
  )}
161
 
162
+ {/* Page title & Quick Filter Toolbar */}
163
  {!selectedSymbol && (
164
+ <div className="flex flex-col gap-3 mb-4 sm:mb-5">
165
+ {/* Top row: Title & Sort Switcher */}
166
+ <div className="flex items-center justify-between gap-3">
167
+ <div>
168
+ <h2 className="text-base sm:text-lg font-bold text-text-primary leading-tight">
169
+ Market Conviction Overview
170
+ </h2>
171
+ <p className="text-[11px] sm:text-xs text-text-secondary mt-0.5">
172
+ Menampilkan {displayedSignals.length} dari {allSortedSignals.length} pair aktif
173
+ </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  </div>
175
 
176
  {/* Stable Layout Toggle (Zero-Jumping Mode) */}
177
  <button
178
  type="button"
179
  onClick={() => setSortMode((prev) => (prev === 'STABLE' ? 'CONVICTION' : 'STABLE'))}
180
+ className="px-2.5 py-1.5 rounded-lg text-xs font-medium border border-border bg-bg-elevated hover:bg-bg-card text-text-secondary hover:text-text-primary flex items-center gap-1.5 transition-all shadow-sm shrink-0"
181
  title={sortMode === 'STABLE' ? 'Posisi kartu stabil (A-Z, kartu tidak loncat-loncat)' : 'Diurutkan berdasarkan skor keyakinan tertinggi'}
182
  >
183
  <span className="text-[10px] text-text-muted hidden xs:inline">Tata Letak:</span>
 
186
  </span>
187
  </button>
188
  </div>
189
+
190
+ {/* Bottom row: Filter Pills with smooth horizontal scrolling */}
191
+ <div className="flex items-center gap-1.5 p-1 rounded-xl bg-bg-elevated/70 border border-border/80 overflow-x-auto no-scrollbar">
192
+ <button
193
+ onClick={() => setFilterMode('ALL')}
194
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
195
+ filterMode === 'ALL'
196
+ ? 'bg-card text-text-primary shadow-sm font-semibold'
197
+ : 'text-text-secondary hover:text-text-primary'
198
+ }`}
199
+ >
200
+ <Layers size={13} />
201
+ <span>All ({allSortedSignals.length})</span>
202
+ </button>
203
+
204
+ <button
205
+ onClick={() => setFilterMode('SPOT_ONLY')}
206
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
207
+ filterMode === 'SPOT_ONLY'
208
+ ? 'bg-emerald-500/20 text-emerald-400 border border-emerald-500/30 font-semibold'
209
+ : 'text-text-secondary hover:text-emerald-400'
210
+ }`}
211
+ title="Hanya pair yang memiliki pasar Spot riil (Aman dari manipulasi bandar perp-only)"
212
+ >
213
+ <ShieldCheck size={13} className="text-emerald-400" />
214
+ <span>🛡️ Aman ({spotCount})</span>
215
+ </button>
216
+
217
+ <button
218
+ onClick={() => setFilterMode('PERP_ONLY')}
219
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
220
+ filterMode === 'PERP_ONLY'
221
+ ? 'bg-amber-500/20 text-amber-300 border border-amber-500/40 font-semibold'
222
+ : 'text-text-secondary hover:text-amber-400'
223
+ }`}
224
+ title="Hanya pair PERP-ONLY tanpa pasar Spot (Rawan manipulasi bandar)"
225
+ >
226
+ <AlertTriangle size={13} className="text-amber-400" />
227
+ <span>⚠️ Rawan ({perpOnlyCount})</span>
228
+ </button>
229
+
230
+ <button
231
+ onClick={() => setFilterMode('HOT')}
232
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
233
+ filterMode === 'HOT'
234
+ ? 'bg-amber-500/20 text-amber-400 border border-amber-500/30 font-semibold'
235
+ : 'text-text-secondary hover:text-amber-400'
236
+ }`}
237
+ >
238
+ <Flame size={13} className={hotCount > 0 ? 'text-amber-400' : ''} />
239
+ <span>Ready ≥4 ({hotCount})</span>
240
+ </button>
241
+
242
+ <button
243
+ onClick={() => setFilterMode('LONG')}
244
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
245
+ filterMode === 'LONG'
246
+ ? 'bg-signal-long/20 text-signal-long border border-signal-long/30 font-semibold'
247
+ : 'text-text-secondary hover:text-signal-long'
248
+ }`}
249
+ >
250
+ <ArrowUpRight size={13} />
251
+ <span>Longs ({longCount})</span>
252
+ </button>
253
+
254
+ <button
255
+ onClick={() => setFilterMode('SHORT')}
256
+ className={`flex items-center gap-1.5 px-3 py-1.5 rounded-lg text-xs font-medium transition-all shrink-0 ${
257
+ filterMode === 'SHORT'
258
+ ? 'bg-signal-short/20 text-signal-short border border-signal-short/30 font-semibold'
259
+ : 'text-text-secondary hover:text-signal-short'
260
+ }`}
261
+ >
262
+ <ArrowDownRight size={13} />
263
+ <span>Shorts ({shortCount})</span>
264
+ </button>
265
+ </div>
266
  </div>
267
  )}
268