/* ========================================
   Stats / Analytics Dashboard
   ======================================== */

/* === Stats View Container === */

.stats-view {
  display: none;
  flex-direction: column;
  padding: var(--space-6);
  max-width: 100%;
  margin: 0 auto;
  width: 100%;
  flex: 1;
  min-height: 0;
  max-height: calc(100vh - var(--header-height) - 60px);
  overflow-y: auto;
  background:
    radial-gradient(ellipse at 20% 0%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 100%, rgba(59, 130, 246, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03) 0%, transparent 60%),
    #000000;
  position: relative;
}

.stats-view::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255, 255, 255, 0.05) 0%,
      transparent 30%,
      transparent 70%,
      rgba(255, 255, 255, 0.02) 100%);
  pointer-events: none;
}

.stats-view.view--active {
  display: flex;
}

/* === Stats Header === */

.stats-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.stats-header__left {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stats-header__filters {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.stats-header__icon {
  font-size: var(--text-2xl);
}

.stats-header__date-range {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
}

/* Period selector (hidden for now, groundwork for future) */
.stats-header__period {
  display: none; /* Hidden until future implementation */
}

.period-selector {
  display: flex;
  gap: var(--space-1);
  background: var(--bg-elevated);
  border-radius: var(--border-radius);
  padding: var(--space-1);
}

.period-selector__btn {
  padding: var(--space-2) var(--space-3);
  border: none;
  border-radius: var(--border-radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.period-selector__btn:hover {
  color: var(--text-secondary);
}

.period-selector__btn--active {
  color: var(--text-primary);
  background: var(--bg-surface);
}

/* === Stats Layout (Two-column with calendar) === */

/* Stats Overview Container - Filters, Stats Cards, and Equity Curve */
.stats-overview-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
  margin-bottom: var(--space-6);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Top row: Stats cards + Equity curve side-by-side */
.stats-top-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-6);
  align-items: center;
}

.stats-cards-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.stats-cards-column .stats-section:last-child {
  margin-bottom: var(--space-4);
}

.stats-chart-column {
  min-height: 90px;
  display: flex;
  align-items: stretch;
}

.stats-chart-column .stats-section {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.stats-chart {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.stats-chart__container {
  position: relative;
  width: 100%;
  height: 260px;
}

/* Stats Details Container - Calendar and Daily Trades */
.stats-details-container {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.2);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.05),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.stats-details-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: var(--space-6);
  align-items: start;
}

.stats-calendar-column {
  min-width: 0;
}

.stats-trades-column {
  min-width: 0;
}

.stats-trades-column .stats-section-header {
  margin-top: -7px;
}

/* Responsive: Stack vertically on smaller screens */
@media (max-width: 1600px) {
  .stats-details-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1700px) {
  .stats-top-row {
    grid-template-columns: 1fr;
  }

  .stats-chart-column {
    min-height: 90px;
  }
}

/* === Stats Sections === */

.stats-section {
  margin-bottom: var(--space-8);
}

.stats-section__header {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.stats-section__title {
  font-family: var(--font-mono);
  font-size: var(--text-xl);
  font-weight: var(--font-bold);
  color: #ffffff;
  letter-spacing: 0.05em;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.6);
  margin: 0;
}

.stats-section__icon {
  font-size: var(--text-lg);
}

/* === Stats Grid === */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* === Stat Card === */

.stat-card {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
    linear-gradient(145deg, #0a0a0a 0%, #000000 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
  min-height: 110px;
  transition: all var(--transition-base);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(139, 92, 246, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  position: relative;
}

.stat-card:hover {
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.8),
    0 0 32px rgba(139, 92, 246, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.08);
}

/* Stat card animation */
.stat-card--animate {
  animation: cardDealIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

/* Staggered card animations */
.stat-card--animate:nth-child(1) { animation-delay: 0ms; }
.stat-card--animate:nth-child(2) { animation-delay: 80ms; }
.stat-card--animate:nth-child(3) { animation-delay: 160ms; }
.stat-card--animate:nth-child(4) { animation-delay: 240ms; }
.stat-card--animate:nth-child(5) { animation-delay: 320ms; }
.stat-card--animate:nth-child(6) { animation-delay: 400ms; }
.stat-card--animate:nth-child(7) { animation-delay: 480ms; }
.stat-card--animate:nth-child(8) { animation-delay: 560ms; }

.stat-card__label {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--font-medium);
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.stat-card__value {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  line-height: var(--leading-tight);
  text-shadow:
    0 0 8px rgba(139, 92, 246, 0.5),
    0 0 16px rgba(139, 92, 246, 0.25);
}

.stat-card__sub {
  display: block;
  font-size: var(--text-xs);
  color: var(--text-muted);
  margin-top: var(--space-2);
}

.stat-card__sub--danger {
  color: var(--danger);
  font-weight: var(--font-semibold);
  text-shadow:
    0 0 6px rgba(239, 68, 68, 0.5),
    0 0 12px rgba(239, 68, 68, 0.25);
}

.stat-card__sub--success {
  color: var(--success);
  font-weight: var(--font-semibold);
}

.stat-card__sub--success-glow {
  color: var(--success);
  font-weight: var(--font-semibold);
  text-shadow:
    0 0 6px rgba(34, 197, 94, 0.6),
    0 0 12px rgba(34, 197, 94, 0.3);
}

.stat-card__sub--muted {
  color: var(--text-muted);
  opacity: 0.7;
}

.stat-card__sub--highlight {
  color: var(--text-primary);
  font-weight: var(--font-semibold);
  text-shadow:
    0 0 8px rgba(255, 255, 255, 0.5),
    0 0 16px rgba(255, 255, 255, 0.25);
}

/* Stat card variants */
.stat-card--success .stat-card__value {
  color: var(--success);
  text-shadow:
    0 0 8px rgba(34, 197, 94, 0.6),
    0 0 16px rgba(34, 197, 94, 0.3);
}

.stat-card--danger .stat-card__value {
  color: var(--danger);
  text-shadow:
    0 0 8px rgba(239, 68, 68, 0.6),
    0 0 16px rgba(239, 68, 68, 0.3);
}

.stat-card--warning .stat-card__value {
  color: var(--warning);
  text-shadow:
    0 0 8px rgba(245, 158, 11, 0.6),
    0 0 16px rgba(245, 158, 11, 0.3);
}

.stat-card--highlight {
  border-color: rgba(59, 130, 246, 0.9);
  border-width: 2px;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 0 48px rgba(59, 130, 246, 0.7),
    0 0 72px rgba(59, 130, 246, 0.5),
    0 0 96px rgba(59, 130, 246, 0.3),
    inset 0 1px 2px rgba(255, 255, 255, 0.12);
}

.stat-card--highlight:hover {
  border-color: rgba(59, 130, 246, 1);
  box-shadow:
    0 4px 16px rgba(0, 0, 0, 0.8),
    0 0 56px rgba(59, 130, 246, 0.8),
    0 0 80px rgba(59, 130, 246, 0.6),
    0 0 104px rgba(59, 130, 246, 0.4),
    inset 0 1px 2px rgba(255, 255, 255, 0.15);
}

.stat-card--primary .stat-card__value {
  color: var(--primary);
  text-shadow:
    0 0 8px rgba(59, 130, 246, 0.6),
    0 0 16px rgba(59, 130, 246, 0.3);
}

/* Large stat card for hero metrics */
.stat-card--lg {
  padding: var(--space-6);
}

.stat-card--lg .stat-card__value {
  font-size: var(--text-3xl);
}

/* Loading spinner overlay for stat cards */
.stat-card-loading {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: var(--border-radius-lg);
  backdrop-filter: blur(2px);
  z-index: 10;
}

.stat-card-loading .spinner {
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.8)) drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
  stroke: rgba(139, 92, 246, 0.9);
}

/* === Equity Chart Section === */

.stats-chart {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.05) 0%, transparent 60%),
    linear-gradient(145deg, #0a0a0a 0%, #000000 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--border-radius-lg);
  padding: var(--space-5);
  margin-top: var(--space-4);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(139, 92, 246, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  position: relative;
}

/* Stats chart animation */
.stats-chart--animate {
  animation: cardDealIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) backwards !important;
}

.stats-chart__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-4);
}

