:root {
  --bg: #0B0B0F; --panel: #15151C; --panel2: #1C1C25; --line: rgba(201,165,76,.16); --gold: #C9A54C; --gold2: #9C8550;
  --white: #F2EFE8; --muted: #8A8780; --green: #3DDC97; --red: #FF5A5F; --amber: #F0BE50; --sma: #6F8BFF;
  --ease: cubic-bezier(.22,.8,.26,1);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--white);
  font: 15px/1.4 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-variant-numeric: tabular-nums; }
html { overflow-x: hidden; }
body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); overflow-x: hidden; }
main, .view, .card { min-width: 0; max-width: 100%; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.top { display: flex; align-items: center; gap: 12px; padding: 14px 16px 8px; }
.logo { border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.brand { display: flex; flex-direction: column; flex: 1; }
.brand b { letter-spacing: .1em; font-size: 16px; }
.brand span { color: var(--gold2); font-size: 11px; letter-spacing: .06em; }
.pill { display: flex; align-items: center; gap: 4px; border: 1px solid var(--gold2); color: var(--gold);
  border-radius: 999px; padding: 3px 10px 3px 7px; font-weight: 700; font-size: 11px; letter-spacing: .1em; }
.pill svg { width: 15px; height: 15px; }
.pill.real { border-color: var(--red); color: var(--red); }
main { padding: 4px 16px 8px; min-height: 60vh; }
.view { animation: slide .32s var(--ease) both; }
.view.back { animation-name: slideback; }
@keyframes slide { from { opacity: 0; transform: translateX(22px); } }
@keyframes slideback { from { opacity: 0; transform: translateX(-22px); } }
.enter { animation: rise .4s var(--ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
.label { color: var(--gold2); font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; margin: 20px 2px 8px; }
.card { background: linear-gradient(160deg, #1A1A22, #131319); border: 1px solid var(--line); border-radius: 16px;
  padding: 14px 16px; margin-bottom: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.28); }
.tap { cursor: pointer; transition: transform .15s var(--ease); }
.tap:active, button:active { transform: scale(.97); }
.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero { font-size: 40px; font-weight: 700; letter-spacing: -.02em; margin: 2px 0 6px; }
.hero small { font-size: 20px; color: var(--gold); margin-left: 6px; font-weight: 600; }
.big { font-size: 19px; font-weight: 700; }
.name { font-weight: 600; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .center { text-align: center; }
.up { color: var(--green); } .down { color: var(--red); } .gold { color: var(--gold); } .amber { color: var(--amber); }
.chip { display: inline-block; padding: 4px 11px; border-radius: 999px; font-weight: 600; font-size: 13px;
  background: rgba(255,255,255,.05); }
.chip.up { background: rgba(61,220,151,.12); } .chip.down { background: rgba(255,90,95,.12); }
.note { color: var(--muted); font-size: 12px; margin: 8px 2px; }
.warn { background: rgba(240,190,80,.1); border: 1px solid rgba(240,190,80,.35); color: var(--amber); border-radius: 12px;
  padding: 10px 12px; font-size: 13px; margin: 8px 0; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--muted); margin-right: 7px; }
.dot.verde, .dot.ok { background: var(--green); } .dot.rojo, .dot.bad { background: var(--red); }
.dot.amarillo, .dot.pausa { background: var(--amber); }
.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; margin: 6px 0 10px; }
.seg button { flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 7px 0; border-radius: 9px; transition: background .2s, color .2s; }
.seg button.on { background: rgba(201,165,76,.16); color: var(--gold); }
.chart { position: relative; height: 230px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #15151C; }
.chart.tall { height: 360px; }
.chart .reveal { position: absolute; inset: 0; background: #15151C; z-index: 3; pointer-events: none;
  transform-origin: right; animation: reveal .7s var(--ease) .05s both; }
@keyframes reveal { to { transform: scaleX(0); } }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); margin: 8px 2px; }
.legend i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; background: var(--green); margin-right: 6px; vertical-align: middle; }
.legend i.spy { background: var(--muted); } .legend i.sma { background: var(--sma); } .legend i.don { background: var(--gold2); }
.legend i.stop { background: var(--red); }
.xhair { font-size: 12px; color: var(--muted); min-height: 18px; margin: 6px 2px 0; }
.donut { display: flex; align-items: center; gap: 16px; }
.donut svg { width: 120px; height: 120px; transform: rotate(-90deg); flex: none; }
.donut circle { fill: none; stroke-width: 6; transition: stroke-dasharray .9s var(--ease); stroke-linecap: butt; }
.donut ul { list-style: none; margin: 0; padding: 0; flex: 1; font-size: 13px; }
.donut li { display: flex; justify-content: space-between; padding: 3px 0; }
.donut li i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 8px; }
.bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.07); overflow: hidden; margin: 9px 0 6px; }
.bar b { display: block; height: 100%; background: linear-gradient(90deg, var(--gold2), var(--gold)); border-radius: 3px;
  transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease); }
