/* ==========================================================================
   VECTIS RWA — CSS Design System
   Theme: Obsidian Deep Green, Cyber Emerald, and Platinum Silver
   ========================================================================== */

:root {
  --bg: #050807;
  --bg-card: rgba(10, 16, 14, 0.65);
  --bg-card-hover: rgba(14, 24, 21, 0.8);
  --border: rgba(0, 255, 136, 0.08);
  --border-active: rgba(0, 255, 136, 0.35);
  
  --emerald: #00ff88;
  --emerald-dim: rgba(0, 255, 136, 0.15);
  --red: #ff3b5c;
  --red-dim: rgba(255, 59, 92, 0.12);
  
  --white: #f8fafc;
  --dim: #94a3b8;
  --muted: #475569;
  --faint: #1e293b;
  
  --font-sans: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --nav-h: 76px;
  --max-w: 1280px;
}

/* --- RESET --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg);
}

body {
  background-color: var(--bg);
  color: var(--white);
  font-family: var(--font-sans);
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg);
}
::-webkit-scrollbar-thumb {
  background: var(--faint);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* --- UTILITIES --- */
.text-right { text-align: right; }
.text-center { text-align: center; }
.text-emerald { color: var(--emerald); }
.text-red { color: var(--red); }
.text-dim { color: var(--dim); }
.text-muted { color: var(--muted); }
.hidden { display: none !important; }
.margin-top-12 { margin-top: 12px; }
.margin-top-16 { margin-top: 16px; }
.margin-top-20 { margin-top: 20px; }
.margin-top-24 { margin-top: 24px; }
.border-none { border: none !important; }

/* --- BACKGROUND VISUALS --- */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(rgba(0, 255, 136, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 255, 136, 0.015) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.glow-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}
.glow-orb-1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.04) 0%, transparent 70%);
  top: -200px;
  right: -100px;
}
.glow-orb-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(0, 255, 136, 0.02) 0%, transparent 70%);
  bottom: -100px;
  left: -100px;
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}
.btn-emerald {
  background: var(--emerald);
  color: #030704;
  box-shadow: 0 0 20px rgba(0, 255, 136, 0.25);
}
.btn-emerald:hover {
  background: #00e57a;
  transform: translateY(-1px);
  box-shadow: 0 0 25px rgba(0, 255, 136, 0.4);
}
.btn-ghost {
  background: rgba(0, 255, 136, 0.03);
  color: var(--white);
  border-color: var(--border-active);
}
.btn-ghost:hover {
  background: var(--emerald-dim);
  border-color: var(--emerald);
  color: #fff;
}
.btn-full {
  width: 100%;
}

/* --- NAVIGATION --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  border-bottom: 1px solid var(--border);
  background: rgba(5, 8, 7, 0.85);
  backdrop-filter: blur(20px);
  z-index: 1000;
}
.nav-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.logo-img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.logo-text {
  display: flex;
  flex-direction: column;
}
.wordmark-top {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--white);
  line-height: 1.1;
}
.wordmark-bot {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 2px;
  color: var(--emerald);
  font-weight: 700;
}

.nav-network {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid var(--border);
  border-radius: 100px;
}
.net-dot {
  width: 6px;
  height: 6px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--emerald);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
.net-text {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--emerald);
  letter-spacing: 0.5px;
}

.nav-links {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.nav-tab {
  background: none;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dim);
  transition: all 0.2s;
  cursor: pointer;
}
.nav-tab:hover, .nav-tab.active {
  color: var(--emerald);
  background: rgba(0, 255, 136, 0.05);
}

.nav-actions {
  display: flex;
  gap: 12px;
}

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
}
.burger span {
  width: 22px;
  height: 1.5px;
  background: var(--dim);
  display: block;
  transition: all 0.3s;
}

/* --- MAIN LAYOUT --- */
.main-content {
  position: relative;
  z-index: 10;
  padding-top: var(--nav-h);
}
.main-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px;
}