.stats-chart__title {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.stats-chart__loading {
  display: inline-flex;
  align-items: center;
  opacity: 0.9;
}

.stats-chart__loading .spinner {
  animation: spin 1s linear infinite;
  filter: drop-shadow(0 0 4px rgba(139, 92, 246, 0.8)) drop-shadow(0 0 8px rgba(139, 92, 246, 0.4));
  stroke: rgba(139, 92, 246, 0.9);
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.stats-chart__value {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: var(--font-bold);
  color: var(--text-primary);
  text-shadow:
    0 0 8px rgba(139, 92, 246, 0.5),
    0 0 16px rgba(139, 92, 246, 0.25);
}

.stats-chart__canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Chart empty state */
.stats-chart__empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  text-align: center;
}

.stats-chart__empty-icon {
  font-size: 48px;
  margin-bottom: var(--space-3);
  opacity: 0.5;
}

.stats-chart__empty-text {
  font-size: var(--text-sm);
}

/* === Selected Day Trades Section === */

.selected-day-trades {
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.05) 0%, transparent 60%),
    linear-gradient(145deg, #0a0a0a 0%, #000000 100%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--border-radius-lg);
  max-height: 492px;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(139, 92, 246, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
}

.selected-day-trades__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 492px;
  color: var(--text-tertiary);
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-6);
}

