:root {
  --page: #0a1317;
  --panel: #0f1a1f;
  --panel-2: #142228;
  --hover: #17262c;
  --line: #1e2d33;
  --line-2: #273a41;
  --text: #f2f7f6;
  --muted: #949e9c;
  --dim: #5f6b6e;
  --accent: #50d2c1;
  --accent-dim: rgba(80, 210, 193, 0.14);
  --up: #1fa67d;
  --down: #ed7088;
  --warn: #e8b64c;
  --radius: 6px;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Mono", Consolas, ui-monospace, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--page);
  color: var(--text);
  font: 12px/1.35 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.up { color: var(--up); }
.down { color: var(--down); }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- top bar */
.topbar {
  flex: 0 0 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; color: var(--accent); font-size: 16px; font-weight: 600; letter-spacing: 0.2px; white-space: nowrap; }
.brand span { color: var(--text); }
.brand b { color: var(--accent); font-weight: 600; }
a.brand { text-decoration: none; }
/* page tabs: Profile · Trading · Indicators */
.site-nav { display: flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line-2); margin-left: -6px; }
.site-nav a { padding: 5px 9px; border-radius: 999px; color: var(--muted); text-decoration: none; font-weight: 500; font-size: 12.5px; white-space: nowrap; transition: color 0.15s, background 0.15s; }
.site-nav a:hover { color: var(--text); background: var(--hover); }
.site-nav a.active { color: #04231f; background: var(--accent); font-weight: 600; }

.sync {
  flex: 1;
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 12px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--panel-2);
}
.sync-icon { width: 16px; height: 16px; display: grid; place-items: center; flex: none; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent-dim); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sync-main { flex: 1; min-width: 0; }
.sync-line { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; }
.sync-state { font-weight: 600; color: var(--warn); text-transform: uppercase; font-size: 11px; letter-spacing: 0.6px; }
.sync-text { color: var(--text); overflow: hidden; text-overflow: ellipsis; }
.sync-bar { height: 3px; margin-top: 5px; background: var(--line-2); border-radius: 2px; overflow: hidden; }
.sync-fill { height: 100%; width: 0; background: var(--accent); transition: width 0.4s ease; }
.sync-timer { display: flex; flex-direction: column; align-items: flex-end; font-size: 11px; white-space: nowrap; }
.sync-timer .mono { font-size: 13px; color: var(--text); }

/* compact status moved to the left, leaving the centre for the Claims link */
.sync-compact { flex: 0 1 185px; max-width: 185px; margin: 0; padding: 5px 8px; gap: 8px; }
.sync-compact .sync-timer { display: none; }
.sync-compact .sync-text { font-size: 10.5px; }
.sync-compact .sync-state { font-size: 9.5px; }
.sync-compact .sync-bar { margin-top: 3px; }

/* large blinking link to the Claims page */
.claim-blink {
  flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  text-align: center; text-decoration: none;
  font-family: var(--font); font-weight: 700; font-size: clamp(15px, 1.1vw, 18px);
  line-height: 1.05; letter-spacing: 0.2px;
  color: var(--warn); text-shadow: 0 0 16px rgba(232, 182, 76, 0.55);
  animation: claimBlink 1.5s ease-in-out infinite;
}
.claim-blink > span:first-child { white-space: nowrap; }
.claim-blink-here { color: var(--accent); font-size: clamp(17px, 1.3vw, 21px); text-decoration: underline; text-underline-offset: 3px; }
.claim-blink:hover { color: #fff; }
@keyframes claimBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.sync[data-phase="live"] .sync-state { color: var(--up); }
.sync[data-phase="live"] .spinner { animation: none; border: 0; width: 8px; height: 8px; background: var(--up); box-shadow: 0 0 0 4px rgba(31, 166, 125, 0.2); }
.sync[data-phase="live"] .sync-fill { background: var(--up); }
.sync[data-phase="error"] .sync-state { color: var(--down); }
.sync[data-phase="error"] .spinner { border-top-color: var(--down); }

.conn { display: flex; align-items: center; gap: 6px; color: var(--muted); white-space: nowrap; }
.conn .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--down); }
.conn.ok .dot { background: var(--up); }
.conn.partial .dot { background: var(--warn); }

