/* ============================================================================
   BOT TRADE HISTORY INTERFACE - Dashboard Spectacular Theme
   Matches main dashboard dark theme with red accents
   Enhanced with Live Trading animations and unified styling
   ============================================================================ */

/* Import fonts matching main dashboard */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  --bg: #050506;
  --bg-alt: #0d0d10;
  --bg-elevated: #131318;
  --bg-card: #16161d;
  --border-color: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text-primary: #f4f4f8;
  --text-muted: #9aa6b2;
  --accent: #ff294f;
  --accent-soft: rgba(255, 41, 79, 0.14);
  --accent-glow: rgba(255, 41, 79, 0.35);
  --success: #2adf8c;
  --success-glow: rgba(42, 223, 140, 0.4);
  --warning: #ffc061;
  --warning-glow: rgba(255, 192, 97, 0.4);
  --danger: #ff5f7a;
  --danger-glow: rgba(255, 95, 122, 0.4);
  --long-color: #22c55e;
  --long-glow: rgba(34, 197, 94, 0.4);
  --short-color: #ef4444;
  --short-glow: rgba(239, 68, 68, 0.4);
  --card-radius: 22px;
}

.trade-history-interface {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.5rem; /* Very compact spacing */
}

/* ============================================================================
   HISTORY CONTROLS - Premium Filter Bar with Full Width Spacing
   ============================================================================ */