/* Journal table inside stats should match journal styling */
.selected-day-trades .journal-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}

.selected-day-trades .journal-table th,
.selected-day-trades .journal-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--border-subtle);
}

.selected-day-trades .journal-table th {
  font-weight: var(--font-medium);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: var(--text-xs);
  background: var(--bg-elevated);
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom: 1px solid rgba(139, 92, 246, 0.2);
}

.selected-day-trades .journal-table td {
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.selected-day-trades .journal-table tbody tr {
  transition: background var(--transition-fast);
  cursor: pointer;
}

.selected-day-trades .journal-table tbody tr.journal-row--animate {
  animation: rowSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}

@keyframes rowSlideIn {
  from {
    opacity: 0;
    transform: translateX(-40px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

.selected-day-trades .journal-table tbody tr.journal-row--closed-winner {
  background:
    radial-gradient(circle at 0% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 70%),
    rgba(34, 197, 94, 0.12);
  border-left: 3px solid rgba(34, 197, 94, 0.5);
  box-shadow: inset 0 0 20px rgba(34, 197, 94, 0.08);
}

.selected-day-trades .journal-table tbody tr.journal-row--closed-loser {
  background:
    radial-gradient(circle at 0% 50%, rgba(239, 68, 68, 0.18) 0%, transparent 70%),
    rgba(239, 68, 68, 0.15);
  border-left: 3px solid rgba(239, 68, 68, 0.5);
  box-shadow: inset 0 0 20px rgba(239, 68, 68, 0.08);
}

.selected-day-trades .journal-table tbody tr:hover {
  background:
    radial-gradient(circle at 0% 50%, rgba(139, 92, 246, 0.08) 0%, transparent 60%),
    var(--bg-hover);
  box-shadow: 0 0 16px rgba(139, 92, 246, 0.1);
}

.selected-day-trades .journal-table tbody tr.journal-row--closed-winner:hover {
  background:
    radial-gradient(circle at 0% 50%, rgba(34, 197, 94, 0.22) 0%, transparent 70%),
    rgba(34, 197, 94, 0.18);
  border-left: 3px solid rgba(34, 197, 94, 0.7);
  box-shadow:
    0 0 20px rgba(34, 197, 94, 0.2),
    inset 0 0 25px rgba(34, 197, 94, 0.12);
}

.selected-day-trades .journal-table tbody tr.journal-row--closed-loser:hover {
  background:
    radial-gradient(circle at 0% 50%, rgba(239, 68, 68, 0.25) 0%, transparent 70%),
    rgba(239, 68, 68, 0.22);
  border-left: 3px solid rgba(239, 68, 68, 0.7);
  box-shadow:
    0 0 20px rgba(239, 68, 68, 0.2),
    inset 0 0 25px rgba(239, 68, 68, 0.12);
}

/* === Stats Empty State === */

.stats-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--space-12) var(--space-6);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--border-radius-lg);
}

.stats-empty__icon {
  font-size: 64px;
  margin-bottom: var(--space-4);
  opacity: 0.6;
}

.stats-empty__title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: var(--font-semibold);
  color: var(--text-primary);
  margin: 0 0 var(--space-2);
}

