:root {
  --bg: #07070a;
  --panel: #101014;
  --panel2: #16161c;
  --line: #2a2618;
  --gold: #d4af37;
  --gold2: #f5d77a;
  --gold3: #8a6d1f;
  --text: #ece6d6;
  --dim: #8d8778;
  --green: #3fd08a;
  --red: #ff5a5f;
  --amber: #ffb547;
  --radius: 14px;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 Inter, system-ui, sans-serif; }
body { min-height: 100vh; overflow-x: hidden; }
.glow { position: fixed; inset: -30% -10% auto; height: 70vh; pointer-events: none; z-index: 0;
  background: radial-gradient(60% 60% at 30% 20%, rgba(212,175,55,.16), transparent 70%),
              radial-gradient(40% 50% at 85% 10%, rgba(245,215,122,.08), transparent 70%);
  animation: drift 18s ease-in-out infinite alternate; }
@keyframes drift { to { transform: translate3d(4%, 3%, 0) scale(1.05); } }
header, nav, main, footer { position: relative; z-index: 1; }

/* topo */
.top { display: grid; grid-template-columns: 1fr auto auto; gap: 24px; align-items: center; padding: 22px 28px 14px; border-bottom: 1px solid var(--line); }
.brand { display: flex; gap: 14px; align-items: center; }
.coin { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font: 800 16px Cinzel, serif; color: #1a1406;
  background: conic-gradient(from 200deg, #fbe7a1, #c79b2a, #fff1bf, #a57b16, #fbe7a1); box-shadow: 0 0 24px rgba(212,175,55,.45);
  animation: spin 9s linear infinite; }
@keyframes spin { to { filter: hue-rotate(0deg); transform: rotateY(360deg); } }
h1 { margin: 0; font: 800 24px Cinzel, serif; letter-spacing: .12em;
  background: linear-gradient(90deg, var(--gold3), var(--gold2), var(--gold), var(--gold2), var(--gold3)); background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 6s linear infinite; }
h1 span { font-weight: 600; }
@keyframes shimmer { to { background-position: 300% 0; } }
.sub { margin: 2px 0 0; color: var(--dim); font-size: 12px; letter-spacing: .04em; }
.price-box { text-align: right; }
.label, .k { color: var(--dim); font-size: 11px; text-transform: uppercase; letter-spacing: .12em; }
.price { font: 700 34px 'JetBrains Mono', monospace; color: var(--gold2); transition: color .25s; }
.price.up { color: var(--green); } .price.down { color: var(--red); }
.tiny { color: var(--dim); font-size: 11.5px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; max-width: 420px; justify-content: flex-end; }
.chip { padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 600; border: 1px solid var(--line); background: var(--panel); }
.chip.ok { color: var(--green); border-color: rgba(63,208,138,.35); }
.chip.bad { color: var(--red); border-color: rgba(255,90,95,.45); animation: alarm 1.4s ease-in-out infinite; }
.chip.warn { color: var(--amber); border-color: rgba(255,181,71,.4); }
.chip.dim { color: var(--dim); }
@keyframes alarm { 50% { box-shadow: 0 0 0 4px rgba(255,90,95,.12); } }

/* abas */
.tabs { display: flex; gap: 6px; padding: 12px 28px 0; }
.tab { position: relative; background: none; border: 0; color: var(--dim); font: 600 14px Inter; padding: 10px 16px; cursor: pointer; border-radius: 10px 10px 0 0; transition: color .2s, background .2s; }
.tab:hover { color: var(--text); background: rgba(212,175,55,.05); }
.tab.on { color: var(--gold2); }
.tab.on::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 2px; background: linear-gradient(90deg, transparent, var(--gold), transparent); animation: grow .5s var(--ease); }
.tab:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@keyframes grow { from { transform: scaleX(0); } }
.dot { display: inline-block; width: 8px; height: 8px; margin-right: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(63,208,138,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(63,208,138,0); } 100% { box-shadow: 0 0 0 0 rgba(63,208,138,0); } }

main { padding: 18px 28px 40px; }
.pane { display: none; }
.pane.on { display: block; animation: fadeUp .5s var(--ease); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } }

/* cards */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; padding: 16px 18px; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(160deg, var(--panel2), var(--panel)); border: 1px solid var(--line);
  transition: transform .25s var(--ease), border-color .25s; animation: fadeUp .6s var(--ease) both; }