.history-controls {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 1.25rem;
  padding: 1rem 1.5rem;
  background: linear-gradient(160deg, rgba(35, 35, 48, 0.6) 0%, rgba(20, 20, 30, 0.7) 50%, rgba(28, 28, 38, 0.6) 100%);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.history-filters {
  display: flex;
  gap: 1.5rem;
  flex-wrap: nowrap;
  align-items: flex-end;
  flex: 1;
  width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

/* PnL filter needs more space for two inputs */
.filter-group.pnl-filter {
  flex: 1.5;
}

.filter-group label {
  color: rgba(255, 255, 255, 0.7);
  font-family: 'Space Grotesk', monospace;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.filter-group select,
.filter-group input {
  background: linear-gradient(135deg, #1a1a1f, #16161d);
  border: 1.5px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 0.6rem 0.9rem;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Outfit', sans-serif;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  width: 100%;
}

.filter-group select:hover,
.filter-group input:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: linear-gradient(135deg, #1e1e24, #1a1a1f);
}

.filter-group select:focus,
.filter-group input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 41, 79, 0.2);
  background: #1a1a1f;
}

.pnl-filter .pnl-inputs {
  display: flex;
  gap: 0.75rem;
}

.pnl-inputs input {
  width: 85px;
  flex: none;
  font-size: 0.85rem;
  text-align: center;
}

.pnl-inputs input::placeholder {
  color: rgba(255, 255, 255, 0.35);
}

.history-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.history-actions .action-btn {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #1a1a1f;
  color: var(--text);
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.history-actions .action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(255, 41, 79, 0.2);
  border-color: var(--accent);
  color: var(--accent);
}

/* ============================================================================
   TRADE STATISTICS SUMMARY - Premium Compact Cards
   ============================================================================ */

.trade-stats-summary {
  padding: 0.85rem 1.25rem;
  background: linear-gradient(160deg, rgba(25, 25, 32, 0.95) 0%, rgba(18, 18, 24, 0.9) 100%);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
}

.stat-card {
  background: linear-gradient(160deg, rgba(35, 35, 48, 0.5) 0%, rgba(20, 20, 30, 0.6) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 25px;
  height: 25px;
  background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  opacity: 0.5;
  transition: opacity 0.25s ease;
}

.stat-card:hover {
  background: linear-gradient(160deg, rgba(45, 45, 60, 0.6) 0%, rgba(28, 28, 40, 0.7) 100%);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.stat-card:hover::after {
  opacity: 0.8;
}

.stat-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.3rem;
  font-family: 'Space Grotesk', monospace;
}

.stat-value {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 800;
  line-height: 1.2;
  font-family: 'Outfit', sans-serif;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.stat-value.positive {
  color: #4ade80;
  text-shadow: 0 0 10px rgba(74, 222, 128, 0.3);
}

.stat-value.negative {
  color: #f87171;
  text-shadow: 0 0 10px rgba(248, 113, 113, 0.3);
}

.stat-value.neutral {
  color: rgba(255, 255, 255, 0.6);
}

/* ============================================================================
   TRADE HISTORY TABLE
   ============================================================================ */

.trade-history-table-container {
  flex: 1;
  background: rgba(10, 10, 14, 0.98);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
}

.table-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(14, 14, 19, 0.98);
  position: relative;
  z-index: 1;
}

.table-header h4 {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  margin: 0;
  font-size: 0.95rem;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.02em;
}

.table-info {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.78rem;
  font-family: 'Space Grotesk', monospace;
}

.trade-table-wrapper {
  flex: 1;
  overflow-x: auto;
  overflow-y: auto;
}

.trade-history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  table-layout: fixed; /* Ensure consistent column widths */
}

/* Column width allocations - optimized for Message and OrderID visibility */
.trade-history-table th:nth-child(1) { width: 8%; }    /* Time */
.trade-history-table th:nth-child(2) { width: 6%; }    /* Side */
.trade-history-table th:nth-child(3) { width: 8%; }    /* Status */
.trade-history-table th:nth-child(4) { width: 7%; }    /* Speed */
.trade-history-table th:nth-child(5) { width: 7%; }    /* PNL */
.trade-history-table th:nth-child(6) { width: 9%; }    /* Filled */
.trade-history-table th:nth-child(7) { width: 5%; }    /* Size - compact */
.trade-history-table th:nth-child(8) { width: 4%; }    /* Fees - compact */
.trade-history-table th:nth-child(9) { width: 8%; }    /* Slippage */
.trade-history-table th:nth-child(10) { width: 18%; }  /* Message - more space */
.trade-history-table th:nth-child(11) { width: 12%; }  /* Order ID */

.trade-history-table thead th {
  background: rgba(18, 18, 23, 0.98);
  padding: 0.85rem 1rem;
  text-align: left;
  color: rgba(255, 255, 255, 0.55);
  font-weight: 600;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  position: sticky;
  top: 0;
  z-index: 10;
  font-family: 'Space Grotesk', monospace;
}

.trade-history-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.trade-history-table th.sortable:hover {
  background: var(--bg-alt);
  color: var(--accent);
}

.sort-arrow {
  margin-left: 0.4rem;
  color: var(--text-muted);
  opacity: 0.5;
  font-size: 0.75em;
  display: inline;
  vertical-align: middle;
}

.sort-arrow.active {
  color: var(--accent);
  opacity: 1;
  font-weight: bold;
}

.trade-history-table tbody tr {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  background: rgba(12, 12, 16, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  position: relative;
  border-left: 3px solid transparent;
}

.trade-history-table tbody tr:nth-child(even) {
  background: rgba(16, 16, 21, 0.95);
}

.trade-history-table tbody tr:hover {
  background: rgba(30, 30, 40, 0.95) !important;
  transform: translateX(3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  border-left-color: var(--accent);
}

/* ============================================================================
   OPEN TRADE ANIMATION - Pulse Effect for Active Positions
   ============================================================================ */

.trade-history-table tbody tr.trade-open,
.trade-history-table tbody tr[data-status="open"],
.trade-history-table tbody tr[data-status="pending"],
.trade-history-table tbody tr[data-status="processing"] {
  animation: tradeRowPulse 2s ease-in-out infinite;
  border-left-color: var(--warning);
}

.trade-history-table tbody tr.trade-open.long-trade,
.trade-history-table tbody tr[data-status="open"].long-trade {
  border-left-color: var(--long-color);
  animation: tradeRowPulseLong 2s ease-in-out infinite;
}

.trade-history-table tbody tr.trade-open.short-trade,
.trade-history-table tbody tr[data-status="open"].short-trade {
  border-left-color: var(--short-color);
  animation: tradeRowPulseShort 2s ease-in-out infinite;
}

@keyframes tradeRowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 192, 97, 0),
                inset 0 0 0 rgba(255, 192, 97, 0);
    background: linear-gradient(160deg, rgba(22, 22, 29, 0.95) 0%, rgba(13, 13, 18, 0.98) 100%);
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(255, 192, 97, 0.15),
                inset 0 0 8px rgba(255, 192, 97, 0.03);
    background: linear-gradient(160deg, rgba(30, 28, 22, 0.95) 0%, rgba(20, 18, 14, 0.98) 100%);
  }
}

@keyframes tradeRowPulseLong {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--long-glow),
                inset 0 0 0 rgba(34, 197, 94, 0);
    background: linear-gradient(160deg, rgba(22, 22, 29, 0.95) 0%, rgba(13, 13, 18, 0.98) 100%);
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(34, 197, 94, 0.2),
                inset 0 0 8px rgba(34, 197, 94, 0.04);
    background: linear-gradient(160deg, rgba(20, 28, 22, 0.95) 0%, rgba(12, 18, 14, 0.98) 100%);
  }
}