.topbar .sentiment { gap: 4px; }
.topbar .senti { min-width: 94px; padding: 4px 6px 5px; column-gap: 4px; }
.topbar .senti .txt { font-size: 10.5px; }

@media (max-width: 1250px) {
  .sync-compact { flex-basis: 60px; max-width: 60px; }
  .sync-compact .sync-main { display: none; }
}
@media (max-width: 980px) {
  .topbar .sentiment { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .claim-blink { animation: none; }
}

/* ---------------------------------------------------------------- layout */
.layout {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 344px minmax(0, 1fr) 344px;
  gap: 4px;
  padding: 4px;
}
.panel, .market-head, .chart-card {
  background: var(--panel);
  border-radius: var(--radius);
  min-height: 0;
}
.panel { display: flex; flex-direction: column; overflow: hidden; }
.panel-head { display: flex; align-items: baseline; gap: 8px; padding: 12px 12px 8px; }
.panel-head h2 { margin: 0; font-size: 14px; font-weight: 600; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-note { margin-left: auto; color: var(--dim); font-size: 11px; }
.search-wrap { padding: 0 12px 8px; }
.search {
  width: 100%;
  height: 30px;
  padding: 0 10px;
  color: var(--text);
  background: var(--page);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  outline: none;
  font: inherit;
}
.search:focus { border-color: var(--accent); }

.chips { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 12px 8px; }
.chip {
  padding: 3px 8px;
  border-radius: 4px;
  color: var(--muted);
  background: var(--panel-2);
  font-size: 11px;
}
.chip.active { color: var(--accent); background: var(--accent-dim); }

.thead, .row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px 62px 60px;
  gap: 4px;
  align-items: center;
  padding: 0 12px;
}
.thead { height: 26px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.thead button { text-align: left; color: var(--muted); white-space: nowrap; }
.thead button.r { text-align: right; }
.thead button:hover { color: var(--text); }
.thead button.sorted { color: var(--text); }
.thead button.sorted::after { content: " ▾"; font-size: 9px; }
.thead button.sorted.asc::after { content: " ▴"; }

.list { flex: 1; overflow-y: auto; overflow-x: hidden; }
.list::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 3px; }
.row { height: 28px; cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row:hover { background: var(--hover); }
.row.sel { background: var(--accent-dim); }
.row .r { text-align: right; overflow: hidden; text-overflow: ellipsis; }
.sym { display: flex; align-items: center; gap: 6px; min-width: 0; }
.sym b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; }
.sym em { font-style: normal; font-size: 10px; color: var(--accent); background: var(--accent-dim); padding: 0 4px; border-radius: 3px; flex: none; }
.sym small { color: var(--dim); font-size: 10px; flex: none; }
.st { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--dim); }
.st.downloading { background: var(--warn); animation: pulse 1s ease-in-out infinite; }
.st.ready { background: var(--up); }
.st.error { background: var(--down); }
@keyframes pulse { 50% { opacity: 0.25; } }
.list .empty { padding: 24px 12px; color: var(--muted); text-align: center; }

/* ---------------------------------------------------------------- center */
.center { display: flex; flex-direction: column; gap: 4px; min-width: 0; min-height: 0; }
.market-head {
  flex: none;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 10px 16px;
  overflow-x: auto;
  white-space: nowrap;
}
.mh-coin { display: flex; align-items: center; gap: 8px; }
.mh-name { font-size: 20px; font-weight: 600; }
.badge { font-size: 11px; color: var(--accent); background: var(--accent-dim); padding: 1px 6px; border-radius: 4px; }
.badge.dex { color: var(--muted); background: var(--panel-2); }
.mh-stats { display: flex; gap: 28px; }
.stat { display: flex; flex-direction: column; gap: 2px; }
.stat .lbl { color: var(--muted); font-size: 11px; text-decoration: underline dotted var(--dim); text-underline-offset: 3px; }
.stat .val { font-variant-numeric: tabular-nums; }