.kpi:nth-child(2) { animation-delay: .05s; } .kpi:nth-child(3) { animation-delay: .1s; } .kpi:nth-child(4) { animation-delay: .15s; }
.kpi:nth-child(5) { animation-delay: .2s; } .kpi:nth-child(6) { animation-delay: .25s; }
.kpi:hover { transform: translateY(-3px); border-color: var(--gold3); }
.kpi::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); opacity: .6; }
.kpi.warn { border-color: rgba(255,181,71,.25); }
.kpi.hot { border-color: rgba(255,90,95,.55); box-shadow: 0 0 30px rgba(255,90,95,.12) inset; }
.v { font: 700 24px 'JetBrains Mono', monospace; margin-top: 6px; color: var(--text); }
.v.pos { color: var(--green); } .v.neg { color: var(--red); } .v.gold { color: var(--gold2); }
.s { color: var(--dim); font-size: 12px; margin-top: 2px; }
.flash { animation: flash .6s ease-out; }
@keyframes flash { from { text-shadow: 0 0 18px var(--gold2); } }
.bar { height: 6px; background: #1d1b14; border-radius: 6px; margin-top: 10px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--gold3), var(--gold2), var(--red)); background-size: 300% 100%; transition: width .8s var(--ease); }

.grid2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-bottom: 14px; }
.card { background: linear-gradient(170deg, var(--panel2), var(--panel)); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; animation: fadeUp .6s var(--ease) both; }
.grid2 .card { margin-bottom: 0; }
.card-h { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
h3 { margin: 0; font: 600 13px Inter; letter-spacing: .08em; text-transform: uppercase; color: var(--gold); }
.chart { height: 340px; }
.chart.small { height: 180px; }
.note { color: var(--dim); margin: 0 0 14px; }
.note b { color: var(--gold2); }

.meter { position: relative; height: 26px; border-radius: 8px; background: #17150f; overflow: hidden; border: 1px solid var(--line); }
.meter i { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, rgba(255,90,95,.5), rgba(212,175,55,.6), rgba(63,208,138,.7)); transition: width .8s var(--ease); }
.meter b { position: relative; display: block; text-align: center; font: 600 12px 'JetBrains Mono'; line-height: 26px; }

.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { text-align: left; color: var(--dim); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding: 6px 8px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel2); }
.tbl td { padding: 6px 8px; border-bottom: 1px solid rgba(42,38,24,.5); font-family: 'JetBrains Mono', monospace; }
.tbl tr { transition: background .2s; }
.tbl tbody tr:hover { background: rgba(212,175,55,.06); }
.tbl .pos { color: var(--green); } .tbl .neg { color: var(--red); } .tbl .gold { color: var(--gold2); }
.scroll { max-height: 440px; overflow: auto; }

.feed { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow: auto; font: 12px 'JetBrains Mono', monospace; }
.feed li { padding: 7px 4px; border-bottom: 1px solid rgba(42,38,24,.5); color: var(--dim); animation: slideIn .4s var(--ease); }
.feed li b { color: var(--gold2); font-weight: 600; }
.feed li.err b { color: var(--red); }
@keyframes slideIn { from { opacity: 0; transform: translateX(-8px); } }

.hours { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; align-items: end; height: 220px; padding-top: 10px; }
.hours.short { height: 180px; }
.hcol { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; cursor: default; }
.hcol .b1, .hcol .b2 { width: 70%; border-radius: 4px 4px 0 0; transform-origin: bottom; animation: rise .9s var(--ease) both; }
.hcol .b1 { background: linear-gradient(180deg, var(--gold2), var(--gold3)); }
.hcol .b2 { background: linear-gradient(180deg, rgba(255,90,95,.2), rgba(255,90,95,.8)); border-radius: 0 0 4px 4px; transform-origin: top; }
.hcol .lb { font-size: 10.5px; color: var(--dim); font-family: 'JetBrains Mono'; }
.hcol.best .lb { color: var(--gold2); font-weight: 700; }
.hcol:hover .b1 { filter: brightness(1.25); }
@keyframes rise { from { transform: scaleY(0); } }
.hwrap { display: flex; flex-direction: column; height: 100%; }

.ladder { display: flex; flex-direction: column; gap: 9px; }
.rung { display: grid; grid-template-columns: 90px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; }
.rung .t { height: 12px; border-radius: 6px; background: #1b1811; overflow: hidden; }
.rung .t i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--gold), var(--red)); transition: width 1s var(--ease); }
.rung b { font-family: 'JetBrains Mono'; text-align: right; }

.seg { display: flex; gap: 4px; }
.seg button { background: var(--panel); color: var(--dim); border: 1px solid var(--line); padding: 4px 10px; border-radius: 8px; font: 600 11.5px Inter; cursor: pointer; transition: all .2s; }
.seg button.on, .seg button:hover { color: var(--gold2); border-color: var(--gold3); }

.stops { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.stopc { padding: 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); animation: fadeUp .6s var(--ease) both; }
.stopc h4 { margin: 0 0 6px; font: 700 20px Cinzel, serif; color: var(--gold2); }
.stopc .verd { margin-top: 8px; font-size: 12.5px; }
.stopc.good { border-color: rgba(63,208,138,.35); } .stopc.bad { border-color: rgba(255,90,95,.35); }

.foot { display: flex; justify-content: space-between; padding: 10px 28px 24px; color: var(--dim); font-size: 11.5px; }