@keyframes tradeRowPulseShort {
  0%, 100% {
    box-shadow: 0 0 0 0 var(--short-glow),
                inset 0 0 0 rgba(239, 68, 68, 0);
    background: linear-gradient(160deg, rgba(22, 22, 29, 0.95) 0%, rgba(13, 13, 18, 0.98) 100%);
  }
  50% {
    box-shadow: 0 0 12px 2px rgba(239, 68, 68, 0.2),
                inset 0 0 8px rgba(239, 68, 68, 0.04);
    background: linear-gradient(160deg, rgba(28, 20, 22, 0.95) 0%, rgba(18, 12, 14, 0.98) 100%);
  }
}

/* Closed trades - no animation, slightly muted */
.trade-history-table tbody tr.trade-closed,
.trade-history-table tbody tr[data-status="closed"],
.trade-history-table tbody tr[data-status="filled"],
.trade-history-table tbody tr[data-status="completed"] {
  animation: none;
}

.trade-history-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  vertical-align: middle;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0;
}

/* Empty state styling */
.empty-trades-message {
  text-align: center;
  padding: 3rem 2rem;
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.95rem;
  font-weight: 500;
}

.empty-trades-message::before {
  content: '📊';
  display: block;
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}

/* Loading animation - orbit-loader (dancing balls) */
.orbit-loader {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  height: 50px;
  justify-content: center;
  padding: 3rem 2rem;
}

.orbit-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #ff294f;
  box-shadow: 0 4px 8px rgba(255, 41, 79, 0.4);
  animation: jumpWave 1.2s ease-in-out infinite;
}

.orbit-dot.orbit-dot-1 {
  animation-delay: 0s;
}

.orbit-dot.orbit-dot-2 {
  animation-delay: 0.15s;
}

.orbit-dot.orbit-dot-3 {
  animation-delay: 0.3s;
}

.orbit-dot.orbit-dot-4 {
  animation-delay: 0.45s;
}

.orbit-dot.orbit-dot-5 {
  animation-delay: 0.6s;
}

@keyframes jumpWave {
  0%, 60%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 2px 4px rgba(255, 41, 79, 0.3);
  }
  30% {
    transform: translateY(-25px) scale(1.1);
    box-shadow: 0 8px 16px rgba(255, 41, 79, 0.5);
  }
}