/* --- HERO INTRO --- */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
  margin-bottom: 56px;
}
.hero-content {
  max-width: 600px;
}
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: rgba(0, 255, 136, 0.03);
  border-radius: 100px;
  margin-bottom: 20px;
}
.badge-dot {
  width: 5px;
  height: 5px;
  background: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 6px var(--emerald);
}
.badge-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--emerald);
  text-transform: uppercase;
}
.hero-title {
  font-family: var(--font-sans);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 850;
  line-height: 1.05;
  letter-spacing: -1px;
  margin-bottom: 20px;
}
.gradient-text {
  background: linear-gradient(90deg, #fff 0%, var(--emerald) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-desc {
  font-size: 0.98rem;
  color: var(--dim);
  line-height: 1.7;
}

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 320px;
  flex-shrink: 0;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  backdrop-filter: blur(12px);
}
.stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.stat-val {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}
.stat-sub {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 4px;
}

/* --- SECTION HEADER --- */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 32px;
  gap: 24px;
  flex-wrap: wrap;
}
.tag-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--emerald);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.section-title {
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--white);
}
.header-sub {
  font-size: 0.88rem;
  color: var(--dim);
}

/* --- MOVERS CORNER --- */
.movers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 56px;
}
.mover-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px;
  backdrop-filter: blur(8px);
  cursor: pointer;
  transition: all 0.2s ease;
}
.mover-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-active);
  transform: translateY(-2px);
}
.mc-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.asset-avatar {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
}
.mc-names {
  display: flex;
  flex-direction: column;
}
.mc-sym {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--white);
}
.mc-name {
  font-size: 0.75rem;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}
.mc-bottom {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.mc-price {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 600;
}
.mc-change {
  font-size: 0.88rem;
  font-weight: 600;
}

/* --- Category Chips & Search --- */
.search-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 320px;
}
.search-icon {
  position: absolute;
  left: 14px;
  color: var(--muted);
  pointer-events: none;
}
#searchInput {
  width: 100%;
  padding: 10px 14px 10px 42px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(10, 16, 14, 0.9);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}
#searchInput:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 15px rgba(0, 255, 136, 0.08);
}

.category-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.filter-chip {
  background: var(--bg-card);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--dim);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-chip:hover {
  border-color: var(--border-active);
  color: var(--white);
}
.filter-chip.active {
  background: var(--emerald-dim);
  border-color: var(--emerald);
  color: var(--emerald);
}

/* --- SCREENER TABLE --- */
.table-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(12px);
}
.table-scroll {
  width: 100%;
  overflow-x: auto;
}
.screener-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.screener-table th, .screener-table td {
  padding: 16px 24px;
  font-size: 0.88rem;
  border-bottom: 1px solid rgba(0, 255, 136, 0.03);
  white-space: nowrap;
}
.screener-table th {
  background: rgba(0, 255, 136, 0.015);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
.screener-table th.sortable {
  cursor: pointer;
  transition: color 0.15s;
}
.screener-table th.sortable:hover {
  color: var(--white);
}

.table-row-clickable {
  cursor: pointer;
  transition: background 0.15s;
}
.table-row-clickable:hover {
  background: rgba(0, 255, 136, 0.02);
}

.table-asset-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}
.table-asset-info {
  display: flex;
  flex-direction: column;
}
.table-sym {
  font-weight: 700;
  color: var(--white);
  font-size: 0.92rem;
}
.table-name {
  font-size: 0.75rem;
  color: var(--dim);
}

.table-category-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 8px;
  display: inline-block;
  vertical-align: middle;
}

.mono {
  font-family: var(--font-mono);
}

.btn-star {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.2s;
}
.btn-star:hover, .btn-star.starred {
  color: var(--emerald);
}

.solvency-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(0, 255, 136, 0.05);
  border: 1px solid rgba(0, 255, 136, 0.2);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--emerald);
}

