/* ═══════════════════════════════════════════════════════════════════
   CRIPTO360 · style.css
   Design system "Dark Neon Terminal" — 100% CSS puro, sem frameworks.
   Tokens → Reset → Ambiente → Componentes → Layout → Motion → A11y
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. TOKENS ─────────────────────────────────────────────────── */
:root {
  /* paleta base */
  --bg-0: #0a0e1a;                       /* fundo profundo          */
  --bg-1: #0f1629;                       /* superfície dos cards    */
  --bg-2: #131c35;                       /* superfície elevada      */
  --line: rgba(122, 152, 220, 0.10);     /* bordas discretas        */
  --line-strong: rgba(0, 212, 255, 0.22);

  /* neon */
  --cyan: #00d4ff;
  --green: #00ff9d;
  --red: #ff4d6d;
  --amber: #ffb648;
  --violet: #8a7bff;

  /* texto */
  --tx-0: #eef3ff;
  --tx-1: #aebbd9;
  --tx-2: #6d7ea6;

  /* tipografia */
  --f-display: "Space Grotesk", system-ui, sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, monospace;

  /* métricas */
  --r-lg: 20px;  --r-md: 14px; --r-sm: 10px;
  --shell: 1280px;
  --hdr-h: 64px;

  /* sombras / brilhos */
  --glow-cyan: 0 0 24px rgba(0, 212, 255, 0.25);
  --glow-green: 0 0 24px rgba(0, 255, 157, 0.22);
  --shadow-card: 0 18px 50px -18px rgba(0, 0, 0, 0.65);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ── 2. RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--f-display);
  background: var(--bg-0);
  color: var(--tx-0);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { display: block; max-width: 100%; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
table { border-collapse: collapse; width: 100%; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

::selection { background: rgba(0, 212, 255, 0.30); color: #fff; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-0); }
::-webkit-scrollbar-thumb { background: #1d2a4d; border-radius: 8px; border: 2px solid var(--bg-0); }
::-webkit-scrollbar-thumb:hover { background: #2a3c6b; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 4px; }

.skip {
  position: fixed; top: -60px; left: 16px; z-index: 100;
  background: var(--cyan); color: #04222e; font-weight: 700;
  padding: 10px 18px; border-radius: 0 0 10px 10px; transition: top 0.25s var(--ease-out);
}
.skip:focus { top: 0; }

.noscript {
  position: fixed; inset: auto 16px 16px 16px; z-index: 99;
  background: var(--red); color: #fff; padding: 16px; border-radius: var(--r-md);
  font-weight: 600; text-align: center;
}

/* ── utilitários tipográficos ── */
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.tx2 { color: var(--tx-2); }
.unit { font-size: 0.68em; color: var(--tx-2); font-weight: 500; }
.grad-text {
  background: linear-gradient(93deg, var(--cyan) 5%, var(--green) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.ic { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none;
      stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── 3. AMBIENTE (fundo vivo) ──────────────────────────────────── */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background:
      radial-gradient(1200px 700px at 75% -10%, rgba(0, 212, 255, 0.06), transparent 60%), var(--bg-0); }
.bg-glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: 0.35; }
.bg-glow-a { width: 560px; height: 560px; top: -180px; right: -120px;
             background: rgba(0, 212, 255, 0.16); animation: drift 26s ease-in-out infinite alternate; }
.bg-glow-b { width: 620px; height: 620px; bottom: -260px; left: -160px;
             background: rgba(0, 255, 157, 0.10); animation: drift 32s ease-in-out infinite alternate-reverse; }
.bg-grid { position: absolute; inset: 0; opacity: 0.5;
  background-image:
    linear-gradient(rgba(120, 150, 220, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 220, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 65% at 50% 0%, #000 30%, transparent 78%);
}
.bg-noise { position: absolute; inset: 0; opacity: 0.028; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-60px, 50px, 0) scale(1.15); }
}

/* ── 4. CABEÇALHO ──────────────────────────────────────────────── */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: rgba(10, 14, 26, 0.78);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}
.hdr-inner {
  max-width: var(--shell); margin: 0 auto; height: var(--hdr-h);
  display: flex; align-items: center; gap: 28px; padding: 0 24px;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark { width: 30px; height: 30px; filter: drop-shadow(0 0 10px rgba(0, 212, 255, 0.5)); }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
.brand-name b { color: var(--cyan); font-weight: 700; }
.brand-tag {
  font-family: var(--f-mono); font-size: 9px; font-weight: 600; letter-spacing: 0.22em;
  color: var(--tx-2); border: 1px solid var(--line); border-radius: 5px; padding: 2.5px 7px;
}
.hdr-nav { display: flex; gap: 4px; margin-left: 8px; }
.hdr-nav a {
  font-size: 13px; font-weight: 500; color: var(--tx-1); padding: 7px 12px;
  border-radius: 8px; transition: color 0.2s, background 0.2s;
}
.hdr-nav a:hover { color: var(--tx-0); background: rgba(0, 212, 255, 0.07); }
.hdr-status { margin-left: auto; display: flex; align-items: center; gap: 10px; }

.badge-live {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  color: var(--green); background: rgba(0, 255, 157, 0.09);
  border: 1px solid rgba(0, 255, 157, 0.30); border-radius: 999px; padding: 5px 12px;
  box-shadow: inset 0 0 14px rgba(0, 255, 157, 0.06);
}
.badge-live.ok { color: var(--cyan); border-color: rgba(0, 212, 255, 0.3); background: rgba(0,212,255,.07); font-size: 10px; padding: 4px 10px; }
.pulse-dot {
  width: 7px; height: 7px; border-radius: 50%; background: currentColor; position: relative;
}
.pulse-dot::after {
  content: ""; position: absolute; inset: -4px; border-radius: 50%;
  border: 1px solid currentColor; animation: ping 1.6s cubic-bezier(0, 0, 0.2, 1) infinite;
}
@keyframes ping { 0% { transform: scale(0.5); opacity: 1; } 80%, 100% { transform: scale(1.9); opacity: 0; } }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 11.5px; color: var(--tx-1);
  background: rgba(15, 22, 41, 0.8); border: 1px solid var(--line);
  border-radius: 999px; padding: 5px 11px; white-space: nowrap;
}
.chip b { color: var(--tx-0); font-weight: 600; }
.chip-sec { border-color: rgba(0, 255, 157, 0.28); color: var(--green); transition: all 0.3s; }
.chip-sec.pending { border-color: rgba(255, 182, 72, 0.35); color: var(--amber); }

/* ── 5. SHELL / HERO ───────────────────────────────────────────── */
.shell { max-width: var(--shell); margin: 0 auto; padding: 0 24px 40px; }
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; padding: 44px 0 30px; }
.hero h1 { font-size: clamp(26px, 3.4vw, 38px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.hero .sub { margin-top: 10px; max-width: 560px; color: var(--tx-1); font-size: 14.5px; }
.hero-side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; }
.kex-chip {
  display: flex; align-items: center; gap: 11px;
  background: linear-gradient(160deg, rgba(15, 22, 41, 0.9), rgba(15, 22, 41, 0.55));
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  padding: 10px 14px; box-shadow: var(--glow-cyan);
}
.kex-chip .ic { width: 18px; height: 18px; color: var(--cyan); }
.kex-chip > div { display: flex; flex-direction: column; }
.kex-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--tx-2); }
.kex-chip b { font-size: 13px; color: var(--tx-0); }
.kex-ok {
  font-family: var(--f-mono); font-size: 10px; color: var(--amber);
  border: 1px solid rgba(255, 182, 72, 0.3); padding: 3px 8px; border-radius: 999px;
  transition: all 0.3s;
}
.kex-ok.ready { color: var(--green); border-color: rgba(0, 255, 157, 0.35); }
.hero-note { font-size: 11.5px; color: var(--tx-2); }
.hero-note b { color: var(--tx-1); }

/* ── 6. STATS BAR ──────────────────────────────────────────────── */
.stats { display: grid; grid-template-columns: 1.45fr 1fr 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.stat {
  position: relative; overflow: hidden;
  background: linear-gradient(170deg, var(--bg-1) 0%, rgba(15, 22, 41, 0.55) 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 18px 20px; box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), border-color 0.3s;
}
.stat:hover { transform: translateY(-3px); border-color: rgba(0, 212, 255, 0.28); }
.stat-h { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.stat-h .ic { color: var(--cyan); }
.stat-label { font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--tx-1); }
.stat-hint { margin-left: auto; font-size: 10.5px; color: var(--tx-2); }
.stat-value { display: block; font-size: 27px; font-weight: 700; letter-spacing: -0.02em; }
.stat-sub { font-size: 12.5px; margin-top: 2px; font-family: var(--f-mono); }
.stat-sub.up { color: var(--green); } .stat-sub.down { color: var(--red); }
.stat-foot { margin-top: 10px; font-size: 11.5px; color: var(--tx-2); }

/* card em destaque (P&L): borda de gradiente animada — hierarquia visual nº 1 */
@property --bflow { syntax: "<angle>"; initial-value: 0deg; inherits: false; }
.stat.featured { padding: 24px 22px 18px; border: 1px solid transparent;
  background:
    linear-gradient(170deg, #101a33, rgba(15, 22, 41, 0.7)) padding-box,
    linear-gradient(var(--bflow, 120deg), rgba(0, 212, 255, 0.6), rgba(0, 255, 157, 0.5), rgba(0, 212, 255, 0.6)) border-box;
  animation: borderFlow 7s linear infinite;
}
@keyframes borderFlow { to { --bflow: 360deg; } }
.stat.featured::before {
  content: ""; position: absolute; top: -40%; right: -20%; width: 65%; height: 120%;
  background: radial-gradient(closest-side, rgba(0, 255, 157, 0.12), transparent); pointer-events: none;
}
.stat.featured .stat-value { font-size: 34px; margin-top: 2px; }
.stat-main { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.spark-big { width: 100%; height: 56px; margin-top: 10px; }

.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-family: var(--f-mono); font-size: 11px; font-weight: 600;
  border-radius: 999px; padding: 3.5px 9px; white-space: nowrap;
}
.pill .ic { width: 12px; height: 12px; }
.pill.pct.up, .pill-ok { color: var(--green); background: rgba(0, 255, 157, 0.10); border: 1px solid rgba(0, 255, 157, 0.28); }
.pill.pct.down { color: var(--red); background: rgba(255, 77, 109, 0.10); border: 1px solid rgba(255, 77, 109, 0.28); }
.pill.pct.flat { color: var(--tx-1); background: rgba(174, 187, 217, 0.08); border: 1px solid var(--line); }

/* medidor de sentimento */
.gauge { position: relative; width: 128px; height: 66px; margin: 6px auto 2px; }
.gauge-arc {
  width: 128px; height: 64px; border-radius: 64px 64px 0 0;
  background: conic-gradient(from 270deg at 50% 100%,
    var(--red) 0deg, var(--amber) 45deg, var(--tx-2) 90deg, var(--cyan) 135deg, var(--green) 180deg, transparent 180deg);
  mask: radial-gradient(circle at 50% 100%, transparent 34px, #000 35px);
  -webkit-mask: radial-gradient(circle at 50% 100%, transparent 34px, #000 35px);
  opacity: 0.9;
}
.gauge-needle {
  position: absolute; left: calc(50% - 1.5px); bottom: 0; width: 3px; height: 52px;
  background: linear-gradient(to top, var(--tx-0), var(--cyan));
  border-radius: 3px; transform-origin: 50% 100%; transform: rotate(-90deg);
  transition: transform 0.9s var(--ease-spring); box-shadow: 0 0 8px rgba(0, 212, 255, 0.6);
}
.gauge-hub { position: absolute; left: calc(50% - 6px); bottom: -6px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg-2); border: 2px solid var(--cyan); box-shadow: var(--glow-cyan); }
.gauge-meta { display: flex; align-items: baseline; justify-content: center; gap: 8px; margin-top: 6px; }
.gauge-meta b { font-size: 21px; }

/* ── 7. CARDS / GRADE PRINCIPAL ────────────────────────────────── */
.card {
  background: linear-gradient(170deg, var(--bg-1) 0%, rgba(15, 22, 41, 0.55) 100%);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
}
.card-h {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--line);
}
.card-h h2 { display: flex; align-items: center; gap: 9px; font-size: 14.5px; font-weight: 700; letter-spacing: 0.01em; }
.card-h h2 .ic { color: var(--cyan); }
.card-sub { font-size: 11px; color: var(--tx-2); font-family: var(--f-mono); }
.card-h-side { display: flex; align-items: center; gap: 9px; }
.badge-count {
  min-width: 22px; height: 22px; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 10.5px; font-weight: 700; color: var(--amber);
  background: rgba(255, 182, 72, 0.10); border: 1px solid rgba(255, 182, 72, 0.3); border-radius: 7px;
}
.icon-btn {
  width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px;
  color: var(--tx-2); border: 1px solid var(--line); transition: all 0.2s;
}
.icon-btn:hover { color: var(--red); border-color: rgba(255, 77, 109, 0.4); background: rgba(255, 77, 109, 0.08); }

.grid-main { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }

/* ── 8. GRÁFICO ────────────────────────────────────────────────── */
.chart-card { display: flex; flex-direction: column; min-height: 480px; }
.chart-h { flex-wrap: wrap; row-gap: 10px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--tx-1);
  padding: 6px 12px; border-radius: 9px; border: 1px solid transparent;
  transition: all 0.22s var(--ease-out);
}
.tab:hover { color: var(--tx-0); background: rgba(0, 212, 255, 0.06); }
.tab.active {
  color: var(--cyan); background: rgba(0, 212, 255, 0.09);
  border-color: rgba(0, 212, 255, 0.30); box-shadow: inset 0 0 16px rgba(0, 212, 255, 0.06);
}
.tab .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ac, var(--cyan)); box-shadow: 0 0 8px var(--ac, var(--cyan)); }
.tab .tab-d { font-family: var(--f-mono); font-size: 10px; }
.tab .tab-d.up { color: var(--green); } .tab .tab-d.down { color: var(--red); }

.chart-meta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.chart-price-box { display: flex; align-items: center; gap: 9px; }
.chart-price-box b { font-size: 21px; font-weight: 700; }
.chart-price-box b.up { color: var(--green); } .chart-price-box b.down { color: var(--red); }
.ma-read { display: flex; gap: 12px; font-size: 10.5px; color: var(--tx-2); }
.ma-read em { font-style: normal; }
.ma-read .ma7 { color: var(--cyan); } .ma-read .ma25 { color: var(--amber); } .ma-read .rsiv { color: var(--violet); }

.seg { display: flex; background: rgba(10, 14, 26, 0.75); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg-btn { font-size: 11px; font-weight: 600; color: var(--tx-2); padding: 4px 11px; border-radius: 6px; transition: all 0.2s; }
.seg-btn.active { color: var(--bg-0); background: var(--cyan); box-shadow: 0 0 12px rgba(0, 212, 255, 0.45); }

.chart-wrap { position: relative; flex: 1; min-height: 320px; }
#mainChart { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; }
.chart-live-flag {
  position: absolute; top: 12px; right: 14px; display: flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 9.5px; font-weight: 700; letter-spacing: 0.18em; color: var(--green);
  background: rgba(10, 14, 26, 0.7); border: 1px solid rgba(0, 255, 157, 0.25);
  padding: 4px 9px; border-radius: 999px; pointer-events: none;
}
.chart-tip {
  position: absolute; z-index: 5; pointer-events: none; min-width: 168px;
  background: rgba(10, 14, 26, 0.92); backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 10px 12px; font-size: 11px; box-shadow: 0 12px 32px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, 0);
}
.chart-tip .tt-t { font-family: var(--f-mono); font-size: 10px; color: var(--tx-2); margin-bottom: 6px; }
.chart-tip .tt-row { display: flex; justify-content: space-between; gap: 14px; font-family: var(--f-mono); }
.chart-tip .tt-row b { font-weight: 600; }
.chart-tip .tt-row.price b { color: var(--tx-0); font-size: 12.5px; }
.chart-tip .tt-row .ma7c { color: var(--cyan); } .chart-tip .tt-row .ma25c { color: var(--amber); }

.rsi-wrap { position: relative; height: 92px; border-top: 1px solid var(--line); }
#rsiChart { position: absolute; inset: 0; width: 100%; height: 100%; }
.rsi-tag {
  position: absolute; top: 8px; left: 14px; font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: 0.14em; color: var(--tx-2); pointer-events: none;
}
.rsi-tag b { color: var(--violet); }

/* ── 9. RAIL: SINAIS + ALERTAS ─────────────────────────────────── */
.rail { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.sig-list { padding: 8px; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.sig-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border-radius: var(--r-sm); cursor: pointer; transition: background 0.2s;
}
.sig-item:hover, .sig-item.active { background: rgba(0, 212, 255, 0.05); }
.sig-item.active { box-shadow: inset 2px 0 0 var(--cyan); }
.sig-sym { display: flex; flex-direction: column; min-width: 64px; }
.sig-sym b { font-size: 13px; }
.sig-sym span { font-family: var(--f-mono); font-size: 10px; color: var(--tx-2); }
.sig-why { flex: 1; font-size: 11px; color: var(--tx-1); line-height: 1.4; min-width: 0; }
.sig-score {
  display: flex; flex-direction: column; align-items: center; gap: 2px; width: 44px;
}
.sig-score b { font-family: var(--f-mono); font-size: 12px; }
.sig-bar { width: 40px; height: 4px; border-radius: 3px; background: rgba(122, 152, 220, 0.15); overflow: hidden; }
.sig-bar i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--red), var(--amber), var(--green)); transition: width 0.6s var(--ease-out); }