/* Trade Row Styling - Unified Dark Theme */
.time-display {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.time-display .date {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 600;
  font-size: 0.8rem;
  font-family: 'Outfit', sans-serif;
}

.time-display .time {
  color: rgba(255, 255, 255, 0.45);
  font-size: 0.72rem;
  font-family: 'Outfit', sans-serif;
}

/* Side Badge - Clean Solid Pill Style (TradingView/Bybit style) */
.side-badge {
  padding: 0.35rem 0.65rem;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Outfit', sans-serif;
  white-space: nowrap;
  border: none;
}

/* LONG / BUY - Solid Green */
.side-badge.long,
.side-badge.buy,
.side-badge.entry_long,
.side-badge.open_long {
  background: #22c55e;
  color: #ffffff;
}

/* EXIT LONG - Outlined green */
.side-badge.exit_long,
.side-badge.close_long {
  background: transparent;
  color: #4ade80;
  border: 1px solid #4ade80;
}

/* SHORT / SELL - Solid Red */
.side-badge.short,
.side-badge.sell,
.side-badge.entry_short,
.side-badge.open_short {
  background: #ef4444;
  color: #ffffff;
}

/* EXIT SHORT - Outlined red */
.side-badge.exit_short,
.side-badge.close_short {
  background: transparent;
  color: #f87171;
  border: 1px solid #f87171;
}

.trade-symbol {
  color: rgba(255, 255, 255, 0.95);
  font-weight: 600;
  font-family: 'Outfit', sans-serif;
  font-size: 0.82rem;
  letter-spacing: 0;
}

.trade-size {
  color: rgba(255, 255, 255, 0.75);
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
}

.trade-signal-price,
.trade-fill-price {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
}

.trade-slippage .positive {
  color: #4ade80;
  font-weight: 600;
}

.trade-slippage .negative {
  color: #f87171;
  font-weight: 600;
}

.trade-slippage .neutral {
  color: rgba(255, 255, 255, 0.5);
}

.trade-fees {
  color: rgba(255, 255, 255, 0.6);
  font-family: 'Outfit', sans-serif;
  font-size: 0.8rem;
}

.pnl-display {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.pnl-amount {
  font-weight: 700;
  font-family: monospace;
}

.pnl-amount.profit {
  color: var(--buy);
}

.pnl-amount.loss {
  color: var(--sell);
}

.pnl-amount.neutral {
  color: var(--muted);
}

.pnl-percent {
  font-size: 0.75rem;
  color: var(--muted);
  font-family: monospace;
}

/* Status badges defined below at line 972 - removed duplicate */

.trade-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.action-btn-small {
  width: 32px;
  height: 32px;
  border-radius: 0.375rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: var(--bg-canvas);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.action-btn-small:hover {
  transform: scale(1.1);
  border-color: var(--accent-1);
}

.action-btn-small.danger:hover {
  border-color: var(--sell);
  background: rgba(239, 68, 68, 0.1);
}

/* Empty State */
.no-trades-row td {
  text-align: center;
  padding: 3rem 1rem;
}

.no-trades-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.no-trades-icon {
  font-size: 3rem;
  opacity: 0.5;
}

/* ============================================================================
   PAGINATION - Dark Red Theme
   ============================================================================ */

.pagination-container {
  padding: 0.85rem 1.25rem;
  border-top: 2px solid rgba(255, 41, 79, 0.2);
  background: var(--bg-elevated);
}

.pagination-controls {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  gap: 0.6rem !important;
  flex-wrap: nowrap !important;
}

/* ALL pagination buttons - very specific selectors */
.pagination-controls .page-btn,
.pagination-controls button,
.pagination-controls .prev-btn,
.pagination-controls .next-btn,
.pagination-controls .number-btn,
button.page-btn,
button.prev-btn,
button.next-btn,
button.number-btn {
  padding: 0.6rem 1.1rem !important;
  border-radius: 8px !important;
  border: 1.5px solid rgba(255, 255, 255, 0.2) !important;
  background: linear-gradient(135deg, #1a1a1f, #16161d) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  cursor: pointer !important;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
  min-width: 44px !important;
  height: 40px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Outfit', sans-serif !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5) !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3) !important;
}

.pagination-controls .page-btn:hover:not(.disabled),
.pagination-controls button:hover:not(:disabled),
button.page-btn:hover:not(.disabled),
button.prev-btn:hover:not(.disabled),
button.next-btn:hover:not(.disabled),
button.number-btn:hover:not(.disabled) {
  background: linear-gradient(135deg, rgba(255, 41, 79, 0.25), rgba(255, 41, 79, 0.15)) !important;
  border-color: var(--accent) !important;
  color: #ffffff !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 16px rgba(255, 41, 79, 0.4) !important;
}

.pagination-controls .page-btn.active,
.pagination-controls button.active,
button.page-btn.active,
button.number-btn.active {
  background: linear-gradient(135deg, #ff294f, #ff5570) !important;
  border-color: #ff294f !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  box-shadow: 0 6px 20px rgba(255, 41, 79, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-2px) !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.6) !important;
}

.pagination-controls .page-btn.disabled,
.pagination-controls button:disabled,
button.page-btn.disabled,
button.prev-btn.disabled,
button.next-btn.disabled,
button.page-btn:disabled,
button.prev-btn:disabled,
button.next-btn:disabled {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  border-color: rgba(255, 255, 255, 0.1) !important;
  background: linear-gradient(135deg, #0d0d12, #0a0a0f) !important;
  color: rgba(255, 255, 255, 0.5) !important;
  text-shadow: none !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Page Jump Input */
.page-jump {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: 0.5rem;
}

.page-jump input {
  width: 60px;
  padding: 0.5rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: #16161d;
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  font-family: 'Outfit', sans-serif;
  transition: all 0.25s ease;
}

.page-jump input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 41, 79, 0.2);
  background: #1a1a1f;
}

.page-jump-label {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.85rem;
  font-weight: 500;
}

/* Results Per Page Selector */
.results-per-page {
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  background: linear-gradient(135deg, #1a1a1f, #16161d);
  color: #ffffff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Outfit', sans-serif;
  margin-left: 0.5rem;
  transition: all 0.25s ease;
}

.results-per-page:hover {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(255, 41, 79, 0.15), rgba(255, 41, 79, 0.1));
}

.results-per-page:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 41, 79, 0.2);
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

@media (max-width: 1024px) {
  .history-controls {
    flex-direction: column;
    gap: 1.5rem;
    align-items: stretch;
  }
  
  .history-filters {
    justify-content: space-between;
  }
  
  .history-actions {
    justify-content: center;
  }
  
  .stats-cards {
    grid-template-columns: repeat(3, 1fr);
  }
  
  .trade-history-table {
    font-size: 0.85rem;
  }
  
  .trade-history-table td {
    padding: 0.75rem 0.5rem;
  }
}

@media (max-width: 768px) {
  .history-filters {
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: auto;
    gap: 1rem;
  }
  
  .filter-group {
    min-width: auto;
  }
  
  .stats-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stat-card {
    padding: 0.75rem;
  }
  
  .stat-value {
    font-size: 1.1rem;
  }
  
  .table-header {
    flex-direction: column;
    gap: 1rem;
    align-items: flex-start;
  }
  
  .table-info {
    gap: 1rem;
    font-size: 0.8rem;
  }
  
  /* Horizontal scroll for mobile table */
  .trade-table-wrapper {
    overflow-x: auto;
  }

  .trade-history-table {
    min-width: 950px; /* Increased to accommodate Message column */
  }
  
  .trade-history-table th,
  .trade-history-table td {
    padding: 0.5rem 0.4rem;
    font-size: 0.8rem;
  }
  
  .time-display .date {
    font-size: 0.75rem;
  }
  
  .time-display .time {
    font-size: 0.65rem;
  }
  
  .pnl-amount {
    font-size: 0.85rem;
  }
  
  .pnl-percent {
    font-size: 0.7rem;
  }

  .trade-message {
    max-width: 200px;
  }

  .message-text {
    font-size: 0.75rem;
  }
}

@media (max-width: 480px) {
  .trade-history-interface {
    gap: 1rem;
  }
  
  .history-controls {
    padding: 1rem;
  }
  
  .trade-stats-summary {
    padding: 1rem;
  }
  
  .stats-cards {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }
  
  .table-header {
    padding: 1rem;
  }
  
  .pagination-controls {
    flex-wrap: wrap;
    gap: 0.25rem;
  }
  
  .page-btn {
    padding: 0.4rem 0.6rem;
    font-size: 0.8rem;
    min-width: 35px;
  }
}

/* ============================================================================
   DARK MODE ENHANCEMENTS
   ============================================================================ */

.theme-dark .trade-history-table thead th {
  background: rgba(0, 0, 0, 0.3);
}

.theme-dark .trade-history-table th.sortable:hover {
  background: rgba(17, 224, 255, 0.15);
}

.theme-dark .trade-history-table tbody tr:hover {
  background: rgba(255, 255, 255, 0.05);
}

.theme-dark .trade-history-table tbody tr.profit:hover {
  background: rgba(16, 185, 129, 0.08);
}

.theme-dark .trade-history-table tbody tr.loss:hover {
  background: rgba(239, 68, 68, 0.08);
}

.theme-dark .stat-card {
  background: rgba(0, 0, 0, 0.2);
}

.theme-dark .stat-card:hover {
  background: rgba(0, 0, 0, 0.3);
}

.theme-dark .table-header,
.theme-dark .pagination-container {
  background: rgba(0, 0, 0, 0.15);
}

/* ============================================================================
   COLOR CODING ENHANCEMENTS
   ============================================================================ */

/* Profit/Loss Row Highlighting */
.trade-row.profit {
  border-left: 3px solid var(--buy);
  background: rgba(16, 185, 129, 0.02);
}

.trade-row.loss {
  border-left: 3px solid var(--sell);
  background: rgba(239, 68, 68, 0.02);
}

.trade-row.neutral {
  border-left: 3px solid var(--muted);
  background: rgba(155, 155, 155, 0.01);
}

/* Enhanced hover effects for different trade types */
.trade-row.profit:hover {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), rgba(16, 185, 129, 0.02));
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.trade-row.loss:hover {
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.08), rgba(239, 68, 68, 0.02));
  transform: translateX(2px);
  transition: all 0.2s ease;
}

.trade-row.neutral:hover {
  background: linear-gradient(90deg, rgba(155, 155, 155, 0.05), rgba(155, 155, 155, 0.01));
  transform: translateX(2px);
  transition: all 0.2s ease;
}

/* Status-based row styling */
.trade-row[data-status="pending"] {
  background: rgba(251, 191, 36, 0.03);
  border-left-color: #fbbf24;
}

.trade-row[data-status="cancelled"],
.trade-row[data-status="failed"] {
  opacity: 0.75;
  background: rgba(239, 68, 68, 0.03);
  border-left-color: var(--sell);
}

.trade-row[data-status="completed"],
.trade-row[data-status="filled"] {
  background: rgba(16, 185, 129, 0.02);
  border-left-color: var(--buy);
}

/* ============================================================================
   ENHANCED TABLE TYPOGRAPHY & SPACING
   ============================================================================ */

.trade-history-table {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  letter-spacing: 0.01em;
  line-height: 1.4;
}

.trade-history-table thead th {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--text);
  padding: 0.8rem 0.6rem; /* Reduced from 1.2rem 1rem for more compact table */
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.08));
  border-bottom: 2px solid rgba(255, 255, 255, 0.1);
}