.stats-empty__text {
  font-size: var(--text-base);
  color: var(--text-muted);
  max-width: 400px;
}

/* === Entrance Animations === */

/* === Responsive Adjustments === */

@media (max-width: 1024px) {
  .stats-view {
    padding: var(--space-5);
  }

  .stats-overview-container,
  .stats-details-container {
    padding: var(--space-4);
  }

  .stats-grid {
    gap: var(--space-3);
  }
}

@media (max-width: 768px) {
  .stats-view {
    padding: var(--space-4);
    max-height: calc(100vh - var(--header-height) - 40px);
  }

  .stats-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-3);
    margin-bottom: var(--space-3);
  }

  .stats-overview-container,
  .stats-details-container {
    padding: var(--space-3);
    margin-bottom: var(--space-4);
  }

  .stats-section {
    margin-bottom: var(--space-5);
  }

  .stats-section__title {
    font-size: var(--text-lg);
  }

  .stats-chart__container {
    height: 200px;
  }

  .stat-card {
    min-height: 90px;
    padding: var(--space-4);
  }

  .stat-card__label {
    font-size: 11px;
  }

  .stat-card__value {
    font-size: var(--text-xl);
  }

  .stat-card__sub {
    font-size: 10px;
  }

  /* Trades table horizontal scroll on mobile */
  .selected-day-trades {
    overflow-x: auto;
  }

  .selected-day-trades .journal-table {
    min-width: 800px;
  }

  /* Simpler animations on mobile */
  .stats-view.view--active .stats-header,
  .stats-view.view--active .stats-section,
  .stats-view.view--active .stats-chart,
  .stats-view.view--active .stats-empty {
    animation: fadeIn 0.3s ease-out;
    animation-delay: 0ms;
  }
}

@media (max-width: 640px) {
  .stats-view {
    padding: var(--space-3);
  }

  .stats-header__date-range {
    font-size: 11px;
  }

  .selected-day-trades__date-range {
    font-size: 11px;
  }

  .stats-overview-container,
  .stats-details-container {
    padding: var(--space-2);
  }

  .stats-grid {
    gap: var(--space-2);
  }

  .stat-card {
    min-height: 80px;
    padding: var(--space-3);
  }

  .stat-card__value {
    font-size: var(--text-lg);
  }
}

@media (max-width: 500px) {
  .stat-card__value {
    font-size: var(--text-base);
  }

  .stat-card--lg .stat-card__value {
    font-size: var(--text-xl);
  }

  .stats-section__title {
    font-size: var(--text-base);
  }

  .stats-chart__title {
    font-size: var(--text-base);
  }
}

/* === View visibility for view swap === */

.main.view--hidden,
.positions-view.view--hidden,
.journal-view.view--hidden,
.stats-view.view--hidden {
  display: none !important;
}

.main.view--active {
  display: grid;
}

/* Mobile: override grid with flex for dashboard */
@media (max-width: 600px) {
  .main.view--active {
    display: flex;
    flex-direction: column;
  }
}

.positions-view.view--active,
.journal-view.view--active,
.stats-view.view--active {
  display: flex;
}

