:root {
  --bg: #07090c;
  --panel: #0d1117;
  --panel2: #111821;
  --line: #1d2631;
  --line2: #16202b;
  --text: #edf2f7;
  --muted: #87919d;
  --dim: #5f6874;
  --green: #37d399;
  --blue: #6cb6ff;
  --amber: #f2c36b;
  --red: #ff6673;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --sans: Inter, system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); font-family: var(--sans); }
button, input { font: inherit; }
.shell {
  display: grid;
  grid-template-columns: 360px minmax(560px, 1fr) 360px;
  grid-template-rows: 58px calc(100vh - 58px);
  min-height: 100vh;
}
.topbar {
  grid-column: 1 / 4;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 18px;
  border-bottom: 1px solid var(--line);
  background: #090d12;
}
.brand {
  display: flex;
  align-items: center;
  min-width: 154px;
  white-space: nowrap;
  font-size: 22px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: .08em;
}
.brand-dopa { color: var(--text); }
.brand-meme { color: var(--green); }
.search { display: flex; width: 100%; gap: 8px; }
.search input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  border-radius: 6px;
  padding: 9px 11px;
  font-family: var(--mono);
  font-size: 12px;
  outline: none;
}
.search button, .rail-head button, .intervals button, .tabs button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 11px;
  cursor: pointer;
}
.search button:hover, .rail-head button:hover, .intervals button:hover, .tabs button:hover { color: var(--text); border-color: #304154; }
.health { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
#statusDot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); display: inline-block; }
#statusDot.ok { background: var(--green); box-shadow: 0 0 12px rgba(55,211,153,.7); }
#statusDot.bad { background: var(--red); }
.user-chip { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--panel); border-radius: 7px; padding: 6px 8px; color: var(--muted); font-size: 12px; }
.user-chip button { border: 0; background: transparent; color: var(--dim); cursor: pointer; padding: 2px 4px; }
.user-chip button:hover { color: var(--red); }
.role-badge {
  border: 1px solid rgba(55,211,153,.35) !important;
  background: rgba(55,211,153,.09) !important;
  color: var(--green) !important;
  border-radius: 999px !important;
  padding: 3px 7px !important;
  font: 800 10px var(--mono) !important;
  letter-spacing: .04em;
}
.role-badge.beta {
  border-color: rgba(108,182,255,.35) !important;
  background: rgba(108,182,255,.08) !important;
  color: var(--blue) !important;
}
.role-badge.member { display: none !important; }
.rail, .side { overflow: hidden; background: var(--panel); }
.rail { border-right: 1px solid var(--line); }
.side { border-left: 1px solid var(--line); display: flex; flex-direction: column; }
.rail-head, .section-head, .panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--line2);
}
.rail-head { min-height: 54px; padding: 8px 10px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; }
.rail-tabs, .window-tabs { display: grid; gap: 6px; }
.rail-tabs { grid-template-columns: 1fr 1fr; flex: 1; }
.window-tabs { grid-template-columns: 1fr 1fr; padding: 8px 10px; border-bottom: 1px solid var(--line2); }
.rail-tabs button, .window-tabs button {
  border: 1px solid var(--line);
  background: #0a1017;
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}
.rail-tabs button.on, .window-tabs button.on { color: var(--green); border-color: rgba(55,211,153,.42); background: rgba(55,211,153,.08); }
.list { overflow: auto; height: calc(100% - 102px); }
.item {
  border-bottom: 1px solid var(--line2);
  padding: 12px 14px;
  cursor: pointer;
}
.item:hover, .item.active { background: var(--panel2); }
.item.active { border-left: 2px solid var(--green); padding-left: 12px; }
.token-row { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; }
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #070d13;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 800;
  font-size: 13px;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.token-main { min-width: 0; }
