/* =====================================================================
   halex-m-trading-token-view.css — STAGING ONLY, NOT MERGED.
   HALEX-M Trading View + Token View upgrade styles.
   Every class is prefixed hm-tv-. Reuses the page's CSS variables
   (var(--panel2), var(--line), var(--gold), var(--muted), --text)
   with plain fallbacks, so the sheet degrades gracefully outside
   the page. Touch targets are >= 44px. Animations respect
   prefers-reduced-motion.
   ===================================================================== */
.hm-tv-trading,.hm-tv-token{
  border:1px solid var(--line,#2a2f3a); border-radius:14px;
  padding:14px; background:var(--panel2,#141821); margin:12px 0;
}
.hm-tv-chart-head{display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:10px}
.hm-tv-chart-title{font-size:15px; font-weight:700; line-height:1.3}
.hm-tv-badge{
  display:inline-block; font-size:11px; font-weight:700; letter-spacing:.04em;
  padding:6px 10px; border-radius:999px; border:1px solid;
  min-height:44px; line-height:1.4; box-sizing:border-box;
  display:inline-flex; align-items:center;
}
.hm-tv-badge-live{border-color:#2ee6c8; color:#2ee6c8}
.hm-tv-badge-fallback{border-color:#ffc24b; color:#ffc24b}
.hm-tv-note{font-size:13px; line-height:1.5; color:var(--muted,#9aa3b2); margin:8px 0}
.hm-tv-source{font-size:12px; line-height:1.5; color:var(--muted,#9aa3b2); margin:8px 0 0; word-break:break-word}

/* ---- chart ---- */
.hm-tv-chart{border:1px solid var(--line,#2a2f3a); border-radius:12px; padding:12px; margin:12px 0; overflow:hidden}
.hm-tv-chart-svg{width:100%; height:160px; display:block}
.hm-tv-grid{stroke:var(--line,#2a2f3a); stroke-width:.4; stroke-dasharray:3 3}
.hm-tv-chart-line{
  stroke:#ffc24b; stroke-width:1.6; vector-effect:non-scaling-stroke;
  stroke-dasharray:600; stroke-dashoffset:600;
  animation:hm-tv-draw 1.4s ease-out forwards;
}
.hm-tv-chart-dot{fill:#ffc24b; animation:hm-tv-pulse 2.4s ease-in-out infinite}
.hm-tv-chart-emptybody{font-size:28px; text-align:center; padding:28px 0; color:var(--muted,#9aa3b2)}
.hm-tv-chart-axis{display:flex; justify-content:space-between; gap:8px; font-size:11.5px; color:var(--muted,#9aa3b2); font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
@keyframes hm-tv-draw{to{stroke-dashoffset:0}}
@keyframes hm-tv-pulse{0%,100%{opacity:1}50%{opacity:.35}}

/* ---- bundle-flow diagram ---- */
.hm-tv-bundles{border:1px solid var(--line,#2a2f3a); border-radius:12px; padding:12px; margin:12px 0; overflow:hidden}
.hm-tv-bundle-svg{width:100%; height:180px; display:block}
.hm-tv-flow{stroke:#b45cff; stroke-width:1.2; vector-effect:non-scaling-stroke; stroke-dasharray:5 4; animation:hm-tv-flowdash 1.2s linear infinite}
.hm-tv-flow-dot{fill:#2ee6c8}
.hm-tv-node-wallet{fill:#ffc24b}
.hm-tv-node-pool{fill:#5aa9ff}
.hm-tv-node-label{fill:var(--text,#e8ecf1); font-size:4.5px; font-family:ui-monospace,SFMono-Regular,Menlo,monospace}
.hm-tv-bundles-empty{font-size:28px; text-align:center; padding:20px 0; color:var(--muted,#9aa3b2)}
@keyframes hm-tv-flowdash{to{stroke-dashoffset:-18}}

/* ---- token fields: staggered fade/slide-in ---- */
.hm-tv-fieldlist{list-style:none; margin:10px 0 0; padding:0; display:grid; gap:8px}
.hm-tv-field{
  display:grid; grid-template-columns:1fr auto; gap:4px 12px; align-items:baseline;
  padding:10px 0; border-bottom:1px solid var(--line,#2a2f3a);
  font-size:13.5px; line-height:1.5; min-height:44px; box-sizing:border-box;
  opacity:0; transform:translateY(8px);
  animation:hm-tv-fieldin .5s ease-out forwards;
  animation-delay:var(--hm-tv-delay,0ms);
}
.hm-tv-field:last-child{border-bottom:0}
.hm-tv-field-label{color:var(--muted,#9aa3b2)}
.hm-tv-field-value{text-align:right; word-break:break-word}
.hm-tv-field-source{grid-column:1 / -1; font-size:11.5px; color:var(--muted,#9aa3b2)}
@keyframes hm-tv-fieldin{to{opacity:1; transform:translateY(0)}}
.hm-tv-link{color:var(--gold,#ffc24b); min-height:44px; display:inline-flex; align-items:center; padding:6px 2px}
.hm-tv-btn{
  min-width:44px; min-height:44px; padding:10px 16px; font-size:14px;
  border-radius:10px; border:1px solid var(--line,#2a2f3a);
  background:var(--panel,#1b2130); color:var(--text,#e8ecf1); cursor:pointer;
  transition:background .2s ease, transform .15s ease;
}
.hm-tv-btn:active{transform:scale(.97)}
.hm-tv-btn:focus-visible{outline:2px solid var(--gold,#ffc24b); outline-offset:2px}

@media (max-width:700px){
  .hm-tv-field{grid-template-columns:1fr}
  .hm-tv-field-value{text-align:left}
}
@media (prefers-reduced-motion: reduce){
  .hm-tv-chart-line,.hm-tv-chart-dot,.hm-tv-flow,.hm-tv-field{animation:none !important}
  .hm-tv-field{opacity:1; transform:none}
  .hm-tv-btn{transition:none}
}