.bar b.full { background: linear-gradient(90deg, #2BAF77, var(--green)); }
.conds { display: flex; gap: 6px; flex-wrap: wrap; }
.cond { font-size: 11.5px; padding: 3px 8px; border-radius: 999px; background: rgba(255,90,95,.1); color: #E99; }
.cond.ok { background: rgba(61,220,151,.1); color: var(--green); }
.kv { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 12px; font-size: 14px; }
.kv span { color: var(--muted); }
.op + .op { border-top: 1px solid var(--line); }
.op { padding: 10px 0; }
.tag { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; margin-right: 7px; }
.tag.compra { background: rgba(61,220,151,.12); color: var(--green); } .tag.venta { background: rgba(255,90,95,.12); color: var(--red); }
.motivo { font-size: 13px; color: #CFCBC2; margin-top: 4px; }
.chips { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 6px 0; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; background: var(--panel); border: 1px solid var(--line); color: var(--muted); border-radius: 999px;
  padding: 6px 12px; font: inherit; font-size: 13px; }
.chips button.on { color: var(--gold); border-color: var(--gold2); background: rgba(201,165,76,.1); }
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { background: linear-gradient(160deg, #1A1A22, #131319); border: 1px solid var(--line); border-radius: 16px; padding: 12px 14px; }
.stat span { display: block; color: var(--gold2); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.stat b { font-size: 21px; }
.gauges { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gauge { text-align: center; }
.gauge svg { width: 120px; height: 66px; }
.gauge .trk { stroke: rgba(255,255,255,.08); stroke-width: 10; }
.gauge .val { stroke: var(--gold); stroke-width: 10; transition: stroke-dashoffset 1s var(--ease); }
.gauge b { display: block; font-size: 18px; margin-top: -6px; }
.flash-up { animation: fu .9s ease; } .flash-down { animation: fd .9s ease; }
@keyframes fu { 30% { color: var(--green); text-shadow: 0 0 12px rgba(61,220,151,.6); } }
@keyframes fd { 30% { color: var(--red); text-shadow: 0 0 12px rgba(255,90,95,.6); } }
.sk { position: relative; overflow: hidden; background: #17171E; border-radius: 16px; margin-bottom: 10px; }
.sk::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, rgba(201,165,76,.09), transparent); animation: shim 1.2s infinite; }
@keyframes shim { to { transform: translateX(100%); } }
.foot { text-align: center; color: var(--gold2); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; padding: 10px 0 4px; }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; display: flex; z-index: 10; padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  background: rgba(11,11,15,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
.tabs button { flex: 1; background: none; border: 0; color: var(--muted); display: flex; flex-direction: column; align-items: center;
  gap: 2px; font: inherit; font-size: 10px; padding: 4px 0; transition: color .2s; }
.tabs button.on { color: var(--gold); }
.ind { position: absolute; top: 0; left: 0; height: 2px; background: var(--gold); border-radius: 2px;
  transition: transform .3s var(--ease); width: calc(100% / 6); }
.quiet .enter { animation: none; }
.backlink { display: inline-flex; align-items: center; gap: 4px; color: var(--gold); font-size: 14px; margin: 4px 0 6px; background: none; border: 0; font: inherit; padding: 0; }
.ptr { position: fixed; top: 6px; left: 50%; z-index: 20; margin-left: -19px; width: 38px; height: 38px; border-radius: 50%;
  background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: translateY(-50px); pointer-events: none; }
.ptr img { border-radius: 50%; }
.ptr.go img { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.slider { width: 100%; accent-color: var(--gold); margin: 10px 0 2px; height: 28px; }
.ticks { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ticks b { color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bar b { transform: none; }
}
