/**
 * InflowScan Dashboard - Arctic Blue Design
 * Color Palette: Light, airy, ultra-modern. Clean white with striking blue accent.
 * Think Stripe or Linear — professional SaaS energy.
 */

/* ==================== Fonts ==================== */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,400;9..40,500;9..40,600;9..40,700&display=swap');

/* ==================== Variables ==================== */
:root {
  /* Arctic Blue Theme */
  --dark: #0F172A;
  --text-dark: #1E293B;
  --primary-blue: #3B82F6;
  --primary-blue-deep: #2563EB;
  --primary-blue-light: #DBEAFE;
  --primary-blue-hover: #2563EB;
  --bg-primary: #FFFFFF;
  --bg-secondary: #F8FAFC;
  --bg-tertiary: #DBEAFE;
  --text-primary: #1E293B;
  --text-secondary: #64748B;
  --text-tertiary: #94A3B8;
  --success-green: #10B981;
  --success-bg: #D1FAE5;
  --error-red: #EF4444;
  --error-bg: #FEE2E2;
  --border-color: #E2E8F0;
  --border-hover: #CBD5E1;
  --warning-yellow: #F59E0B;
  --card-bg: #FFFFFF;
  --table-hover: #F8FAFC;
  --table-stripe: #F8FAFC;

  /* Spacing */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;

  /* Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

  /* Border Radius */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

/* ==================== Global Styles ==================== */
* {
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background-color: var(--bg-secondary);
  color: var(--text-primary);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  max-width: 100vw;
}

/* ==================== Landscape Orientation Lock (Mobile Only) ==================== */
.orientation-lock-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-blue-deep) 0%, var(--primary-blue) 100%);
  z-index: 99999;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  padding: 2rem;
  text-align: center;
}

.orientation-lock-content {
  color: white;
  max-width: 400px;
}

.orientation-lock-icon {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  animation: rotateDevice 2s ease-in-out infinite;
}

.orientation-lock-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  letter-spacing: -0.5px;
}

.orientation-lock-message {
  font-size: 1rem;
  opacity: 0.9;
  line-height: 1.5;
  margin-bottom: 2rem;
}

/* Mobile Portrait: Market Summary in Orientation Lock */
.portrait-market-summary {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
  backdrop-filter: blur(10px);
}

.portrait-market-summary .summary-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 1rem;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.portrait-market-summary .summary-title i {
  margin-right: 0.5rem;
}

.portrait-market-summary .summary-metrics {
  display: flex;
  justify-content: space-around;
  gap: 1rem;
}

.portrait-market-summary .summary-metric {
  text-align: center;
  flex: 1;
}

.portrait-market-summary .metric-label {
  font-size: 0.75rem;
  opacity: 0.8;
  margin-bottom: 0.25rem;
}

.portrait-market-summary .metric-value {
  font-size: 1.1rem;
  font-weight: 700;
  white-space: nowrap;
}

.orientation-lock-logo {
  width: 140px;
  height: auto;
  opacity: 0.3;
  margin-top: 2rem;
}

@keyframes rotateDevice {
  0%, 100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-90deg);
  }
  50% {
    transform: rotate(-90deg);
  }
  75% {
    transform: rotate(0deg);
  }
}

/* Show overlay and hide content in portrait mode on mobile devices only */
@media (max-width: 932px) and (orientation: portrait) {
  /* DASHBOARD ONLY: Force landscape mode */
  .dashboard-page .orientation-lock-overlay {
    display: flex !important;
    z-index: 99999 !important;
  }

  /* Hide EVERYTHING on dashboard in portrait */
  .dashboard-page #header-placeholder,
  .dashboard-page .tab-navigation,
  .dashboard-page .compact-metrics-bar,
  .dashboard-page .main-content,
  .dashboard-page .footer,
  .dashboard-page .modal,
  .dashboard-page .modal-backdrop {
    display: none !important;
  }

  /* Force hide all modals in portrait on dashboard */
  body.dashboard-page.modal-open .modal {
    display: none !important;
  }

  /* STATIC PAGES: Allow portrait mode - hide orientation lock */
  body:not(.dashboard-page) .orientation-lock-overlay {
    display: none !important;
  }
}

