@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Space+Grotesk:wght@400;500;600;700&display=swap');


:root {
  --bg: #090a0b;
  --panel: #101214;
  --panel-alt: #141719;
  --line: #292d30;
  --line-bright: #3b4145;
  --text: #f2f4f3;
  --muted: #8b9295;
  --dim: #5f676b;
  --lime: #d9f36a;
  --amber: #f2bd61;
  --red: #ff6c65;
  --blue: #79b8ff;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Noto Sans CJK SC', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  line-height: 1.45;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
.topbar {
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  letter-spacing: .04em;
  font: 12px 'DM Mono', monospace;
}

.brand-mark { color: var(--lime); margin-right: 9px; }
.brand { color: var(--text); font-weight: 500; }
.muted { color: var(--muted); }
.connection { display: flex; align-items: center; gap: 8px; color: var(--lime); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 12px var(--lime); }
.shell { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 72px 0 100px; }
.mobile-shell { max-width: 430px; }
@media (max-width: 760px) {
  .topbar, .shell { width: calc(100% - 20px); }
  .shell { padding: 14px 0 26px; }
  .hero { grid-template-columns: 1fr; gap: 14px; padding-bottom: 18px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .grid { grid-template-columns: 1fr; }
  .panel.wide { grid-column: span 1; }
  .panel { padding: 16px; }
  h1 { font-size: 30px; }
  h2 { font-size: 19px; }
  .brand, .muted, .connection { font-size: 11px; }
  .topbar { min-height: 60px; }
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 48px; align-items: end; padding-bottom: 48px; }
.eyebrow { margin: 0 0 16px; color: var(--muted); font: 11px 'DM Mono', monospace; letter-spacing: .14em; }
h1, h2, p { margin-top: 0; }
code, .eyebrow, .pill, .time, .source, .platform, .hero-stat strong, .hero-stat small, .metrics strong, .empty, .gmgn-readout { font-family: 'DM Mono', monospace; }
h1 { max-width: 720px; margin-bottom: 22px; font-size: clamp(34px, 5vw, 64px); line-height: 1.06; letter-spacing: 0; font-weight: 600; }
h1 em { color: var(--lime); font-style: normal; }
.sub { max-width: 590px; margin-bottom: 0; color: var(--muted); font-size: 15px; }
.hero-stat { padding: 18px 0 2px; border-top: 1px solid var(--line); display: grid; gap: 5px; }
.hero-stat strong { color: var(--lime); font: 22px 'DM Mono', monospace; }
.hero-stat small { color: var(--muted); font: 11px 'DM Mono', monospace; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.metrics > div { padding: 17px 20px; border-right: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.metrics > div:first-child { padding-left: 0; }
.metrics > div:last-child { border-right: 0; }
.metrics span { color: var(--muted); }
.metrics strong { color: var(--lime); font: 15px 'DM Mono', monospace; }
.metrics .amber { color: var(--amber); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.panel { min-width: 0; padding: 24px; border: 1px solid var(--line); background: var(--panel); }
.panel.wide { grid-column: span 2; }
.panel-head { min-height: 44px; display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.panel-head .eyebrow { margin-bottom: 5px; }
.panel-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
h2 { margin-bottom: 0; font-size: 24px; line-height: 1.1; font-weight: 500; }
.icon-btn, .secondary, .primary, .mini-btn { border: 1px solid var(--line-bright); background: transparent; color: var(--text); }
.icon-btn { width: 36px; height: 36px; color: var(--lime); font-size: 20px; }
.mini-btn { min-height: 30px; padding: 0 10px; display: inline-flex; align-items: center; color: var(--lime); font-size: 12px; white-space: nowrap; }
.primary, .secondary { min-height: 42px; padding: 0 15px; }
.primary { border-color: var(--lime); background: var(--lime); color: #11150a; font-weight: 600; }
.secondary { margin: 14px 8px 0 0; color: var(--lime); }
button:hover { filter: brightness(1.14); }
label { display: block; margin: 0 0 14px; color: var(--muted); font-size: 12px; }
input, select { width: 100%; margin-top: 7px; padding: 11px 12px; border: 1px solid var(--line-bright); border-radius: 0; outline: none; background: var(--panel-alt); color: var(--text); }
input:focus, select:focus { border-color: var(--lime); }
.toggles { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 0; }
.toggle { display: flex; align-items: center; gap: 8px; margin: 0; color: var(--text); }
.toggle input { position: absolute; opacity: 0; width: 1px; }
.toggle span { width: 30px; height: 17px; position: relative; border: 1px solid var(--line-bright); background: var(--panel-alt); }
.toggle span:after { content: ''; position: absolute; width: 11px; height: 11px; top: 2px; left: 2px; background: var(--muted); transition: .15s; }
.toggle input:checked + span { border-color: var(--lime); }
.toggle input:checked + span:after { left: 15px; background: var(--lime); }
.pill { display: inline-block; padding: 4px 8px; border: 1px solid var(--line-bright); color: var(--muted); font: 10px 'DM Mono', monospace; white-space: nowrap; }
.pill.green { border-color: #788c35; color: var(--lime); }
.pill.amber { border-color: #96703b; color: var(--amber); }
.pill.red { border-color: #a64440; color: var(--red); }
.pill.gray { color: var(--muted); }
.live-toggle { margin-top: 0; }
.live-hint { margin: 8px 0 0; }
.feed, .orders { min-height: 92px; }
.token-balances { display: grid; gap: 2px; margin-top: 10px; }
.token-balances .gmgn-readout { border-top: 1px solid var(--line); padding-top: 9px; }
.empty { padding: 30px 0; color: var(--dim); text-align: center; font: 12px 'DM Mono', monospace; }
.event, .order { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 15px 0; border-top: 1px solid var(--line); }
.event-main { min-width: 0; flex: 1; }
.time, .source, code { color: var(--muted); font: 11px 'DM Mono', monospace; margin-right: 12px; }
.platform { color: var(--blue); font: 11px 'DM Mono', monospace; }
.message { overflow: hidden; margin-top: 7px; text-overflow: ellipsis; white-space: nowrap; }
.event-result { text-align: right; color: var(--lime); font: 11px 'DM Mono', monospace; }
.event-result.blocked { color: var(--red); }
.event-result small { display: block; max-width: 180px; color: var(--muted); }
.feed-toggle { width: 100%; margin-top: 12px; min-height: 38px; border: 1px solid var(--line-bright); background: var(--panel-alt); color: var(--lime); font: 12px 'DM Mono', monospace; }
.feed-toggle span { color: var(--muted); margin-left: 6px; }
.collapsed-hint { padding: 12px 0 2px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; font: 12px 'DM Mono', monospace; }
.order strong { color: var(--lime); font: 13px 'DM Mono', monospace; }
.qr-box { min-height: 120px; display: grid; place-items: center; border: 1px dashed var(--line-bright); }
.qr-box img { display: block; width: min(100%, 220px); height: auto; }
.hint, .save-msg { color: var(--muted); font-size: 11px; }
.gmgn-readout { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 0; font: 12px 'DM Mono', monospace; }
.monitor-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.monitor-actions .primary, .monitor-actions .secondary { margin-top: 14px; }
.gmgn-readout strong { color: var(--lime); font-weight: 500; }
.gmgn-orders { border-top: 1px solid var(--line); }
.monitor-groups { border-top: 1px solid var(--line); }
.monitor-group { border-bottom: 1px solid var(--line); }
.monitor-row { min-height: 66px; display: flex; align-items: center; gap: 12px; }
.expand-btn { width: 28px; height: 28px; border: 0; background: transparent; color: var(--lime); font-size: 20px; transition: transform .15s; }
.expand-btn.open { transform: rotate(90deg); }
.monitor-title { min-width: 0; flex: 1; display: grid; grid-template-columns: minmax(120px, 1fr) auto; gap: 3px 14px; align-items: center; }
.monitor-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.monitor-title code { margin: 0; }
.monitor-title small { grid-column: 1 / -1; color: var(--muted); font: 11px 'DM Mono', monospace; }
.icon-btn.danger { color: var(--red); border-color: transparent; }
.monitor-detail { display: none; padding: 0 40px 14px; }
.monitor-detail.open { display: block; }
.gmgn-orders .monitor-title code { color: var(--lime); }
.gmgn-orders .monitor-detail label { margin-bottom: 10px; }
.gmgn-preview { margin: 12px 0 0; padding: 14px; border: 1px solid var(--line-bright); background: var(--panel-alt); color: var(--text); white-space: pre-wrap; word-break: break-word; font: 12px 'DM Mono', monospace; }
.gmgn-schema { margin-bottom: 8px; }
@media (max-width: 720px) {
  .topbar, .shell { width: min(100% - 28px, 560px); }
  .topbar { min-height: 58px; }
  .topbar .muted { display: none; }
  .shell { padding-top: 42px; }
  .hero { grid-template-columns: 1fr; gap: 28px; padding-bottom: 32px; }
  h1 { font-size: 36px; }
  .sub { font-size: 14px; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
  .metrics > div, .metrics > div:first-child { padding: 13px 12px; }
  .metrics > div:nth-child(2) { border-right: 0; }
  .metrics > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
  .grid { grid-template-columns: 1fr; gap: 12px; }
  .panel.wide { grid-column: auto; }
  .panel { padding: 18px; }
  h2 { font-size: 21px; }
  .event { align-items: flex-start; gap: 10px; }
  .event-result small { max-width: 90px; }
  .message { white-space: normal; word-break: break-word; }
}
@media (max-width: 390px) {
  .topbar, .shell { width: calc(100% - 20px); }
  .brand { font-size: 11px; }
  h1 { font-size: 31px; }
  .panel { padding: 15px; }
}


.panel-head.slim { margin-top: 18px; margin-bottom: 10px; min-height: 34px; }
.compact { min-height: 34px; margin-top: 0; }
.pnl-summary { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 18px; }
.pnl-summary > div { border: 1px solid var(--line); background: var(--panel-alt); padding: 14px; display: grid; gap: 7px; }
.pnl-summary span { color: var(--muted); font-size: 11px; }
.pnl-summary strong { color: var(--lime); font: 18px 'DM Mono', monospace; }
.pnl-summary strong.red, .red { color: var(--red) !important; }
.pnl-summary strong.green, .green { color: var(--lime) !important; }
.pnl-history-section { margin-top: 18px; }
.pnl-history-section h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--text); }
.pnl-table { border-top: 1px solid var(--line); }
.pnl-row { display: grid; grid-template-columns: minmax(0, 1.3fr) auto auto; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font: 12px 'DM Mono', monospace; }
.pnl-row span { min-width: 0; color: var(--muted); }
.pnl-row b { display: block; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pnl-row small { display: block; color: var(--muted); margin-top: 3px; }
.pnl-row strong { color: var(--lime); font-weight: 500; }
.pnl-history-title { padding: 12px 0 5px; color: var(--muted); font-size: 11px; }
.pnl-calendar-wrap { margin-top: 18px; }
.pnl-calendar-wrap h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; color: var(--text); }
.pnl-calendar { border-top: 1px solid var(--line); padding-top: 10px; }
.pnl-calendar-title { color: var(--muted); font-size: 11px; margin-bottom: 10px; }
.pnl-calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.pnl-cal-head { color: var(--dim); text-align: center; font: 11px 'DM Mono', monospace; padding: 4px 0; }
.pnl-cal-cell { min-height: 70px; border: 1px solid var(--line); background: var(--panel-alt); padding: 8px; display: grid; align-content: start; gap: 4px; font: 11px 'DM Mono', monospace; }
.pnl-cal-cell b { color: var(--text); font-weight: 500; }
.pnl-cal-cell span { color: var(--muted); }
.pnl-cal-cell small { color: var(--dim); overflow: hidden; text-overflow: ellipsis; }
.pnl-cal-cell.green span { color: var(--lime); }
.pnl-cal-cell.red span { color: var(--red); }
.pnl-cal-cell.live { border-color: var(--amber); box-shadow: inset 0 0 0 1px rgba(255,193,7,.2); }
.pnl-cal-cell em { color: var(--amber); font-style: normal; font-size: 10px; }
@media (max-width: 900px) {
  .pnl-summary { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .pnl-summary { grid-template-columns: 1fr; }
  .pnl-row { grid-template-columns: minmax(0, 1fr) auto; }
  .pnl-row strong { grid-column: 1 / -1; }
  .pnl-calendar-grid { gap: 4px; }
  .pnl-cal-cell { min-height: 58px; padding: 5px; font-size: 10px; }
}

