/* Base theme */
:root {
  --bg: #162f29;
  --text: #ffffff;
  --muted: rgba(255,255,255,0.6);
  --card: rgba(255,255,255,0.05);
  --card-soft: rgba(255,255,255,0.02);
  --line: rgba(255,255,255,0.15);
  --hover: rgba(255,255,255,0.08);
  --amber: #ffb300;
  --red: #e53935;
  --ok: rgba(255,255,255,0.15);
  
  /* Brand-aligned colors from main site */
  --space-bg-1: rgba(47, 101, 88, 0.35);
  --space-bg-2: rgba(30, 62, 53, 0.35);
  --space-bg-1-hover: rgba(47, 101, 88, 0.50);
  --space-bg-2-hover: rgba(30, 62, 53, 0.50);
  --hud-text: #fafafa;
  --accent-border: rgba(143, 211, 192, 0.60);
  --accent-glow-weak: rgba(109, 176, 159, 0.22);
  --accent-glow-strong: rgba(109, 176, 159, 0.42);
  --focus-ring-dark: rgba(22, 47, 41, 0.7);
  --focus-ring-accent: rgba(143, 211, 192, 0.55);
  --sheen-1: rgba(143, 211, 192, 0.35);
  --sheen-2: rgba(47, 101, 88, 0.18);
  --primary-green: #6db09f;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: #0d1f1c;
  color: var(--text);
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  letter-spacing: 0.1px;
}

.header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; 
  border-bottom: 1px solid rgba(109, 176, 159, 0.3); 
  position: static; 
  width: 100%;
  background: linear-gradient(135deg, #162f29 0%, #0d1f1c 100%); 
  backdrop-filter: blur(20px);
}

/* Logo styling to match main page */
#logo {
  width: 80px;
  border-radius: 16px;
  box-shadow: none;
  transition: all 0.3s ease;
  cursor: default;
  border: none !important;
  outline: none !important;
  object-fit: contain;
}
#logo:hover {
  transform: scale(1.05);
  box-shadow: none;
}

.brand { 
  font-family: 'Poppins', Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 800; 
  font-size: 1.6875em; /* Increased by 50% from 1.125em */
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text);
  letter-spacing: -0.01em;
}

.tabs { 
  display: flex; 
  gap: 16px; 
  margin-left: auto;
}

.tab {
  background: none; border: none; color: var(--text); font-weight: 700; cursor: pointer; padding: 8px 0;
  text-decoration: none;
}

.tab.active { color: var(--text); border-bottom: 2px solid var(--text); }

.tab.back-button {
  background: #dcefea;
  color: #162f29;
  padding: 12px 24px;
  border-radius: 25px;
  border: none;
  transition: all 0.3s ease;
  margin-left: 8px;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
}

.tab.back-button:hover {
  background: #c5e0d8;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(220, 239, 234, 0.4);
}
.hidden { display: none; }