/* --- PORTFOLIO VIEW --- */
.portfolio-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 24px;
  align-items: start;
}
.stats-box {
  display: flex;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
}
.p-stat {
  flex: 1;
  text-align: center;
}
.p-stat-sep {
  width: 1px;
  height: 48px;
  background: var(--border);
}
.ps-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  color: var(--dim);
  letter-spacing: 1px;
  margin-bottom: 4px;
}
.ps-val {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
  font-family: var(--font-mono);
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
}
.form-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 20px;
}
.form-desc {
  font-size: 0.88rem;
  line-height: 1.6;
}
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.form-group {
  flex: 1;
  min-width: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form-group label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1px;
}
.form-select, .form-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 7, 0.8);
  color: #fff;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  outline: none;
  transition: all 0.2s;
}
.form-select:focus, .form-input:focus {
  border-color: var(--emerald);
}

/* Allocation Donut */
.portfolio-chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.donut-container {
  position: relative;
  width: 160px;
  height: 160px;
  margin-bottom: 24px;
}
.donut-chart {
  width: 100%;
  height: 100%;
}
.donut-bg {
  fill: none;
  stroke: var(--faint);
  stroke-width: 12;
}
.donut-fill {
  fill: none;
  stroke: var(--emerald);
  stroke-width: 12;
  stroke-dasharray: 440;
  stroke-dashoffset: 440; /* Updated in JS */
  transform: rotate(-90deg);
  transform-origin: 50% 50%;
  transition: stroke-dashoffset 0.6s ease;
}
.donut-text {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.dt-top {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}
.dt-bot {
  font-size: 0.72rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.dl-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--dim);
}
.dl-lbl-box {
  display: flex;
  align-items: center;
  gap: 8px;
}
.dl-indicator {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

/* --- ATTESTATION ORACLE VIEW --- */
.oracle-grid {
  display: grid;
  grid-template-columns: 0.80fr 1.20fr;
  gap: 24px;
  align-items: start;
}
.diagnostic-row {
  display: flex;
  justify-content: space-between;
  width: 100%;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--dim);
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
}
.diagnostic-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.oracle-console-card {
  background: #020403;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.console-header {
  display: flex;
  align-items: center;
  background: rgba(0, 255, 136, 0.02);
  border-bottom: 1px solid var(--border);
  padding: 12px 18px;
}
.console-dots {
  display: flex;
  gap: 6px;
  margin-right: 16px;
}
.cd {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}
.cd.red { background: #ff5f56; }
.cd.yellow { background: #ffbd2e; }
.cd.green { background: #27c93f; }
.console-title {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--dim);
  letter-spacing: 1px;
}
.console-body {
  padding: 20px;
  min-height: 320px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.c-line {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
}
.c-line.system { color: #5a6d7a; }
.c-line.success { color: var(--emerald); }
.c-line.warn { color: #ffbd2e; }
.c-line.error { color: var(--red); }
.c-line.data { color: #38bdf8; }

/* --- DETAIL VIEW --- */
.detail-back-bar {
  margin-bottom: 24px;
}
.detail-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 24px;
}
.dh-title-row {
  display: flex;
  align-items: center;
  gap: 20px;
}
.dh-logo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 800;
}
.dh-name-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.dh-name {
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.5px;
}
.dh-sym {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--dim);
}
.dh-cat {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 4px;
}
.dh-info-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--dim);
  margin-top: 6px;
}
.meta-dot {
  width: 4px;
  height: 4px;
  background: var(--muted);
  border-radius: 50%;
}

.dh-price-row {
  text-align: right;
}
.dh-price {
  font-family: var(--font-mono);
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1;
}
.dh-change-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
.dh-change {
  font-size: 0.95rem;
  font-weight: 600;
}
.meta-label {
  font-size: 0.72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 24px;
  align-items: start;
}
.detail-left-cols, .detail-right-cols {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px;
  backdrop-filter: blur(12px);
}
.card-title {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--dim);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 18px;
}
.desc-text {
  font-size: 0.92rem;
  color: var(--dim);
  line-height: 1.8;
}

/* --- SVG CHART --- */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 24px 24px 16px 24px;
  backdrop-filter: blur(12px);
}
.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.chart-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--white);
}
.timeframe-buttons {
  display: flex;
  gap: 4px;
  background: rgba(5, 8, 7, 0.6);
  border: 1px solid var(--border);
  padding: 4px;
  border-radius: 6px;
}
.tf-btn {
  background: none;
  border: none;
  padding: 4px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s;
}
.tf-btn:hover {
  color: var(--dim);
}
.tf-btn.active {
  background: var(--emerald-dim);
  color: var(--emerald);
}