/* ==================== Landscape Mode Optimizations (Mobile) - ULTRA DENSE ==================== */
@media (max-width: 932px) and (orientation: landscape) {
  /* Hide orientation lock overlay */
  .orientation-lock-overlay {
    display: none !important;
  }

  /* Force show all content in landscape mode */
  body {
    overflow: visible !important;
  }

  .header,
  .tab-navigation,
  .main-content,
  .footer {
    display: block !important;
    visibility: visible !important;
  }

  .compact-metrics-bar {
    display: flex !important;
    visibility: visible !important;
  }
  /* ULTRA COMPACT HEADER - Absolute minimum vertical space */
  .header {
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 1100;
  }

  .header .container-fluid {
    padding: 0.2rem 0.4rem !important;
  }

  .header .py-3 {
    padding-top: 0.2rem !important;
    padding-bottom: 0.2rem !important;
  }

  .header .d-flex {
    gap: 0.5rem !important;
  }

  /* Header search box - HIDDEN ON MOBILE */
  .header-search-box {
    display: none !important;
  }

  /* Tiny logo */
  .logo {
    width: 70px;
    height: 24px;
  }

  /* Ultra compact version badge */
  .version-badge {
    font-size: 0.4rem;
    padding: 0.1rem 0.25rem;
    letter-spacing: 0.3px;
  }

  .live-dot-inline {
    width: 4px;
    height: 4px;
  }

  /* Header navigation positioning for dropdown */
  .header-nav {
    position: relative;
    z-index: 1100;
  }

  /* HAMBURGER MENU - Hide desktop nav, show hamburger */
  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    padding: 0.3rem 0.4rem;
    font-size: 1.2rem;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-left: auto;
    order: 999;
  }

  /* Mobile menu dropdown - compact for landscape */
  .mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0.5rem;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    box-shadow: var(--shadow-lg);
    min-width: 180px;
    z-index: 1200;
    overflow: hidden;
    margin-top: 0.25rem;
  }

  .mobile-menu.show {
    display: block;
  }

  .mobile-menu-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.2s;
    border-bottom: 1px solid var(--border-color);
    text-decoration: none;
  }

  .mobile-menu-link:last-child {
    border-bottom: none;
  }

  .mobile-menu-link:hover {
    background: var(--bg-secondary);
    color: var(--primary-blue);
  }

  .mobile-menu-link i {
    font-size: 0.95rem;
  }

  /* Ultra compact ticker bar for landscape */
  .ticker-bar {
    display: block !important;
    padding: 0.15rem 0 !important;
    border-top: 1px solid var(--border-color);
  }

  .ticker-scroll-track {
    animation-duration: 30s !important;
  }

  .ticker-item {
    padding: 0.2rem 0.4rem !important;
    font-size: 0.6rem !important;
    gap: 0.25rem !important;
  }

  .ticker-symbol {
    font-size: 0.6rem !important;
    font-weight: 600;
  }

  .ticker-price {
    font-size: 0.58rem !important;
  }

  .ticker-change {
    font-size: 0.55rem !important;
    padding: 0.1rem 0.25rem !important;
  }

  .ticker-item i {
    font-size: 0.6rem !important;
  }

  /* ULTRA COMPACT TAB NAVIGATION - Single horizontal line */
  .tab-navigation {
    border-bottom: 1px solid var(--border-color);
    position: relative;
    z-index: 100;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
  }

  .tab-navigation .container-fluid {
    padding: 0.15rem 0.4rem !important;
    display: block !important;
    visibility: visible !important;
  }

  /* SHOW mobile tab selector + search on phone landscape */
  .mobile-tab-view {
    display: flex !important;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0;
  }

  .desktop-tab-view {
    display: none !important;
    overflow-x: auto;
    scrollbar-width: none; /* Hide scrollbar Firefox */
  }

  .desktop-tab-view::-webkit-scrollbar {
    display: none; /* Hide scrollbar Chrome/Safari */
  }

  /* Search box - visible next to dropdown */
  .search-box-compact {
    display: block !important;
    flex: 1;
    min-width: 0 !important;
    max-width: 50% !important;
  }

  .search-box-compact input {
    padding: 0.25rem 0.35rem;
    font-size: 0.65rem;
    height: 24px;
    border-radius: 3px;
  }

  /* Compact horizontal tabs */
  .tab-navigation .nav-tabs {
    border-bottom: none;
    gap: 0.2rem;
    flex-wrap: nowrap;
    margin-bottom: 0;
  }

  .tab-navigation .nav-link {
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    border: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
    border-radius: 0;
    color: var(--text-secondary);
    font-weight: 500;
  }

  .tab-navigation .nav-link.active {
    color: var(--primary-blue);
    border-bottom-color: var(--primary-blue);
    background: transparent;
  }

  .tab-navigation .nav-link:hover {
    color: var(--primary-blue);
    background: var(--bg-secondary);
    border-radius: 3px 3px 0 0;
  }

  /* Hide tab icons to save space */
  .tab-navigation .nav-link img,
  .tab-navigation .nav-link i {
    display: none;
  }

  /* HIDE METRICS BAR - Save precious vertical space */
  .compact-metrics-bar {
    display: none !important;
  }

  /* MAIN CONTENT - Zero padding */
  .main-content {
    padding: 0.25rem 0 0.5rem 0;
  }

  .main-content .container-fluid {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* Remove margin from row */
  .main-content .row {
    margin: 0;
  }

  /* TABLES - ULTRA DENSE TERMINAL MODE - Show all rows */
  .table-responsive {
    border-radius: 4px;
    max-height: none;
    overflow-y: visible;
    overflow-x: hidden; /* No horizontal scroll - columns must fit */
    margin-bottom: 0.5rem;
    box-shadow: none;
    border: 1px solid var(--border-color);
  }

  /* Allow page to scroll instead of table */
  body {
    overflow-y: auto !important;
  }

  .data-table {
    font-size: 0.65rem;
    margin-bottom: 0;
  }

  /* ULTRA COMPACT TABLE HEADERS */
  .data-table th {
    padding: 0.3rem 0.2rem;
    font-size: 0.6rem;
    letter-spacing: 0.3px;
    line-height: 1.2;
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 10;
    text-align: center;
    border-bottom: 1px solid var(--primary-blue);
  }

  /* Simplify flow column headers - Add "FLOW" group label */
  #btcTable thead tr, #ethTable thead tr,
  #xrpTable thead tr, #solTable thead tr {
    position: relative;
  }

  /* Add "FLOW" label above flow columns */
  #btcTable th:nth-child(3)::before,
  #ethTable th:nth-child(3)::before,
  #xrpTable th:nth-child(3)::before,
  #solTable th:nth-child(3)::before {
    content: 'FLOW ▼';
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    font-size: 0.5rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-align: center;
    letter-spacing: 1px;
  }

  /* Compact flow headers - show only timeframe */
  #btcTable th:nth-child(3), #ethTable th:nth-child(3),
  #xrpTable th:nth-child(3), #solTable th:nth-child(3) {
    font-size: 0.65rem;
    font-weight: 700;
    padding-top: 0.6rem; /* Space for FLOW label */
  }

  #btcTable th:nth-child(5), #ethTable th:nth-child(5),
  #xrpTable th:nth-child(5), #solTable th:nth-child(5),
  #btcTable th:nth-child(6), #ethTable th:nth-child(6),
  #xrpTable th:nth-child(6), #solTable th:nth-child(6) {
    font-size: 0.65rem;
    font-weight: 700;
  }

  /* ULTRA COMPACT TABLE CELLS - CENTER ALIGNED */
  .data-table td {
    padding: 0.3rem 0.2rem;
    font-size: 0.65rem;
    line-height: 1.3;
    text-align: center;
    vertical-align: middle;
  }

  /* Removed extra column padding - using fixed widths instead for better spacing */

  .data-table th i {
    font-size: 0.55rem;
    margin-left: 0.15rem;
  }

  /* Compact table footer */
  .data-table tfoot td {
    padding: 0.4rem;
    font-size: 0.65rem;
  }

  /* Loading row - compact */
  .loading-row td {
    padding: 1.5rem !important;
  }

  .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
  }

  /* TBL-05: Coming Soon State for Empty Tables */
  .coming-soon-row td {
    padding: 3rem 1rem !important;
  }

  .coming-soon-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
  }

  .coming-soon-container h4 {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1.25rem;
  }

  .coming-soon-container p {
    max-width: 500px;
    line-height: 1.6;
  }

  /* Show ALL columns in landscape mode - we have the space! */
  #btcTable th, #btcTable td,
  #ethTable th, #ethTable td,
  #xrpTable th, #xrpTable td,
  #solTable th, #solTable td {
    display: table-cell !important;
  }

  /* MOBILE LANDSCAPE TABLE LAYOUT - Fit all visible columns in viewport */
  #btcTable, #ethTable, #xrpTable, #solTable {
    table-layout: fixed !important;
    width: 100%;
  }

  /* Column 1: TICKER */
  #btcTable th:nth-child(1), #btcTable td:nth-child(1),
  #ethTable th:nth-child(1), #ethTable td:nth-child(1),
  #xrpTable th:nth-child(1), #xrpTable td:nth-child(1),
  #solTable th:nth-child(1), #solTable td:nth-child(1) {
    width: 13%;
    white-space: nowrap;
    font-weight: 600;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Column 2: NAME - HIDDEN (set by JS d-none) */
  #btcTable th:nth-child(2), #btcTable td:nth-child(2),
  #ethTable th:nth-child(2), #ethTable td:nth-child(2),
  #xrpTable th:nth-child(2), #xrpTable td:nth-child(2),
  #solTable th:nth-child(2), #solTable td:nth-child(2) {
    display: none !important;
    width: 0;
  }

  /* Column 3: 24H Flow/Price */
  #btcTable th:nth-child(3), #btcTable td:nth-child(3),
  #ethTable th:nth-child(3), #ethTable td:nth-child(3),
  #xrpTable th:nth-child(3), #xrpTable td:nth-child(3),
  #solTable th:nth-child(3), #solTable td:nth-child(3) {
    width: 16%;
    text-align: center;
  }

  /* Column 4: VOLUME */
  #btcTable th:nth-child(4), #btcTable td:nth-child(4),
  #ethTable th:nth-child(4), #ethTable td:nth-child(4),
  #xrpTable th:nth-child(4), #xrpTable td:nth-child(4),
  #solTable th:nth-child(4), #solTable td:nth-child(4) {
    width: 14%;
    text-align: center;
  }

  /* Column 5: 7D */
  #btcTable th:nth-child(5), #btcTable td:nth-child(5),
  #ethTable th:nth-child(5), #ethTable td:nth-child(5),
  #xrpTable th:nth-child(5), #xrpTable td:nth-child(5),
  #solTable th:nth-child(5), #solTable td:nth-child(5) {
    width: 16%;
    text-align: center;
  }

  /* Column 6: 30D */
  #btcTable th:nth-child(6), #btcTable td:nth-child(6),
  #ethTable th:nth-child(6), #ethTable td:nth-child(6),
  #xrpTable th:nth-child(6), #xrpTable td:nth-child(6),
  #solTable th:nth-child(6), #solTable td:nth-child(6) {
    width: 16%;
    text-align: center;
  }

  /* Column 7: P/D - HIDDEN ON MOBILE */
  #btcTable th:nth-child(7), #btcTable td:nth-child(7),
  #ethTable th:nth-child(7), #ethTable td:nth-child(7),
  #xrpTable th:nth-child(7), #xrpTable td:nth-child(7),
  #solTable th:nth-child(7), #solTable td:nth-child(7) {
    display: none !important;
    width: 0;
  }

  /* Column 8: AUM */
  #btcTable th:nth-child(8), #btcTable td:nth-child(8),
  #ethTable th:nth-child(8), #ethTable td:nth-child(8),
  #xrpTable th:nth-child(8), #xrpTable td:nth-child(8),
  #solTable th:nth-child(8), #solTable td:nth-child(8) {
    width: 8%;
    text-align: center;
    display: table-cell !important;
  }

  /* Ultra compact badges - accommodates up to 10 chars (+$563.1M) */
  .premium-badge,
  .flow-badge {
    padding: 0.2rem 0.4rem;
    font-size: 0.6rem;
    border-radius: 3px;
    white-space: nowrap;
    display: inline-block;
    min-width: 65px;
    max-width: 100%;
    text-align: center;
    box-sizing: border-box;
  }

  /* COMPACT FOOTER IN LANDSCAPE */
  .footer {
    padding: 1rem 0 0.75rem;
    margin-top: 1rem;
    font-size: 0.7rem;
  }

  .footer-link {
    font-size: 0.65rem;
    margin: 0 0.4rem;
    padding: 0.25rem 0.5rem;
  }

  .copyright {
    font-size: 0.65rem;
    margin-top: 0.5rem;
  }

  .footer .row {
    margin-bottom: 0.5rem;
  }

  /* Modals - Stacked vertical layout for mobile */
  .modal-dialog {
    max-width: 95vw;
    margin: 0.5rem auto;
  }

  .modal-content {
    max-height: 95vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-header {
    padding: 0.5rem 0.75rem;
  }

  /* ETF Modal mobile compact */
  #etfDetailModal .modal-title {
    font-size: 0.85rem;
    font-weight: 600;
  }

  #etfDetailModal .data-table th,
  #etfDetailModal .data-table td {
    text-align: center !important;
    padding: 0.3rem !important;
    font-size: 0.6rem;
  }

  #etfDetailModal .today-row {
    background: var(--primary-blue-light);
    border-left: 3px solid var(--primary-blue);
    font-weight: 500;
  }

  .modal-body {
    padding: 0.75rem;
  }

  .modal-footer {
    padding: 0.5rem 0.75rem;
  }

  #etfDetailModal #etfChartTabs .nav-link {
    padding: 0.3rem 0.6rem;
    font-size: 0.7rem;
  }

  #etfDetailModal .form-check-label {
    font-size: 0.65rem;
  }

  /* Touch targets - slightly smaller but still tappable */
  button, a, .nav-link {
    min-height: 36px;
    min-width: 36px;
  }

  /* Index Table - show all columns, compact */
  #indexTable {
    font-size: 0.65rem;
  }

  #indexTable th, #indexTable td {
    display: table-cell !important;
    padding: 0.3rem 0.4rem;
  }

  #indexTable th {
    font-size: 0.6rem;
  }

  /* Stablecoins Table - show all columns, compact */
  #stableTable {
    font-size: 0.65rem;
  }

  #stableTable th, #stableTable td {
    display: table-cell !important;
    padding: 0.3rem 0.4rem;
  }

  #stableTable th {
    font-size: 0.6rem;
  }

  /* News Table - show all 20 articles, compact */
  #newsContainer {
    max-height: none; /* Show all articles */
    overflow-y: visible;
  }

  #newsTable {
    font-size: 0.65rem;
  }

  #newsTable th, #newsTable td {
    display: table-cell !important;
    padding: 0.3rem 0.4rem;
  }

  #newsTable th {
    font-size: 0.6rem;
  }

  #newsTable tbody tr {
    border-bottom: 1px solid var(--border-color);
  }

  .news-source {
    font-size: 0.6rem;
    padding: 0.15rem 0.35rem;
  }

  .news-headline {
    font-size: 0.7rem;
    line-height: 1.3;
  }

  .news-time {
    font-size: 0.65rem;
  }

  /* Alert boxes - compact */
  .alert {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem;
    margin-bottom: 0.5rem;
  }

  .alert i {
    font-size: 0.85rem;
  }

  /* Remove hover transforms to prevent layout shifts */
  .data-table tbody tr:hover {
    transform: none;
    box-shadow: inset 3px 0 0 var(--primary-blue);
  }
}