.row1, .row2 { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.sym { font-weight: 800; font-size: 14px; }
.mint { font-family: var(--mono); font-size: 10px; color: var(--dim); }
.pill { font-size: 10px; color: var(--green); background: rgba(55,211,153,.1); border: 1px solid rgba(55,211,153,.2); border-radius: 999px; padding: 2px 7px; }
.pill.warn { color: var(--amber); background: rgba(242,195,107,.1); border-color: rgba(242,195,107,.2); }
.pill.bad { color: var(--red); background: rgba(255,102,115,.1); border-color: rgba(255,102,115,.2); }
.meta { margin-top: 6px; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.detail { margin-top: 6px; color: #b8c2cc; font-size: 11px; line-height: 1.35; }
.socials { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.social {
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--blue);
  text-decoration: none;
  font: 700 9px var(--mono);
  padding: 3px 5px;
  background: rgba(108,182,255,.07);
}
.social:hover { border-color: rgba(108,182,255,.55); color: var(--text); }
.workbench { overflow: auto; padding: 16px 22px 34px; }
.workbench-search {
  width: 100%;
  margin: 0 0 14px;
}
.workbench-search input {
  padding: 11px 12px;
  font-size: 12px;
}
.workbench-search button {
  min-width: 54px;
}
.hero {
  display: flex;
  gap: 20px;
  align-items: center;
  min-height: 104px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}
.token-identity { display: grid; grid-template-columns: 58px 1fr; gap: 14px; align-items: center; min-width: 0; }
.token-avatar {
  width: 58px;
  height: 58px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #070d13;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green);
  font-weight: 900;
  font-size: 20px;
}
.token-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.token-copy { min-width: 0; }
.title-line { display: flex; align-items: end; gap: 12px; min-width: 0; }
.header-socials { display: flex; gap: 5px; align-items: center; padding-bottom: 8px; flex-wrap: wrap; }
.eyebrow, .label { color: var(--green); font-size: 11px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
h1 { margin: 8px 0 6px; font-size: clamp(28px, 4vw, 58px); line-height: .95; letter-spacing: 0; }
p { margin: 0; color: var(--muted); max-width: 720px; }
.metric-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 14px;
}
.metric { background: var(--panel); padding: 12px; }
.metric span { display: block; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.metric b { display: block; margin-top: 6px; font: 700 15px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-section, .panel { border: 1px solid var(--line); background: var(--panel); margin-top: 18px; }
.section-head { min-height: 54px; padding: 10px 14px; }
.section-head strong { display: block; margin-top: 3px; }
.intervals { display: flex; gap: 5px; }
.intervals button { padding: 6px 9px; font-family: var(--mono); font-size: 11px; }
.intervals button.on { color: var(--green); border-color: rgba(55,211,153,.45); background: rgba(55,211,153,.1); }
.chart { height: 420px; background: #08111a; position: relative; }
.empty { color: var(--dim); height: 100%; display: flex; align-items: center; justify-content: center; }
.intel-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; }
.panel-head { padding: 12px 14px; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.panel-head b { color: var(--dim); font-size: 10px; }
.panel-body { padding: 14px; min-height: 136px; color: #cdd5de; line-height: 1.55; }
.muted { color: var(--muted); }
.kv { display: grid; grid-template-columns: 118px 1fr; gap: 8px; padding: 5px 0; border-bottom: 1px solid var(--line2); }
.kv:last-child { border-bottom: none; }
.kv span { color: var(--dim); }
.kv b { font-weight: 600; }
.tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 10px; border-bottom: 1px solid var(--line2); }
.tabs button { padding: 7px 6px; font-size: 11px; }
.tabs button.on { color: var(--green); border-color: rgba(55,211,153,.4); background: rgba(55,211,153,.08); }
.side .list { height: calc(100% - 55px); }
.tool-panel { display: none; min-height: 0; flex: 1; overflow: hidden; }
.tool-panel.on { display: flex; flex-direction: column; }
.tool-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-bottom: 1px solid var(--line2); }
.tool-actions input {
  min-width: 0;
  border: 1px solid var(--line);
  background: #0a1017;
  color: var(--text);
  border-radius: 6px;
  padding: 8px 9px;
  font: 12px var(--mono);
  outline: none;
}
.tool-actions input:focus { border-color: #304154; }
.tool-actions button, .wide-action {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 10px;
  cursor: pointer;
}
.tool-actions button:hover, .wide-action:hover { color: var(--text); border-color: #304154; }
.wide-action { margin: 10px; width: calc(100% - 20px); font-size: 12px; }
.tool-list { overflow: auto; flex: 1; padding: 8px 10px 14px; }
.tool-card {
  border: 1px solid var(--line2);
  background: #0a1017;
  border-radius: 7px;
  padding: 10px;
  margin-bottom: 8px;
  cursor: pointer;
}
.tool-card:hover { border-color: #304154; background: var(--panel2); }
.tool-card-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tool-card-title { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 800; }
.tool-card-title img { width: 26px; height: 26px; border-radius: 6px; object-fit: cover; background: var(--panel); }
.tool-card-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tool-card-meta { margin-top: 7px; color: var(--muted); font: 11px var(--mono); }
.tool-card button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  border-radius: 5px;
  cursor: pointer;
  padding: 4px 7px;
}
.tool-card button:hover { color: var(--red); border-color: rgba(255,102,115,.35); }
.pf-total { border: 1px solid var(--line); background: #0a1017; border-radius: 7px; padding: 12px; margin-bottom: 10px; }
.pf-total span { display: block; color: var(--dim); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; }
.pf-total b { display: block; margin-top: 5px; font: 800 24px var(--mono); }
.chat-tool { min-height: 0; }
.chat-msgs { flex: 1; overflow: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-hint { color: var(--dim); font-size: 12px; line-height: 1.5; }
.msg { font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.msg.user { align-self: flex-end; max-width: 88%; color: #dff7ec; background: rgba(55,211,153,.09); border: 1px solid rgba(55,211,153,.18); border-radius: 10px 10px 3px 10px; padding: 8px 10px; }
.msg.bot { align-self: flex-start; color: #cdd5de; }
.chat-input { display: grid; grid-template-columns: 1fr 42px; gap: 8px; padding: 10px; border-top: 1px solid var(--line2); }
.chat-input input {
  min-width: 0;
  border: 1px solid var(--line);
  background: #0a1017;
  color: var(--text);
  border-radius: 6px;
  padding: 9px 10px;
  outline: none;
}
.chat-input button { border: none; border-radius: 6px; background: var(--green); color: #06231a; font-weight: 900; cursor: pointer; }
.chat-input button:disabled { opacity: .5; cursor: default; }
.pos { color: var(--green); }
.neg { color: var(--red); }
.gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  align-items: center;
  justify-content: center;
  background: #05070a;
  padding: 4vh 4vw;
}
.gate-box {
  width: min(1200px, 100%);
  min-height: 88vh;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  text-align: center;
}
.gate-logo {
  width: min(82vw, 900px);
  height: min(68vh, 720px);
  border-radius: 0;
  object-fit: contain;
  border: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.gate-tag { color: #b8c2cc; line-height: 1.55; max-width: 390px; }
.gate-note { color: var(--dim); font-size: 12px; min-height: 14px; }
.x-btn {
  border: 0;
  background: var(--green);
  color: #04140d;
  border-radius: 8px;
  padding: 12px 22px;
  font-weight: 900;
  cursor: pointer;
  font-size: 14px;
}
.x-btn:disabled { opacity: .5; cursor: default; }
.x-btn.ghost { background: var(--panel2); color: var(--muted); border: 1px solid var(--line); }
.overlay-panel {
  position: fixed;
  inset: 0;
  z-index: 45;
  align-items: stretch;
  justify-content: center;
  background: rgba(5,7,10,.96);
  padding: 0 18px 28px;
  overflow: auto;
}
.overlay-box {
  width: min(1040px, 100%);
  min-height: 100vh;
  background: var(--bg);
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 0 18px 28px;
}
.report-box { width: min(640px, 100%); min-height: auto; margin: auto 0; border: 1px solid var(--line); border-radius: 8px; }
.overlay-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.overlay-head b { font-size: 18px; }
.overlay-head button, .admin-row button, .report-tabs button {
  border: 1px solid var(--line);
  background: var(--panel2);
  color: var(--muted);
  border-radius: 6px;
  padding: 8px 12px;
  cursor: pointer;
}
.overlay-head button:hover, .admin-row button:hover, .report-tabs button:hover { color: var(--text); border-color: #304154; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding-top: 18px; }
.overlay-subhead { color: var(--green); font: 800 11px var(--mono); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 10px; }
.admin-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; margin-bottom: 12px; }
.admin-row input, .admin-row select, .report-box textarea {
  border: 1px solid var(--line);
  background: #0a1017;
  color: var(--text);
  border-radius: 6px;
  padding: 9px 10px;
  outline: none;
}
.admin-row select { color: var(--muted); }
.overlay-list { display: flex; flex-direction: column; gap: 8px; }
.overlay-item {
  border: 1px solid var(--line2);
  background: var(--panel);
  border-radius: 7px;
  padding: 10px;
}
.overlay-item.compact {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
}
.overlay-item.compact button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--dim);
  border-radius: 6px;
  padding: 6px 9px;
  cursor: pointer;
}
.overlay-item.compact button:hover { color: var(--red); border-color: rgba(255,102,115,.35); }
.overlay-line { display: flex; gap: 10px; align-items: baseline; min-width: 0; }
.overlay-line b { color: var(--text); }
.overlay-line span { color: var(--green); font: 700 11px var(--mono); }
.overlay-line em { margin-left: auto; color: var(--dim); font: normal 10px var(--mono); }
.overlay-text { margin-top: 8px; color: #cdd5de; line-height: 1.45; white-space: pre-wrap; }
.overlay-url { margin-top: 8px; color: var(--dim); font: 10px var(--mono); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.report-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.report-tabs button.on { color: var(--green); border-color: rgba(55,211,153,.42); background: rgba(55,211,153,.08); }
.report-box textarea { min-height: 170px; width: 100%; resize: vertical; font: 13px/1.5 var(--sans); }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 320px 1fr; }
  .side { display: none; }
  .topbar { grid-column: 1 / 3; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .topbar { position: sticky; top: 0; z-index: 4; }
  .search { width: 100%; }
  .rail { height: 300px; border-right: none; border-bottom: 1px solid var(--line); }
  .hero { display: block; }
  .token-identity { grid-template-columns: 46px 1fr; }
  .token-avatar { width: 46px; height: 46px; }
  .title-line { display: block; }
  .header-socials { padding-bottom: 0; margin-bottom: 8px; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intel-grid { grid-template-columns: 1fr; }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-row { grid-template-columns: 1fr; }
}
