/* ─── CSS CUSTOM PROPERTIES ─────────────────────────────────────────────── */
:root {
  --bg:           #0A0A0A;
  --panel:        #141414;
  --panel-light:  #1C1C1C;
  --overlay:      #242424;
  --border-s:     #242424;
  --border-d:     #383838;
  --accent:       #8CCD4E;
  --accent-dark:  #6BA83A;
  --coral:        #FA7261;
  --orange:       #FF8F47;
  --text-1:       #FFFFFF;
  --text-2:       #BBBBBB;
  --text-3:       #747474;

  --f-display: 'Space Grotesk', sans-serif;
  --f-sans:    'DM Sans', sans-serif;
  --f-mono:    'JetBrains Mono', monospace;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
}

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

body {
  background: var(--bg);
  color: var(--text-1);
  font-family: var(--f-sans);
  min-height: 100vh;
  line-height: 1.5;
}

button { cursor: pointer; }

/* ─── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  opacity: 0;
  animation: fadeInUp 0.4s ease forwards;
  animation-delay: var(--delay, 0s);
}

/* ─── TOP NAV ────────────────────────────────────────────────────────────── */
.top-nav {
  height: 4rem;
  border-bottom: 1px solid var(--border-d);
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  position: sticky;
  top: 0;
  z-index: 20;
}