a {
  color: var(--primary-blue);
  text-decoration: none;
  transition: color 0.2s;
}

a:hover {
  color: var(--primary-blue-hover);
}

/* ==================== Header ==================== */
.header {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

/* Full-Width Scrolling Ticker Bar */
.ticker-bar {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 0.5rem 0;
  overflow: hidden;
  position: relative;
}

.ticker-scroll-container {
  width: 100%;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.ticker-scroll-container .live-indicator {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  z-index: 10;
  background: var(--bg-secondary);
  padding: 0.25rem 0.5rem;
  border-radius: 3px;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.ticker-scroll-track {
  display: flex;
  gap: 2rem;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
  padding-left: 100px; /* Space for LIVE indicator */
}

.ticker-scroll-track:hover {
  animation-play-state: paused;
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.logo {
  width: 180px;
  height: 60px;
  object-fit: contain;
}

.version-badge {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--primary-blue);
  background: var(--primary-blue-light);
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--primary-blue);
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.15);
  align-self: center;
}

.brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.brand-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin: 0;
}

.header-nav {
  display: flex;
  gap: var(--spacing-md);
  align-items: center;
  justify-content: flex-end;
}

.header-nav .nav-link {
  color: var(--text-secondary);
  font-weight: 500;
  padding: var(--spacing-xs) var(--spacing-sm);
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}

.header-nav .nav-link:hover {
  color: var(--primary-blue);
  background: var(--bg-secondary);
}

/* NAV-01: Active page indicator */
.header-nav .nav-link.active {
  color: var(--primary-blue);
  background: var(--bg-secondary);
  font-weight: 600;
}

.mobile-menu-link.active {
  color: var(--primary-blue);
  background: var(--bg-secondary);
  font-weight: 600;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.mobile-menu-toggle:hover {
  color: var(--primary-blue);
}

.mobile-menu-toggle i {
  display: block;
}

/* Mobile Dropdown Menu */
.mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  width: 180px;
  max-width: 60vw;
  z-index: 1200;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
}

.mobile-menu.show {
  display: block;
  opacity: 1;
  transform: translateY(0);
  pointer-events: all;
}

.mobile-menu-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  color: var(--text-secondary);
  font-weight: 500;
  transition: all 0.2s;
  border-bottom: 1px solid var(--border-color);
}

.mobile-menu-link:last-child {
  border-bottom: none;
}

.mobile-menu-link:hover {
  background: var(--bg-secondary);
  color: var(--primary-blue);
}

.mobile-menu-link i {
  font-size: 1.1rem;
}

/* Desktop navigation visible by default */
.desktop-nav {
  display: block;
}

/* CSS-10: Breadcrumb Navigation for Static Pages */
/* Breadcrumbs removed */

/* CSS-05: Accessibility - Focus Styles */
button:focus-visible,
a:focus-visible,
.nav-link:focus-visible,
.btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.data-table tbody tr:focus-visible,
.ticker-item:focus-visible,
.mobile-menu-link:focus-visible {
  outline: 2px solid var(--primary-blue);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* Remove default outline, rely on focus-visible */
button:focus,
a:focus,
input:focus,
select:focus,
textarea:focus {
  outline: none;
}

/* Hide mobile menu elements on desktop */
@media (min-width: 933px) {
  .mobile-menu-toggle {
    display: none !important;
  }

  .mobile-menu {
    display: none !important;
  }
}

/* Show mobile menu on mobile devices */
@media (max-width: 932px) {
  .desktop-nav {
    display: none !important;
  }

  .mobile-menu-toggle {
    display: flex !important;
    align-items: center;
    justify-content: center;
  }

  .mobile-menu {
    display: none;
    margin-top: 0.5rem;
  }

  .mobile-menu.show {
    display: block;
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
  }
}

/* ==================== Market Ticker Bar ==================== */
.ticker-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
  position: relative;
}

.ticker-wrapper-full {
  width: 100%;
  overflow: visible;
  position: relative;
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ticker-status {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  padding-right: 0.75rem;
  border-right: 1px solid var(--border-color);
}

.live-dot {
  width: 6px;
  height: 6px;
  background: var(--success-green);
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
}

.live-dot-inline {
  display: inline-block;
  width: 5px;
  height: 5px;
  background: var(--success-green);
  border-radius: 50%;
  animation: livePulse 2s ease-in-out infinite;
  vertical-align: middle;
  margin: 0 2px;
}

.live-text {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--success-green);
  letter-spacing: 0.5px;
}

.ticker-content-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: space-between;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: thin; /* Firefox - show thin scrollbar */
  scrollbar-color: var(--border-color) transparent;
}


.ticker-content-inline::-webkit-scrollbar {
  height: 4px;
}

.ticker-content-inline::-webkit-scrollbar-track {
  background: transparent;
}

.ticker-content-inline::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.ticker-content-inline::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  padding: 0.3rem 0.5rem;
  background: transparent;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  flex-shrink: 0;
  cursor: pointer;
  position: relative;
  min-width: fit-content;
}

.ticker-item:hover {
  background: var(--bg-primary);
  border-color: var(--border-color);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.ticker-item.active {
  background: var(--bg-primary);
  border-color: var(--primary-blue);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
}

.ticker-arrow {
  display: none;
}

.ticker-logo {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.ticker-item i {
  font-size: 0.75rem;
  color: var(--text-dark);
}

.ticker-symbol {
  font-weight: 700;
  font-size: 0.625rem;
  color: var(--text-dark);
  letter-spacing: 0.3px;
  min-width: 35px;
  display: inline-block;
}

.ticker-price {
  font-weight: 600;
  font-size: 0.75rem;
  color: var(--text-primary);
  margin-left: 0.1rem;
  min-width: 65px;
  display: inline-block;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ticker-change {
  font-weight: 600;
  font-size: 0.625rem;
  margin-left: 0.1rem;
  min-width: 45px;
  display: inline-block;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ticker-change.positive {
  color: var(--success-green);
}

.ticker-change.positive::before {
  content: "▲ ";
  font-size: 0.625rem;
}

.ticker-change.negative {
  color: var(--error-red);
}

.ticker-change.negative::before {
  content: "▼ ";
  font-size: 0.625rem;
}

.ticker-change.neutral {
  color: var(--text-tertiary);
  font-size: 0.625rem;
}

/* Price flash animation on update */
@keyframes priceFlash {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(59, 130, 246, 0.2);
  }
}

@keyframes priceFlashUp {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(16, 185, 129, 0.2);
  }
}

@keyframes priceFlashDown {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(239, 68, 68, 0.2);
  }
}

.ticker-price.price-flash {
  animation: priceFlash 0.6s ease;
}

.price-flash-up {
  animation: priceFlashUp 1s ease;
}

.price-flash-down {
  animation: priceFlashDown 1s ease;
}

/* Smooth value changes */
.ticker-price,
.ticker-change {
  transition: color 0.3s ease;
}

/* Special styling for stablecoin ticker (has longer text) */
.ticker-stables {
  border-color: transparent;
}

.ticker-stables .ticker-symbol {
  min-width: 85px;
}

.ticker-stables .ticker-price {
  min-width: 55px;
}

/* Ensure header ticker is completely hidden on mobile */
@media (max-width: 768px) {
  .header .ticker-inline,
  .header-ticker {
    display: none !important;
  }
}

/* Mobile responsiveness */
@media (max-width: 992px) {
  .ticker-content-inline {
    gap: 1rem;
    justify-content: flex-start;
  }

  .ticker-item {
    padding: 0.3rem 0.5rem;
  }

  .ticker-symbol {
    font-size: 0.6875rem;
  }

  .ticker-price {
    font-size: 0.75rem;
  }

  .ticker-logo {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 768px) {
  .ticker-wrapper-inline {
    padding: 0.4rem 0.6rem;
  }

  .ticker-item i {
    font-size: 0.875rem;
  }
}

/* Crypto Live Price in Modal */
.crypto-live-price {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-dark);
}

.crypto-live-change {
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
}

.crypto-live-change.positive {
  background: rgba(16, 185, 129, 0.1);
  color: #10B981;
}

.crypto-live-change.negative {
  background: rgba(239, 68, 68, 0.1);
  color: #EF4444;
}

/* ==================== Premium Modal ==================== */
.premium-modal-content {
  border: 3px solid var(--primary-blue);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(59, 130, 246, 0.4),
              0 0 0 1px rgba(59, 130, 246, 0.1);
  background: linear-gradient(135deg, #FFFFFF 0%, #F8FAFC 100%);
}

.premium-modal-header {
  background: linear-gradient(135deg, var(--primary-blue-deep) 0%, var(--primary-blue) 100%);
  padding: 2rem 1.5rem 1rem;
  position: relative;
  text-align: center;
  border-bottom: none;
}

.premium-icon-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 1rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 3px solid rgba(255, 255, 255, 0.3);
}

.premium-icon-wrapper i {
  font-size: 2.5rem;
  color: #FFFFFF;
}

.premium-modal-header .btn-close-white {
  position: absolute;
  top: 1rem;
  right: 1rem;
  opacity: 0.8;
}

.premium-modal-body {
  padding: 2rem 2rem 1.5rem;
}

.premium-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.premium-subtitle {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.premium-features {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.premium-feature-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--primary-blue-light);
  border-radius: 8px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  transition: all 0.2s ease;
}

.premium-feature-item:hover {
  background: rgba(59, 130, 246, 0.15);
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--primary-blue);
}