.trade-history-table td {
  padding: 0.4rem 0.6rem; /* Reduced from 0.6rem 0.8rem for more compact table */
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-weight: 500;
  line-height: 1.3;
}

/* Symbol Styling */
.trade-symbol {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  letter-spacing: 0.5px;
}

/* Enhanced Time Display */
.time-display {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
}

.time-display .date {
  color: var(--text);
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1.2;
}

.time-display .time {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 500;
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Enhanced Price & Quantity Display */
.trade-entry,
.trade-exit {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
}

.trade-size {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--text);
}

/* Enhanced Side Badges */
.side-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 0.5rem;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1.5px solid;
  transition: all 0.2s ease;
}

/* REMOVED - Old gradient styles (replaced by clean flat styles above)
.side-badge.long {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.2), rgba(16, 185, 129, 0.1));
  color: var(--buy);
  border-color: var(--buy);
  box-shadow: 0 2px 4px rgba(16, 185, 129, 0.15);
}

.side-badge.short {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.2), rgba(239, 68, 68, 0.1));
  color: var(--sell);
  border-color: var(--sell);
  box-shadow: 0 2px 4px rgba(239, 68, 68, 0.15);
}
*/

/* Enhanced Status Badges - Clean Minimal Style (TradingView/Bybit) */
.status-badge {
  padding: 0.35rem 0.7rem !important;
  border-radius: 6px !important;
  font-size: 0.68rem !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.03em !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: none !important;
  transition: all 0.2s ease !important;
  font-family: 'Outfit', sans-serif !important;
  position: relative !important;
  line-height: 1 !important;
  min-width: auto !important;
  /* Default fallback styling */
  background: rgba(107, 114, 128, 0.2) !important;
  color: #9ca3af !important;
}