/* Opened Trades Date Range - above the trades container */
.selected-day-trades__date-range {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-2);
}

/* Note: Column hiding is now handled by statsPageMode in the renderer */

/* Apply P&L colors to stats page trades table (matching journal page) */
.stats-view .journal-table td.journal-table__pnl--positive {
  color: var(--success);
  font-weight: var(--font-semibold);
  text-shadow:
    0 0 6px rgba(34, 197, 94, 0.5),
    0 0 12px rgba(34, 197, 94, 0.25);
}

.stats-view .journal-table td.journal-table__pnl--negative {
  color: var(--danger);
  font-weight: var(--font-semibold);
  text-shadow:
    0 0 6px rgba(239, 68, 68, 0.5),
    0 0 12px rgba(239, 68, 68, 0.25);
}

/* Column styling matching journal page */

/* Date column (1st) - blue glow */
.stats-view .journal-table td:nth-child(1) {
  text-shadow:
    0 0 8px rgba(96, 165, 250, 0.6),
    0 0 16px rgba(96, 165, 250, 0.3);
}

/* Ticker column (2nd) - gradient shimmer */
.stats-view .journal-table td:nth-child(2) {
  font-family: var(--font-mono);
  font-size: var(--text-base);
  font-weight: var(--font-bold);
  background: linear-gradient(135deg, #60a5fa 0%, #a78bfa 60%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.05em;
  filter: drop-shadow(0 0 6px rgba(96, 165, 250, 0.4));
  animation: tickerShimmer 3s ease-in-out infinite;
  background-size: 200% 100%;
}

/* Options column (3rd) - blue glow */
.stats-view .journal-table td:nth-child(3) {
  text-shadow:
    0 0 8px rgba(96, 165, 250, 0.6),
    0 0 16px rgba(96, 165, 250, 0.3);
}

/* Entry column (4th) - blue glow */
.stats-view .journal-table td:nth-child(4) {
  text-shadow:
    0 0 8px rgba(96, 165, 250, 0.6),
    0 0 16px rgba(96, 165, 250, 0.3);
}

/* Shares column (6th) - blue glow */
.stats-view .journal-table td:nth-child(6) {
  text-shadow:
    0 0 8px rgba(96, 165, 250, 0.6),
    0 0 16px rgba(96, 165, 250, 0.3);
}

@keyframes tickerShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* === Stats Note === */
.stats-note {
  position: sticky;
  top: 0 !important;
  z-index: 10;
  text-align: center;
  padding: var(--space-2) var(--space-4);
  margin-top: 0 !important;
  margin-bottom: var(--space-6);
  margin-left: auto;
  margin-right: auto;
  max-width: 600px;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background:
    radial-gradient(circle at 50% 0%, rgba(139, 92, 246, 0.08) 0%, transparent 70%),
    linear-gradient(145deg, rgba(10, 10, 10, 0.95) 0%, rgba(0, 0, 0, 0.95) 100%);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(139, 92, 246, 0.3);
  border-radius: var(--border-radius-lg);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 0 24px rgba(139, 92, 246, 0.15),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  letter-spacing: 0.01em;
}

/* === Stats Section Headers === */
.stats-section-header {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--space-3);
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.stats-section-header .toggle-switch {
  margin: 0;
}

.stats-section-header .toggle-switch__option {
  pointer-events: auto !important;
  cursor: pointer !important;
}

.stats-section-header .toggle-switch__option[data-mode="closed"].active {
  color: rgba(255, 255, 255, 0.95) !important;
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12) 0%, transparent 70%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.04) 100%) !important;
  border-color: rgba(255, 255, 255, 0.4) !important;
  box-shadow:
    0 2px 8px rgba(0, 0, 0, 0.7),
    0 0 16px rgba(255, 255, 255, 0.2),
    inset 0 0 12px rgba(255, 255, 255, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.08) !important;
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.5) !important;
}

.stats-section-header__date {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-left: auto;
}
