/* NMCT.T desktop. Dark navy Pulse-style board. Responsive-friendly, desktop-first. */
:root {
  --bg: #070b16;
  --bg-2: #0a1020;
  --panel: #0d1426;
  --card: #11192c;
  --card-h: #172136;
  --line: #1c2740;
  --line-2: #24304c;
  --text: #e8eef8;
  --muted: #7d8aa3;
  --faint: #5b6780;
  --green: #3ee08f;
  --green-bg: rgba(62, 224, 143, 0.14);
  --red: #ff5d73;
  --red-bg: rgba(255, 93, 115, 0.14);
  --amber: #f5c15a;
  --amber-bg: rgba(245, 193, 90, 0.14);
  --blue: #4c7dff;
  --blue-2: #3b6cff;
  --blue-bg: rgba(76, 125, 255, 0.16);
  --override: #ff8a4c;
  --near: #e8c44d;
  --font: "Segoe UI", "SF Pro Text", ui-sans-serif, system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%;
  background: var(--bg); color: var(--text);
  font: 13px/1.35 var(--font);
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
.hidden, [hidden] { display: none !important; }

.topbar {
  display: flex; align-items: center; gap: 16px;
  height: 52px; padding: 0 16px;
  background: var(--bg-2); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.brand { font-weight: 700; letter-spacing: 0.08em; font-size: 15px; color: #f2f6ff; }
.search { display: flex; flex: 1; max-width: 520px; gap: 8px; }
.search input, .inline input, .trade-box input, .preset-edit input {
  flex: 1; min-width: 0;
  background: var(--panel); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 7px 10px; outline: none;
}
.search input:focus, .inline input:focus, .trade-box input:focus { border-color: var(--blue); }
.search button, .inline button, .ghost, .trade-box button, .modal-card button {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 6px 12px; color: var(--text);
}
.search button, .inline button { background: var(--blue-2); border-color: transparent; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.sol-pill {
  background: var(--blue-bg); color: #c9d7ff;
  border: 1px solid rgba(76,125,255,0.35);
  border-radius: 999px; padding: 4px 10px;
  font-variant-numeric: tabular-nums; font-weight: 600;
}
.toggle { display: flex; align-items: center; gap: 6px; color: var(--muted); user-select: none; }
.toggle input { accent-color: var(--blue); }
.ghost { background: transparent; }
.ghost:hover { filter: brightness(1.08); }

.shell { display: flex; height: calc(100% - 52px - 28px); min-height: 0; }
.sidebar {
  width: 300px; flex-shrink: 0;
  display: flex; flex-direction: column;
  background: var(--bg-2); border-right: 1px solid var(--line); min-width: 0;
}
.side-head { padding: 12px 14px 8px; }
.side-head h1 { margin: 0; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.side-tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 0 10px 10px; border-bottom: 1px solid var(--line); }
.stab {
  background: transparent; border: 1px solid transparent;
  border-radius: 999px; padding: 4px 8px; color: var(--muted); font-size: 12px;
}
.stab:hover { color: var(--text); background: var(--card); }
.stab.on { color: var(--text); background: var(--card); border-color: var(--line-2); }
.side-body { flex: 1; overflow: auto; min-height: 0; padding: 8px; }
.side-panel { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.side-list { display: flex; flex-direction: column; gap: 6px; min-height: 80px; }
.subh { margin: 14px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.inline { display: flex; gap: 6px; margin-bottom: 8px; }
.inline input { padding: 5px 8px; }
.inline button { padding: 5px 8px; }

.board { display: flex; flex: 1; min-width: 0; min-height: 0; }
.col {
  flex: 1; min-width: 280px;
  display: flex; flex-direction: column;
  border-right: 1px solid var(--line); background: var(--bg); min-height: 0;
}
.col:last-child { border-right: 0; }
.col-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px 8px; border-bottom: 1px solid var(--line);
  background: var(--panel); flex-shrink: 0;
}
.col-head h2 { margin: 0; font-size: 13px; font-weight: 650; }
.count { font-size: 11px; color: var(--muted); background: var(--card); border-radius: 999px; padding: 1px 7px; }
.list { flex: 1; overflow: auto; min-height: 0; padding: 6px; }

/* Pulse-style coin card */
.pcard {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  column-gap: 10px; row-gap: 2px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; margin-bottom: 6px;
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.pcard:hover { background: var(--card-h); border-color: var(--line-2); }
.pcard.focus, .pcard.new { outline: 1px solid var(--blue); }
.pcard.call-normal { box-shadow: inset 3px 0 0 var(--green); }
.pcard.call-near_miss { box-shadow: inset 3px 0 0 var(--near); }
.pcard.call-override { box-shadow: inset 3px 0 0 var(--override); }
.pcard.call-rug { box-shadow: inset 3px 0 0 var(--red); }
.pcard.call-milestone { box-shadow: inset 3px 0 0 var(--green); }
.avcol { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.av {
  width: 52px; height: 52px; border-radius: 10px;
  background: #1a2340; overflow: hidden;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700; color: #bcd0ff; flex-shrink: 0;
}
.av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mint-short { font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }
.body { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.nm { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.nm .name { font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm .tick { color: var(--muted); font-size: 11px; flex-shrink: 0; }
.meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
  color: var(--faint); font-size: 11px;
}
.meta .soc { display: flex; gap: 4px; }
.meta .soc a { color: var(--muted); font-size: 10px; font-weight: 700; }
.right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 3px;
  font-variant-numeric: tabular-nums; min-width: 86px;
}
.right .mc { font-weight: 650; }
.right .vol, .right .ftx { color: var(--muted); font-size: 11px; }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip {
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  border-radius: 999px; padding: 1px 6px;
}
.chip.up { color: var(--green); background: var(--green-bg); }
.chip.down { color: var(--red); background: var(--red-bg); }
.chip.flat { color: var(--muted); background: var(--card-h); }
.badge {
  font-size: 10px; font-weight: 650; border-radius: 4px;
  padding: 1px 5px; background: var(--card-h); color: var(--muted); white-space: nowrap;
}
.badge.dip { color: var(--green); background: var(--green-bg); }
.badge.spike { color: var(--red); background: var(--red-bg); }
.badge.modeb { color: #c9d7ff; background: var(--blue-bg); }
.badge.smart { color: var(--amber); background: var(--amber-bg); }
.badge.grade-A { color: var(--green); }
.badge.grade-F { color: var(--red); }
.badge.call { color: #c9d7ff; background: var(--blue-bg); }
.badge.near { color: var(--near); background: var(--amber-bg); }
.badge.ovr { color: var(--override); background: rgba(255,138,76,0.14); }
.buy-pill {
  background: var(--blue); color: #fff; border: 0;
  border-radius: 999px; padding: 3px 10px;
  font-size: 11px; font-weight: 700; white-space: nowrap;
}
.buy-pill:hover { background: #5b8aff; }

/* Sidebar position cards — stacked, no overlap */
.pos {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px;
}
.pos h3 { margin: 0; font-size: 13px; }
.pos .row { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.pos .note { color: var(--faint); font-size: 11px; word-break: break-word; }
.pos .sells { display: flex; flex-wrap: wrap; gap: 4px; }
.pos .sells button { background: #8a3a4a; border: 0; color: #fff; border-radius: 999px; padding: 3px 8px; font-size: 11px; font-weight: 700; }

.statusbar {
  height: 28px; display: flex; align-items: center; gap: 16px;
  padding: 0 14px; background: var(--bg-2); border-top: 1px solid var(--line);
  color: var(--muted); font-size: 11px; flex-shrink: 0;
}
.statusbar .grow { flex: 1; }
.ok-dot::before, .warn-dot::before {
  content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; margin-right: 6px;
}
.ok-dot::before { background: var(--green); }
.warn-dot::before { background: var(--amber); }

/* Coin trade view */
.coin-view {
  display: flex; flex-direction: column;
  height: calc(100% - 52px - 28px); min-height: 0; background: var(--bg);
}
.coin-top { padding: 8px 14px 6px; border-bottom: 1px solid var(--line); background: var(--bg-2); }
.coin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-top: 6px; }
.coin-id { display: flex; align-items: center; gap: 10px; }
.coin-id .av { width: 44px; height: 44px; }
.coin-metrics { display: flex; flex-wrap: wrap; gap: 14px 18px; font-variant-numeric: tabular-nums; }
.coin-metrics .k { display: block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--faint); }
.coin-metrics .v { font-weight: 650; }
.stats5 { display: flex; gap: 18px; margin-top: 8px; font-size: 12px; }
.stats5 .up { color: var(--green); } .stats5 .down { color: var(--red); }
.coin-main { display: flex; flex: 1; min-height: 0; }
.coin-chart { flex: 1; min-width: 0; padding: 8px; display: flex; flex-direction: column; }
.chart-tools { display: flex; gap: 8px; margin: 0 0 6px; flex-wrap: wrap; align-items: center; }
.chart-intervals, .chart-toggles { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.chart-intervals button, .chart-toggles button {
  padding: 3px 8px; font-size: 11px; border-radius: 999px;
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  cursor: pointer;
}
.chart-intervals button.on, .chart-toggles button.on { background: var(--blue); border-color: transparent; font-weight: 700; color: #fff; }
.chart-ohlc { font-size: 11px; color: var(--muted); flex: 1; min-width: 140px; font-variant-numeric: tabular-nums; }
.chart-attr { font-size: 10px; color: var(--faint); text-decoration: none; margin-left: auto; }
.chart-attr:hover { color: var(--muted); }
.chart-label {
  position: absolute; top: 8px; left: 10px; z-index: 2;
  font-size: 11px; color: var(--muted); pointer-events: none; letter-spacing: 0.04em;
}
.chart-last {
  position: absolute; top: 8px; right: 10px; z-index: 2;
  font-size: 11px; color: var(--text); pointer-events: none;
}
.chart { flex: 1; min-height: 280px; background: #0a0f1c; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative; }
.chart iframe, .chart canvas { width: 100%; height: 100%; border: 0; display: block; }
.trade-box {
  width: 300px; flex-shrink: 0; border-left: 1px solid var(--line);
  background: var(--bg-2); padding: 10px; overflow: auto;
}
.trade-box h3 { margin: 0 0 8px; font-size: 13px; }
.unit-toggle, .preset-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.unit-toggle button, .preset-bar button { padding: 3px 8px; font-size: 11px; border-radius: 999px; }
.unit-toggle button.on, .preset-bar .on { background: var(--blue); border-color: transparent; font-weight: 700; }
.btn-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.btn-row button { padding: 8px 4px; font-weight: 700; border-radius: 8px; }
.btn-row.buy button { background: var(--blue-2); border: 0; }
.btn-row.sell button { background: #8a3a4a; border: 0; color: #fff; }
.equiv { font-size: 11px; color: var(--muted); margin: -4px 0 8px; }
.holding {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px; margin: 10px 0; font-size: 12px;
}
.holding .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.token-info { font-size: 12px; color: var(--muted); }
.token-info li { margin: 0 0 4px; }
.coin-bottom { border-top: 1px solid var(--line); height: 200px; display: flex; flex-direction: column; background: var(--bg-2); }
.coin-tabs { display: flex; gap: 6px; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.ctab { background: transparent; border: 0; color: var(--muted); padding: 4px 10px; border-radius: 6px; }
.ctab.on { background: var(--card); color: var(--text); }
.coin-tab { flex: 1; overflow: auto; padding: 8px 12px; font-size: 12px; }
.trade-head, .trade-row, .hold-row {
  display: grid; grid-template-columns: 44px 40px 62px 70px 78px 62px 72px; gap: 6px;
  padding: 3px 0; border-bottom: 1px solid var(--line);
  align-items: center;
}
.trade-head {
  position: sticky; top: 0; z-index: 1;
  color: var(--muted); font-size: 10px; letter-spacing: 0.04em;
  text-transform: uppercase; background: var(--bg-2);
  border-bottom: 1px solid var(--line-2); padding-bottom: 4px;
}
.trade-row { font-variant-numeric: tabular-nums; font-size: 11px; }
.trade-row.buy .type, .trade-row .type.up { color: #3ee08f; font-weight: 600; }
.trade-row.sell .type, .trade-row .type.down { color: #ff5d73; font-weight: 600; }
.trade-row .age, .trade-row .trader { color: var(--muted); }
@keyframes tradeFlashBuy {
  from { background: rgba(62, 224, 143, 0.22); }
  to { background: transparent; }
}
@keyframes tradeFlashSell {
  from { background: rgba(255, 93, 115, 0.22); }
  to { background: transparent; }
}
.trade-row.flash.buy { animation: tradeFlashBuy 1.1s ease-out; }
.trade-row.flash.sell { animation: tradeFlashSell 1.1s ease-out; }
.hold-row { grid-template-columns: 70px 1fr 1fr 2fr; }
.preset-edit { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 8px; }
.preset-edit .row { display: flex; gap: 4px; margin-bottom: 6px; flex-wrap: wrap; }
.preset-edit input { width: 70px; flex: 0 0 70px; padding: 4px 6px; }

.modal { position: fixed; inset: 0; background: rgba(2,6,16,0.65); display: grid; place-items: center; z-index: 30; }
.modal-card { width: min(520px, 92vw); background: var(--bg-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 18px; }
.modal-card h2 { margin: 0 0 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.danger { background: var(--blue) !important; border: 0 !important; font-weight: 700 !important; color: #fff !important; }
.warn { color: var(--amber); }
.error { color: var(--red); }
.muted { color: var(--muted); }
.small { font-size: 11px; }
.keys { list-style: none; padding: 0; }
.keys li { margin: 0 0 8px; color: var(--muted); }
kbd {
  display: inline-block; min-width: 1.4em; text-align: center;
  border: 1px solid var(--line-2); border-bottom-width: 2px;
  border-radius: 4px; padding: 1px 5px; color: var(--text); background: var(--card);
}
.report { padding: 8px; }
.report h3 { margin: 0 0 6px; font-size: 13px; }
.report p, .report .excerpt { color: var(--muted); margin: 0 0 10px; white-space: pre-wrap; }
.hit { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
.hit .box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px; }
.hit .box b { display: block; font-size: 16px; }
.news-item, .wallet-row { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px; margin-bottom: 6px; }
.news-item .src { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--faint); }
.wallet-box { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 8px; }
.wallet-box .addr { font-size: 11px; color: var(--muted); word-break: break-all; }
.empty { color: var(--faint); padding: 16px 8px; text-align: center; }

.login-body { display: grid; place-items: center; overflow: auto; }
.login-card { width: min(400px, 92vw); background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login-card h1 { margin: 0 0 8px; letter-spacing: 0.08em; }
.login-card label { display: block; margin: 16px 0 6px; color: var(--muted); }
.login-card input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 10px; }
.login-card button { margin-top: 16px; width: 100%; background: var(--blue); border: 0; border-radius: 8px; padding: 10px; font-weight: 700; }

@media (max-width: 1100px) { .sidebar { width: 260px; } .trade-box { width: 260px; } }
@media (max-width: 800px) {
  .shell { flex-direction: column; }
  .sidebar { width: 100%; height: 36%; border-right: 0; border-bottom: 1px solid var(--line); }
  .board, .coin-main { flex-direction: column; }
  .trade-box { width: 100%; }
}

.badge.catalyst { color: #ffd36a; background: rgba(255, 211, 106, 0.14); }
.badge.copycat { color: #c9c4b0; background: rgba(200, 200, 200, 0.1); }
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.vol-win, .tx-win { opacity: 0.65; font-size: 0.85em; margin-left: 4px; }
.cat-item { padding: 10px 0; border-bottom: 1px solid var(--line); }
.cat-item .terms { color: #ffd36a; }
.cat-coins { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }

/* Pulse filters */
.col-head-right { display: flex; align-items: center; gap: 8px; }
.hidden-count { font-size: 11px; color: var(--faint); }
.filter-btn {
  position: relative;
  display: grid; place-items: center;
  width: 26px; height: 26px; padding: 0;
  background: transparent; border: 1px solid transparent;
  border-radius: 7px; color: var(--muted);
}
.filter-btn:hover, .filter-btn.on { color: var(--text); background: var(--card); border-color: var(--line-2); }
.filter-btn.on { color: var(--blue); }
.filter-badge {
  position: absolute; top: -5px; right: -6px;
  min-width: 14px; height: 14px; padding: 0 3px;
  border-radius: 999px; background: var(--blue); color: #fff;
  font-size: 9px; font-weight: 700; line-height: 14px; text-align: center;
}
.filters-card { width: min(760px, 96vw); max-height: 86vh; overflow: auto; padding: 16px 18px 14px; }
.filters-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.filters-head h2 { margin: 0; }
.filters-head #filters-close { font-size: 18px; line-height: 1; padding: 2px 8px; }
.filters-col-tabs, .ff-subs { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 10px; }
.ftab, .fsub {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 5px 10px; color: var(--muted);
}
.ftab.on, .fsub.on { background: var(--blue-bg); border-color: transparent; color: var(--text); font-weight: 650; }
.switch-row { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; cursor: pointer; }
.switch-row input { accent-color: var(--blue); }
.ff-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 8px; }
.ff-chipbox input { width: 100%; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 4px; min-height: 0; margin: 4px 0; }
.kw-chip {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--blue-bg); border-radius: 999px; padding: 2px 6px 2px 8px;
  font-size: 11px;
}
.kw-chip button { background: none; border: 0; padding: 0 2px; color: var(--muted); line-height: 1; }
.ff-panel { margin-top: 4px; }
.ff-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.proto-pill, .quote-pill {
  background: var(--card); border: 1px solid var(--line-2);
  border-radius: 999px; padding: 5px 10px; color: var(--muted);
}
.proto-pill.on, .quote-pill.on { background: var(--blue-bg); border-color: transparent; color: var(--text); font-weight: 650; }
.range-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 8px 0; }
.range-row label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 11px; }
.range-row input, .range-row select {
  width: 110px; background: var(--bg); border: 1px solid var(--line-2);
  border-radius: 8px; padding: 6px 8px; color: var(--text);
}
.range-row select { width: 64px; }
.toggle-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 16px; }
.ff-space { margin: 10px 0 4px; }
.filters-actions { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; margin-top: 14px; align-items: center; }
.filters-presets { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.preset-slot.filled { border-color: var(--blue); color: var(--text); }
.small-btn { padding: 3px 8px; font-size: 11px; }
@media (max-width: 800px) {
  .ff-top { grid-template-columns: 1fr; }
  .toggle-grid { grid-template-columns: 1fr; }
}