.logo-img { height: 1.75rem; width: auto; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* notification bell */
.notification-wrapper { position: relative; }

.notification-btn {
  background: none;
  border: none;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: 0;
  transition: color .2s;
}
.notification-btn:hover { color: var(--text-1); }

.notification-dot {
  position: absolute;
  top: 0; right: 0;
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

.notification-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 20rem;
  background: var(--panel);
  border: 1px solid var(--border-s);
  border-radius: var(--r-xl);
  box-shadow: 0 25px 50px -12px rgba(0,0,0,.8);
  overflow: hidden;
  z-index: 50;
  opacity: 0;
  transform: translateY(4px) scale(.98);
  pointer-events: none;
  transition: opacity .15s, transform .15s;
}
.notification-wrapper:hover .notification-dropdown {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.notification-header {
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border-s);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notification-title {
  font-family: var(--f-display);
  font-size: .625rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .1em;
}
.notification-count {
  font-family: var(--f-display);
  font-size: .625rem;
  color: var(--accent);
}

.notification-list { display: flex; flex-direction: column; }

.notification-item {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .875rem 1rem;
  border-bottom: 1px solid var(--border-s);
  transition: background .2s;
}
.notification-item:last-child { border-bottom: none; }
.notification-item:hover { background: var(--panel-light); }

.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-dot--accent  { background: var(--accent); }
.notif-dot--orange  { background: var(--orange); }

.notif-content { flex: 1; min-width: 0; }
.notif-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.notif-item-title {
  font-size: .875rem;
  font-weight: 500;
  font-family: var(--f-display);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-time {
  font-family: var(--f-display);
  font-size: .625rem;
  color: var(--text-2);
  flex-shrink: 0;
}
.notif-desc {
  font-size: .75rem;
  color: var(--text-3);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.notification-footer {
  padding: .625rem 1rem;
  border-top: 1px solid var(--border-s);
}
.notif-view-all {
  width: 100%;
  background: none;
  border: none;
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  transition: color .2s;
}
.notif-view-all:hover { color: var(--text-1); }

/* user avatar */
.user-avatar-wrapper { position: relative; flex-shrink: 0; }

.user-avatar {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: var(--panel-light);
  border: 1px solid var(--border-s);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .875rem;
  font-weight: 500;
  font-family: var(--f-display);
  transition: border-color .2s;
}
.user-avatar:hover { border-color: var(--text-2); }

.user-status-dot {
  position: absolute;
  bottom: 0; right: 0;
  width: 10px; height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--bg);
}

/* ─── LAYOUT ─────────────────────────────────────────────────────────────── */
.layout { display: flex; }

/* ─── SIDEBAR ────────────────────────────────────────────────────────────── */
.sidebar {
  width: 4rem;
  border-right: 1px solid var(--border-d);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0;
  gap: 1rem;
  height: calc(100vh - 4rem);
  position: sticky;
  top: 4rem;
  flex-shrink: 0;
}

.nav-item {
  width: 2.5rem; height: 2.5rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--text-2);
  position: relative;
  transition: color .2s, background .2s;
}
.nav-item:hover {
  color: var(--text-1);
  background: var(--overlay);
}
.nav-item--active {
  background: rgba(140,205,78,.1);
  color: var(--accent);
}
.nav-item--active:hover {
  background: rgba(140,205,78,.15);
  color: var(--accent);
}

.nav-tooltip {
  position: absolute;
  left: calc(100% + 1rem);
  padding: .25rem .5rem;
  background: var(--panel-light);
  border: 1px solid var(--border-s);
  border-radius: var(--r-md);
  font-size: .75rem;
  font-family: var(--f-display);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
  z-index: 50;
  box-shadow: 0 1px 3px rgba(0,0,0,.5);
}
.nav-item:hover .nav-tooltip { opacity: 1; }

/* ─── MAIN CONTENT ───────────────────────────────────────────────────────── */
.main-content {
  flex: 1;
  padding: 1rem;
  max-width: 1440px;
  margin: 0 auto;
  width: 100%;
  overflow-x: hidden;
  min-width: 0;
}
@media (min-width: 640px)  { .main-content { padding: 1.5rem; } }
@media (min-width: 1024px) { .main-content { padding: 2rem; } }

/* ─── PANEL ──────────────────────────────────────────────────────────────── */
.panel {
  background: var(--panel);
  border: 1px solid var(--border-s);
  border-radius: var(--r-xl);
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.section-label {
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 400;
}

/* ─── KPI CARDS ──────────────────────────────────────────────────────────── */
.kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
@media (min-width: 640px)  { .kpi-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .kpi-grid { grid-template-columns: repeat(4,1fr); } }

.kpi-card {
  background: var(--panel);
  border: 1px solid var(--border-s);
  border-radius: var(--r-xl);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  min-width: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.kpi-card--featured {
  border-color: rgba(140,205,78,.3);
  box-shadow: 0 0 24px -6px rgba(140,205,78,.35);
}

.kpi-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
}

.kpi-label {
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .1em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sparkline-svg {
  flex-shrink: 0;
  margin-top: -4px;
  overflow: visible;
}

.kpi-value {
  font-family: var(--f-mono);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -.025em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (min-width: 1280px) { .kpi-value { font-size: 1.875rem; } }

.kpi-delta {
  display: flex;
  align-items: center;
  gap: 6px;
}
.kpi-change          { font-size: .875rem; font-family: var(--f-mono); }
.kpi-change--positive { color: var(--accent); }
.kpi-change--negative { color: var(--coral); }
.kpi-period          { font-size: .75rem; font-family: var(--f-display); color: var(--text-3); margin-left: 4px; }

/* ─── CASH CHART ─────────────────────────────────────────────────────────── */
.cash-chart-panel { margin-bottom: 1.5rem; }

.cash-chart-header {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2rem;
}
@media (min-width: 640px) {
  .cash-chart-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  font-family: var(--f-display);
  font-size: .75rem;
}
.legend-item        { display: flex; align-items: center; gap: .5rem; }
.legend-dot         { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-dot--accent { background: var(--accent); }
.legend-dot--muted  { background: var(--text-3); }
.legend-text--white     { color: var(--text-1); white-space: nowrap; }
.legend-text--secondary { color: var(--text-2); white-space: nowrap; }

.chart-container { height: 300px; width: 100%; position: relative; }

/* ─── BOTTOM GRID ────────────────────────────────────────────────────────── */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: stretch;
}
@media (min-width: 1024px) { .bottom-grid { grid-template-columns: repeat(2,1fr); } }

.bottom-left { display: flex; flex-direction: column; gap: 1.5rem; }

/* ─── TRANSACTIONS ───────────────────────────────────────────────────────── */
.transactions-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.transaction-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border-radius: var(--r-lg);
  background: var(--panel-light);
  border: 1px solid var(--border-s);
}

.tx-left  { display: flex; align-items: center; gap: .75rem; min-width: 0; }
.tx-right { display: flex; align-items: center; gap: 1rem; flex-shrink: 0; }

.tx-dot         { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.tx-dot--accent { background: var(--accent); }
.tx-dot--orange { background: var(--orange); }

.tx-pair   { font-family: var(--f-mono); font-size: .875rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-amount { font-family: var(--f-mono); font-size: .875rem; white-space: nowrap; }

.tx-badge {
  font-size: .625rem;
  font-family: var(--f-display);
  padding: 2px 10px;
  border-radius: 50px;
  border: 1px solid;
  white-space: nowrap;
}
.tx-badge--completed  { border-color: rgba(140,205,78,.3); color: var(--accent);  background: rgba(140,205,78,.05); }
.tx-badge--processing { border-color: rgba(255,143,71,.3);  color: var(--orange); background: rgba(255,143,71,.05); }

.view-all-btn {
  background: none;
  border: none;
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  transition: color .2s;
  flex-shrink: 0;
}
.view-all-btn:hover { color: var(--text-1); }

.initiate-btn {
  width: 100%;
  padding: .75rem;
  border-radius: var(--r-md);
  background: var(--accent);
  color: #000;
  font-family: var(--f-display);
  font-weight: 500;
  font-size: .875rem;
  border: none;
  transition: background .2s;
}
.initiate-btn:hover { background: var(--accent-dark); }

/* ─── TRANSFER SUMMARY ───────────────────────────────────────────────────── */
.transfer-grid {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: .75rem;
}

.transfer-col { display: flex; flex-direction: column; gap: 6px; }

.transfer-icon-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--f-display);
  font-size: .625rem;
}
.transfer-icon-row--accent { color: var(--accent); }
.transfer-icon-row--white  { color: var(--text-1); }
.transfer-icon-row--orange { color: var(--orange); }

.transfer-icon-label { text-transform: uppercase; letter-spacing: .05em; color: var(--text-2); }
.transfer-value      { font-family: var(--f-mono); font-size: 1.125rem; font-weight: 500; }
.transfer-sub        { font-size: .625rem; color: var(--text-3); }

/* ─── BURN SCENARIOS ─────────────────────────────────────────────────────── */
.burn-scenarios { display: flex; flex-direction: column; }

.burn-table-wrapper { display: none; width: 100%; }
@media (min-width: 640px) { .burn-table-wrapper { display: block; } }

.burn-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0;
  text-align: left;
}

.burn-th {
  padding-bottom: 1.25rem;
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  font-weight: 400;
}
.burn-th--metric  { width: 40%; }
.burn-th--center  { text-align: center; padding-left: 1.5rem; padding-right: 1.5rem; }
.burn-th--current {
  text-align: center;
  color: var(--accent);
  border-left: 1px solid var(--border-d);
  border-right: 1px solid var(--border-d);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.burn-divider-row td {
  height: 1px;
  background: var(--border-d);
  padding: 0;
}

.burn-td          { padding: 1.25rem 0; }
.burn-td--label   { font-family: var(--f-display); font-size: .875rem; color: var(--text-2); }
.burn-td--center  { font-family: var(--f-mono); font-size: .875rem; text-align: center; padding-left: 1.5rem; padding-right: 1.5rem; }
.burn-td--current-col {
  font-family: var(--f-mono);
  font-size: .875rem;
  text-align: center;
  color: var(--text-1);
  border-left: 1px solid var(--border-d);
  border-right: 1px solid var(--border-d);
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* risk dots */
.risk-dot         { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }
.risk-dot--accent { background: var(--accent); }
.risk-dot--orange { background: var(--orange); }
.risk-dot--coral  { background: var(--coral);  }

/* mobile burn cards */
.burn-mobile { display: flex; flex-direction: column; gap: .75rem; }
@media (min-width: 640px) { .burn-mobile { display: none; } }

.burn-card {
  background: var(--panel-light);
  border: 1px solid var(--border-s);
  border-radius: var(--r-lg);
  padding: 1rem;
}
.burn-card-label { font-family: var(--f-display); font-size: .75rem; color: var(--text-2); margin-bottom: .75rem; }
.burn-card-cols  { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; }
.burn-card-col   { display: flex; flex-direction: column; gap: 4px; }
.burn-card-col--current {
  padding: 0 .5rem;
  border-left: 1px solid var(--border-d);
  border-right: 1px solid var(--border-d);
}

.burn-col-header         { font-family: var(--f-display); font-size: .625rem; text-transform: uppercase; letter-spacing: .08em; }
.burn-col-header--muted  { color: var(--text-3); }
.burn-col-header--accent { color: var(--accent); }

.burn-col-val        { font-family: var(--f-mono); font-size: .875rem; }
.burn-col-val--white { color: var(--text-1); }

/* ─── RISK KEY ───────────────────────────────────────────────────────────── */
.risk-key {
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-d);
}
.risk-key-title {
  font-family: var(--f-display);
  font-size: .75rem;
  color: var(--text-2);
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 400;
  margin-bottom: 1rem;
}
.risk-key-list { display: flex; flex-direction: column; gap: .75rem; }
.risk-key-item { display: flex; align-items: center; gap: .75rem; }
.risk-key-text { font-size: .75rem; color: var(--text-3); }
.risk-key-note { font-size: .625rem; color: var(--text-3); margin-top: 1rem; }
