/* ===== OWL IN HOOD FINAL — Robinhood L2 DEX Terminal ===== */
/* fix: remove ellipsis from th-token-amt */
:root {
  --bg-darkest: #070a07;
  --bg-dark: #0a0f0a;
  --bg-sidebar: #0c110c;
  --bg-card: #101510;
  --bg-hover: #161d16;
  --bg-active: #1c261c;
  --border: #1c261a;
  --border-light: #2a362a;
  --text: #eef2e8;
  --text-dim: #b0b8a8;
  --text-muted: #7a8578;
  --text-faint: #4a5448;
  --green: #8ede3a;
  --green-bright: #a7e86a;
  --green-dim: #6ba82b;
  --red: #e5533d;
  --red-bright: #f87171;
  --red-dim: #a83640;
  --gold: #e0b93a;
  --gold-bright: #f0c850;
  --gold-dim: #876315;
  --blue: #4a9eff;
  --blue-bright: #60a5fa;
  --font-sans: 'Oswald', system-ui, sans-serif;
  --font-mono: 'Share Tech Mono', 'SF Mono', monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { height: 100%; }
body { height: 100%; overflow: hidden; overscroll-behavior: none; }
body {
  font-family: var(--font-sans);
  background: var(--bg-darkest);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
#root { display: flex; flex-direction: column; height: 100vh; }

/* ===== TICKER BAR ===== */
#tickerBar {
  width: 100%;
  height: 28px;
  min-height: 28px;
  background: var(--bg-darkest);
  border-bottom: 1px solid var(--green-dim);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
}
#tickerBar::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: linear-gradient(90deg, 
    rgba(142,222,58,0.06) 0%, 
    rgba(142,222,58,0.02) 50%, 
    rgba(142,222,58,0.06) 100%);
  pointer-events: none;
  z-index: 0;
}
.ticker-track {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: tickerScroll 30s linear infinite;
  gap: 0;
  position: relative;
  z-index: 1;
}
.ticker-text {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--green);
  letter-spacing: 2px;
  text-transform: uppercase;
  padding: 0 4px;
  animation: tickerBlink 2.5s ease-in-out infinite;
}
.ticker-sep {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--green-dim);
  padding: 0 10px;
  opacity: 0.5;
}
@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-33.33%); }
}
@keyframes tickerBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* ===== HAMBURGER ===== */
.hamburger {
  display: none; background: var(--bg-card); color: var(--text-dim);
  border: 1px solid var(--border); border-radius: 4px; padding: 6px 10px;
  font-size: 16px; cursor: pointer; transition: all .15s; flex-shrink: 0;
}
.hamburger:hover { color: var(--green-bright); border-color: var(--green-dim); }

/* ===== TOP BAR ===== */
#topbar {
  display: flex; align-items: center; height: 48px; min-height: 48px;
  background: var(--bg-dark); border-bottom: 1px solid var(--border);
  padding: 0 12px; gap: 16px;
}
.topbar-logo { display: flex; align-items: center; gap: 5px; min-width: 260px; }
.logo-icon { font-size: 16px; color: var(--green-bright); }
.logo-text { font-size: 14px; font-weight: 700; letter-spacing: -0.3px; color: var(--text); }
.logo-version {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 2px; border-radius: 2px;
  background: rgba(142,222,58,0.08);
  border: 1px solid rgba(142,222,58,0.25);
  line-height: 0;
}
.btn-back-story {
  font-size: 10px; font-family: var(--font-mono); color: var(--gold-bright);
  text-decoration: none; margin-left: 12px; padding: 2px 6px;
  border: 1px solid var(--gold-dim); border-radius: 3px;
  background: rgba(228,181,31,0.08);
  transition: all .15s; white-space: nowrap;
}
.btn-back-story:hover {
  color: #fff; border-color: var(--gold);
  background: var(--gold-dim);
}
.topbar-pair { display: flex; align-items: center; gap: 12px; }
.pair-selector {
  display: flex; align-items: center; gap: 2px; cursor: pointer;
  padding: 3px 8px; border-radius: 3px; background: var(--bg-card);
  border: 1px solid var(--border); transition: border-color .15s;
}
.pair-selector:hover { border-color: var(--border-light); }
.pair-base { font-size: 13px; font-weight: 700; color: var(--text); }
.pair-sep { color: var(--text-muted); font-size: 11px; }
.pair-quote { font-size: 11px; color: var(--text-dim); }
.pair-version {
  font-size: 8px; font-family: var(--font-mono); color: var(--gold);
  background: rgba(228,181,31,0.1); padding: 1px 4px; border-radius: 2px; margin-left: 4px;
}
.pair-price-block { display: flex; flex-direction: column; gap: 1px; }
.pair-price { font-size: 15px; font-weight: 700; font-family: var(--font-mono); color: var(--text); }
.pair-change { font-size: 11px; font-weight: 600; }
.pair-change.up { color: var(--green-bright); }
.pair-change.down { color: var(--red-bright); }
.topbar-fee { display: flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 11px; margin-left: auto; }
.eth-price { color: var(--green-bright); font-weight: 600; font-family: var(--font-mono); }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