.muted { color: #dcefea; }
.small { font-size: 12px; }
.pill {
  padding: 4px 8px; border-radius: 999px; background: var(--ok); color: #fff; font-size: 12px;
}

main { padding: 20px 20px 16px 20px; max-width: 1200px; margin: 0 auto; position: relative; z-index: 10; }

/* Stablecoin Dashboard Background Images */
.stablecoin-bg-left {
  position: absolute;
  left: 35px;
  top: 160px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 1;
  opacity: 0.15;
  pointer-events: auto;
}

.stablecoin-bg-right {
  position: absolute;
  right: 35px;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  z-index: 1;
  opacity: 0.15;
  pointer-events: auto;
}

.currency-coin {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(109, 176, 159, 0.3), rgba(47, 101, 88, 0.2));
  border: 2px solid rgba(220, 239, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(220, 239, 234, 0.4);
  font-weight: bold;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  pointer-events: auto;
}

.currency-coin:hover {
  border-color: #ffffff;
  color: #ffffff;
}

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.card {
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 12px;
  padding: 14px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Keep hover animation only for KPI cards */
.card.kpi {
  transition: all 0.3s ease;
}

.card.kpi:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.kpi .kpi-label { color: #b0c9c1; font-size: 12px; font-weight: 600; letter-spacing: 0.3px; }
.kpi .kpi-value { 
  font-size: 22px; 
  font-weight: 800; 
  margin-top: 8px; 
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; margin-bottom: 12px; }
.card-title { 
  font-weight: 700; 
  margin-bottom: 16px; 
  color: var(--text);
  font-size: 16px;
}
.row-between { display: flex; align-items: center; justify-content: space-between; }
.row-center { display: flex; justify-content: center; padding: 8px 0; }
.row-wrap { display: flex; gap: 12px; flex-wrap: wrap; }

.controls { display: flex; gap: 12px; align-items: center; }

.table-list .row, .table .trow {
  display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr 0.8fr 0.8fr 1fr 1.2fr; gap: 10px;
  padding: 10px 8px; border-bottom: 1px solid var(--line);
}
.table-list .row:hover, .table .trow:hover { background: var(--hover); }
.table-list .header, .table .thead {
  background: var(--card-soft); color: var(--muted); font-weight: 700;
}
.table { width: 100%; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.trow { display: grid; grid-template-columns: 1.6fr 1fr 0.9fr 1fr 0.8fr 0.8fr 0.9fr 1.2fr; gap: 10px; padding: 10px 8px; }

.badge { border-radius: 6px; padding: 2px 6px; font-size: 11px; font-weight: 700; display: inline-block; }
.badge.onpeg { background: var(--ok); color: #fff; }
.badge.slight { background: var(--amber); color: #162f29; }
.badge.offpeg { background: var(--red); color: #fff; }

.btn { 
  background: linear-gradient(135deg, var(--primary-green) 0%, #4a8b7a 100%);
  color: white; 
  border: none; 
  padding: 10px 14px; 
  border-radius: 8px; 
  font-weight: 600; 
  cursor: pointer;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Coming Soon (Yield) */
.coming-soon { 
  text-align: center; 
  padding: 64px 24px; 
  background: radial-gradient(1200px 600px at 50% -10%, rgba(74, 222, 128, 0.15), transparent 60%), var(--card); 
  border: 1px solid rgba(74, 222, 128, 0.25);
}
.coming-soon-title {
  font-size: 2.5rem; 
  font-weight: 800; 
  margin: 0 0 10px 0; 
  background: linear-gradient(135deg, #4ade80, #22c55e, #16a34a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(74, 222, 128, 0.25);
}
.coming-soon-text {
  font-size: 1.15rem; 
  color: rgba(255,255,255,0.75); 
  margin: 0 auto; 
  max-width: 800px; 
  line-height: 1.8;
}

@media (max-width: 768px) {
  .coming-soon { padding: 48px 20px; }
  .coming-soon-title { font-size: 2rem; }
  .coming-soon-text { font-size: 1rem; }
}

.skeleton { background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.08), rgba(255,255,255,0.04)); height: 40px; border-radius: 6px; animation: pulse 1.4s infinite ease-in-out; }
@keyframes pulse {
  0% { opacity: 0.6; } 50% { opacity: 1; } 100% { opacity: 0.6; }
}

.footer { padding: 24px 20px; border-top: 1px solid var(--line); margin-top: 24px; }

/* Responsive */
@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .trow { grid-template-columns: 1.4fr 1fr 0.9fr 1fr 0.8fr 0.8fr 0.9fr 1.2fr; }
}

/* ===============================
   STABLECOIN TABLE STYLES  
   =============================== */

.table-list .row { 
  grid-template-columns: 1.2fr 1fr 1fr; 
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background-color 0.2s ease;
}

.table-list .row:hover {
  background: rgba(109, 176, 159, 0.03);
}

.table-list .row div {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.table-list .row div:first-child {
  justify-content: flex-start;
}

.table-list .row div:nth-child(2) {
  justify-content: center;
  font-weight: 600;
}

.table-list .row div:last-child {
  justify-content: flex-end;
}

.table-list .row.header {
  background: #dcefea;
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 12px;
  font-weight: 600;
  color: #162f29;
  text-align: center;
  padding: 20px 0;
  margin-bottom: 12px;
  text-transform: none;
  letter-spacing: 0.2px;
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(255, 255, 255, 0.05);
  position: relative;
  backdrop-filter: blur(20px);
}

.table-list .row.header div {
  display: flex;
  align-items: center;
  padding: 0 12px;
}

.table-list .row.header div:first-child {
  justify-content: flex-start;
}

.table-list .row.header div:nth-child(2) {
  justify-content: center;
}

.table-list .row.header div:last-child {
  justify-content: flex-end;
}

/* Chart sizing fixes */
.grid-2 .card { overflow: hidden; }
.card canvas { display: block; width: 100%; height: 400px; }

/* Chart descriptions should match KPI label color */
.grid-2 .card .muted.small {
  color: #b0c9c1;
}

/* Specific chart dimensions: square for circular pie chart */
#chartDonut { 
  width: 400px !important; 
  height: 400px !important; 
  max-width: 100%; 
  max-height: 100%;
  margin: 0 auto !important;
  display: block !important;
}
#chartStacked { 
  width: 500px !important; 
  height: 400px !important; 
  max-width: 100%; 
  margin: 0 auto !important;
  display: block !important;
}

/* Sortable header buttons */
.sortable {
  cursor: pointer;
  color: rgba(255,255,255,0.8);
  user-select: none;
  position: relative;
  padding-right: 14px;
  transition: color 0.15s ease, transform 0.1s ease;
}
.sortable:hover {
  color: #fff;
}
.sortable.active {
  color: var(--text);
  font-weight: 700;
}
.sortable::after {
  content: '';
  position: absolute;
  right: 6px;
  top: 50%;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 6px solid rgba(255,255,255,0.35); /* default arrow */
  transform: translateY(-25%);
}
.sortable.active.asc::after {
  border-top: 6px solid var(--text);
  transform: translateY(-25%) rotate(180deg);
}
.sortable.active.desc::after {
  border-top: 6px solid var(--text);
}

/* ===============================
   PLASMA ECOSYSTEM STYLES  
   =============================== */

.plasma-container {
  padding: 20px;
  max-width: 1400px;
  margin: 0 auto;
}

.plasma-header {
  text-align: center;
  margin-bottom: 40px;
}

.plasma-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 15px;
  background: linear-gradient(135deg, #dcefea, var(--primary-green), #4a8b7a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: 0 0 30px rgba(109, 176, 159, 0.5);
  position: relative;
}

.plasma-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--primary-green), transparent);
  border-radius: 2px;
}

.plasma-subtitle {
  font-size: 1.2rem;
  color: #dcefea;
  margin: 0;
  font-weight: 400;
  margin-bottom: 10px;
}

#plasmaPartnerCount {
  color: var(--primary-green);
  font-weight: 600;
}

.plasma-controls {
  display: flex;
  flex-direction: column;
  gap: 25px;
  margin-bottom: 40px;
  align-items: center;
}

.search-container {
  width: 100%;
  max-width: 500px;
}

.plasma-search {
  width: 100%;
  padding: 15px 25px;
  border: 2px solid rgba(220, 239, 234, 0.3);
  border-radius: 30px;
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  color: #dcefea;
  font-size: 1.1rem;
  transition: all 0.3s ease;
  backdrop-filter: blur(20px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.plasma-search:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 25px rgba(109, 176, 159, 0.4), 0 4px 15px rgba(0, 0, 0, 0.3);
  background: linear-gradient(135deg, rgba(22, 47, 41, 1) 0%, rgba(13, 31, 28, 1) 100%);
  color: #fafafa;
}

.plasma-search::placeholder {
  color: rgba(220, 239, 234, 0.6);
}

.filter-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}

.filter-btn {
  padding: 10px 18px;
  border: 2px solid rgba(220, 239, 234, 0.3);
  border-radius: 25px;
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.8) 0%, rgba(13, 31, 28, 0.8) 100%);
  color: #dcefea;
  font-size: 0.935rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(220, 239, 234, 0.1), transparent);
  transition: left 0.3s ease;
}