/* Open/Active status - Blue solid */
.status-badge.open,
.status-badge.active {
  background: #3b82f6 !important;
  color: #ffffff !important;
}

/* Trade Message Display */
.trade-message {
  display: flex;
  align-items: center;
  width: 100%;
}

.message-text {
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.8);
  white-space: normal;
  overflow: visible !important;
  text-overflow: unset !important;
}

.message-text.failed,
.message-text.cancelled,
.message-text.error {
  color: var(--sell);
  font-style: italic;
}

.message-text.completed,
.message-text.filled,
.message-text.success {
  color: var(--buy);
}

.message-text.pending,
.message-text.submitted {
  color: #fbbf24;
}

/* Success states - Completed/Filled - GREEN solid */
.status-badge.completed,
.status-badge.status-completed,
.status-badge.filled,
.status-badge.status-filled,
.status-badge.success,
.status-badge.status-success {
  background: #22c55e !important;
  color: #ffffff !important;
}

/* Warning states - Pending/Processing - YELLOW */
.status-badge.pending,
.status-badge.status-pending,
.status-badge.submitted,
.status-badge.status-submitted,
.status-badge.processing,
.status-badge.status-processing,
.status-badge.status-open {
  background: rgba(251, 191, 36, 0.2) !important;
  color: #fbbf24 !important;
}

/* Error states - Failed/Cancelled - RED */
.status-badge.cancelled,
.status-badge.status-cancelled,
.status-badge.failed,
.status-badge.status-failed,
.status-badge.error,
.status-badge.status-error,
.status-badge.rejected,
.status-badge.status-rejected {
  background: #ef4444 !important;
  color: #ffffff !important;
}

/* Closed state - Neutral/Gray */
.status-badge.closed,
.status-badge.status-closed {
  background: rgba(107, 114, 128, 0.25) !important;
  color: #9ca3af !important;
}

/* Partial fill state - PURPLE */
.status-badge.partial,
.status-badge.status-partial,
.status-badge.partially-filled,
.status-badge.status-partially-filled {
  background: rgba(168, 85, 247, 0.25) !important;
  color: #c084fc !important;
}

/* Remove the animation keyframes - keep simple */
@keyframes statusPulsePurple {
  0%, 100% {
    opacity: 1;
  }
  50% {
    box-shadow: 0 4px 18px rgba(168, 85, 247, 0.6), 0 0 24px rgba(168, 85, 247, 0.25);
  }
}

/* Enhanced P&L Display */
.pnl-display {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}

.pnl-amount {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-weight: 800;
  font-size: 0.9rem;
  line-height: 1.2;
}

.pnl-amount.profit {
  color: var(--buy);
  text-shadow: 0 0 4px rgba(16, 185, 129, 0.3);
}

.pnl-amount.loss {
  color: var(--sell);
  text-shadow: 0 0 4px rgba(239, 68, 68, 0.3);
}

.pnl-amount.neutral {
  color: var(--muted);
}

.pnl-percent {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
}