.btn-connect:hover { background: var(--green); color: var(--bg-darkest); }
.btn-connect.connected {
  background: var(--bg-card); color: var(--text-dim);
  border-color: var(--border-light); font-family: var(--font-mono);
}

/* My Portfolio */

.btn-portfolio:hover {
  background: var(--green); color: var(--bg-darkest);
}
.btn-portfolio.active {
  background: var(--green-dim); box-shadow: 0 0 8px rgba(92,242,66,.25);
}

/* BUY $HTERM — blinking CTA */

.btn-buy-htoken:hover {
  background: var(--green); color: var(--bg-darkest);
  animation: none;
}
@keyframes hterm-blink {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 rgba(45,212,191,0); }
  50% { opacity: 0.7; box-shadow: 0 0 12px rgba(45,212,191,0.4); }
}

/* ===== MOBILE BACKDROP ===== */
.mobile-backdrop {
  display: none; position: fixed; top: 48px; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6); z-index: 90; opacity: 0; transition: opacity .3s;
}
.mobile-backdrop.show { display: block; opacity: 1; }

/* ===== RESIZERS ===== */
.resizer {
  width: 4px; flex-shrink: 0; cursor: col-resize; background: transparent;
  position: relative; z-index: 10; transition: background .15s;
}
.resizer:hover, .resizer.dragging { background: var(--green-dim); }
.resizer::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 24px; background: var(--border-light); border-radius: 1px; transition: background .15s;
}
.resizer:hover::after, .resizer.dragging::after { background: var(--green-bright); }

/* ===== MAIN LAYOUT ===== */
.main-layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }

/* ===== LEFT SIDEBAR ===== */
.sidebar-left {
  width: 320px; min-width: 200px; max-width: 500px; background: var(--bg-sidebar);
  border-right: none; display: flex; flex-direction: column; overflow: hidden; flex-shrink: 0;
}
.sidebar-tabs { display: flex; padding: 6px 8px; gap: 4px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.sb-tab {
  padding: 4px 10px; font-size: 11px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: none; border-radius: 3px; cursor: pointer; transition: all .15s;
}
.sb-tab.active { color: var(--text); background: var(--bg-active); }
.sidebar-filters { display: flex; gap: 6px; padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.filter-chip {
  padding: 2px 8px; font-size: 9px; font-weight: 600; letter-spacing: 0.5px;
  color: var(--text-muted); background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; transition: all .15s; user-select: none;
}
.filter-chip:hover { color: var(--text-dim); border-color: var(--border-light); }
.filter-chip.active { color: var(--gold); border-color: var(--gold-dim); background: rgba(228,181,31,0.08); }
.search-box { padding: 6px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.search-box input {
  width: 100%; padding: 5px 8px; background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 3px; color: var(--text); font-size: 11px; font-family: var(--font-sans);
  outline: none; transition: border-color .15s;
}
.search-box input:focus { border-color: var(--blue); }
.search-box input::placeholder { color: var(--text-faint); }
.token-list-header {
  display: flex; align-items: center; padding: 6px 10px; gap: 4px;
  border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-muted);
  font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; user-select: none; flex-shrink: 0;
}
.th-rank { width: 24px; text-align: center; flex-shrink: 0; }
.th-pair { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.th-pair.sortable, .th-price.sortable, .th-change.sortable, .th-liq.sortable {
  cursor: pointer; transition: color .15s; display: flex; align-items: center; gap: 3px;
}
.th-pair.sortable:hover, .th-price.sortable:hover, .th-change.sortable:hover, .th-liq.sortable:hover { color: var(--text); }
.th-price { width: 72px; text-align: right; flex-shrink: 0; justify-content: flex-end; }
.th-change { width: 58px; text-align: right; flex-shrink: 0; justify-content: flex-end; }
.th-liq { width: 62px; text-align: right; flex-shrink: 0; justify-content: flex-end; }
.sort-arrow { font-size: 9px; color: var(--green-bright); display: inline-block; width: 10px; }
.sort-arrow.desc::after { content: '\2193'; }
.sort-arrow.asc::after { content: '\2191'; }

/* TOKEN LIST — SCROLL FIX */
.token-list { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.token-item {
  display: flex; align-items: center; padding: 7px 10px; gap: 4px; cursor: pointer;
  border-bottom: 1px solid rgba(26,32,48,0.3); transition: background .1s;
}
.token-item:hover { background: var(--bg-hover); }
.token-item.active { background: var(--bg-active); border-left: 2px solid var(--green-bright); }
.token-item.new-token { animation: flashNew 2s ease-out; }
@keyframes flashNew { 0% { background: rgba(45,212,191,0.2); } 100% { background: transparent; } }
.col-rank { width: 24px; text-align: center; font-size: 10px; color: var(--text-faint); flex-shrink: 0; }
.col-pair { flex: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.token-avatar {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: var(--bg-active); color: var(--text-dim); font-size: 9px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.token-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.token-pair-info { min-width: 0; flex: 1; }
.token-pair-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: 0.2px; color: var(--text); }
.tp-version { font-size: 8px; color: var(--gold); margin-left: 4px; font-family: var(--font-mono); }
.token-pair-sub { font-size: 9px; color: var(--text-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.col-price { width: 72px; text-align: right; font-size: 10px; font-family: var(--font-mono); color: var(--text-dim); flex-shrink: 0; }
.col-change { width: 58px; text-align: right; font-size: 10px; font-weight: 600; flex-shrink: 0; }
.col-change.up { color: var(--green-bright); }
.col-change.down { color: var(--red-bright); }
.col-liq { width: 62px; text-align: right; font-size: 10px; color: var(--text-muted); flex-shrink: 0; }
.new-badge {
  font-size: 7px; font-weight: 700; color: var(--green-bright); background: rgba(45,212,191,0.15);
  padding: 1px 4px; border-radius: 2px; margin-left: 4px; animation: pulse 1.5s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }

/* ===== CENTER AREA ===== */
.center-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; position: relative; }
.chart-toolbar { padding: 4px 8px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.timeframe-group { display: flex; gap: 2px; }
.tf-btn {
  padding: 3px 8px; font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: all .15s;
}
.tf-btn:hover { color: var(--text-dim); }
.tf-btn.active { color: var(--green-bright); background: var(--bg-active); border-color: var(--border); }
.scale-toggle {
  padding: 3px 8px; font-size: 10px; font-weight: 600; color: #8ede3a;
  background: var(--bg-active); border: 1px solid #8ede3a; border-radius: 3px;
  cursor: pointer; transition: all .15s; margin-left: 8px;
}
.scale-toggle.linear { color: var(--text-muted); background: transparent; border-color: var(--border); }
.price-toggle { display: flex; gap: 2px; margin-left: auto; }
.pt-btn {
  padding: 3px 10px; font-size: 10px; font-weight: 700; color: var(--text-muted);
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 3px; cursor: pointer; transition: all .15s;
}
.pt-btn.active { color: var(--green-bright); border-color: var(--green-dim); background: var(--bg-active); }
.chart-wrapper { flex: 3; display: flex; overflow: hidden; position: relative; min-height: 200px; }
/* BUG #14: Empty chart placeholder */
#chartContainer[data-empty="true"]::after {
  content: "No chart data available for this timeframe";
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  color: #4a5448; font-size: 13px; font-family: 'Spline Sans Mono', monospace;
  pointer-events: none;
}
.chart-warning {
  display: none; position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
  z-index: 10; padding: 4px 10px; font-size: 10px; font-weight: 600;
  color: #e0b93a; background: rgba(228,181,31,0.1); border: 1px solid rgba(228,181,31,0.3);
  border-radius: 4px; pointer-events: none; white-space: nowrap;
}
.chart-warning.show { display: block; }
.chart-type-menu, .indicator-menu {
  width: 70px; min-width: 70px; display: flex; flex-direction: column;
  border-right: 1px solid var(--border); padding: 4px 0;
}
.indicator-menu { border-right: none; border-left: 1px solid var(--border); }
.ct-vertical, .ind-vertical {
  padding: 6px 4px; font-size: 9px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: none; cursor: pointer; transition: all .15s;
  text-align: center; white-space: nowrap;
}
.ct-vertical:hover, .ind-vertical:hover { color: var(--text-dim); }
.ct-vertical.active { color: var(--green-bright); background: var(--bg-active); }
.ind-vertical.active { color: var(--gold); background: var(--bg-active); }
.chart-container { flex: 1; position: relative; overflow: hidden; min-width: 0; }
.ohlc-tooltip {
  display: none; position: absolute; z-index: 50;
  background: rgba(14,17,22,0.95); border: 1px solid var(--border-light);
  border-radius: 4px; padding: 6px 10px; min-width: 140px;
  font-family: var(--font-mono); font-size: 10px; pointer-events: none;
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.ohlc-row { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.ohlc-label { color: var(--text-muted); width: 14px; flex-shrink: 0; }
.ohlc-val { color: var(--text-dim); text-align: right; }
.ohlc-change { font-weight: 700; padding-top: 3px; border-top: 1px solid var(--border); margin-top: 2px; }
.ohlc-time { color: var(--text-muted); font-size: 9px; padding-top: 2px; }
.chart-loading {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
  color: var(--text-dim); font-size: 12px;
}
.chart-brand { padding: 2px 10px; font-size: 9px; color: var(--text-muted); text-align: right; border-top: 1px solid var(--border); flex-shrink: 0; }
.chart-brand a { color: var(--text-dim); text-decoration: none; }
.chart-brand a:hover { color: var(--text); }

/* ===== BOTTOM PANEL ===== */
.bottom-panel { flex: 2; min-height: 160px; border-top: 1px solid var(--border); display: flex; flex-direction: column; }
.bottom-tabs-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 8px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.bottom-tabs-left { display: flex; gap: 2px; flex-wrap: wrap; }
.bottom-tabs-right { display: flex; gap: 8px; align-items: center; }
.bt-btn {
  padding: 3px 10px; font-size: 10px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: none; border-radius: 3px; cursor: pointer; transition: all .15s;
}
.bt-btn:hover { color: var(--text-dim); }
.bt-btn.active { color: var(--text); background: var(--bg-active); }
.trade-filter { display: flex; gap: 2px; }
.tf-filter {
  padding: 2px 8px; font-size: 9px; font-weight: 600; color: var(--text-muted);
  background: transparent; border: 1px solid transparent; border-radius: 3px; cursor: pointer; transition: all .15s;
}
.tf-filter:hover { color: var(--text-dim); }
.tf-filter.active { color: var(--green-bright); border-color: var(--border); background: var(--bg-card); }
.txn-table { flex: 1; overflow: auto; -webkit-overflow-scrolling: touch; min-height: 0; }
.txn-header {
  display: flex; align-items: center; padding: 6px 20px; gap: 18px;
  border-bottom: 1px solid var(--border); font-size: 11px; color: var(--text-muted);
  font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase;
  position: sticky; top: 0; background: var(--bg-sidebar); z-index: 1; flex-shrink: 0;
  min-width: 560px;
}
.txn-row {
  display: flex; align-items: center; padding: 6px 20px; gap: 18px;
  border-bottom: 1px solid rgba(38,46,66,0.5); font-size: 12px; transition: background .1s;
  min-width: 560px;
}
.txn-row:hover { background: var(--bg-hover); }
.txn-col { display: flex; align-items: center; }
.th-date { flex: 1; min-width: 80px; color: var(--text-dim); flex-shrink: 0; }
.th-type { flex: 0.6; min-width: 38px; font-weight: 600; flex-shrink: 0; }
.th-type.buy { color: var(--green-bright); }
.th-type.sell { color: var(--red-bright); }
.th-token-amt { flex: 1.5; min-width: 70px; color: var(--text-dim); font-family: var(--font-mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex-shrink: 0; }
.th-eth-amt { flex: 1.2; min-width: 70px; color: var(--text-dim); font-family: var(--font-mono); text-align: right; flex-shrink: 0; }
.th-usd-amt { flex: 1.2; min-width: 60px; color: var(--text-dim); font-family: var(--font-mono); text-align: right; flex-shrink: 0; }
.th-price { flex: 1.5; min-width: 70px; color: var(--text-dim); font-family: var(--font-mono); text-align: right; flex-shrink: 0; }
.th-mcap { flex: 1.2; min-width: 60px; color: var(--text-muted); text-align: right; flex-shrink: 0; }
.th-tx { flex: 0.4; min-width: 24px; text-align: center; flex-shrink: 0; }
.th-tx a { color: var(--blue-bright); text-decoration: none; font-size: 12px; }
.th-tx a:hover { color: var(--green-bright); }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--border); padding: 1px; }
.info-cell { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; background: var(--bg-sidebar); }
.info-key { font-size: 9px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.info-val { font-size: 11px; color: var(--text); font-weight: 500; }
.info-val.mono { font-family: var(--font-mono); }

/* ===== RIGHT SIDEBAR ===== */
.sidebar-right {
  width: 300px; min-width: 200px; max-width: 500px; background: var(--bg-sidebar);
  border-left: none; display: flex; flex-direction: column; overflow-y: auto; flex-shrink: 0;
  -webkit-overflow-scrolling: touch;
}

/* ===== SWAP CARD ===== */





.swap-side-btn[data-side="buy"].active { background: rgba(23,186,119,0.15); color: var(--green-bright); border-color: var(--green); }
.swap-side-btn[data-side="sell"].active { background: rgba(237,75,88,0.15); color: var(--red-bright); border-color: var(--red); }



.swap-input:focus { border-color: var(--blue); }



.swap-quick-btn:hover { color: var(--text-dim); border-color: var(--border-light); }







.swap-info-row span:first-child { color: var(--text-muted); }
.swap-info-row span:last-child { color: var(--text-dim); }



.slip-btn:hover { color: var(--text-dim); }
.slip-btn.active { color: var(--gold); border-color: var(--gold-dim); background: rgba(228,181,31,0.08); }

.btn-buy { background: var(--green-dim); color: var(--green-bright); border-color: var(--green); }
.btn-buy:hover { background: var(--green); color: var(--bg-darkest); }
.btn-sell { background: var(--red-dim); color: var(--red-bright); border-color: var(--red); }
.btn-sell:hover { background: var(--red); color: var(--bg-darkest); }
.btn-swap-action.disabled, .btn-swap-action:disabled { opacity: 0.4; cursor: not-allowed; }

/* ===== STATS ===== */
.stats-row { display: flex; gap: 1px; background: var(--border); border-bottom: 1px solid var(--border); }
.stat-box { flex: 1; padding: 8px; background: var(--bg-sidebar); display: flex; flex-direction: column; gap: 2px; }
.stat-label { font-size: 8px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }
.stat-value { font-size: 14px; font-weight: 700; font-family: var(--font-mono); color: var(--text); }
.stats-sub {
  display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 10px; font-size: 10px;
  color: var(--text-dim); border-bottom: 1px solid var(--border);
}
.sub-sep { color: var(--text-muted); }
.section-header {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px;
  border-bottom: 1px solid var(--border); font-size: 11px; font-weight: 700; color: var(--text);
}
.section-icon { color: var(--text-muted); font-size: 13px; }
.security-card { padding: 4px 10px; border-bottom: 1px solid var(--border); }
.sec-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 10px; }
.sec-label { color: var(--text-muted); }
.sec-value { color: var(--text-dim); font-weight: 500; }
.sec-value.green { color: var(--green-bright); }
.sec-value.mono { font-family: var(--font-mono); }
.about-card { padding: 10px; border-bottom: 1px solid var(--border); }
.about-card p { font-size: 10px; color: var(--text-dim); line-height: 1.5; margin-bottom: 6px; }
.social-links { display: flex; gap: 6px; margin-bottom: 6px; flex-wrap: wrap; }
.social-link {
  font-size: 9px; font-weight: 600; color: var(--text-dim); text-decoration: none;
  background: var(--bg-card); padding: 2px 8px; border-radius: 3px; border: 1px solid var(--border); transition: all .15s;
}
.social-link:hover { color: var(--blue-bright); border-color: var(--blue); }
.desc-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.desc-tag {
  font-size: 8px; font-weight: 600; color: var(--text-muted);
  background: var(--bg-card); padding: 2px 6px; border-radius: 2px; border: 1px solid var(--border);
}
.contracts-card { padding: 4px 10px; }
.contract-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 10px; gap: 4px; }
.contract-label { color: var(--text-muted); flex-shrink: 0; }
.contract-value { color: var(--blue-bright); font-family: var(--font-mono); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  font-size: 8px; font-weight: 600; color: var(--text-muted); background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 3px; padding: 2px 6px; cursor: pointer;
  transition: all .15s; flex-shrink: 0;
}
.copy-btn:hover { color: var(--green-bright); border-color: var(--green-dim); }
.copy-btn.copied { color: var(--green-bright); border-color: var(--green); background: rgba(45,212,191,0.1); }

/* ===== STATUS BAR ===== */
#statusbar {
  display: flex; justify-content: space-between; align-items: center; height: 24px; min-height: 24px;
  background: var(--bg-dark); border-top: 1px solid var(--border); padding: 0 12px; font-size: 10px; color: var(--text-muted);
  flex-shrink: 0; overflow: hidden;
}
.status-left { display: flex; align-items: center; gap: 6px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-faint); }
.status-dot.connected { background: var(--green-bright); box-shadow: 0 0 4px var(--green-bright); }
.status-right { display: flex; gap: 4px; }
.status-sep { color: var(--text-faint); }

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-faint); }

.loading-placeholder { padding: 16px; text-align: center; color: var(--text-dim); font-size: 11px; }

/* ===== TOAST ===== */
.toast {
  position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
  background: var(--bg-active); color: var(--green-bright); padding: 8px 16px;
  border-radius: 4px; border: 1px solid var(--green-dim); font-size: 11px; font-weight: 600;
  z-index: 2000; opacity: 0; transition: opacity .3s; pointer-events: none; max-width: 90vw; text-align: center;
}
.toast.show { opacity: 1; }

/* ===== PORTFOLIO ===== */
.portfolio-summary { padding: 4px 0; }
.pf-total { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; padding: 10px 12px; background: var(--bg-card); border: 1px solid var(--border-light); border-radius: 6px; margin-bottom: 8px; }
.pf-total-label { font-size: 11px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; width: 100%; }
.pf-total-eth { font-size: 16px; font-weight: 700; color: var(--green-bright); font-family: var(--font-mono); }
.pf-total-usd { font-size: 13px; color: var(--text-secondary); font-family: var(--font-mono); }
.pf-eth-row, .pf-row { display: flex; align-items: center; padding: 6px 12px; border-bottom: 1px solid var(--border-dark); gap: 8px; }
.pf-eth-row:hover, .pf-row:hover { background: var(--bg-hover); }
.pf-asset { display: flex; align-items: center; gap: 6px; min-width: 80px; flex-shrink: 0; }
.pf-logo { width: 18px; height: 18px; border-radius: 50%; }
.pf-symbol { font-size: 12px; font-weight: 600; color: var(--text-primary); font-family: var(--font-mono); }
.pf-bal { flex: 1; font-size: 12px; color: var(--text-secondary); font-family: var(--font-mono); text-align: right; }
.pf-val { min-width: 70px; font-size: 12px; color: var(--text-primary); font-family: var(--font-mono); text-align: right; }
.pf-pct { min-width: 40px; font-size: 11px; color: var(--text-dim); font-family: var(--font-mono); text-align: right; }

/* ===== RESPONSIVE: TABLET ===== */
@media (max-width: 1200px) {
  .topbar-fee { display: none; }
  .chart-type-menu, .indicator-menu { width: 65px; min-width: 65px; }
}

/* ===== RESPONSIVE: MOBILE ===== */
@media (max-width: 900px) {
  .hamburger { display: block; }
  .resizer-chart { height: 16px; }
  .hamburger-right { display: block !important; }
  .sidebar-left, .sidebar-right {
    position: fixed; top: 48px; bottom: 24px; z-index: 100;
    transition: transform 0.3s ease; box-shadow: 4px 0 20px rgba(0,0,0,0.5);
  }
  .sidebar-left { left: 0; transform: translateX(-100%); width: 300px; max-width: 85vw; }
  .sidebar-left.mobile-open { transform: translateX(0); }
  .sidebar-right { right: 0; transform: translateX(100%); width: 300px; max-width: 85vw; }
  .sidebar-right.mobile-open { transform: translateX(0); }
  .resizer { display: block; width: 4px; }
  .resizer::after { display: none; }
  .chart-type-menu, .indicator-menu { width: 55px; min-width: 55px; }
  .ct-vertical, .ind-vertical { font-size: 9px; padding: 4px 3px; }
  .topbar-logo { min-width: auto; }
  .logo-version { display: none; }
  .btn-back-story { margin-left: 6px; padding: 2px 4px; font-size: 9px; }

  .status-right span:not(#autoRefreshStatus) { display: none; }
  .status-right::before { content: 'Robinhood L2'; color: var(--text-muted); }
  /* Fix text overlap on mobile */
  .token-item { padding: 8px 8px; gap: 6px; }
  .col-pair { gap: 6px; }
  .token-avatar { width: 24px; height: 24px; flex-shrink: 0; }
  .token-pair-name { font-size: 12px; }
  .token-pair-sub { font-size: 9px; }
  .col-price { font-size: 10px; }
  .col-liq { font-size: 10px; }
  .col-change { font-size: 10px; }
  .scale-toggle { padding: 2px 5px; font-size: 9px; margin-left: 4px; }
  .tf-btn { padding: 3px 6px; font-size: 9px; }
  .resizer-chart { height: 10px; }
  .chart-brand { font-size: 8px; padding: 1px 6px; }
  #topbar { gap: 8px; }
  .topbar-actions { gap: 4px; }
  
  
  
  /* Mobile txn: DexScreener-style single line, scroll horizontal */
  .txn-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .txn-header, .txn-row {
    flex-wrap: nowrap; gap: 10px; padding: 6px 10px;
    white-space: nowrap; min-width: 580px;
  }
  .txn-header { font-size: 8px; }
  .txn-row { font-size: 10px; }
  .th-date { width: 75px; min-width: 75px; flex: none; }
  .th-type { width: 36px; min-width: 36px; flex: none; font-size: 10px; }
  .th-token-amt { width: 110px; min-width: 110px; flex: none; }
  .th-eth-amt { width: 75px; min-width: 75px; flex: none; }
  .th-usd-amt { width: 65px; min-width: 65px; flex: none; }
  .th-price { width: 75px; min-width: 75px; flex: none; }
  .th-mcap { width: 65px; min-width: 65px; flex: none; }
  .th-tx { width: 24px; min-width: 24px; flex: none; }
}

@media (max-width: 600px) {
  .topbar-pair { display: none; }
  .topbar-fee { display: none; }
  .btn-back-story { display: none; }
  .th-change.sortable, .th-change { display: none; }
  .col-change { display: none; }
  .th-liq { width: 55px; }
  .col-liq { width: 55px; }
  .col-price { width: 65px; }
  .th-pair { font-size: 8px; flex: none; width: 62px; }
  /* Match header-data alignment on mobile */
  .token-list-header { gap: 4px; }
  .token-item { gap: 4px; padding: 7px 10px; }
  .token-item.active { padding-left: 8px; } /* compensate 2px border-left */
  .col-pair { gap: 6px; overflow: hidden; flex: none; width: 62px; }
  .col-pair .token-pair-sub { display: none; }
  .col-pair .token-pair-name { font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .col-pair .token-pair-info { min-width: 0; overflow: hidden; }
  .col-rank { width: 24px; }
  .token-avatar { width: 22px; height: 22px; }
  .hamburger { padding: 6px 8px; font-size: 14px; }
  
  
  
  .topbar-logo { gap: 3px; min-width: auto; }
  .logo-text { font-size: 12px; }
  .scale-toggle { display: none; }
  .tf-btn { padding: 3px 6px; font-size: 9px; }
  .chart-toolbar { padding: 2px 4px; }
  .chart-brand { display: none; }
  .resizer-chart { height: 6px; }
  .chart-type-menu, .indicator-menu { width: 45px; min-width: 45px; }
  .ct-vertical, .ind-vertical { font-size: 8px; padding: 4px 2px; }
  #topbar { gap: 6px; padding: 0 6px; }
  .topbar-actions { gap: 3px; }
  
  
  .btn-connect-swap.connected { color: var(--green); border-color: var(--green-dim); }
  /* Pastikan bottom panel selalu kelihatan — overflow auto di center */
  .center-area { overflow-y: auto; }
}
/* ===== CHART RESIZER ===== */
.resizer-chart {
  width: 100%; height: 4px; flex-shrink: 0; cursor: row-resize; background: transparent;
  position: relative; z-index: 10; transition: background .15s; touch-action: none;
}
.resizer-chart:hover, .resizer-chart.dragging { background: var(--green-dim); }
.resizer-chart::after {
  content: ''; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 24px; height: 2px; background: var(--border-light); border-radius: 1px; transition: background .15s;
}
.resizer-chart:hover::after, .resizer-chart.dragging::after { background: var(--green-bright); }


/* ===== OWL IN HOOD — SCANLINES OVERLAY ===== */
.main-layout::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,.06) 2px,
    rgba(0,0,0,.06) 4px
  );
  animation: scanMove 8s linear infinite;
}

@keyframes scanMove {
  0% { background-position: 0 0; }
  100% { background-position: 0 100vh; }
}

/* Neon green glow on status bar */
.status-left .status-dot {
  box-shadow: 0 0 10px rgba(142,222,58,.6);
}

/* Active sidebar tab glow */
.sb-tab.active {
  text-shadow: 0 0 8px rgba(142,222,58,.4);
}

/* Token row hover glow */
.token-item:hover {
  box-shadow: inset 0 0 20px rgba(142,222,58,.05);
}

/* Header pair name glow */
.pair-base {
  text-shadow: 0 0 12px rgba(142,222,58,.3);
}