.pill-signal { font-size: 9.5px; font-weight: 700; letter-spacing: 0.06em; padding: 3.5px 8px; }
.pill-strong-buy  { color: #04222e; background: var(--green); box-shadow: 0 0 14px rgba(0, 255, 157, 0.45); animation: glowPulse 2s ease-in-out infinite; }
.pill-buy         { color: var(--green); background: rgba(0, 255, 157, 0.10); border: 1px solid rgba(0, 255, 157, 0.30); }
.pill-neutral     { color: var(--tx-1); background: rgba(174, 187, 217, 0.08); border: 1px solid var(--line); }
.pill-sell        { color: var(--red); background: rgba(255, 77, 109, 0.10); border: 1px solid rgba(255, 77, 109, 0.30); }
.pill-strong-sell { color: #fff; background: var(--red); box-shadow: 0 0 14px rgba(255, 77, 109, 0.45); }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 8px rgba(0,255,157,.35);} 50% { box-shadow: 0 0 20px rgba(0,255,157,.6);} }

.alert-feed { padding: 8px; display: flex; flex-direction: column; gap: 8px; max-height: 320px; overflow-y: auto; }
.alert-feed:empty::after {
  content: "Nenhum alerta no radar. O terminal continua varrendo o mercado para você.";
  display: block; padding: 22px 14px; font-size: 12px; color: var(--tx-2); text-align: center;
}
.alert-item {
  position: relative; overflow: hidden;
  display: flex; gap: 11px; padding: 12px 13px;
  background: rgba(10, 14, 26, 0.6); border: 1px solid var(--line); border-radius: var(--r-sm);
  animation: alertIn 0.45s var(--ease-spring);
}
@keyframes alertIn {
  from { opacity: 0; transform: translateY(-10px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.alert-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--sev, var(--cyan)); box-shadow: 0 0 10px var(--sev, var(--cyan)); }
.alert-item.sev-critical { --sev: var(--red); border-color: rgba(255, 77, 109, 0.3); background: linear-gradient(120deg, rgba(255, 77, 109, 0.07), rgba(10, 14, 26, 0.6) 55%); }
.alert-item.sev-warning  { --sev: var(--amber); border-color: rgba(255, 182, 72, 0.28); }
.alert-item.sev-info     { --sev: var(--cyan); }
.alert-item.sev-critical .alert-ico { color: var(--red); }
.alert-item.sev-warning .alert-ico { color: var(--amber); }
.alert-item.sev-info .alert-ico { color: var(--cyan); }
.alert-ico { margin-top: 1px; }
.alert-item.sev-critical .alert-ico .ic { animation: blinkIco 1.1s steps(2, jump-none) infinite; }
@keyframes blinkIco { 50% { opacity: 0.35; } }
.alert-body { flex: 1; min-width: 0; }
.alert-title { display: flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 700; line-height: 1.35; }
.alert-title .alert-sym { font-family: var(--f-mono); font-size: 10px; color: var(--tx-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.alert-msg { margin-top: 3px; font-size: 11.5px; color: var(--tx-1); line-height: 1.45; }
.alert-meta { margin-top: 7px; display: flex; align-items: center; gap: 10px; }
.alert-time { font-family: var(--f-mono); font-size: 9.5px; color: var(--tx-2); }
.alert-cta {
  font-size: 10.5px; font-weight: 700; color: var(--cyan); display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 6px; border: 1px solid rgba(0, 212, 255, 0.3); background: rgba(0, 212, 255, 0.06);
  transition: all 0.2s;
}
.alert-cta:hover { background: rgba(0, 212, 255, 0.14); box-shadow: var(--glow-cyan); }
.alert-cta .ic { width: 11px; height: 11px; }

/* ── 10. TABELA ────────────────────────────────────────────────── */
.table-card { margin-bottom: 16px; }
.table-scroll { overflow-x: auto; }
table { min-width: 860px }
th {
  font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--tx-2); text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line);
}
th.r, td.r { text-align: right; }
td { padding: 13px 16px; font-size: 13px; border-bottom: 1px solid rgba(122, 152, 220, 0.06); }
tbody tr { cursor: pointer; transition: background 0.18s; }
tbody tr:hover { background: rgba(0, 212, 255, 0.04); }
tbody tr.sel { background: rgba(0, 212, 255, 0.06); box-shadow: inset 3px 0 0 var(--cyan); }
.t-asset { display: flex; align-items: center; gap: 11px; }
.t-coin {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none;
  font-family: var(--f-mono); font-size: 10px; font-weight: 700;
  background: linear-gradient(150deg, rgba(0, 212, 255, 0.14), rgba(0, 255, 157, 0.10));
  border: 1px solid var(--line-strong); color: var(--ac, var(--cyan));
}
.t-asset b { display: block; font-size: 13px; }
.t-asset span { font-size: 11px; color: var(--tx-2); }
.t-price { font-weight: 600; transition: color 0.2s, text-shadow 0.2s; }
tr.flash-up .t-price { color: var(--green); text-shadow: 0 0 14px rgba(0, 255, 157, 0.7); }
tr.flash-down .t-price { color: var(--red); text-shadow: 0 0 14px rgba(255, 77, 109, 0.7); }
.t-delta.up { color: var(--green); } .t-delta.down { color: var(--red); }
.t-rsi { position: relative; }
.t-rsi.over { color: var(--amber); font-weight: 700; }
.t-rsi.over::after { content: ""; position: absolute; inset: auto 0 -2px 0; height: 2px;
  background: var(--amber); border-radius: 2px; opacity: 0.6; }
.t-alloc { font-family: var(--f-mono); font-size: 12px; color: var(--tx-1); }
.spark { width: 96px; height: 30px; margin-left: auto; }

/* ── 11. SEGURANÇA / CONSOLE ───────────────────────────────────── */
.sec-card { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 0; overflow: hidden; margin-bottom: 26px; }
.sec-copy { padding: 24px 26px; }
.sec-copy .card-h { padding: 0 0 14px 0; border-bottom: 0; }
.sec-lead { font-size: 14px; color: var(--tx-1); max-width: 42ch; }
.sec-lead b { color: var(--tx-0); }
.sec-list { margin-top: 20px; display: flex; flex-direction: column; gap: 15px; }
.sec-list li { display: flex; gap: 13px; }
.sec-list .ic { width: 19px; height: 19px; color: var(--green); margin-top: 3px; flex: none; }
.sec-list b { display: block; font-size: 13.5px; }
.sec-list span { display: block; font-size: 12px; color: var(--tx-2); margin-top: 2px; line-height: 1.5; }

.console { border-left: 1px solid var(--line); background: rgba(7, 10, 19, 0.75); display: flex; flex-direction: column; min-height: 320px; }
.console-h {
  display: flex; align-items: center; gap: 7px; padding: 13px 16px;
  border-bottom: 1px solid var(--line); font-family: var(--f-mono); font-size: 10.5px; color: var(--tx-2);
}
.console-h i { width: 10px; height: 10px; border-radius: 50%; background: #223055; }
.console-h i:nth-child(1) { background: rgba(255, 77, 109, 0.75); }
.console-h i:nth-child(2) { background: rgba(255, 182, 72, 0.75); }
.console-h i:nth-child(3) { background: rgba(0, 255, 157, 0.75); }
.console-h span { margin-left: 8px; letter-spacing: 0.08em; }
.console-flag { margin-left: auto; color: var(--green); }
.console-body { flex: 1; overflow-y: auto; padding: 14px 16px; font-family: var(--f-mono); font-size: 11px; line-height: 1.8; }
.console-line { display: block; white-space: pre-wrap; word-break: break-all; opacity: 0; animation: lineIn 0.4s var(--ease-out) forwards; }
@keyframes lineIn { from { opacity: 0; transform: translateX(-6px);} to { opacity: 1; transform: none; } }
.c-time { color: var(--tx-2); }
.c-tag { font-weight: 700; }
.c-tag.send { color: var(--cyan); } .c-tag.recv { color: var(--amber); }
.c-tag.ok { color: var(--green); } .c-tag.key { color: var(--violet); }
.c-dim { color: var(--tx-2); } .c-ek { color: var(--violet); } .c-iv { color: var(--amber); } .c-ct { color: var(--green); }

/* ── 12. RODAPÉ / TOASTS ───────────────────────────────────────── */
.foot { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  padding: 18px 4px 6px; border-top: 1px solid var(--line); color: var(--tx-2); font-size: 12px; }
.foot-l { display: flex; align-items: center; gap: 13px; }
.foot-c b, .foot-r b { color: var(--tx-1); }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 80; display: flex; flex-direction: column; gap: 10px; width: min(360px, calc(100vw - 40px)); }
.toast {
  display: flex; gap: 11px; padding: 13px 15px;
  background: rgba(15, 22, 41, 0.92); backdrop-filter: blur(14px);
  border: 1px solid var(--line-strong); border-radius: var(--r-md);
  box-shadow: 0 20px 46px -14px rgba(0, 0, 0, 0.7);
  animation: toastIn 0.5s var(--ease-spring);
}
.toast.out { animation: toastOut 0.35s var(--ease-out) forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(0.96); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(30px) scale(0.96); } }
.toast .ic { flex: none; margin-top: 1px; }
.toast.sev-critical { border-color: rgba(255, 77, 109, 0.45); } .toast.sev-critical .ic { color: var(--red); }
.toast.sev-warning .ic { color: var(--amber); }
.toast.sev-info .ic { color: var(--cyan); }
.toast b { display: block; font-size: 13px; }
.toast span { display: block; font-size: 11.5px; color: var(--tx-1); margin-top: 2px; line-height: 1.45; }

/* ── 13. ENTRADA EM CENA / FLASH DE DADOS ──────────────────────── */
.gsap-up { opacity: 0; transform: translateY(18px); animation: rise 0.7s var(--ease-out) forwards; }
.gsap-up:nth-child(2) { animation-delay: 0.07s; }
.gsap-up:nth-child(3) { animation-delay: 0.14s; }
.gsap-up:nth-child(4) { animation-delay: 0.21s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ── 14. RESPONSIVO ────────────────────────────────────────────── */
@media (max-width: 1080px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .stat.featured { grid-column: 1 / -1; }
  .grid-main { grid-template-columns: 1fr; }
  .rail { flex-direction: row; }
  .rail > .card { flex: 1; min-width: 0; }
  .sec-card { grid-template-columns: 1fr; }
  .console { border-left: 0; border-top: 1px solid var(--line); }
  .hdr-nav { display: none; }
}
@media (max-width: 720px) {
  .shell { padding: 0 14px 32px; }
  .hero { flex-direction: column; align-items: flex-start; gap: 18px; padding-top: 30px; }
  .hero-side { align-items: flex-start; }
  .stats { grid-template-columns: 1fr; }
  .rail { flex-direction: column; }
  .chip { display: none; }
  .chip-sec { display: inline-flex; }
  .stat.featured .stat-value { font-size: 28px; }
  .chart-meta { width: 100%; justify-content: space-between; }
  .foot { justify-content: center; text-align: center; }
}

/* ── 15. MOVIMENTO REDUZIDO ────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