.chart-card { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.chart-toolbar {
  flex: none;
  height: 36px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px;
  border-bottom: 1px solid var(--line);
}
.tfs { display: flex; gap: 2px; }
.tfs button { padding: 4px 9px; border-radius: 4px; color: var(--muted); font-weight: 500; }
.tfs button:hover { color: var(--text); background: var(--hover); }
.tfs button.active { color: var(--accent); }
.sep { width: 1px; height: 18px; background: var(--line-2); }
.tool-label { color: var(--muted); }
.chart-info { color: var(--muted); margin-left: auto; font-variant-numeric: tabular-nums; }

.chart-wrap { position: relative; flex: 1; min-height: 0; background: var(--panel); }
#chart { position: absolute; inset: 0; z-index: 1; }
.legend {
  position: absolute;
  top: 8px;
  left: 12px;
  z-index: 3;
  pointer-events: none;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  line-height: 1.6;
}
.legend .title { color: var(--text); margin-right: 10px; }
.legend .k { color: var(--muted); margin-left: 8px; }
/* last price + countdown tag on the right price axis (TradingView style) */
.last-tag {
  position: absolute;
  right: 0;
  z-index: 3;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2px 0 3px;
  border-radius: 2px 0 0 2px;
  color: #fff;
  font-size: 11px;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.last-tag.up { background: var(--up); }
.last-tag.down { background: var(--down); }
.last-tag b { font-weight: 600; }
.last-tag span { font-size: 10px; opacity: 0.92; }
.unit-label {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 3;
  pointer-events: none;
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.4px;
}

.ctx-menu {
  position: fixed;
  z-index: 50;
  min-width: 210px;
  padding: 4px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}
.ctx-menu button {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 4px;
  text-align: left;
}
.ctx-menu button:hover { background: var(--hover); color: var(--accent); }
.ctx-menu button span { color: var(--dim); }

.overlay {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  background: var(--panel);
}
.overlay.translucent { background: rgba(15, 26, 31, 0.72); }
.overlay-box { text-align: center; max-width: 380px; padding: 20px; }
.overlay-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.overlay-sub { color: var(--muted); }
.overlay .spinner { margin: 0 auto 12px; width: 22px; height: 22px; border-width: 3px; }

@media (max-width: 1200px) {
  .layout { grid-template-columns: 280px minmax(0, 1fr) 280px; }
  .thead, .row { grid-template-columns: minmax(0, 1fr) 72px 62px; }
  .thead button:nth-child(4), .row > :nth-child(4) { display: none; }
}

/* ======================================================= top-wallet features */
:root {
  --lv-entry: #b07cff;
  --lv-tp: #2ee6a0;
  --lv-sl: #ff4d6d;
  --lv-liq: #ffa024;
}

/* sentiment chips (top-right) */
.sentiment { display: flex; gap: 6px; align-items: center; }
.senti {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto 4px;
  column-gap: 6px;
  row-gap: 3px;
  align-items: center;
  padding: 4px 9px 5px;
  min-width: 118px;
  border-radius: 7px;
  background: var(--panel-2);
  border: 1px solid var(--line-2);
  cursor: pointer;
  white-space: nowrap;
}
.senti:hover { border-color: var(--accent); }
.senti .emo { font-size: 15px; line-height: 1; grid-row: 1; }
.senti .txt { font-size: 11px; line-height: 1.2; }
.senti .txt b { font-weight: 600; margin-right: 4px; color: var(--text); }
.senti .bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--down); overflow: hidden; }
.senti .bar i { display: block; height: 100%; background: var(--up); }
.senti.cur { border-style: dashed; }