.premium-feature-item i {
  font-size: 1.25rem;
  color: var(--primary-blue);
  flex-shrink: 0;
}

.premium-feature-item span {
  font-size: 0.9375rem;
  color: var(--text-dark);
  font-weight: 500;
}

.premium-modal-footer {
  padding: 1.5rem 2rem 2rem;
  border-top: 2px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.premium-modal-footer .btn {
  padding: 0.75rem 2rem;
  font-weight: 600;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.btn-premium {
  background: linear-gradient(135deg, var(--primary-blue-deep) 0%, var(--primary-blue) 100%);
  border: 2px solid var(--primary-blue);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  background: linear-gradient(135deg, var(--primary-blue) 0%, var(--primary-blue-deep) 100%);
  color: #FFFFFF;
}

.premium-modal-footer .btn-light {
  background: #FFFFFF;
  border: 2px solid var(--border-color);
  color: var(--text-secondary);
}

.premium-modal-footer .btn-light:hover {
  background: var(--bg-secondary);
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

/* ==================== Controls Bar ==================== */
.controls-bar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.time-filters {
  display: flex;
  gap: var(--spacing-xs);
}

.filter-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
}

.filter-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.last-updated {
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* ==================== Tab Navigation ==================== */
.tab-navigation {
  background: var(--card-bg);
  border-bottom: 1px solid var(--border-color);
}

.tab-navigation .nav-tabs {
  border-bottom: none;
  gap: var(--spacing-sm);
}

.tab-navigation .nav-link {
  color: var(--text-secondary);
  border: none;
  border-bottom: 3px solid transparent;
  padding: 1rem 1.5rem;
  font-weight: 500;
  transition: all 0.2s;
}

.tab-navigation .nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-navigation .nav-link.active {
  color: var(--primary-blue);
  border-bottom-color: var(--primary-blue);
  background: transparent;
}

.tab-navigation .nav-link i {
  margin-right: 0.5rem;
}

/* Crypto logo icons */
.crypto-logo {
  display: inline-block !important;
  width: 20px;
  height: 20px;
  margin-right: 0.5rem;
  vertical-align: middle;
  object-fit: contain;
}

/* Hide crypto logos on mobile to save space */
@media (max-width: 768px) {
  .crypto-logo {
    display: none !important;
  }
}

/* Mobile Tab Selector */
.mobile-tab-view {
  display: none;
  padding: 0.75rem 0;
}

.mobile-tab-selector {
  font-weight: 500;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  padding: 0.65rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s;
  min-height: 44px; /* Better tap target */
}

.mobile-tab-selector:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Desktop tab view visible by default */
.desktop-tab-view {
  display: flex;
}

/* MOBILE: Always show dropdown selector (Option A) - Works in both portrait and landscape */
@media (max-width: 1024px) {
  .desktop-tab-view {
    display: none !important;
  }

  .mobile-tab-view {
    display: block !important;
  }

  .search-box-compact {
    min-width: auto !important;
    flex: 1;
    flex-shrink: 0;
  }

  .search-box-compact input {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
    min-height: 44px;
    width: 100%;
  }

  .mobile-tab-selector {
    flex: 1;
    max-width: 50%;
  }

  /* COMPACT TABLE for phones/tablets - all 4 ETF tables */
  #btcTable, #ethTable, #xrpTable, #solTable {
    table-layout: fixed !important;
    width: 100%;
  }

  .table-responsive {
    overflow-x: hidden;
  }

  .data-table {
    font-size: 0.7rem;
  }

  .data-table th {
    padding: 0.3rem 0.2rem;
    font-size: 0.65rem;
    text-align: center;
  }

  .data-table td {
    padding: 0.3rem 0.2rem;
    font-size: 0.7rem;
    text-align: center;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Column 1: TICKER - 14% */
  #btcTable th:nth-child(1), #btcTable td:nth-child(1),
  #ethTable th:nth-child(1), #ethTable td:nth-child(1),
  #xrpTable th:nth-child(1), #xrpTable td:nth-child(1),
  #solTable th:nth-child(1), #solTable td:nth-child(1) {
    width: 14%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Column 2: NAME - HIDDEN */
  #btcTable th:nth-child(2), #btcTable td:nth-child(2),
  #ethTable th:nth-child(2), #ethTable td:nth-child(2),
  #xrpTable th:nth-child(2), #xrpTable td:nth-child(2),
  #solTable th:nth-child(2), #solTable td:nth-child(2) {
    display: none !important;
    width: 0;
  }

  /* Column 3: 24H - 16% */
  #btcTable th:nth-child(3), #btcTable td:nth-child(3),
  #ethTable th:nth-child(3), #ethTable td:nth-child(3),
  #xrpTable th:nth-child(3), #xrpTable td:nth-child(3),
  #solTable th:nth-child(3), #solTable td:nth-child(3) {
    width: 16%;
  }

  /* Column 4: VOL - 16% */
  #btcTable th:nth-child(4), #btcTable td:nth-child(4),
  #ethTable th:nth-child(4), #ethTable td:nth-child(4),
  #xrpTable th:nth-child(4), #xrpTable td:nth-child(4),
  #solTable th:nth-child(4), #solTable td:nth-child(4) {
    width: 16%;
  }

  /* Column 5: 7D - 16% */
  #btcTable th:nth-child(5), #btcTable td:nth-child(5),
  #ethTable th:nth-child(5), #ethTable td:nth-child(5),
  #xrpTable th:nth-child(5), #xrpTable td:nth-child(5),
  #solTable th:nth-child(5), #solTable td:nth-child(5) {
    width: 16%;
  }

  /* Column 6: 30D - 16% */
  #btcTable th:nth-child(6), #btcTable td:nth-child(6),
  #ethTable th:nth-child(6), #ethTable td:nth-child(6),
  #xrpTable th:nth-child(6), #xrpTable td:nth-child(6),
  #solTable th:nth-child(6), #solTable td:nth-child(6) {
    width: 16%;
  }

  /* Column 7: P/D - HIDDEN */
  #btcTable th:nth-child(7), #btcTable td:nth-child(7),
  #ethTable th:nth-child(7), #ethTable td:nth-child(7),
  #xrpTable th:nth-child(7), #xrpTable td:nth-child(7),
  #solTable th:nth-child(7), #solTable td:nth-child(7) {
    display: none !important;
    width: 0;
  }

  /* Column 8: AUM - 12% */
  #btcTable th:nth-child(8), #btcTable td:nth-child(8),
  #ethTable th:nth-child(8), #ethTable td:nth-child(8),
  #xrpTable th:nth-child(8), #xrpTable td:nth-child(8),
  #solTable th:nth-child(8), #solTable td:nth-child(8) {
    width: 8%;
  }

  /* Compact badges */
  .flow-badge, .premium-badge {
    padding: 0.15rem 0.3rem;
    font-size: 0.65rem;
    min-width: 55px;
  }
}

/* ==================== Compact Metrics Bar ==================== */
.compact-metrics-bar {
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  padding: 0.5rem 0;
}

.metrics-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: center;
  justify-content: center;
  text-align: center;
  flex: 1;
  min-width: 150px;
  min-height: 100px;
  padding: 1rem;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
}

.metric-label {
  font-size: 0.625rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  display: block;
  width: 100%;
}

.metric-content {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  justify-content: center;
  flex-direction: row;
  width: 100%;
}

.metric-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-dark);
  font-variant-numeric: tabular-nums;
  text-align: center;
  display: inline-block;
  transition: color 0.3s ease;
}

.metric-change {
  font-size: 0.75rem;
  font-weight: 600;
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.metric-change.positive,
.metric-value.positive {
  color: var(--success-green);
}

.metric-change.negative,
.metric-value.negative {
  color: var(--error-red);
}

.metric-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
}

.metric-ticker-link {
  color: var(--primary-blue) !important;
  cursor: pointer;
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: 4px;
  transition: all 0.2s ease;
  display: inline-block;
}

.metric-ticker-link:hover {
  background: var(--primary-blue-light);
  color: var(--primary-blue-deep) !important;
  transform: translateY(-1px);
}

/* ==================== Sentiment Gauge ==================== */
.sentiment-gauge {
  width: 60px;
  height: 30px;
  position: relative;
  background: linear-gradient(90deg,
    #EF4444 0%,      /* Red - Extreme Fear */
    #F59E0B 25%,     /* Orange - Fear */
    #94A3B8 50%,     /* Gray - Neutral */
    #10B981 75%,     /* Green - Greed */
    #059669 100%     /* Dark Green - Extreme Greed */
  );
  border-radius: 30px 30px 0 0;
  margin: 0 auto 0.25rem;
  overflow: hidden;
  border: 2px solid var(--border-color);
  border-bottom: none;
}

.sentiment-needle {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 2px;
  height: 24px;
  background: var(--text-dark);
  transform-origin: bottom center;
  transform: translateX(-50%) rotate(0deg);
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
}

.sentiment-needle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid var(--text-dark);
}

.sentiment-needle::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 50%;
  transform: translateX(-50%);
  width: 6px;
  height: 6px;
  background: var(--text-dark);
  border-radius: 50%;
  border: 2px solid var(--bg-primary);
}

/* Sentiment value colors */
.metric-value[data-sentiment="extreme-fear"],
.metric-value[data-sentiment="fear"] {
  color: var(--error-red);
}

.metric-value[data-sentiment="neutral"] {
  color: var(--text-secondary);
}

.metric-value[data-sentiment="greed"],
.metric-value[data-sentiment="extreme-greed"] {
  color: var(--success-green);
}

