/* Nodetrail Terminal — sits inside the site chrome. Fonts come from the site. */
.terminal-page .nt-term { box-sizing: border-box; color: var(--text, #e5e7eb); }
.terminal-page .nt-term *, .terminal-page .nt-term *::before, .terminal-page .nt-term *::after { box-sizing: border-box; }
.nt-term-wallet {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 20px;
  border-bottom: 1px solid var(--line, #1f2937);
  background: var(--card, #111827);
  font-size: 13px;
}
.nt-term-wallet-label { color: #6b7280; font-weight: 600; }
.nt-term-wallet-addr { font-family: ui-monospace, monospace; color: #5eead4; font-weight: 600; }
.nt-term-wallet-link, .nt-term-wallet-note { color: #9ca3af; text-decoration: none; font-size: 12.5px; }
.nt-term-wallet-link:hover { color: #5eead4; text-decoration: underline; }

.layout {
  display: grid;
  grid-template-columns: 320px 1fr 320px;
  gap: 14px;
  padding: 14px;
  flex: 1;
  align-items: start;
  min-width: 0;
  max-width: 100%;
}

.card {
  background: #111827;
  border: 1px solid #1f2937;
  border-radius: 14px;
  padding: 14px;
  min-width: 0;
}

/* ---------- left column ---------- */
.col-left { min-width: 0; }
.chain-filter { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chain-filter button {
  background: #0a0f1a; color: #9ca3af; border: 1px solid #1f2937;
  border-radius: 999px; padding: 5px 11px; font: 600 12px 'Inter', sans-serif; cursor: pointer;
}
.chain-filter button.active { background: #14b8a6; border-color: #14b8a6; color: #04241f; }

.search {
  width: 100%; background: #0a0f1a; border: 1px solid #1f2937; border-radius: 10px;
  color: #e5e7eb; padding: 9px 12px; font: 400 13px 'Inter', sans-serif; margin-bottom: 12px; outline: none;
}
.search:focus { border-color: #14b8a6; }

.tabs { display: flex; gap: 6px; margin-bottom: 10px; }
.tab {
  background: transparent; border: 1px solid #1f2937; color: #9ca3af;
  border-radius: 8px; padding: 6px 12px; font: 600 12.5px 'Inter', sans-serif; cursor: pointer;
}
.tab.active { background: #1f2937; color: #fff; border-color: #374151; }

.pool-list { display: flex; flex-direction: column; gap: 4px; max-height: 72vh; overflow-y: auto; }
.pool-row {
  display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center;
  padding: 8px; border-radius: 10px; cursor: pointer; border: 1px solid transparent;
}
.pool-row:hover { background: #0d1526; }
.pool-row.selected { background: #0d1526; border-color: #14b8a6; }
.pool-logo { width: 30px; height: 30px; border-radius: 50%; background: #1f2937; object-fit: cover; }
.pool-logo-letter {
  width: 30px; height: 30px; border-radius: 50%; background: #134e4a; color: #5eead4;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px;
}
.pool-sym { font-weight: 700; color: #fff; font-size: 13.5px; }
.pool-sub { color: #6b7280; font-size: 11.5px; margin-top: 1px; }
.pool-right { text-align: right; }
.pool-price { font-weight: 600; color: #f3f4f6; font-size: 13px; }
.up { color: #22c55e; } .down { color: #ef4444; }

/* ---------- middle column ---------- */
.col-mid { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.chart-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.chart-title { font-weight: 700; font-size: 15px; color: #fff; }
.tf-group { display: flex; gap: 4px; }
.tf-group button {
  background: #0a0f1a; border: 1px solid #1f2937; color: #9ca3af; border-radius: 7px;
  padding: 4px 9px; font: 600 12px 'Inter', sans-serif; cursor: pointer;
}
.tf-group button.active { background: #14b8a6; border-color: #14b8a6; color: #04241f; }
.chart { width: 100%; height: 380px; min-width: 0; overflow: hidden; }

.table-wrap { overflow-x: auto; max-height: 340px; overflow-y: auto; }
table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
th { text-align: left; color: #6b7280; font-weight: 600; padding: 6px 8px; border-bottom: 1px solid #1f2937; position: sticky; top: 0; background: #111827; }
td { padding: 6px 8px; border-bottom: 1px solid #16202f; color: #d1d5db; white-space: nowrap; }
.side-buy { color: #22c55e; font-weight: 700; }
.side-sell { color: #ef4444; font-weight: 700; }
.wallet { color: #5eead4; font-family: ui-monospace, monospace; font-size: 12px; }

/* ---------- right column ---------- */
.col-right { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.info-head { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; }
.info-logo { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; background: #1f2937; }
.info-symbol { font-size: 18px; font-weight: 800; color: #fff; }
.info-name { color: #9ca3af; font-size: 12.5px; }
.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 14px; margin-bottom: 14px; }
.info-grid span { display: block; color: #6b7280; font-size: 11.5px; margin-bottom: 2px; }
.info-grid strong { color: #f3f4f6; font-size: 13.5px; font-weight: 600; }
.contract-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.contract {
  flex: 1; background: #0a0f1a; border: 1px solid #1f2937; border-radius: 8px;
  padding: 7px 9px; font-size: 11px; color: #9ca3af; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn {
  border-radius: 9px; padding: 8px 13px; font: 600 13px 'Inter', sans-serif; cursor: pointer;
  border: 1px solid #1f2937; background: #0a0f1a; color: #e5e7eb; text-decoration: none; display: inline-block; text-align: center;
}
.btn-ghost:hover { border-color: #14b8a6; color: #5eead4; }
.btn-trade { background: #14b8a6; border-color: #14b8a6; color: #04241f; width: 100%; font-weight: 700; }
.btn-trade:hover { background: #2dd4bf; }
.facts-title { font-weight: 700; color: #fff; margin-bottom: 8px; }
#nt-facts { min-height: 60px; color: #6b7280; font-size: 13px; }
/* Hidden until a real facts feed is wired. Do not call paid scan APIs on load. */
body.terminal-page .nt-term .facts-card { display: none !important; }

.muted { color: #6b7280; padding: 10px 4px; }

/* ---------- mobile: stack, chart first ---------- */
@media (max-width: 1020px) {
  .layout,
  .nt-term .layout {
    grid-template-columns: 1fr;
    padding: 12px;
    min-width: 0;
    max-width: 100%;
  }
  .col-left, .col-mid, .col-right, .col, .card, .chart-card, .tables-card, .info-card {
    min-width: 0;
    max-width: 100%;
  }
  .col-mid { order: -1; }
  .chart { height: 300px; min-width: 0; overflow: hidden; }
  .pool-list { max-height: 46vh; }
}

.is-hidden { display: none !important; }

.nt-term .layout { padding: 14px 20px 28px; }
@media (max-width: 1020px) {
  .nt-term .layout { padding: 12px; }
}
.nt-chart-canvas { width: 100%; height: 100%; display: block; }
.nt-term .search, .nt-term .chain-filter button, .nt-term .tab, .nt-term .tf-group button, .nt-term .btn {
  font-family: inherit;
}

/* Keep the terminal well dark in both site themes so figures stay readable. */
body.terminal-page .nt-term {
  background: #0a0f1a;
  color: #e5e7eb;
  margin: 0;
}
body.terminal-page .nt-term .card {
  background: #111827 !important;
  color: #e5e7eb !important;
  border: 1px solid #1f2937 !important;
  box-shadow: none !important;
}
body.terminal-page .nt-term .chart-title,
body.terminal-page .nt-term .info-symbol,
body.terminal-page .nt-term .pool-sym,
body.terminal-page .nt-term .facts-title,
body.terminal-page .nt-term .pool-price,
body.terminal-page .nt-term .info-grid strong { color: #f3f4f6; }
body.terminal-page .nt-term .search {
  background: #0a0f1a;
  color: #e5e7eb;
  border-color: #1f2937;
}
body.terminal-page .nt-term-wallet {
  background: #0d1322;
  color: #e5e7eb;
  border-bottom-color: #1f2937;
}
body.terminal-page .nt-term-wallet .btn { color: #e5e7eb; border-color: #374151; }

.nt-empty { padding: 12px 4px 8px; }
.nt-empty .muted { padding: 0 0 10px; margin: 0; }
.nt-empty .nt-retry { display: inline-block; }

/* ---------- terminal v2 (2026-11-29): watchlist stars + browser-only alerts ---------- */
.pool-row.nt-has-star { grid-template-columns: 30px minmax(0, 1fr) auto 26px; }
.nt-star { background: none; border: 0; color: #6b7280; font-size: 17px; line-height: 1; cursor: pointer; padding: 4px; min-width: 26px; min-height: 26px; }
.nt-star:hover, .nt-star:focus-visible { color: #FFC84E; }
.nt-star.nt-star-on { color: #FFC84E; }
.nt-card { min-width: 0; }
.nt-watch-row, .nt-alert-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid #1f2937; min-width: 0; font-size: 13px; }
.nt-watch-open { background: none; border: 0; color: #f3f4f6; font-weight: 700; cursor: pointer; padding: 0; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 50%; }
.nt-watch-rm { margin-left: auto; background: none; border: 1px solid #374151; color: #9ca3af; border-radius: 8px; font-size: 12px; padding: 3px 8px; cursor: pointer; }
.nt-alert-row.fired span { color: #9ca3af; }
.nt-muted { color: #9ca3af; font-size: 12.5px; margin: 6px 0; }
.nt-fine { font-size: 11.5px; }
.nt-alert-form { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; margin: 6px 0; }
.nt-alert-form[hidden] { display: none; }
.nt-input { background: #0a0f1a; color: #e5e7eb; border: 1px solid #1f2937; border-radius: 8px; padding: 6px 8px; font: inherit; font-size: 13px; min-width: 0; }
.nt-notice { background: rgba(255, 162, 50, .12); border: 1px solid #FFA232; color: #f3f4f6; border-radius: 10px; padding: 8px 10px; font-size: 13px; margin: 6px 0; }
.nt-notice[hidden] { display: none; }

/* ---------- watchlist tab (2026-11-29, additive) ---------- */
.info-title-wrap { flex: 1; min-width: 0; }
.info-sym-row { display: flex; align-items: center; gap: 8px; }
.info-sym-row .nt-star { font-size: 22px; min-width: 32px; min-height: 32px; }

.watch-bar { margin-bottom: 10px; }
.watch-bar[hidden] { display: none; }
.watch-signin {
  display: block;
  border: 1px solid #3CCBFF; border-radius: 8px; color: #3CCBFF;
  padding: 7px 10px; font: 600 12.5px inherit; margin-bottom: 8px;
  text-decoration: none;
}
.watch-signin:hover { color: #7ad8ff; }
.watch-signin[hidden] { display: none; }
.watch-sort { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.watch-sort button {
  background: #0a0f1a; color: #9ca3af; border: 1px solid #1f2937;
  border-radius: 8px; padding: 6px 11px; font: 600 12.5px inherit; cursor: pointer;
}
.watch-sort button.active {
  background: linear-gradient(90deg, #FFC84E, #FF6E2A); border-color: #FF6E2A; color: #1a1005;
}
.watch-sort-note { color: #FFC84E; font: 600 11.5px inherit; }
.watch-sort-note[hidden] { display: none; }
.watch-empty { font-size: 14px; padding: 16px 6px; }

.watch-row {
  display: flex; align-items: center; gap: 10px;
  min-height: 62px; padding: 9px 8px;
  border: 1px solid #1f2937; border-left: 3px solid #3CCBFF; border-radius: 10px;
  cursor: pointer; background: #0d1526;
}
.watch-row:hover { border-color: #374151; border-left-color: #3CCBFF; }
.watch-row.selected { border-color: #FFC84E; border-left-color: #3CCBFF; }
.watch-row.dragging { opacity: .45; }
.watch-row.drop-target { border-top: 2px solid #FFC84E; }
.watch-main { flex: 1; min-width: 0; }
.watch-sym-row { display: flex; align-items: center; gap: 7px; }
.watch-sym { font-size: 15px; }
.watch-chain {
  border: 1px solid #3CCBFF; color: #3CCBFF; border-radius: 999px;
  padding: 1px 7px; font: 700 10px inherit; letter-spacing: .4px; text-transform: uppercase; white-space: nowrap;
}
.watch-spark { width: 84px; height: 26px; flex: none; }
.watch-down { color: #FF5257; }
.watch-actions { display: flex; align-items: center; gap: 2px; flex: none; }
.watch-moves { display: none; flex-direction: column; gap: 2px; }
.watch-move {
  background: #0a0f1a; border: 1px solid #1f2937; color: #9ca3af; border-radius: 6px;
  width: 28px; height: 22px; font-size: 10px; line-height: 1; cursor: pointer; padding: 0;
}
.watch-move:active { border-color: #FFC84E; color: #FFC84E; }
.watch-remove {
  background: none; border: none; color: #6b7280; font-size: 15px; cursor: pointer; line-height: 1; padding: 6px 4px;
}
.watch-remove:hover { color: #FF5257; }
.watch-row .nt-star { font-size: 20px; padding: 6px 4px; }

@media (hover: none), (max-width: 640px) {
  .watch-moves { display: flex; }
  .watch-row { min-height: 68px; }
}
@media (max-width: 420px) {
  .watch-spark { width: 60px; }
  .watch-sym { font-size: 14px; }
}