@media (max-width: 1100px) { .grid2 { grid-template-columns: 1fr; } .top { grid-template-columns: 1fr; } .chips { justify-content: flex-start; } .price-box { text-align: left; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

.chip.power { cursor: pointer; font: 700 12px Inter; color: #1a1406; background: linear-gradient(135deg, var(--gold2), var(--gold)); border-color: var(--gold); transition: transform .15s var(--ease), filter .2s; }
.chip.power:hover { transform: translateY(-1px); filter: brightness(1.1); }
.chip.power.off { color: var(--text); background: #3a1416; border-color: rgba(255,90,95,.6); }
.chip.power:focus-visible { outline: 2px solid var(--gold2); outline-offset: 2px; }
a.chip { color: var(--dim); text-decoration: none; }
a.chip:hover, button.chip.dim:hover { color: var(--gold); border-color: var(--gold); }
button.chip.dim { color: var(--dim); cursor: pointer; }
[hidden] { display: none !important; }
.banner { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: baseline; margin: 14px 28px 0;
          padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); }
.banner strong { font-size: 14px; letter-spacing: .02em; }
.banner span { color: var(--text); font-size: 14px; }
.banner small { flex-basis: 100%; color: var(--dim); font-size: 12px; }
.banner.ativo { border-color: rgba(255,181,71,.55); background: linear-gradient(90deg, rgba(255,181,71,.10), var(--panel) 60%); }
.banner.ativo strong { color: var(--amber); }
.banner.aviso { border-color: rgba(212,175,55,.35); }
.banner.aviso strong { color: var(--gold); }
@media (max-width: 640px) { .banner { margin: 12px 16px 0; } }
/* aba Notícias */
.news-why .lead { color: var(--text); font-size: 14px; line-height: 1.6; margin: 0 0 14px; max-width: 900px; }
.rules { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.rules li { display: flex; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); font-size: 13px; line-height: 1.5; color: var(--dim); }
.rules li b { color: var(--text); }
.rules .ico { color: var(--gold); font-size: 16px; line-height: 1.3; }
.tbl tr.st-agora td { background: rgba(255,181,71,.10); }
.tbl tr.st-passou td { opacity: .45; }
.pill { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; font-family: inherit; border: 1px solid var(--line); }
.pill.of { color: var(--green); border-color: rgba(63,208,138,.35); }
.pill.es { color: var(--amber); border-color: rgba(255,181,71,.4); }
.pill.ag { color: #111; background: var(--amber); border-color: var(--amber); }
.cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.cmp .cap { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--bg); }
.cmp .cap h4 { margin: 0 0 8px; color: var(--gold); font-size: 13px; letter-spacing: .05em; }
.cmp .row { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: baseline; padding: 7px 0; border-top: 1px solid rgba(42,38,24,.6); font-size: 12.5px; }
.cmp .row .nm { color: var(--dim); font-size: 12.5px; font-family: inherit; }
.cmp .row.best { color: var(--text); }
.cmp .row.best .nm { color: var(--gold); font-weight: 600; }
.cmp .q { font-family: 'JetBrains Mono', monospace; }
.cmp .q.bad { color: var(--red); } .cmp .q.ok { color: var(--green); }
.cmp .m { font-family: 'JetBrains Mono', monospace; text-align: right; min-width: 88px; }
.cmp .m.pos { color: var(--green); } .cmp .m.neg { color: var(--red); }
.cmp .d { grid-column: 1 / -1; color: var(--dim); font-size: 11px; }
#n-fim { margin-top: 12px; }
@media (max-width: 640px) {
  #t-noticias thead { display: none; }
  #t-noticias tr { display: block; padding: 10px 2px; border-bottom: 1px solid var(--line); }
  #t-noticias td { display: flex; justify-content: space-between; gap: 10px; border: 0; padding: 3px 4px; }
  #t-noticias td:first-child { color: var(--gold); font-weight: 600; }
  #t-noticias td::before { content: attr(data-label); color: var(--dim); font-family: 'Inter', system-ui, sans-serif; font-size: 11px; }
  #t-noticias td:first-child::before, #t-noticias td:last-child:empty { display: none; }
  #noticias .scroll { max-height: none; }
}
.explica { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 14px; background: var(--bg); }
.explica h4 { margin: 0 0 8px; color: var(--gold); font-size: 14px; }
.explica p { margin: 0 0 8px; color: var(--dim); font-size: 13.5px; line-height: 1.6; max-width: 980px; }
.explica p b { color: var(--text); }
.explica p.warn { color: var(--amber); margin-bottom: 0; }
.cmp .d.conta { color: var(--text); opacity: .75; }
.sel-conta { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.sel-conta button { font-size: 12px; }
/* conta REAL aberta: aviso vermelho inconfundivel */
body.conta-real .top { box-shadow: inset 0 3px 0 var(--red); }
body.conta-real #sel-conta button.on { color: #fff; background: var(--red); border-color: var(--red); }
body.conta-real #chip-conta { color: var(--red); border-color: rgba(255,90,95,.6); font-weight: 700; }