/* ==================== Toolbar ==================== */
.toolbar {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.toolbar-btn {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: var(--radius-sm);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-right: var(--spacing-xs);
}

.toolbar-btn:hover {
  border-color: var(--primary-blue);
  color: var(--primary-blue);
  background: var(--bg-tertiary);
}

.toolbar-btn.active {
  background: var(--primary-blue);
  color: white;
  border-color: var(--primary-blue);
}

.toolbar-btn.premium-feature {
  position: relative;
}

.toolbar-btn.premium-feature::after {
  content: "⭐";
  position: absolute;
  top: -5px;
  right: -5px;
  font-size: 0.75rem;
}

/* ==================== Main Content ==================== */
.main-content {
  padding: var(--spacing-sm) 0 var(--spacing-md) 0;
  min-height: 60vh;
}

/* Compact row spacing */
.main-content .row.mb-4,
.modal-body .row.mb-4 {
  margin-bottom: 1rem !important;
}

.main-content .row.mb-5,
.modal-body .row.mb-5 {
  margin-bottom: 1.25rem !important;
}

/* ==================== Summary Cards ==================== */
.summary-card {
  background: var(--card-bg);
  padding: 0.875rem 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  transition: transform 0.2s, box-shadow 0.2s, background-color 0.3s ease, border-color 0.3s ease;
}

.summary-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--primary-blue);
}

.card-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 600;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.card-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.card-change {
  font-size: 0.8125rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.card-change.positive {
  color: var(--success-green);
}

.card-change.negative {
  color: var(--error-red);
}

.card-subtitle {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* ==================== Chart Container ==================== */
.chart-container {
  background: var(--card-bg);
  padding: var(--spacing-md);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
}

/* ==================== Search Box ==================== */
.search-box {
  max-width: 300px;
}

.search-box input {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 0.4rem 0.75rem;
  font-size: 0.8125rem;
}

.search-box input:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
  outline: none;
}

/* Compact Search Box for Inline Layout */
.search-box-compact {
  min-width: 200px;
  max-width: 250px;
}

.search-box-compact input {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
  font-size: 0.875rem;
}

.search-box-compact input:focus {
  border-color: var(--primary-blue);
  outline: none;
  box-shadow: 0 0 0 2px var(--primary-blue-light);
}

/* Inline Ticker (next to search) */
.ticker-inline {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-color) transparent;
  flex-shrink: 0;
}

/* Header Ticker - Special styling for ticker in header */
.header-ticker.ticker-inline {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  gap: 1rem;
  flex-shrink: 1;
  max-width: none;
}

.ticker-inline::-webkit-scrollbar {
  height: 3px;
}

.ticker-inline::-webkit-scrollbar-track {
  background: transparent;
}

.ticker-inline::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: 4px;
}

.ticker-inline::-webkit-scrollbar-thumb:hover {
  background: var(--primary-blue);
}

.ticker-inline .live-indicator {
  width: 5px;
  height: 5px;
}

.ticker-inline .live-text {
  font-size: 0.55rem;
  padding-right: 0.5rem;
  border-right: 1px solid var(--border-color);
}

.ticker-inline .ticker-item {
  padding: 0.2rem 0.4rem;
  gap: 0.25rem;
  border: none;
}

.ticker-inline .ticker-item:hover {
  background: var(--table-hover);
  border-radius: 4px;
}

.ticker-logo-sm {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.ticker-inline .ticker-symbol {
  font-size: 0.7rem;
  font-weight: 600;
}

.ticker-inline .ticker-price {
  font-size: 0.75rem;
  font-weight: 600;
  min-width: 60px;
  display: inline-block;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ticker-inline .ticker-change {
  font-size: 0.65rem;
  padding: 0.1rem 0.3rem;
  min-width: 42px;
  display: inline-block;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.ticker-inline .ticker-stables i {
  font-size: 0.9rem;
}

/* Responsive adjustments for inline ticker */
@media (max-width: 1400px) {
  .ticker-inline {
    max-width: 600px;
  }
}

@media (max-width: 1200px) {
  .ticker-inline {
    max-width: 500px;
  }

  .ticker-inline .ticker-symbol {
    display: none;
  }
}

@media (max-width: 992px) {
  .ticker-inline {
    max-width: 400px;
  }
}

/* ==================== ETF Metadata Card - Ultra Compact ==================== */
.etf-metadata-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 3px;
  padding: 0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  position: relative;
  animation: slideInDown 0.15s ease;
  font-size: 0.75rem;
}

/* Compact header row */
.etf-meta-header-row {
  display: flex;
  align-items: center;
  padding: 0.4rem 0.5rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
  gap: 0.4rem;
}

/* Quick Stats Bar - Ultra Compact */
.etf-stats-bar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--border-color);
}

.etf-stat {
  padding: 0.35rem 0.5rem;
  border-right: 1px solid var(--border-color);
  text-align: center;
}

.etf-stat:last-child {
  border-right: none;
}

.stat-label {
  font-size: 0.625rem;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  display: block;
  margin-bottom: 0.15rem;
}

.stat-value {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-dark);
  display: block;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tiny logo */
.etf-logo-container {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.etf-logo-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.etf-meta-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-dark);
  margin: 0;
}

.etf-meta-ticker {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--text-tertiary);
  margin: 0;
}

.etf-meta-description {
  font-size: 0.6875rem;
  color: var(--text-secondary);
  line-height: 1.3;
  margin: 0;
  padding: 0.4rem 0.5rem;
  border-bottom: 1px solid var(--border-color);
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Data table layout */
.etf-meta-data-table {
  display: table;
  width: 100%;
  font-size: 0.6875rem;
}

.etf-meta-data-row {
  display: table-row;
}

.etf-meta-data-row:nth-child(even) {
  background: var(--table-stripe);
}

.etf-meta-label {
  display: table-cell;
  font-weight: 600;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 0.3rem 0.5rem;
  width: 30%;
  font-size: 0.625rem;
}

.etf-meta-value {
  display: table-cell;
  font-weight: 600;
  color: var(--text-dark);
  padding: 0.3rem 0.5rem;
  font-size: 0.6875rem;
}

/* Expanded row styling for inline quick view */
.etf-expanded-row {
  animation: expandRow 0.2s ease;
}

.etf-expanded-row td {
  padding: 0 !important;
  border: none !important;
  background: var(--bg-secondary) !important;
}

.etf-expanded-row .etf-metadata-card {
  margin: 0;
  border-radius: 0;
  border-left: 3px solid var(--primary-color);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

tr.expanded {
  background: var(--bg-secondary) !important;
  box-shadow: 0 1px 3px rgba(59, 130, 246, 0.2);
}

@keyframes expandRow {
  from {
    opacity: 0;
    transform: scaleY(0.8);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}

.btn-close-meta {
  position: absolute;
  top: 0.3rem;
  right: 0.3rem;
  width: 20px;
  height: 20px;
  border-radius: 3px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  opacity: 0.5;
}

.btn-close-meta:hover {
  background: var(--error-red);
  opacity: 1;
  transform: scale(1.05);
}

.btn-close-meta i {
  font-size: 0.625rem;
  color: var(--text-secondary);
}

.btn-close-meta:hover i {
  color: white;
}

/* Make table rows clickable */
.data-table tbody tr {
  cursor: pointer;
  transition: all 0.2s ease;
}

.data-table tbody tr.selected {
  background: var(--primary-blue-light) !important;
  border-left: 3px solid var(--primary-blue);
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .etf-metadata-card {
    padding: 1rem;
  }

  .etf-meta-grid {
    grid-template-columns: 1fr;
  }

  .etf-logo-container {
    width: 48px;
    height: 48px;
  }

  .etf-meta-name {
    font-size: 1rem;
  }
}

/* ==================== ETF Detail Modal - DefiLlama Style ==================== */
/* ==================== ETF Detail Modal (Redesigned) ==================== */

/* Header */
.etf-modal-header {
  padding: 0.75rem 1rem;
}

.etf-header-sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.15rem;
}

.etf-header-price {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
}

.etf-header-change {
  font-size: 0.75rem;
  font-weight: 600;
}

.etf-header-change.positive { color: var(--success-green); }
.etf-header-change.negative { color: var(--error-red); }

/* Modal body */
.etf-modal-body {
  padding: 0.75rem 1rem;
}

/* Desktop layout: chart + stats side by side */
.etf-layout {
  display: flex;
  gap: 1rem;
}

.etf-chart-section {
  flex: 1 1 65%;
  min-width: 0;
}

#etfDetailChart {
  width: 100%;
  height: 300px;
}

/* Stats Grid: 3x2 on desktop */
.etf-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
  flex: 0 0 35%;
  align-content: start;
}

.etf-stat-card {
  display: flex;
  flex-direction: column;
  padding: 0.5rem 0.6rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
}

.etf-stat-label {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 0.15rem;
}

.etf-stat-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Performance Row */
.etf-perf-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color);
}

.etf-perf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
}

.etf-perf-label {
  font-size: 0.6rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.etf-perf-value {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.etf-perf-value.positive { color: var(--success-green); }
.etf-perf-value.negative { color: var(--error-red); }

.etf-perf-divider {
  width: 1px;
  height: 24px;
  background: var(--border-color);
}

/* Daily Breakdown Accordion */
.etf-breakdown-section {
  margin-top: 0.75rem;
  border-top: 1px solid var(--border-color);
  padding-top: 0.5rem;
}

.etf-breakdown-toggle {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0.25rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.2s;
}

.etf-breakdown-toggle:hover {
  color: var(--primary-blue);
}

.etf-breakdown-toggle[aria-expanded="true"] .etf-breakdown-chevron {
  transform: rotate(180deg);
}

.etf-breakdown-chevron {
  transition: transform 0.2s;
}

.etf-breakdown-content {
  padding-top: 0.5rem;
}

/* Mobile overrides */
@media (max-width: 768px) {
  .etf-layout {
    flex-direction: column;
  }

  .etf-chart-section {
    flex: none;
  }

  #etfDetailChart {
    height: 200px;
  }

  .etf-stats-grid {
    flex: none;
    grid-template-columns: repeat(3, 1fr);
  }

  .etf-perf-row {
    gap: 0.5rem;
  }

  .etf-perf-value {
    font-size: 0.75rem;
  }

  .etf-stat-value {
    font-size: 0.75rem;
  }

  #stablecoinChainCollapse {
    display: none;
  }
  #stablecoinChainCollapse.show {
    display: block;
  }
}