/* Quantity Display Enhancements */
.quantity-display {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-end;
}

/* Slippage Display */
.slippage-text {
  font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;
  font-weight: 600;
  font-size: 0.8rem;
}

.slippage-text.high-slippage {
  color: var(--sell);
  font-weight: 700;
}

.slippage-text.normal-slippage {
  color: var(--muted);
}

/* ============================================================================
   LOADING & INTERACTION STATES
   ============================================================================ */

.trade-row {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.trade-row:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  z-index: 1;
  position: relative;
}

/* Loading State */
.trades-loading {
  padding: 3rem;
  text-align: center;
  color: var(--muted);
}

.trades-loading::after {
  content: '';
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-1);
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 1s linear infinite;
  margin-left: 0.5rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================================
   SMART TRADE SPACING - CONSISTENT ROW HEIGHT
   ============================================================================ */

/* ALL trade rows have identical structure - only margin differs */
.trade-history-table tbody tr {
  /* Ensure all rows are identical */
  height: auto;
  min-height: 3rem;
}

.trade-history-table tbody tr td {
  /* Force consistent padding for ALL rows */
  padding: 0.6rem 0.8rem !important;
  vertical-align: middle;
  line-height: 1.3;
}

/* Use margin for spacing instead of padding to avoid misalignment */
.trade-related {
  margin-top: 0.2rem;
  border-left: 2px solid rgba(17, 224, 255, 0.15);
}

.trade-new-position {
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* Compact time display for thinner rows */
.time-display {
  gap: 0.1rem;
}

.time-display .date {
  font-size: 0.8rem;
  line-height: 1.1;
}

.time-display .time {
  font-size: 0.7rem;
  line-height: 1.1;
}

/* Compact badge sizing */
.side-badge {
  padding: 0.3rem 0.6rem;
  font-size: 0.65rem;
  line-height: 1;
}

/* Compact P&L display */
.pnl-display {
  gap: 0.1rem;
}

.pnl-amount {
  font-size: 0.85rem;
  line-height: 1.1;
}

.pnl-percent {
  font-size: 0.65rem;
  line-height: 1.1;
}

/* ============================================================================
   RESPONSIVE ADJUSTMENTS FOR THINNER ROWS
   ============================================================================ */

@media (max-width: 768px) {
  .trade-history-table td {
    padding: 0.5rem 0.4rem;
    font-size: 0.75rem;
  }

  .position-summary td {
    padding: 0.6rem 0.5rem;
  }

  .position-summary-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .time-display .date {
    font-size: 0.7rem;
  }

  .time-display .time {
    font-size: 0.65rem;
  }
}

@media (max-width: 480px) {
  .trade-history-table td {
    padding: 0.4rem 0.3rem;
  }

  .side-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
  }

  .trade-message {
    max-width: 160px;
  }

  .message-text {
    font-size: 0.7rem;
  }
}

/* ============================================================================
   REAL-TIME TRADE STATUS UPDATES (PHASE 3)
   ============================================================================ */

/* Real-time Trade Status Update Animations */
.trade-updated {
  animation: tradeStatusUpdate 3s ease-in-out;
  position: relative;
}

@keyframes tradeStatusUpdate {
  0% {
    background-color: rgba(42, 223, 140, 0.15);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(42, 223, 140, 0.3);
  }
  20% {
    background-color: rgba(42, 223, 140, 0.1);
  }
  100% {
    background-color: transparent;
    transform: scale(1);
    box-shadow: none;
  }
}

.trade-updated::after {
  content: "Updated";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: linear-gradient(135deg, #2adf8c, #10b981);
  color: #000;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  animation: updateBadgeFade 3s ease-in-out forwards;
  z-index: 10;
  border: 1px solid #2adf8c;
}

@keyframes updateBadgeFade {
  0% { opacity: 1; transform: translateY(-50%) scale(1.1); }
  70% { opacity: 1; transform: translateY(-50%) scale(1); }
  100% { opacity: 0; transform: translateY(-50%) scale(0.9); }
}

/* Polling Status Indicator */
.polling-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 12px;
  margin-left: 10px;
  padding: 4px 8px;
  background: rgba(255, 41, 79, 0.12);
  border-radius: 999px;
}

.polling-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pollingPulse 1.5s ease-in-out infinite;
}

@keyframes pollingPulse {
  0% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1.2); }
  100% { opacity: 0.3; transform: scale(0.8); }
}