.chart-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
}
.performance-chart {
  width: 100%;
  height: 100%;
  display: block;
}
.chart-area-path {
  transition: d 0.5s ease;
}
.chart-line-path {
  transition: d 0.5s ease;
}

.chart-tooltip {
  position: absolute;
  top: 10px;
  left: 10px;
  background: rgba(5, 8, 7, 0.9);
  border: 1px solid var(--emerald);
  padding: 6px 12px;
  border-radius: 6px;
  pointer-events: none;
  display: none;
  z-index: 10;
}
.ct-price {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--white);
}
.ct-time {
  font-size: 0.68rem;
  color: var(--dim);
  margin-top: 2px;
}

/* Key Stats Details */
.kv-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.kv-row:last-child {
  border-bottom: none;
}
.kv-lbl {
  font-size: 0.88rem;
  color: var(--dim);
}
.kv-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--white);
  font-weight: 500;
}

/* Yield Big Box */
.yield-big {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  line-height: 1;
}
.yield-sub {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--dim);
  margin-top: 4px;
}

/* Price Alerts Inside Card */
.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  background: rgba(0, 255, 136, 0.02);
  border: 1px solid var(--border);
  padding: 8px 12px;
  border-radius: 6px;
  margin-bottom: 8px;
}
.alert-txt {
  font-family: var(--font-mono);
  color: var(--dim);
}
.btn-alert-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  transition: color 0.15s;
}
.btn-alert-del:hover {
  color: var(--red);
}
.alert-form {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

/* Report Box / PoR */
.report-box {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(0, 255, 136, 0.02);
  border: 1px solid var(--border);
  padding: 16px;
  border-radius: 8px;
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
}
.ops-table th, .ops-table td {
  padding: 10px 14px;
  font-size: 0.8rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.ops-table th {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--muted);
  text-transform: uppercase;
}

/* --- FOOTER --- */
.footer {
  border-top: 1px solid var(--border);
  background: #020403;
  padding: 64px 24px;
}
.footer-container {
  max-width: var(--max-w);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
}
.fb-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.fb-img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}
.fb-title {
  font-family: var(--font-sans);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--white);
}
.fb-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 1px;
  color: var(--dim);
}
.footer-desc {
  font-size: 0.88rem;
  color: var(--dim);
  line-height: 1.7;
}
.footer-meta {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 24px;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 12px;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
  .hero {
    flex-direction: column;
    gap: 40px;
  }
  .hero-stats {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
  }
  .stat-card {
    flex: 1;
    min-width: 220px;
  }
  
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  
  .oracle-grid {
    grid-template-columns: 1fr;
  }
  
  .detail-grid {
    grid-template-columns: 1fr;
  }
  
  .footer-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }
}

/* ==========================================================================
   WALLET CONNECT BUTTON & MODAL
   ========================================================================== */

/* Nav button */
.btn-wallet {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--border-active);
  background: rgba(0, 255, 136, 0.04);
  color: var(--white);
  transition: all 0.2s ease;
  letter-spacing: 0.2px;
}
.btn-wallet:hover {
  background: var(--emerald-dim);
  border-color: var(--emerald);
  color: var(--emerald);
  box-shadow: 0 0 18px rgba(0, 255, 136, 0.1);
}
.btn-wallet.is-connected {
  background: rgba(0, 255, 136, 0.06);
  border-color: var(--emerald);
  color: var(--emerald);
}
.wallet-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Modal overlay */
.wc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.wc-overlay.open {
  display: flex;
  animation: fadeIn 0.18s ease;
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Modal card */
.wc-modal {
  background: #0a100d;
  border: 1px solid rgba(0, 255, 136, 0.18);
  border-radius: 20px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7), 0 0 60px rgba(0, 255, 136, 0.04);
  overflow: hidden;
  animation: slideUp 0.22s ease;
}
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Header */
.wc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 28px 20px;
  border-bottom: 1px solid rgba(0, 255, 136, 0.06);
}
.wc-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.wc-shield-icon {
  width: 34px;
  height: 34px;
  background: var(--emerald-dim);
  border: 1px solid var(--border-active);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--emerald);
}
.wc-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.2px;
}
.wc-close {
  width: 30px;
  height: 30px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--dim);
  transition: all 0.15s;
}
.wc-close:hover {
  background: rgba(255, 59, 92, 0.08);
  border-color: rgba(255, 59, 92, 0.3);
  color: #ff3b5c;
}