.nav-pills-sm .nav-link {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: 4px;
}

/* ==================== Data Tables ==================== */
.table-responsive {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Enable horizontal scrolling on mobile if needed */
@media (max-width: 768px) {
  .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-md);
    position: relative;
  }

  /* Ensure tables have minimum width to trigger horizontal scroll */
  #btcTable, #ethTable, #xrpTable, #solTable {
    min-width: 830px;
  }

  /* Add scroll shadow indicators */
  .table-responsive::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 30px;
    background: linear-gradient(to left, rgba(255, 255, 255, 0.8), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .table-responsive.has-scroll::after {
    opacity: 1;
  }

  /* Ensure sticky headers work during horizontal scroll */
  .data-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  }
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

.data-table thead {
  background: var(--bg-secondary);
  border-bottom: 2px solid var(--primary-blue);
  transition: background-color 0.3s ease;
}

.data-table th {
  padding: 1rem;
  text-align: center;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  position: sticky;
  top: 0;
  background: var(--bg-secondary);
  z-index: 10;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  transition: background-color 0.3s ease;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.data-table th.sortable:hover {
  background: var(--primary-blue-light);
  color: var(--primary-blue-deep);
}

.data-table th i {
  font-size: 0.75rem;
  margin-left: 0.25rem;
  opacity: 0.5;
}

.data-table tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: all 0.2s ease;
}

/* Striped rows for all tables */
.data-table tbody tr:nth-child(odd) {
  background-color: var(--table-stripe);
}

.data-table tbody tr:nth-child(even) {
  background-color: var(--card-bg);
}

.data-table tbody tr:hover {
  background: var(--primary-blue-light);
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--primary-blue);
  cursor: pointer;
}

.data-table td {
  padding: 0.875rem 1rem;
  color: var(--text-primary);
  font-size: 0.9rem;
  text-align: center;
}

/* Contain tables within viewport on desktop */
.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  table-layout: fixed;
}

/* Ticker column - enough for ticker + small name */
.data-table td:first-child,
.data-table th:first-child {
  min-width: 100px;
  max-width: 160px;
  text-align: left;
  overflow: hidden;
}

/* Truncate long fund names under tickers */
.data-table td:first-child small {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
}

/* Index table: center all columns including ticker */
#indexTable {
  table-layout: fixed;
  width: 100%;
}

#indexTable td,
#indexTable th {
  text-align: center;
}

/* Column widths: Ticker 8%, Name 28%, Type 8%, Price 12%, Change 12%, Change% 12%, Vol 12% */
#indexTable th:nth-child(1), #indexTable td:nth-child(1) { width: 8%; }
#indexTable th:nth-child(2), #indexTable td:nth-child(2) { width: 28%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#indexTable th:nth-child(3), #indexTable td:nth-child(3) { width: 8%; }
#indexTable th:nth-child(4), #indexTable td:nth-child(4) { width: 12%; }
#indexTable th:nth-child(5), #indexTable td:nth-child(5) { width: 12%; }
#indexTable th:nth-child(6), #indexTable td:nth-child(6) { width: 10%; }
#indexTable th:nth-child(7), #indexTable td:nth-child(7) { width: 10%; }

#indexTable td:first-child small {
  text-align: center;
}

/* Ticker links - styled like regular text since row click does expansion */
.etf-ticker-link,
.stablecoin-ticker-link {
  color: var(--text-dark) !important;
  text-decoration: none !important;
  font-weight: 600;
  cursor: pointer;
  border: none !important;
  outline: none !important;
  background: none !important;
  padding: 0 !important;
}

.etf-ticker-link:hover,
.stablecoin-ticker-link:hover {
  color: var(--primary-color) !important;
  text-decoration: none !important;
}

.etf-ticker-link:focus,
.stablecoin-ticker-link:focus {
  outline: none !important;
  box-shadow: none !important;
}

/* Stablecoin Chain Breakdown Table - Striped Rows */
#stablecoinChainTableBody tr {
  transition: all 0.2s ease;
}

#stablecoinChainTableBody tr:nth-child(odd) {
  background-color: var(--bg-secondary);
}

#stablecoinChainTableBody tr:nth-child(even) {
  background-color: var(--card-bg);
}

#stablecoinChainTableBody tr:hover {
  background-color: var(--table-hover);
  transform: translateX(4px);
  box-shadow: inset 3px 0 0 var(--primary-blue);
}

#stablecoinChainTableBody td {
  padding: 0.875rem 1rem;
}

#stablecoinChainTableBody td:first-child {
  font-weight: 500;
}

#stablecoinChainTableBody img {
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#stablecoinChainTableBody .badge {
  padding: 0.4rem 0.75rem;
  font-weight: 600;
  border: 1px solid var(--border-color);
}

.data-table tfoot {
  border-top: 2px solid var(--border-color);
  background: var(--bg-tertiary);
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.data-table tfoot td {
  padding: 1rem;
}

/* Fixed Column Widths for Crypto ETF Tables */
#btcTable,
#ethTable,
#xrpTable,
#solTable {
  table-layout: fixed;
}

/* Column 1: Ticker */
/* Ticker 8% + Name 18% + Flow 11% + Vol 9% + 7D 11% + 30D 11% + P/D 9% + AUM 14% = ~100% (with Name visible) */
#btcTable th:nth-child(1), #ethTable th:nth-child(1), #xrpTable th:nth-child(1), #solTable th:nth-child(1) { width: 8%; }

#btcTable th:nth-child(2), #ethTable th:nth-child(2), #xrpTable th:nth-child(2), #solTable th:nth-child(2) { width: 28%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

#btcTable th:nth-child(3), #ethTable th:nth-child(3), #xrpTable th:nth-child(3), #solTable th:nth-child(3) { width: 10%; }

#btcTable th:nth-child(4), #ethTable th:nth-child(4), #xrpTable th:nth-child(4), #solTable th:nth-child(4) { width: 9%; }

#btcTable th:nth-child(5), #ethTable th:nth-child(5), #xrpTable th:nth-child(5), #solTable th:nth-child(5) { width: 10%; }

#btcTable th:nth-child(6), #ethTable th:nth-child(6), #xrpTable th:nth-child(6), #solTable th:nth-child(6) { width: 10%; }

#btcTable th:nth-child(7), #ethTable th:nth-child(7), #xrpTable th:nth-child(7), #solTable th:nth-child(7) { width: 10%; }

#btcTable th:nth-child(8), #ethTable th:nth-child(8), #xrpTable th:nth-child(8), #solTable th:nth-child(8) { width: 10%; }

/* Center align Volume + AUM */
#btcTable td:nth-child(4), #ethTable td:nth-child(4), #xrpTable td:nth-child(4), #solTable td:nth-child(4) { text-align: center; }
#btcTable td:nth-child(8), #ethTable td:nth-child(8), #xrpTable td:nth-child(8), #solTable td:nth-child(8) { text-align: center; }

/* td widths match th widths */
#btcTable td:nth-child(1), #ethTable td:nth-child(1), #xrpTable td:nth-child(1), #solTable td:nth-child(1) { width: 8%; }
#btcTable td:nth-child(2), #ethTable td:nth-child(2), #xrpTable td:nth-child(2), #solTable td:nth-child(2) { width: 28%; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#btcTable td:nth-child(3), #ethTable td:nth-child(3), #xrpTable td:nth-child(3), #solTable td:nth-child(3) { width: 10%; }
#btcTable td:nth-child(4), #ethTable td:nth-child(4), #xrpTable td:nth-child(4), #solTable td:nth-child(4) { width: 9%; }
#btcTable td:nth-child(5), #ethTable td:nth-child(5), #xrpTable td:nth-child(5), #solTable td:nth-child(5) { width: 10%; }
#btcTable td:nth-child(6), #ethTable td:nth-child(6), #xrpTable td:nth-child(6), #solTable td:nth-child(6) { width: 10%; }
#btcTable td:nth-child(7), #ethTable td:nth-child(7), #xrpTable td:nth-child(7), #solTable td:nth-child(7) { width: 10%; }
#btcTable td:nth-child(8), #ethTable td:nth-child(8), #xrpTable td:nth-child(8), #solTable td:nth-child(8) { width: 10%; }

/* Flow Value Styling */
.flow-positive {
  color: var(--success-green);
  font-weight: 600;
}

.flow-negative {
  color: var(--error-red);
  font-weight: 600;
}

.flow-neutral {
  color: var(--text-secondary);
}

/* Premium/Discount Badge */
.premium-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
  display: inline-block;
}

.premium-badge.positive {
  background: rgba(5, 177, 105, 0.1);
  color: var(--success-green);
}

.premium-badge.negative {
  background: rgba(223, 95, 103, 0.1);
  color: var(--error-red);
}

/* Flow Badge (similar to premium badge) */
.flow-badge {
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
  display: inline-block;
}

.flow-badge.positive {
  background: rgba(5, 177, 105, 0.1);
  color: var(--success-green);
}

.flow-badge.negative {
  background: rgba(223, 95, 103, 0.1);
  color: var(--error-red);
}

.flow-badge.zero {
  background: rgba(148, 163, 184, 0.1);
  color: var(--text-dark);
}

/* Compare Checkbox */
.compare-checkbox,
.compare-checkbox-all {
  cursor: pointer;
  width: 18px;
  height: 18px;
}