.filter-btn:hover:not(.active)::before {
  left: 100%;
}

.filter-btn:hover:not(.active) {
  border-color: rgba(220, 239, 234, 0.6);
  background: linear-gradient(135deg, rgba(47, 101, 88, 0.8) 0%, rgba(30, 62, 53, 0.8) 100%);
  color: #fafafa;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(109, 176, 159, 0.2);
}

.filter-btn.active {
  border-color: #dcefea;
  background: linear-gradient(135deg, #dcefea 0%, #c5e0d8 100%);
  color: #162f29;
  font-weight: 600;
  transform: none;
  box-shadow: none;
}

.filter-btn.active::before {
  display: none;
}

.plasma-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.partner-card {
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 2px solid rgba(220, 239, 234, 0.2);
  border-radius: 20px;
  padding: 25px;
  text-align: center;
  cursor: pointer;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.partner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(220, 239, 234, 0.1), rgba(109, 176, 159, 0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.partner-card:hover {
  border-color: #dcefea;
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(109, 176, 159, 0.3), 0 0 0 1px rgba(220, 239, 234, 0.2);
  background: linear-gradient(135deg, rgba(47, 101, 88, 0.95) 0%, rgba(30, 62, 53, 0.95) 100%);
}

.partner-card:hover::before {
  opacity: 1;
}

.partner-logo {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(220, 239, 234, 0.15), rgba(109, 176, 159, 0.1));
  border: 2px solid rgba(220, 239, 234, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
  transition: all 0.3s ease;
}

.partner-card:hover .partner-logo {
  background: linear-gradient(135deg, rgba(220, 239, 234, 0.25), rgba(109, 176, 159, 0.15));
  border-color: rgba(220, 239, 234, 0.4);
  transform: scale(1.05);
}

.partner-logo img {
  max-width: 60px;
  max-height: 60px;
  border-radius: 10px;
}

.partner-name {
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 10px;
  color: #dcefea;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.partner-card:hover .partner-name {
  color: #fafafa;
}

.partner-categories {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 15px;
}

.category-tag {
  padding: 5px 12px;
  background: linear-gradient(135deg, rgba(109, 176, 159, 0.2), rgba(47, 101, 88, 0.2));
  border: 1px solid rgba(220, 239, 234, 0.3);
  border-radius: 15px;
  font-size: 0.8rem;
  color: #dcefea;
  text-transform: uppercase;
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.partner-card:hover .category-tag {
  background: linear-gradient(135deg, rgba(220, 239, 234, 0.3), rgba(109, 176, 159, 0.2));
  border-color: rgba(220, 239, 234, 0.5);
  color: #fafafa;
}

.partner-description {
  font-size: 0.9rem;
  color: rgba(220, 239, 234, 0.8);
  line-height: 1.5;
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.partner-card:hover .partner-description {
  color: rgba(250, 250, 250, 0.9);
}

.plasma-no-results {
  text-align: center;
  padding: 60px 20px;
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.6) 0%, rgba(13, 31, 28, 0.6) 100%);
  border: 2px dashed rgba(220, 239, 234, 0.3);
  border-radius: 20px;
  backdrop-filter: blur(10px);
}

.plasma-no-results h3 {
  font-size: 1.5rem;
  margin-bottom: 10px;
  color: #dcefea;
  font-weight: 600;
}

.plasma-no-results p {
  font-size: 1rem;
  margin-bottom: 20px;
  color: rgba(220, 239, 234, 0.7);
}

.plasma-no-results .btn {
  background: linear-gradient(135deg, #dcefea 0%, #c5e0d8 100%);
  color: #162f29;
  border: none;
  padding: 12px 24px;
  border-radius: 25px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.plasma-no-results .btn:hover {
  background: linear-gradient(135deg, #c5e0d8 0%, #b0d3cc 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(220, 239, 234, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .plasma-title {
    font-size: 2.2rem;
  }
  
  .plasma-subtitle {
    font-size: 1rem;
  }
  
  .plasma-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .filter-container {
    gap: 8px;
  }
  
  .filter-btn {
    padding: 8px 16px;
    font-size: 0.935rem;
  }
}

@media (max-width: 480px) {
  .plasma-container {
    padding: 15px;
  }
  
  .plasma-grid {
    grid-template-columns: 1fr;
  }
  
  .partner-card {
    padding: 20px;
  }
}

/* ===============================
   STABLECOIN TABLE STYLES  
   =============================== */

.badge { 
  background: linear-gradient(135deg, rgba(83, 174, 148, 0.9), rgba(83, 174, 148, 0.7)); 
  color: white; 
  padding: 4px 10px; 
  border-radius: 16px; 
  font-size: 0.75rem; 
  font-weight: 600; 
  margin: 2px 4px 2px 0;
  display: inline-block;
  box-shadow: 0 2px 4px rgba(83, 174, 148, 0.3);
}

/* Clickable badge styles */
.badge.clickable {
  cursor: pointer;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.8), rgba(59, 130, 246, 0.6));
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  transition: all 0.3s ease;
}

.badge.clickable:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 1), rgba(59, 130, 246, 0.8));
  box-shadow: 0 4px 8px rgba(59, 130, 246, 0.4);
  transform: translateY(-2px) scale(1.05);
}