/* Subtitle */
.wc-subtitle {
  font-size: 0.88rem;
  color: var(--dim);
  padding: 20px 28px 12px;
  line-height: 1.5;
}

/* Wallet options list */
.wc-wallets {
  display: flex;
  flex-direction: column;
  padding: 0 16px 12px;
  gap: 6px;
}
.wc-wallet-opt {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.02);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: left;
  width: 100%;
}
.wc-wallet-opt:hover {
  background: rgba(0, 255, 136, 0.04);
  border-color: rgba(0, 255, 136, 0.2);
  transform: translateX(2px);
}
.wc-wallet-logo {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wc-wallet-info {
  flex: 1;
}
.wc-wallet-name {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 2px;
}
.wc-wallet-desc {
  font-size: 0.75rem;
  color: var(--muted);
}
.wc-wallet-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 4px;
  background: var(--emerald-dim);
  border: 1px solid rgba(0, 255, 136, 0.2);
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.wc-wallet-badge.detected {
  background: rgba(0, 255, 136, 0.12);
  border-color: var(--emerald);
}
.wc-wallet-badge.not-detected {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border);
  color: var(--muted);
}

/* Security footer */
.wc-footer {
  margin: 8px 16px 24px;
  padding: 12px 16px;
  background: rgba(0, 255, 136, 0.02);
  border: 1px solid rgba(0, 255, 136, 0.06);
  border-radius: 10px;
  font-size: 0.73rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Connecting spinner */
.wc-connecting-box {
  padding: 48px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}
.wc-spinner {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid rgba(0, 255, 136, 0.1);
  border-top-color: var(--emerald);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}
.wc-conn-wallet-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
}
.wc-conn-desc {
  font-size: 0.85rem;
  color: var(--dim);
  text-align: center;
  line-height: 1.6;
}

/* Connected state */
.wc-connected-box {
  padding: 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.wc-check-circle {
  margin-bottom: 4px;
}
.wc-addr-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--dim);
}
.wc-addr-display {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  padding: 10px 20px;
  background: rgba(0, 255, 136, 0.04);
  border: 1px solid var(--border-active);
  border-radius: 8px;
  letter-spacing: 1px;
}
.wc-network-row {
  display: flex;
  align-items: center;
  gap: 6px;
}
.wc-network-name {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--emerald);
}

/* Balance box inside connected */
.wc-balance-box {
  width: 100%;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  margin-top: 4px;
}
.wc-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.wc-balance-row:last-child {
  border-bottom: none;
}
.wc-bal-lbl {
  font-size: 0.82rem;
  color: var(--dim);
}
.wc-bal-val {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
}

.wc-connected-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 8px;
}
.btn-disconnect {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(255, 59, 92, 0.3);
  background: rgba(255, 59, 92, 0.05);
  color: #ff3b5c;
  transition: all 0.2s;
}
.btn-disconnect:hover {
  background: rgba(255, 59, 92, 0.12);
  border-color: #ff3b5c;
}

/* ==========================================================================
   RESPONSIVE (keep this at end)
   ========================================================================== */
@media (max-width: 768px) {
  .nav-links, .nav-actions {
    display: none;
  }
  .burger {
    display: flex;
  }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--nav-h);
    left: 0; right: 0;
    background: rgba(5, 8, 7, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 24px;
    gap: 16px;
    backdrop-filter: blur(20px);
  }
  .burger.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
  .burger.open span:nth-child(2) { opacity: 0; }
  .burger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .hero-stats {
    flex-direction: column;
  }
  
  .search-container {
    width: 100%;
  }
}