/* Manual Refresh Button */
.refresh-button {
  background: linear-gradient(45deg, #4caf50, #45a049);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  margin-left: 10px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-button:hover {
  background: linear-gradient(45deg, #45a049, #4caf50);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.refresh-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.refresh-button:disabled {
  background: #ccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.refresh-button.refreshing {
  animation: buttonSpin 1s linear infinite;
}

@keyframes buttonSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Trade Status Change Notifications */
.trade-notification {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  z-index: 10000;
  max-width: 300px;
  animation: notificationSlide 0.3s ease-out;
  font-size: 14px;
}

@keyframes notificationSlide {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.trade-notification.success {
  border-left: 4px solid #4caf50;
  background: #f1f8e9;
}

.trade-notification.error {
  border-left: 4px solid #f44336;
  background: #ffebee;
}

.trade-notification.info {
  border-left: 4px solid #2196f3;
  background: #e3f2fd;
}

/* Polling Status in Table Header */
.table-info .polling-status {
  color: #2196f3;
  font-weight: 500;
  margin-left: 10px;
}

.table-info .last-updated {
  color: #666;
  font-style: italic;
}

/* Dark theme support for polling elements */
.theme-dark .trade-updated {
  background-color: rgba(33, 150, 243, 0.2);
}

.theme-dark .polling-indicator {
  background: rgba(33, 150, 243, 0.2);
  color: #64b5f6;
}

.theme-dark .trade-notification {
  background: var(--bg-surface);
  border-color: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.trade-history-table th.trade-message-col {
  width: 18%;
  min-width: 180px;
}

.trade-history-table td.trade-message {
  width: 18%;
  max-width: none;
  overflow: visible;
}

@media (max-width: 1280px) {
  .trade-history-table th.trade-message-col {
    min-width: 150px;
    width: 20%;
  }

  .trade-history-table td.trade-message {
    max-width: none;
    overflow: visible;
  }
}

@media (max-width: 768px) {
  .trade-history-table th.trade-message-col {
    min-width: 120px;
  }

  .trade-history-table td.trade-message {
    max-width: none;
    overflow: visible;
  }
}


/* ============================================================================
   EMPTY STATE - No Emojis, Clean Design
   ============================================================================ */

.no-trades-row {
  background: var(--bg-card) !important;
}

.no-trades-message {
  padding: 4rem 2rem !important;
  text-align: center;
}

.no-trades-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  max-width: 500px;
  margin: 0 auto;
}

.no-trades-icon-wrapper {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(255, 41, 79, 0.15), rgba(255, 41, 79, 0.05));
  border: 2px solid rgba(255, 41, 79, 0.3);
  color: var(--accent);
}

.no-trades-text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.no-trades-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  font-family: 'Outfit', sans-serif;
}

.no-trades-subtitle {
  font-size: 0.9rem;
  color: var(--text-muted);
  text-align: center;
  max-width: 400px;
  line-height: 1.6;
}

.inline-badge {
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.85em;
}

.inline-badge.buy {
  background: rgba(185, 255, 102, 0.2);
  color: #b9ff66;
  border: 1px solid rgba(185, 255, 102, 0.3);
}

.inline-badge.sell {
  background: rgba(255, 92, 122, 0.2);
  color: #ff5c7a;
  border: 1px solid rgba(255, 92, 122, 0.3);
}

/* ============================================================================
   NEW TABLE CELL STYLES - Advanced Firebase Data Display
   ============================================================================ */

.trade-row td {
  padding: 0.85rem 1rem;
  color: var(--text);
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
}

.time-display {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.time-display .date {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.85em;
}

.time-display .time {
  font-size: 0.75em;
  color: var(--text-muted);
  font-family: 'Space Grotesk', monospace;
}

.price-display {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.price-label {
  font-size: 0.65em;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.price-value {
  font-family: 'Space Grotesk', monospace;
  font-weight: 600;
  color: var(--text-primary);
}

.slippage-value {
  font-family: 'Space Grotesk', monospace;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  font-size: 0.85em;
}

.slippage-value.positive {
  color: #2adf8c;
  background: rgba(42, 223, 140, 0.15);
}

.slippage-value.negative {
  color: #ff5f7a;
  background: rgba(255, 95, 122, 0.15);
}

.slippage-value.neutral {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
}

.fee-value {
  font-family: 'Space Grotesk', monospace;
  font-weight: 600;
  color: var(--text-muted);
}

/* ============================================================================
   ACTION BUTTONS - SVG Icons, No Emojis
   ============================================================================ */

.action-btn-icon {
  background: #1a1a1f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 6px;
  padding: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-btn-icon:hover {
  background: rgba(255, 41, 79, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.action-btn-icon.danger:hover {
  background: rgba(255, 95, 122, 0.15);
  border-color: #ff5f7a;
  color: #ff5f7a;
}

.trade-actions {
  display: flex;
  gap: 0.4rem;
  justify-content: center;
}