/* right column: HIP-3 on top, wallets below */
.right-col { display: flex; flex-direction: column; gap: 4px; min-height: 0; min-width: 0; }
.right-col #panel-hip3 { flex: 1 1 0; }
.right-col #panel-wallets { flex: 1.25 1 0; }
#panel-hip3 .panel-head, #panel-wallets .panel-head { padding: 10px 12px 6px; }

.w-progress { height: 2px; margin: 0 12px 6px; background: var(--line); border-radius: 1px; overflow: hidden; }
.w-progress div { height: 100%; width: 0; background: var(--accent); transition: width 0.5s ease; }
.w-focus { padding: 0 12px 8px; }
.wf-card { padding: 8px 10px; border-radius: 6px; background: var(--panel-2); border: 1px solid var(--line); }
.wf-top { display: flex; align-items: baseline; gap: 6px; }
.wf-top b { font-size: 13px; }
.wf-top .wf-verdict { margin-left: auto; font-weight: 600; }
.wf-bar { position: relative; height: 16px; margin: 6px 0 5px; border-radius: 4px; background: rgba(237, 112, 136, 0.75); overflow: hidden; font-size: 10px; font-weight: 600; }
.wf-bar i { position: absolute; inset: 0 auto 0 0; background: rgba(31, 166, 125, 0.9); }
.wf-bar span { position: absolute; top: 1px; z-index: 1; color: #fff; }
.wf-bar .l { left: 6px; }
.wf-bar .s { right: 6px; }
.wf-meta { display: flex; flex-wrap: wrap; gap: 2px 10px; color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.wf-meta em { font-style: normal; color: var(--text); }

.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); }
.tabs button { padding: 6px 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--accent); border-bottom-color: var(--accent); }

.wrow { display: grid; grid-template-columns: minmax(0, 1fr) 64px 92px 54px; gap: 6px; align-items: center; height: 28px; padding: 0 12px; cursor: pointer; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wrow:hover { background: var(--hover); }
.wrow.sel { background: var(--accent-dim); }
.wrow.head { height: 24px; cursor: default; color: var(--muted); font-size: 11px; position: sticky; top: 0; background: var(--panel); z-index: 1; }
.wrow.head:hover { background: var(--panel); }
.wrow .r { text-align: right; }
.wrow .ls { color: var(--muted); font-size: 11px; text-align: right; }
.mini { position: relative; height: 14px; border-radius: 3px; background: rgba(237, 112, 136, 0.55); overflow: hidden; font-size: 10px; }
.mini i { position: absolute; inset: 0 auto 0 0; background: rgba(31, 166, 125, 0.85); }
.mini span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 600; }