/* Loading State */
.loading-row td {
  padding: 3rem !important;
}

.spinner-border {
  color: var(--primary-blue);
}

/* ==================== Footer ==================== */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-xl) 0 var(--spacing-lg);
  margin-top: var(--spacing-xl);
}

.newsletter-form .input-group {
  max-width: 500px;
  margin: 0 auto;
}

.newsletter-form .form-control {
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  border-right: none;
  padding: 0.75rem 1rem;
}

.newsletter-form .btn-primary {
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  padding: 0.75rem 2rem;
}

.enterprise-contact {
  background: var(--bg-secondary);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

.footer-link {
  color: var(--text-secondary);
  margin: 0 var(--spacing-md);
  font-weight: 500;
}

.footer-link:hover {
  color: var(--primary-blue);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: var(--spacing-md) 0 0;
}

/* ==================== Buttons ==================== */
.btn-primary {
  background: var(--primary-blue);
  border-color: var(--primary-blue);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-md);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--primary-blue-hover);
  border-color: var(--primary-blue-hover);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: var(--bg-secondary);
  border-color: var(--border-color);
  color: var(--text-primary);
  font-weight: 600;
}

.btn-secondary:hover {
  background: var(--border-color);
}

/* ==================== Forms ==================== */
.form-control,
.form-select {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-color);
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 3px rgba(0, 82, 255, 0.1);
  outline: none;
}

/* ==================== Modals - Force Scrolling ==================== */
.modal-dialog {
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-content {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  border-bottom: 1px solid var(--border-color);
  padding: var(--spacing-md) var(--spacing-lg);
  flex-shrink: 0;
}

.modal-body {
  padding: var(--spacing-lg);
  overflow-y: auto !important;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  flex: 1 1 auto;
}

.modal-footer {
  border-top: 1px solid var(--border-color);
  padding: var(--spacing-md) var(--spacing-lg);
  flex-shrink: 0;
}

/* ==================== Alerts/Messages ==================== */
.alert-success {
  background: rgba(5, 177, 105, 0.1);
  border: 1px solid var(--success-green);
  color: var(--success-green);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
}

.alert-error {
  background: rgba(223, 95, 103, 0.1);
  border: 1px solid var(--error-red);
  color: var(--error-red);
  border-radius: var(--radius-md);
  padding: var(--spacing-sm) var(--spacing-md);
}

/* ==================== Responsive Design ==================== */

/* Tablet and below */
@media (max-width: 992px) {
  /* Header adjustments */
  .header .d-flex {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .logo {
    width: 140px;
    height: 50px;
  }

  /* Hide ticker bar on tablets and mobile in PORTRAIT only */
  @media (orientation: portrait) {
    .ticker-bar {
      display: none !important;
    }
  }

  /* Make nav full width on next line if needed */
  .header-nav {
    order: 3;
    width: 100%;
    justify-content: center;
  }

  /* Compact metrics bar - 2 per row on tablets */
  .metrics-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .metric-item {
    padding: 0.5rem;
    min-width: auto;
  }

  .metric-label {
    font-size: 0.6rem;
  }

  .metric-value {
    font-size: 0.9rem;
  }
}

@media (max-width: 768px) {
  /* Header */
  .header .container-fluid {
    padding: 0 1rem;
  }

  .logo {
    width: 120px;
    height: 45px;
  }

  .version-badge {
    font-size: 0.5rem;
    padding: 0.2rem 0.4rem;
  }

  .brand-name {
    font-size: 1.25rem;
  }

  .brand-subtitle {
    font-size: 0.75rem;
  }

  .header-nav {
    gap: 0.5rem;
  }

  .header-nav .nav-link {
    font-size: 0.8rem;
    padding: 0.5rem;
  }

  /* Make nav links more compact */
  .header-nav .nav-link i {
    font-size: 1rem;
  }

  /* Tab navigation */
  .tab-navigation .container-fluid {
    padding: 0 0.5rem;
  }

  .tab-navigation .d-flex {
    flex-direction: column;
    gap: 0.75rem !important;
  }

  .search-box-compact {
    width: 48%;
    max-width: 48%;
    min-width: 0;
    margin-bottom: 0;
  }

  .tab-navigation .nav-tabs {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .tab-navigation .nav-tabs::-webkit-scrollbar {
    height: 3px;
  }

  .tab-navigation .nav-link {
    padding: 0.75rem 1rem;
    font-size: 0.8rem;
    white-space: nowrap;
  }

  .tab-navigation .nav-link img {
    width: 16px;
    height: 16px;
    margin-right: 4px;
  }

  /* Compact metrics bar - hide completely on mobile */
  .compact-metrics-bar {
    display: none !important;
  }

  .metrics-row {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
  }

  .metric-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
    background: transparent;
    border: none;
    box-shadow: none;
    gap: 0.5rem;
  }

  .metric-label {
    font-size: 0.65rem;
    font-weight: 400;
    color: var(--text-secondary);
    text-transform: none;
    letter-spacing: normal;
  }

  .metric-content {
    display: flex;
    align-items: center;
    gap: 0.35rem;
  }

  .metric-value {
    font-size: 0.75rem;
    font-weight: 600;
  }

  .metric-change {
    font-size: 0.65rem;
  }

  .metric-subtitle {
    font-size: 0.65rem;
  }

  /* Sentiment gauge adjustments */
  .sentiment-gauge {
    width: 50px;
    height: 25px;
  }

  .sentiment-needle {
    height: 20px;
  }

  /* Time filters */
  .time-filters {
    flex-wrap: wrap;
  }

  .filter-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Toolbar */
  .toolbar-btn {
    padding: 0.4rem 0.75rem;
    font-size: 0.875rem;
  }

  /* Summary cards */
  .card-value {
    font-size: 1.5rem;
  }

  .summary-card {
    margin-bottom: var(--spacing-sm);
  }

  /* Tables */
  .data-table {
    font-size: 0.7rem;
    table-layout: fixed !important;
  }

  .data-table th,
  .data-table td {
    padding: 0.6rem 0.4rem;
    white-space: normal !important;
    word-wrap: break-word !important;
  }

  .data-table th {
    font-size: 0.65rem;
  }

  .data-table tbody tr:hover {
    transform: none;
  }

  /* MOBILE 6-COLUMN LAYOUT: Ticker(12%) | 24H(17%) | Vol(17%) | 7D(17%) | 30D(17%) | AUM(14%) */
  /* Hide Name(2) and P/D(7) */
  #btcTable th:nth-child(2), #btcTable td:nth-child(2),
  #ethTable th:nth-child(2), #ethTable td:nth-child(2),
  #xrpTable th:nth-child(2), #xrpTable td:nth-child(2),
  #solTable th:nth-child(2), #solTable td:nth-child(2),
  #btcTable th:nth-child(7), #btcTable td:nth-child(7),
  #ethTable th:nth-child(7), #ethTable td:nth-child(7),
  #xrpTable th:nth-child(7), #xrpTable td:nth-child(7),
  #solTable th:nth-child(7), #solTable td:nth-child(7) {
    display: none !important;
    width: 0 !important;
  }

  #btcTable th:nth-child(1), #btcTable td:nth-child(1),
  #ethTable th:nth-child(1), #ethTable td:nth-child(1),
  #xrpTable th:nth-child(1), #xrpTable td:nth-child(1),
  #solTable th:nth-child(1), #solTable td:nth-child(1) {
    display: table-cell !important;
    width: 12% !important;
    min-width: 0 !important;
  }

  #btcTable th:nth-child(3), #btcTable td:nth-child(3),
  #ethTable th:nth-child(3), #ethTable td:nth-child(3),
  #xrpTable th:nth-child(3), #xrpTable td:nth-child(3),
  #solTable th:nth-child(3), #solTable td:nth-child(3) {
    display: table-cell !important;
    width: 17% !important;
    min-width: 0 !important;
  }

  #btcTable th:nth-child(4), #btcTable td:nth-child(4),
  #ethTable th:nth-child(4), #ethTable td:nth-child(4),
  #xrpTable th:nth-child(4), #xrpTable td:nth-child(4),
  #solTable th:nth-child(4), #solTable td:nth-child(4) {
    display: table-cell !important;
    width: 17% !important;
    min-width: 0 !important;
  }

  #btcTable th:nth-child(5), #btcTable td:nth-child(5),
  #ethTable th:nth-child(5), #ethTable td:nth-child(5),
  #xrpTable th:nth-child(5), #xrpTable td:nth-child(5),
  #solTable th:nth-child(5), #solTable td:nth-child(5) {
    display: table-cell !important;
    width: 17% !important;
    min-width: 0 !important;
  }

  #btcTable th:nth-child(6), #btcTable td:nth-child(6),
  #ethTable th:nth-child(6), #ethTable td:nth-child(6),
  #xrpTable th:nth-child(6), #xrpTable td:nth-child(6),
  #solTable th:nth-child(6), #solTable td:nth-child(6) {
    display: table-cell !important;
    width: 17% !important;
    min-width: 0 !important;
  }

  #btcTable th:nth-child(8), #btcTable td:nth-child(8),
  #ethTable th:nth-child(8), #ethTable td:nth-child(8),
  #xrpTable th:nth-child(8), #xrpTable td:nth-child(8),
  #solTable th:nth-child(8), #solTable td:nth-child(8) {
    display: table-cell !important;
    width: 8% !important;
    min-width: 0 !important;
  }

  /* Hide the unimportant columns */
  #btcTable th:nth-child(2), #btcTable td:nth-child(2),
  #ethTable th:nth-child(2), #ethTable td:nth-child(2),
  #xrpTable th:nth-child(2), #xrpTable td:nth-child(2),
  #solTable th:nth-child(2), #solTable td:nth-child(2) {
    display: none !important; /* Hide Name */
  }

  /* Vol and 30D visible - handled by 6-column layout above */

  #btcTable th:nth-child(7), #btcTable td:nth-child(7),
  #ethTable th:nth-child(7), #ethTable td:nth-child(7),
  #xrpTable th:nth-child(7), #xrpTable td:nth-child(7),
  #solTable th:nth-child(7), #solTable td:nth-child(7) {
    display: none !important; /* Hide Prem/Disc */
  }

  /* Crypto Index Table - Keep: Ticker, Price, Change (%), Market Cap */
  #indexTable th:nth-child(2), #indexTable td:nth-child(2) {
    display: none; /* Hide Name */
  }

  #indexTable th:nth-child(3), #indexTable td:nth-child(3) {
    display: none; /* Hide Type */
  }

  #indexTable th:nth-child(5), #indexTable td:nth-child(5) {
    display: none; /* Hide Change (24h) dollar amount */
  }

  #indexTable th:nth-child(7), #indexTable td:nth-child(7) {
    display: none; /* Hide Volume */
  }

  #indexTable th:nth-child(9), #indexTable td:nth-child(9) {
    display: none; /* Hide Expense */
  }

  /* Stablecoins Table - Keep: Stablecoin, Price, 24h Flow, Market Cap */
  #stableTable th:nth-child(4), #stableTable td:nth-child(4) {
    display: none; /* Hide 7d Flow */
  }

  #stableTable th:nth-child(5), #stableTable td:nth-child(5) {
    display: none; /* Hide 30d Flow */
  }

  #stableTable th:nth-child(7), #stableTable td:nth-child(7) {
    display: none; /* Hide Chains */
  }

  /* News Table - Keep: Time, Headline (hide Source) */
  #newsTable th:nth-child(1), #newsTable td:nth-child(1) {
    display: table-cell !important; /* Time */
    width: 25% !important;
  }

  #newsTable th:nth-child(2), #newsTable td:nth-child(2) {
    display: none !important; /* Hide Source */
  }

  #newsTable th:nth-child(3), #newsTable td:nth-child(3) {
    display: table-cell !important; /* Headline - most important */
    width: 75% !important;
  }

  /* Footer */
  .footer-link {
    display: inline-block;
    margin: 0.5rem;
    font-size: 0.85rem;
  }

  /* Modals */
  .modal-dialog {
    margin: 0.5rem;
  }

  .premium-modal-body {
    padding: 1.5rem 1rem;
  }

  .premium-title {
    font-size: 1.5rem;
  }

  .premium-modal-footer {
    flex-direction: column;
  }

  .premium-modal-footer .btn {
    width: 100%;
  }
}