/* Modal styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(5px);
}

.modal.hidden {
  display: none;
}

.modal-content {
  background: #1a1a1a;
  border: 1px solid #333;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 80vh;
  overflow: hidden;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid #333;
  background: #222;
}

.modal-header h3 {
  margin: 0;
  color: white;
  font-size: 1.3rem;
}

.modal-close {
  color: #999;
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.modal-close:hover {
  color: white;
  background: #333;
}

.modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.chain-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chain-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  background: #2a2a2a;
  border: 1px solid #444;
  border-radius: 8px;
}

.chain-name {
  font-weight: 600;
  color: white;
  font-size: 1rem;
}

.chain-amount {
  font-weight: 500;
  color: white;
  font-size: 0.95rem;
}

/* Responsive modal */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
  }
  
  .modal-header {
    padding: 16px 20px;
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .chain-item {
    padding: 14px;
  }
}

/* Mobile styles for stablecoin table - hide Top Chains column */
@media (max-width: 768px) {
  .table-list .row {
    grid-template-columns: 1.5fr 1fr;
  }
  
  .table-list .row div:nth-child(3) {
    display: none;
  }
  
  .table-list .row div:nth-child(2) {
    justify-content: flex-end;
  }
  
  /* KPI cards stack vertically on mobile */
  .kpis {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  
  .kpi .kpi-value {
    font-size: 20px;
  }
  
  /* Charts stack vertically on mobile */
  .grid-2 {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  

}

/* ===============================
   HISTORICAL TAB STYLES
   =============================== */

.hist-layout { 
  display: grid; 
  grid-template-columns: 320px 1fr; 
  gap: 40px;
  position: relative;
  margin-left: -180px;
  align-items: start;
}

.hist-sidebar { 
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  height: fit-content;
  margin-left: 0;
  display: flex;
  flex-direction: column;
}

.hist-title { 
  font-size: 30px; 
  font-weight: 700; 
  margin: 0 0 22px; 
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hist-desc { 
  font-size: 17px; 
  color: #b0c9c1; 
  margin: 0 0 26px; 
  line-height: 1.6;
}

.hist-search { 
  display: flex; 
  gap: 8px; 
  margin-bottom: 16px; 
}

.hist-search input { 
  width: 100%; 
  padding: 12px 16px; 
  background: rgba(22, 47, 41, 0.8); 
  border: 1px solid rgba(109, 176, 159, 0.3); 
  border-radius: 8px; 
  color: var(--text); 
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
}

.hist-search input:focus {
  outline: none;
  border-color: var(--primary-green);
  box-shadow: 0 0 0 2px rgba(109, 176, 159, 0.2);
  background: rgba(22, 47, 41, 0.95);
}

.hist-search input::placeholder {
  color: #b0c9c1;
}

.hist-list { 
  display: grid; 
  gap: 8px; 
  max-height: 564px; 
  overflow-y: auto; 
  flex: 1;
}

.hist-content { 
  padding: 0; 
}

.hist-asset { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  padding: 12px 16px; 
  border: 1px solid rgba(109, 176, 159, 0.2); 
  border-radius: 8px; 
  cursor: pointer; 
  background: rgba(22, 47, 41, 0.6);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.hist-asset:hover { 
  background: rgba(109, 176, 159, 0.08);
  border-color: rgba(109, 176, 159, 0.4);
}

.hist-asset .name { 
  font-weight: 600; 
  color: var(--text);
}

.hist-asset .symbol { 
  color: #b0c9c1; 
  font-size: 12px; 
  margin-left: 8px; 
  font-weight: 500;
}

.hist-asset .circulating { 
  color: #b0c9c1; 
  font-size: 12px; 
  font-weight: 500;
}

.hist-header { 
  display: flex; 
  align-items: baseline; 
  gap: 12px; 
  margin: 0 0 12px; 
}

.hist-symbol { 
  color: #b0c9c1; 
  font-weight: 600; 
  font-size: 22px;
}

.hist-subheader { 
  color: #b0c9c1; 
  font-size: 17px; 
  margin-bottom: 26px; 
  line-height: 1.6;
}

.hist-cards { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 18px; 
  margin-bottom: 26px; 
}

.hist-card { 
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 12px;
  padding: 26px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
  transition: all 0.3s ease;
}

.hist-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.hist-card-label { 
  color: #b0c9c1; 
  font-size: 15px; 
  font-weight: 600; 
  letter-spacing: 0.3px;
  margin-bottom: 13px;
}

.hist-card-value { 
  font-size: 28px; 
  font-weight: 800; 
  color: var(--text);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hist-chart { 
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 12px;
  padding: 26px;
  margin-bottom: 26px;
  backdrop-filter: blur(20px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.hist-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 26px;
  margin-bottom: 26px;
}

.hist-charts-grid .hist-chart {
  margin-bottom: 0;
}

.hist-chart-head { 
  display: flex; 
  align-items: center; 
  justify-content: space-between; 
  gap: 18px; 
  margin-bottom: 22px; 
}

.hist-chart-title { 
  margin: 0; 
  font-size: 21px; 
  font-weight: 700; 
  color: var(--text);
}

.hist-chart-actions { 
  display: flex; 
  align-items: center; 
  gap: 18px; 
}

.hist-footnote { 
  color: #b0c9c1; 
  font-size: 13px; 
  font-weight: 500;
}

.hist-chart-frame { 
  position: relative; 
  width: 100%; 
  aspect-ratio: 3 / 2; 
  min-height: 325px;
}

.hist-chart-canvas { 
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  display: block; 
}

.hist-mobile-picker { 
  display: none; 
  margin-bottom: 16px; 
}

.hist-mobile-picker select {
  width: 100%;
  padding: 12px 16px;
  background: linear-gradient(135deg, rgba(22, 47, 41, 0.95) 0%, rgba(13, 31, 28, 0.95) 100%);
  border: 1px solid rgba(109, 176, 159, 0.4);
  border-radius: 8px;
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 14px;
  cursor: pointer;
}

.hist-label { 
  font-size: 12px; 
  color: #b0c9c1; 
  display: block; 
  margin-bottom: 8px; 
  font-weight: 600; 
  letter-spacing: 0.3px;
}

/* Historical tab responsive styles */
@media (max-width: 768px) {
  .hist-layout { 
    grid-template-columns: 1fr; 
    gap: 20px;
  }
  
  .hist-sidebar { 
    display: none; 
    margin-left: 0;
  }
  
  .hist-mobile-picker { 
    display: block; 
  }
  
  .hist-chart-frame { 
    aspect-ratio: 4 / 3; 
    min-height: 270px;
  }
  
  .hist-cards {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .hist-charts-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  
  .hist-card-value {
    font-size: 24px;
  }
  
  .hist-chart-title {
    font-size: 19px;
  }
  
  .hist-title {
    font-size: 26px;
  }
  
  .hist-desc {
    font-size: 15px;
  }
  
  .hist-card-label {
    font-size: 14px;
  }
}

/* Historical tab mobile tweaks */
@media (max-width: 480px) {
  .hist-title { 
    font-size: 23px; 
  }
  
  .hist-desc { 
    font-size: 14px; 
  }
  
  .hist-card-value { 
    font-size: 22px; 
  }
  
  .hist-chart-title { 
    font-size: 17px; 
  }
  
  .hist-footnote { 
    font-size: 12px; 
  }
  
  .hist-search input { 
    padding: 12px 16px; 
    font-size: 14px;
  }
  
  .hist-chart { 
    padding: 22px; 
  }
  
  .hist-sidebar {
    padding: 20px;
    margin-left: 0;
  }
  
  .hist-card {
    padding: 22px;
  }
  
  .hist-card-label {
    font-size: 13px;
  }
}