.pos-card { padding: 7px 12px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.pos-card .pc-top { display: flex; align-items: center; gap: 6px; }
.pos-card .pc-top a { color: var(--muted); text-decoration: none; }
.pos-card .pc-top a:hover { color: var(--accent); }
.pos-card .pc-top .val { margin-left: auto; font-weight: 600; }
.side { font-size: 10px; font-weight: 700; padding: 0 5px; border-radius: 3px; letter-spacing: 0.3px; }
.side.L { color: #fff; background: var(--up); }
.side.S { color: #fff; background: var(--down); }
.pos-card .pc-lv { display: flex; flex-wrap: wrap; gap: 2px 10px; margin-top: 3px; font-size: 11px; color: var(--muted); }
.pos-card .pc-lv b { font-weight: 500; }
.c-entry { color: var(--lv-entry); }
.c-tp { color: var(--lv-tp); }
.c-sl { color: var(--lv-sl); }
.c-liq { color: var(--lv-liq); }

.ev { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 6px; align-items: center; padding: 5px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 11px; font-variant-numeric: tabular-nums; }
.ev:hover { background: var(--hover); }
.ev .ago { color: var(--dim); }
.ev .what { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev .what b { font-weight: 600; }
.ev .amt { font-weight: 600; }
.w-empty { padding: 20px 12px; color: var(--muted); text-align: center; line-height: 1.5; }

/* chart toolbar layer toggles */
.layers { display: flex; align-items: center; gap: 2px; }
.layers-label { color: var(--muted); margin-right: 4px; }
.layers button { display: flex; align-items: center; gap: 5px; padding: 3px 7px; border-radius: 4px; color: var(--dim); }
.layers button i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); opacity: 0.35; }
.layers button.on { color: var(--text); background: var(--panel-2); }
.layers button.on i { opacity: 1; box-shadow: 0 0 6px var(--c); }
.layers .sep { margin: 0 4px; }
.layers .side-btn { font-weight: 600; }
.layers .side-btn[data-layer="long"].on { color: var(--up); background: rgba(31, 166, 125, 0.14); }
.layers .side-btn[data-layer="short"].on { color: var(--down); background: rgba(237, 112, 136, 0.14); }
.chart-info { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* levels canvas + hover tip */
#levels { position: absolute; inset: 0; z-index: 2; pointer-events: none; }
.level-tip {
  position: absolute;
  z-index: 5;
  pointer-events: none;
  min-width: 190px;
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(10, 19, 23, 0.94);
  border: 1px solid var(--line-2);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  font-size: 11px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  backdrop-filter: blur(4px);
}
.level-tip .tt { color: var(--muted); margin-bottom: 3px; }
.level-tip .tt b { color: var(--text); }
.level-tip .ln { display: flex; justify-content: space-between; gap: 14px; }
.level-tip .ln span:first-child::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; background: var(--c); }

/* ======================================================= Indicators (TradingView / Hyperliquid style) */
#indUnder { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
#indOver { position: absolute; inset: 0; z-index: 2; pointer-events: none; }

.ind-btn { display: flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 4px; color: var(--text); font-weight: 500; }
.ind-btn:hover { background: var(--hover); color: var(--accent); }

.ind-legend { position: absolute; top: 48px; left: 8px; z-index: 4; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; }
.ind-row {
  display: flex; align-items: center; gap: 7px; height: 22px; padding: 0 4px 0 6px;
  border: 1px solid transparent; border-radius: 4px; cursor: pointer; font-size: 12px; white-space: nowrap;
}
.ind-row:hover { background: rgba(15, 26, 31, 0.92); border-color: var(--line-2); }
.ind-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ind-name { color: var(--text); }
.ind-args { color: var(--muted); font-variant-numeric: tabular-nums; }
.ind-row.off .ind-name, .ind-row.off .ind-args { color: var(--dim); text-decoration: line-through; }
.ind-row.off .ind-dot { opacity: 0.35; }
.ind-btns { display: flex; gap: 1px; opacity: 0; transition: opacity 0.12s; }
.ind-row:hover .ind-btns, .ind-row.off .ind-btns { opacity: 1; }
.ind-btns button { width: 22px; height: 20px; display: grid; place-items: center; border-radius: 3px; color: var(--muted); }
.ind-btns button:hover { background: var(--hover); color: var(--text); }
.ind-btns button[data-act="remove"]:hover { color: var(--down); }

/* dialogs */
.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; background: rgba(2, 8, 10, 0.55); backdrop-filter: blur(2px); }
.modal {
  width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
.modal.settings { width: min(460px, calc(100vw - 32px)); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; font-size: 16px; font-weight: 600; }
.m-x { width: 28px; height: 28px; border-radius: 6px; color: var(--muted); font-size: 14px; }
.m-x:hover { background: var(--hover); color: var(--text); }
.modal-search { padding: 0 16px 10px; border-bottom: 1px solid var(--line); }
.modal-search input { width: 100%; height: 34px; padding: 0 12px; color: var(--text); background: var(--page); border: 1px solid var(--line-2); border-radius: 6px; outline: none; font: inherit; font-size: 13px; }
.modal-search input:focus { border-color: var(--accent); }
.modal-body { overflow-y: auto; padding: 6px 0 10px; }
.ind-group { padding: 10px 16px 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.6px; text-transform: uppercase; }
.ind-item { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 16px; text-align: left; }
.ind-item:hover { background: var(--hover); }
.ii-icon { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 7px; background: var(--panel-2); font-size: 15px; font-style: italic; font-weight: 700; color: var(--accent); }
.ii-icon.ic-walletLong { background: rgba(31, 166, 125, 0.16); font-style: normal; }
.ii-icon.ic-walletShort { background: rgba(237, 112, 136, 0.16); font-style: normal; }
.ii-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ii-text b { font-weight: 600; font-size: 13px; }
.ii-text small { color: var(--muted); font-size: 11px; line-height: 1.35; }
.ii-state { flex: none; font-size: 11px; padding: 3px 8px; border-radius: 4px; color: var(--muted); background: var(--panel-2); }
.ind-item.on .ii-state { color: var(--accent); background: var(--accent-dim); }
.ind-none { padding: 24px 16px; color: var(--muted); text-align: center; }

.set-tabs { display: flex; gap: 2px; padding: 0 16px; border-bottom: 1px solid var(--line); }
.set-tabs button { padding: 7px 10px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.set-tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.set-body { padding: 4px 16px 12px; }
.sf-sec { margin: 12px 0 4px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.5px; text-transform: uppercase; }
.sf-sec small { text-transform: none; font-weight: 400; letter-spacing: 0; }
.sf { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 32px; }
.sf > span:first-child { color: var(--text); }
.sf select, .sf input[type="number"] {
  width: 190px; height: 28px; padding: 0 8px; color: var(--text); background: var(--page);
  border: 1px solid var(--line-2); border-radius: 5px; outline: none; font: inherit;
}
.sf input[type="number"] { width: 90px; }
.sf select:focus, .sf input:focus { border-color: var(--accent); }
.sf-bool { justify-content: flex-start; cursor: pointer; }
.sf-bool input { width: 15px; height: 15px; accent-color: var(--accent); }
.sf-range { display: flex; align-items: center; gap: 8px; }
.sf-range input { width: 150px; accent-color: var(--accent); }
.sf-range em { width: 38px; text-align: right; font-style: normal; color: var(--muted); font-variant-numeric: tabular-nums; }
.sf-note { margin-top: 10px; padding: 8px 10px; border-radius: 6px; background: var(--panel-2); color: var(--muted); font-size: 11px; line-height: 1.45; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 16px 14px; border-top: 1px solid var(--line); }
.m-btn { padding: 7px 16px; border-radius: 6px; background: var(--accent); color: #04211d; font-weight: 600; }
.m-btn.ghost { margin-right: auto; background: none; color: var(--muted); border: 1px solid var(--line-2); }
.m-btn.ghost:hover { color: var(--text); }

/* Overlay Signals dashboard (like the Pine table) */
.os-dash {
  position: absolute; z-index: 3; pointer-events: none; min-width: 168px;
  border: 1px solid rgba(120, 123, 134, 0.3); border-radius: 4px; overflow: hidden;
  background: rgba(19, 23, 34, 0.88); font-size: 11px; font-variant-numeric: tabular-nums;
}
.od-row { display: flex; justify-content: space-between; gap: 14px; padding: 3px 8px; border-top: 1px solid rgba(120, 123, 134, 0.18); }
.od-row:first-child { border-top: 0; }
.od-row span { color: #9598a1; }
.od-row b { font-weight: 600; color: #fff; }
.od-row b.up { color: #089981; }
.od-row b.down { color: #f23645; }
.od-row b.muted { color: #9598a1; }
.od-head { padding: 4px 4px 4px 8px; align-items: center; }
.od-head span { color: #fff; font-weight: 600; }
.od-head b { padding: 1px 8px; border-radius: 3px; color: #fff !important; }
.od-head b.bull { background: #089981; }
.od-head b.bear { background: #f23645; }