@media (max-width: 576px) {
  /* Header - ultra compact */
  .header .py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  .logo {
    width: 100px;
    height: 40px;
  }

  .version-badge {
    font-size: 0.45rem;
    padding: 0.15rem 0.35rem;
  }

  .header-nav {
    width: auto;
    order: initial;
  }

  .header-nav .nav-link {
    padding: 0.4rem;
    font-size: 1.2rem;
  }

  /* Just show icons, no text */
  .header-nav .nav-link i {
    margin: 0;
  }

  .header-nav .nav-text {
    display: none;
  }

  /* Tab navigation */
  .tab-navigation .nav-link {
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
  }

  /* Hide icons in tabs to save space */
  .tab-navigation .nav-link i {
    display: none;
  }

  .tab-navigation .nav-link img {
    display: none;
  }

  /* Metrics bar - single column */
  .metrics-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .metric-item {
    flex-direction: row;
    justify-content: space-between;
    text-align: left;
    padding: 0.5rem 0.75rem;
    background: var(--card-bg);
    border-radius: 6px;
    border: 1px solid var(--border-color);
  }

  .metric-content {
    justify-content: flex-end;
  }

  .metric-label {
    font-size: 0.65rem;
  }

  .metric-value {
    font-size: 0.85rem;
  }

  /* Main content padding */
  .main-content {
    padding: 0.75rem 0 1rem 0;
  }

  /* Tables - even more compact */
  .data-table {
    font-size: 0.65rem;
  }

  .data-table th,
  .data-table td {
    padding: 0.5rem 0.25rem;
  }

  .data-table th {
    font-size: 0.6rem;
  }

  /* Also hide price column on very small screens */
  .data-table th:nth-child(3),
  .data-table td:nth-child(3) {
    display: none;
  }

  /* Stablecoin table adjustments */
  #stableTable th:nth-child(4),
  #stableTable td:nth-child(4),
  #stableTable th:nth-child(5),
  #stableTable td:nth-child(5) {
    display: none; /* Hide 7d Flow and Supply columns */
  }

  /* Modal adjustments */
  .modal-body .row.mb-4 {
    margin-bottom: 0.75rem !important;
  }

  .modal-body .col-md-4 {
    border-right: none !important;
    border-bottom: 1px solid var(--border-color);
  }

  /* ETF Detail Modal - stack vertically */
  #etfDetailModal .row.g-0 {
    flex-direction: column;
  }

  #etfDetailModal .col-md-4,
  #etfDetailModal .col-md-8 {
    width: 100%;
  }

  /* Premium modal */
  .premium-icon-wrapper {
    width: 60px;
    height: 60px;
  }

  .premium-icon-wrapper i {
    font-size: 2rem;
  }

  .premium-title {
    font-size: 1.25rem;
  }

  .premium-subtitle {
    font-size: 0.9rem;
  }

  .premium-feature-item {
    padding: 0.6rem 0.75rem;
  }

  .premium-feature-item span {
    font-size: 0.85rem;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .logo {
    width: 90px;
    height: 35px;
  }

  .header-nav .nav-link {
    padding: 0.3rem;
  }

  .tab-navigation .nav-link {
    padding: 0.5rem 0.6rem;
    font-size: 0.7rem;
  }

  .data-table {
    font-size: 0.6rem;
  }

  .metric-label {
    font-size: 0.6rem;
  }

  .metric-value {
    font-size: 0.8rem;
  }
}

/* ==================== News Items - Table Style ==================== */
#newsContainer {
  background: transparent;
  padding: 0;
}

#newsTable {
  width: 100%;
}

.news-row {
  transition: background 0.15s ease;
}

.news-row:hover {
  background: var(--row-hover);
}

.news-time {
  color: var(--success-green);
  font-weight: 600;
  font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
  font-size: 0.8125rem;
}

.news-source {
  color: var(--primary-blue);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 3px;
  display: inline-block;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-headline {
  color: var(--text-dark);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.5;
}

.news-row:hover .news-headline {
  color: var(--primary-blue);
}

.news-meta {
  display: none;
}

.news-image {
  display: none;
}

.news-date {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.news-date::before {
  content: '•';
  color: var(--border-color);
}

/* Mobile news adjustments */
@media (max-width: 768px) {
  .news-item {
    padding: 1rem;
  }

  .news-image {
    width: 60px;
    height: 60px;
    margin-left: 0.75rem;
  }

  .news-title {
    font-size: 0.9rem;
  }

  .news-text {
    font-size: 0.8125rem;
  }
}

/* ==================== Utility Classes ==================== */
.text-positive {
  color: var(--success-green);
}

.text-negative {
  color: var(--error-red);
}

.text-muted {
  color: var(--text-secondary);
}

.bg-light {
  background: var(--bg-secondary);
}

/* ==================== Mobile Touch Improvements ==================== */
@media (max-width: 768px) {
  /* Bigger touch targets */
  button, a, .nav-link, .filter-btn, .toolbar-btn {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Better spacing for tappable elements */
  .tab-navigation .nav-link {
    min-height: 44px;
  }

  /* Prevent text selection on buttons */
  button, .btn, .nav-link {
    -webkit-tap-highlight-color: rgba(59, 130, 246, 0.2);
    user-select: none;
  }

  /* Better form controls on mobile */
  .form-control, .form-select {
    font-size: 16px; /* Prevents zoom on iOS */
    min-height: 44px;
  }

  /* Container padding */
  .container-fluid {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  /* News items */
  .news-item {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  /* Better modal sizing on mobile - ensure scrolling works */
  .modal-dialog-centered {
    min-height: auto;
    max-height: 95vh;
    display: flex;
  }

  .modal-dialog {
    max-height: 95vh;
  }

  .modal-content {
    display: flex;
    flex-direction: column;
    max-height: 100%;
  }

  .modal-body {
    max-height: none;
    overflow-y: scroll !important;
    -webkit-overflow-scrolling: touch !important;
    flex: 1 1 auto;
  }
}

/* ==================== Loading Skeletons ==================== */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border-color) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: var(--radius-sm);
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* ==================== Scrollbar Styling ==================== */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--border-color);
  border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-secondary);
}

/* ==================== Market Overview Section ==================== */
.market-overview-section {
  padding: 1rem 0;
}

.overview-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  transition: all 0.3s ease;
}

.overview-card:hover {
  border-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

.overview-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 500;
}

.overview-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
  font-variant-numeric: tabular-nums;
}

.overview-change {
  font-size: 0.875rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.overview-change.positive {
  color: var(--success-color);
}

.overview-change.negative {
  color: var(--danger-color);
}

.overview-subtitle {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}


/* SPA Static Content Panels */
.static-content-panel {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 1rem;
}

.static-content-panel h1 { color: var(--text-primary); }
.static-content-panel h2 { color: var(--text-primary); margin-top: 2rem; }
.static-content-panel h3 { color: var(--text-primary); }
.static-content-panel h4 { color: var(--text-secondary); }
.static-content-panel p { color: var(--text-secondary); line-height: 1.7; }
.static-content-panel li { color: var(--text-secondary); margin-bottom: 0.5rem; }
.static-content-panel code { color: var(--primary-blue); }

/* SPA Breadcrumb */
  border-bottom: 1px solid var(--border-color);
}
