/* =====================================================
   BacBo Signals — Dashboard CSS (reescrito v3)
   Filosofia:
   • Navbar fixa 64px
   • Body abaixo da navbar: sidebar fixa à esq + conteúdo scroll à dir
   • NENHUM overflow:hidden nos containers pai que contém conteúdo
   • KPIs sempre visíveis, sem corte
   • Barra de resultado SEMPRE acima de tudo
   ===================================================== */

/* ── VARIÁVEIS SEMÂNTICAS ── */
:root {
  --player:    #4fa3ff;
  --player-bg: rgba(79, 163, 255, .12);
  --player-bd: rgba(79, 163, 255, .35);
  --banker:    #ff5252;
  --banker-bg: rgba(255, 82, 82, .12);
  --banker-bd: rgba(255, 82, 82, .35);
  --tie:       #22d47b;
  --tie-bg:    rgba(34, 212, 123, .12);
  --tie-bd:    rgba(34, 212, 123, .35);
}

/* ── UTILITÁRIOS ── */
.player-color { color: var(--player) !important; }
.banker-color { color: var(--banker) !important; }
.tie-color    { color: var(--tie)    !important; }
.gold-color   { color: var(--gold)   !important; }
.player-icon  { color: var(--player) !important; }
.banker-icon  { color: var(--banker) !important; }
.tie-icon     { color: var(--tie)    !important; }
.player-value { color: var(--player); }
.banker-value { color: var(--banker); }
.tie-value    { color: var(--tie); }

/* ══════════════════════════════════════════
   BODY & NAVBAR OVERRIDE
══════════════════════════════════════════ */
.dashboard-body {
  background: var(--bg-base);
  /* sem overflow-x:hidden aqui para não criar stacking context */
}

/* Navbar no dashboard ocupa 100% da largura */
.nav-container--dash {
  max-width: 100%;
  padding: 0 16px;
  gap: 8px;
  flex-wrap: nowrap;
}

/* Abas na navbar */
.dash-tab-nav {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
  flex-shrink: 0;
}

.dash-tab-btn {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 10px;
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
  white-space: nowrap;
}
.dash-tab-btn:hover {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, .05);
}
.dash-tab-btn.active {
  background: var(--bg-card2);
  color: var(--text-primary);
  border: 1px solid var(--border-bright);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.tab-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

/* Nav-links compactos */
.nav-container--dash .nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.nav-container--dash .nav-link {
  padding: 6px 11px;
  font-size: .78rem;
}

/* ══════════════════════════════════════════
   LAYOUT PRINCIPAL
   Sidebar fixa + conteúdo scrollável
══════════════════════════════════════════ */
.dashboard-layout {
  display: flex;
  flex-direction: row;
  padding-top: 64px;   /* compensa navbar */
  min-height: 100vh;
  align-items: flex-start;
}

/* ── SIDEBAR ── */
.sidebar {
  width: 258px;
  flex-shrink: 0;
  background: var(--bg-dark);
  border-right: 1px solid var(--border);
  padding: 18px 14px 40px;
  height: calc(100vh - 64px);
  overflow-y: auto;
  position: sticky;
  top: 64px;
  display: flex;
  flex-direction: column;
  gap: 0;
  transition: transform .3s ease;
}

.sidebar-section {
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.sidebar-section:last-child { border-bottom: none; }

.sidebar-label {
  font-size: .64rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 9px;
}

/* Telegram */
.tg-status-box  { display: flex; flex-direction: column; gap: 5px; }
.tg-status-row  { display: flex; align-items: center; gap: 7px; font-size: .82rem; font-weight: 600; color: var(--text-primary); }
.tg-dot         { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); transition: background .3s; }
.tg-dot.connected    { background: var(--green); box-shadow: 0 0 8px rgba(34,212,123,.7); animation: pulse 1.8s infinite; }
.tg-dot.disconnected { background: var(--red); }
.tg-dot.connecting   { background: var(--gold); animation: pulse 1s infinite; }
.tg-meta        { font-size: .71rem; color: var(--text-muted); line-height: 1.4; }
.tg-mode-badge  {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .8px;
  background: rgba(245, 200, 66, .1);
  color: var(--gold);
  border: 1px solid rgba(245, 200, 66, .2);
  width: fit-content;
}
.tg-mode-badge.real {
  background: rgba(34, 212, 123, .1);
  color: var(--green);
  border-color: rgba(34, 212, 123, .3);
}

/* Status */
.system-status { display: flex; flex-direction: column; gap: 7px; }
.status-item   { display: flex; align-items: center; gap: 7px; font-size: .77rem; color: var(--text-secondary); }
.status-dot    { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.status-dot.green  { background: var(--green); box-shadow: 0 0 6px rgba(34,212,123,.6); animation: pulse 2s infinite; }
.status-dot.yellow { background: var(--gold);  box-shadow: 0 0 6px rgba(245,200,66,.6); animation: pulse 2s infinite; }
.status-dot.red    { background: var(--red); }

/* Resumo */
.day-summary  { display: flex; flex-direction: column; gap: 4px; }
.summary-row  {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  font-size: .77rem;
  color: var(--text-secondary);
}
.summary-row.green strong    { color: var(--green); }
.summary-row.red   strong    { color: var(--red); }
.summary-row.highlight       { background: var(--gold-dim); border: 1px solid rgba(245,200,66,.1); color: var(--text-primary); }
.summary-row.highlight strong{ color: var(--gold); font-size: .86rem; }

.chart-wrap-sm { padding: 4px 0; }
.last-update   { font-size: .74rem; color: var(--text-muted); }

/* Log Telegram */
.tg-log       { display: flex; flex-direction: column; gap: 5px; max-height: 140px; overflow-y: auto; }
.tg-log-empty { font-size: .71rem; color: var(--text-muted); font-style: italic; }
.tg-log-item  {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--border);
  border-left: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  font-size: .7rem;
  color: var(--text-secondary);
  line-height: 1.4;
  animation: slideIn .3s ease;
}
.tg-log-item.result-player { border-left-color: var(--player); }
.tg-log-item.result-banker { border-left-color: var(--banker); }
.tg-log-item.result-tie    { border-left-color: var(--tie); }
.tg-log-item.unrecognized  { opacity: .6; }
.tg-log-time  { font-size: .62rem; color: var(--text-muted); margin-top: 2px; }

.btn-vip-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 11px;
  background: linear-gradient(135deg, #f5c842, #e06c00);
  color: #0a0b0f;
  font-weight: 700;
  font-size: .82rem;
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all var(--transition);
}
.btn-vip-sm:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(245,200,66,.3); }

/* ── CONTEÚDO PRINCIPAL ── */
.dash-content-wrap {
  flex: 1;
  min-width: 0;
  /* sem overflow:hidden — deixa o conteúdo rolar normalmente */
}

/* ── ABAS ── */
.dash-tab-content         { display: none; }
.dash-tab-content.active  { display: block; }

/* ══════════════════════════════════════════
   ABA PAINEL
   Padding + flex column + gap uniforme
══════════════════════════════════════════ */
#tab-painel {
  padding: 24px 24px 80px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* ── TOPBAR ── */
.dash-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.dash-title h1 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.live-badge {
  font-size: .7rem;
  font-weight: 700;
  color: var(--green);
  background: rgba(34, 212, 123, .12);
  border: 1px solid rgba(34, 212, 123, .25);
  padding: 3px 10px;
  border-radius: 100px;
  animation: pulse 2s infinite;
}
.dash-title p  { font-size: .8rem; color: var(--text-muted); margin-top: 2px; }
.dash-controls { display: flex; gap: 6px; flex-shrink: 0; }

.btn-ctrl {
  width: 36px; height: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  transition: all var(--transition);
}
.btn-ctrl:hover  { background: rgba(255,255,255,.08); color: var(--text-primary); }
.btn-ctrl.active { background: var(--gold-dim); border-color: rgba(245,200,66,.2); color: var(--gold); }

/* ══════════════════════════════════════════
   BARRA DE RESULTADO
   Regra: NUNCA tem overflow:hidden no pai
══════════════════════════════════════════ */
.manual-result-bar {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid transparent;
  border-radius: var(--radius-md);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  /* sem position:relative e sem pseudo-elementos que cortam */
}
.manual-result-bar.has-signal {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, rgba(245,200,66,.04), var(--bg-card));
}
.manual-result-bar.feedback-win  { animation: flashGreen 1s ease; }
.manual-result-bar.feedback-loss { animation: flashRed   1s ease; }
@keyframes flashGreen { 0%,100%{background:var(--bg-card)} 50%{background:rgba(34,212,123,.1)} }
@keyframes flashRed   { 0%,100%{background:var(--bg-card)} 50%{background:rgba(255,82,82,.1)} }

.mr-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: .81rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.manual-result-bar.has-signal .mr-label { color: var(--gold); }

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 1.8s infinite;
  flex-shrink: 0;
}

.mr-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: nowrap;
}
.mr-btn {
  padding: 9px 20px;
  border-radius: var(--radius-md);
  font-size: .83rem;
  font-weight: 800;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  letter-spacing: .3px;
  white-space: nowrap;
}
.mr-btn.player { background: var(--player-bg); border-color: var(--player-bd); color: var(--player); }
.mr-btn.player:hover { background: rgba(79,163,255,.24); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(79,163,255,.3); }
.mr-btn.banker { background: var(--banker-bg); border-color: var(--banker-bd); color: var(--banker); }
.mr-btn.banker:hover { background: rgba(255,82,82,.24); transform: translateY(-2px); box-shadow: 0 4px 14px rgba(255,82,82,.3); }
.mr-btn.tie    { background: var(--tie-bg);    border-color: var(--tie-bd);    color: var(--tie); }
.mr-btn.tie:hover    { background: rgba(34,212,123,.24); transform: translateY(-2px); }
.mr-btn:active { transform: scale(.96); }

.mr-hint {
  font-size: .71rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 5px;
  flex: 1;
  min-width: 140px;
  flex-wrap: wrap;
}
.mr-hint i { color: var(--player); flex-shrink: 0; }

/* ── Atalhos de teclado ───────────────────────── */
.mr-shortcut-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-left: 6px;
  opacity: .7;
}
kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  font-family: inherit;
  font-size: .68rem;
  font-weight: 700;
  color: var(--text-primary);
  background: var(--bg-elevated, #1e2030);
  border: 1.5px solid var(--border);
  border-radius: 4px;
  box-shadow: 0 2px 0 var(--border);
  letter-spacing: .5px;
}

/* Flash visual ao usar atalho de teclado */
@keyframes keyFlash {
  0%   { transform: scale(1);    box-shadow: none; }
  35%  { transform: scale(1.08); box-shadow: 0 0 14px rgba(245,200,66,.55); }
  100% { transform: scale(1);    box-shadow: none; }
}
.mr-btn.key-flash {
  animation: keyFlash .28s ease;
}

/* ══════════════════════════════════════════
   KPI STRIP — 5 cards, sem corte, com scroll
══════════════════════════════════════════ */
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  /* Sem overflow:hidden — os cards não devem ser cortados */
}

.kpi-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: border-color var(--transition);
  min-width: 0;
}
.kpi-card:hover { border-color: var(--border-bright); }
.kpi-card.highlight-kpi {
  background: var(--gold-dim);
  border-color: rgba(245, 200, 66, .2);
}

.kpi-icon    { font-size: 1.2rem; color: var(--text-muted); flex-shrink: 0; }
.kpi-content { min-width: 0; flex: 1; }
.kpi-value   {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.1;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-label {
  font-size: .65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

/* ══════════════════════════════════════════
   GRID SUPERIOR: SINAL ATIVO + BEAD ROAD
══════════════════════════════════════════ */
.dash-grid-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.active-signal-box,
.bead-road-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.signal-box-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  background: rgba(255, 255, 255, .02);
  border-bottom: 1px solid var(--border);
  font-size: .79rem;
  font-weight: 600;
  color: var(--text-secondary);
  gap: 8px;
  flex-wrap: wrap;
}
.signal-timer {
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  color: var(--gold);
}
.signal-box-body { padding: 18px; }

/* Sem sinal */
.no-signal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 28px;
  text-align: center;
}
.no-signal i    { font-size: 1.8rem; color: var(--text-muted); }
.no-signal p    { font-weight: 600; color: var(--text-secondary); }
.no-signal span { font-size: .77rem; color: var(--text-muted); }

/* Sinal ativo */
.as-direction {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  flex-wrap: wrap;
  gap: 8px;
}
.as-dir-label {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 900;
}
.as-dir-label.player { color: var(--player); }
.as-dir-label.banker { color: var(--banker); }
.as-dir-label.tie    { color: var(--tie); }

.as-confidence-badge {
  padding: 5px 14px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 700;
}
.as-confidence-badge.win     { background: rgba(34,212,123,.15); color: var(--green); }
.as-confidence-badge.pending { background: rgba(245,200,66,.15); color: var(--gold); }
.as-confidence-badge.loss    { background: rgba(255,82,82,.15);  color: var(--red); }

.as-rows { display: flex; flex-direction: column; gap: 5px; }
.as-row  {
  display: flex;
  justify-content: space-between;
  font-size: .81rem;
  padding: 7px 10px;
  background: rgba(255,255,255,.02);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  gap: 8px;
}
.as-row .as-key { color: var(--text-muted); }
.as-row .as-val { font-weight: 700; color: var(--text-primary); text-align: right; }

.as-alert {
  margin-top: 12px;
  padding: 8px 12px;
  background: rgba(245,200,66,.07);
  border: 1px solid rgba(245,200,66,.2);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  color: var(--gold);
}

/* ══════════════════════════════════════════
   SISTEMA DE GALE — estilos visuais
══════════════════════════════════════════ */

/* Banner de GALE no topo do sinal ativo */
.as-gale-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-md);
  margin-bottom: 14px;
  border: 1.5px solid;
  animation: galePulse 1.8s ease infinite;
}
.as-gale-banner.gale1 {
  background: rgba(245, 200, 66, .1);
  border-color: rgba(245, 200, 66, .4);
}
.as-gale-banner.gale2 {
  background: rgba(255, 82, 82, .1);
  border-color: rgba(255, 82, 82, .4);
}
@keyframes galePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .7; }
}
.as-gale-icon { font-size: 1.3rem; flex-shrink: 0; }
.as-gale-info { display: flex; flex-direction: column; gap: 2px; }
.as-gale-banner.gale1 .as-gale-info strong { color: var(--gold); font-size: .85rem; }
.as-gale-banner.gale2 .as-gale-info strong { color: var(--red);  font-size: .85rem; }
.as-gale-info span  { font-size: .75rem; color: var(--text-secondary); }

/* Track de tentativas (Entrada → Gale 1 → Gale 2) */
.as-gale-track {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 14px;
  background: rgba(255,255,255,.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.as-gale-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 10px 6px;
  border-right: 1px solid var(--border);
  position: relative;
  transition: background .25s;
}
.as-gale-step:last-child { border-right: none; }

/* Dot de status no topo do step */
.as-gale-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--border);
  border: 2px solid var(--border-bright);
  transition: all .25s;
}
.as-gale-step-lbl { font-size: .62rem; text-transform: uppercase; color: var(--text-muted); letter-spacing: .6px; }
.as-gale-step-val { font-size: .75rem; font-weight: 700; color: var(--text-secondary); }

/* Estados dos steps */
.as-gale-step.done {
  background: rgba(255, 82, 82, .05);
}
.as-gale-step.done .as-gale-dot {
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 0 6px rgba(255,82,82,.5);
}
.as-gale-step.done .as-gale-step-lbl { color: var(--red); }

.as-gale-step.active {
  background: rgba(245, 200, 66, .08);
  animation: galePulse 1.5s ease infinite;
}
.as-gale-step.active .as-gale-dot {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 8px rgba(245,200,66,.7);
}
.as-gale-step.active .as-gale-step-lbl { color: var(--gold); font-weight: 700; }
.as-gale-step.active .as-gale-step-val { color: var(--gold); font-size: .82rem; }

.as-gale-step.win {
  background: rgba(34, 212, 123, .07);
}
.as-gale-step.win .as-gale-dot {
  background: var(--green);
  border-color: var(--green);
  box-shadow: 0 0 8px rgba(34,212,123,.6);
}
.as-gale-step.win .as-gale-step-lbl { color: var(--green); }

/* Barra de resultado com GALE ativo */
.manual-result-bar.has-gale {
  border-left-color: var(--gold);
  background: linear-gradient(135deg, rgba(245,200,66,.08), var(--bg-card));
  animation: galePulse 2s ease infinite;
}

/* Badge de GALE no feed card */
.feed-dir-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}
.feed-gale-badge {
  font-size: .6rem;
  font-weight: 800;
  color: var(--gold);
  background: rgba(245,200,66,.15);
  border: 1px solid rgba(245,200,66,.3);
  border-radius: 100px;
  padding: 1px 6px;
  animation: galePulse 1.8s ease infinite;
}

/* Status badge de GALE no feed */
.feed-status-badge.gale1,
.feed-status-badge.gale2,
.feed-status-badge.pending {
  background: rgba(245,200,66,.15);
  color: var(--gold);
}
.feed-status-badge.gale1 { background: rgba(245,200,66,.18); }
.feed-status-badge.gale2 { background: rgba(255,82,82,.15);  color: var(--red); }

/* Feed card com status gale */
.feed-card.pending .feed-dir { position: relative; }

/* Toast de GALE */
.result-toast.gale {
  background: rgba(245,200,66,.15);
  border: 1px solid rgba(245,200,66,.4);
  color: var(--gold);
}

/* ── Banner de GALE no painel lateral (GSP) ── */
.gsp-gale-banner {
  padding: 7px 10px;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 5px;
  animation: galePulse 1.8s ease infinite;
}
.gsp-gale-banner.gale1 {
  background: rgba(245,200,66,.12);
  border: 1px solid rgba(245,200,66,.35);
  color: var(--gold);
}
.gsp-gale-banner.gale2 {
  background: rgba(255,82,82,.12);
  border: 1px solid rgba(255,82,82,.35);
  color: var(--red);
}
.gsp-gale-inline {
  font-size: .55rem;
  font-weight: 800;
  background: rgba(245,200,66,.2);
  color: var(--gold);
  border-radius: 4px;
  padding: 1px 4px;
  margin-left: 3px;
  vertical-align: middle;
}

/* Bead road */
.bead-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .72rem;
  color: var(--text-muted);
}
.bead-dot        { width: 9px; height: 9px; border-radius: 50%; display: inline-block; margin-right: 2px; }
.bead-dot.player { background: var(--player); }
.bead-dot.banker { background: var(--banker); }
.bead-dot.tie    { background: var(--tie); }

/* ══════════════════════════════════════════
   BEAD ROAD — coluna por coluna, 6 linhas
   Fiel ao original: fundo branco, grade
   cinza, bolas sólidas com gradiente 3D
══════════════════════════════════════════ */

/* Card externo — moldura dourada igual ao original */
.bead-road-box {
  background: #fff !important;
  border: 3px solid #b08e4c !important;
  border-radius: 12px !important;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,220,120,.15);
}
.bead-road-box .signal-box-header {
  background: #f0ead8;
  border-bottom: 1px solid #c8a84a;
  color: #4a3a1a;
}
.bead-road-box .signal-box-header .bead-legend { color: #6a5a30; }
/* Dots da legenda com cor real */
.bead-road-box .bead-dot.player { background: #3366cc; }
.bead-road-box .bead-dot.banker { background: #e23b32; }
.bead-road-box .bead-dot.tie    { background: #d39a2c; }

/* Scroll horizontal suave */
.bead-road-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #c8b97a #f0ead8;
}
.bead-road-scroll::-webkit-scrollbar       { height: 5px; }
.bead-road-scroll::-webkit-scrollbar-thumb { background: #c8b97a; border-radius: 4px; }
.bead-road-scroll::-webkit-scrollbar-track { background: #f0ead8; }

/* Container: flex-row de colunas
   Cada célula = 26×26px (bola 22px + margem 2px cada lado) */
.bead-road {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: max-content;
  background-color: #fff;
  background-image:
    repeating-linear-gradient(to right,  #dedede 0px, #dedede 1px, transparent 1px, transparent 26px),
    repeating-linear-gradient(to bottom, #dedede 0px, #dedede 1px, transparent 1px, transparent 26px);
  background-size: 26px 26px;
}

/* Cada coluna: exatamente 6 bolas */
.bead-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Bola: 22×22px dentro de célula 26×26px (margem 2px) */
.bead {
  width: 22px;
  height: 22px;
  margin: 2px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .6rem;
  font-weight: 900;
  color: #fff;
  cursor: default;
  flex-shrink: 0;
  line-height: 1;
  transition: transform .15s;
  text-shadow: 0 1px 2px rgba(0,0,0,.55);
}
.bead:hover { transform: scale(1.25); z-index: 2; position: relative; }

/* PLAYER — azul royal #3366CC, gradiente 3D */
.bead.player {
  background: radial-gradient(circle at 36% 30%, #6699ff 0%, #2255cc 55%, #1a48b0 100%);
  border: 1.5px solid #1245a0;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.55), 0 2px 5px rgba(30,80,200,.4);
}

/* BANKER — vermelho vivo #E23B32, gradiente 3D */
.bead.banker {
  background: radial-gradient(circle at 36% 30%, #ff7060 0%, #d83020 55%, #b01810 100%);
  border: 1.5px solid #9a1010;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.55), 0 2px 5px rgba(200,30,20,.4);
}

/* EMPATE — dourado âmbar #D39A2C, gradiente 3D */
.bead.tie {
  background: radial-gradient(circle at 36% 30%, #ffe066 0%, #d08c18 55%, #b07010 100%);
  border: 1.5px solid #906000;
  box-shadow: inset 0 2px 3px rgba(255,255,255,.55), 0 2px 5px rgba(180,130,10,.4);
}

/* Célula vazia — transparente, grid aparece */
.bead.bead-empty {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  pointer-events: none;
}

.bead.new-bead { animation: beadPop .4s cubic-bezier(.34,1.56,.64,1); }
@keyframes beadPop { 0%{transform:scale(0) rotate(-20deg);opacity:0} 100%{transform:scale(1) rotate(0deg);opacity:1} }

/* ══════════════════════════════════════════
   FEED DE SINAIS
══════════════════════════════════════════ */
.signals-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.signals-section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}
.signals-section-header h3 {
  font-size: .86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-primary);
}
.signals-section-header h3 i { color: var(--gold); }

.filter-tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.filter-tab  {
  padding: 4px 11px;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  transition: all var(--transition);
}
.filter-tab:hover  { color: var(--text-secondary); border-color: var(--border-bright); }
.filter-tab.active { background: var(--gold-dim); border-color: rgba(245,200,66,.3); color: var(--gold); }

.signals-feed {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  max-height: 340px;
  overflow-y: auto;
}

/* Feed card */
.feed-card {
  background: var(--bg-card2);
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: var(--radius-md);
  padding: 11px 15px;
  display: grid;
  grid-template-columns: 68px 1fr auto auto;
  align-items: center;
  gap: 10px;
  transition: all var(--transition);
}
.feed-card:hover   { border-color: rgba(255,255,255,.1); transform: translateX(3px); }
.feed-card.win     { border-left-color: var(--green); }
.feed-card.loss    { border-left-color: var(--red); }
.feed-card.pending { border-left-color: var(--gold); }
.feed-card.hidden  { display: none !important; }

.feed-dir          { font-family: var(--font-display); font-weight: 800; font-size: .93rem; text-align: center; }
.feed-dir.player   { color: var(--player); }
.feed-dir.banker   { color: var(--banker); }
.feed-dir.tie      { color: var(--tie); }
.feed-info         { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-pattern      { font-size: .76rem; color: var(--text-secondary); }
.feed-meta         { font-size: .68rem; color: var(--text-muted); }
.feed-conf         { font-size: .72rem; font-weight: 700; text-align: right; white-space: nowrap; }
.feed-status       { text-align: right; }
.feed-status-badge {
  padding: 3px 9px;
  border-radius: 100px;
  font-size: .66rem;
  font-weight: 700;
  white-space: nowrap;
}
.feed-status-badge.win     { background: rgba(34,212,123,.15); color: var(--green); }
.feed-status-badge.loss    { background: rgba(255,82,82,.15);  color: var(--red); }
.feed-status-badge.pending { background: rgba(245,200,66,.15); color: var(--gold); }

/* ══════════════════════════════════════════
   GRÁFICOS
══════════════════════════════════════════ */
.charts-row {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
}
.chart-card h4 {
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-secondary);
}
.chart-card h4 i { color: var(--gold); }

/* ══════════════════════════════════════════
   HISTÓRICO
══════════════════════════════════════════ */
.history-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.history-count {
  font-size: .74rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.04);
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid var(--border);
}
.history-table-wrap {
  overflow-x: auto;
  max-height: 280px;
  overflow-y: auto;
}
.history-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .79rem;
}
.history-table thead th {
  background: rgba(255,255,255,.03);
  padding: 9px 13px;
  text-align: left;
  font-size: .67rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}
.history-table tbody td {
  padding: 8px 13px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.history-table tbody tr:hover td { background: rgba(255,255,255,.02); }
.history-table tbody tr:last-child td { border-bottom: none; }

.res-player { color: var(--player); font-weight: 700; }
.res-banker { color: var(--banker); font-weight: 700; }
.res-tie    { color: var(--tie);    font-weight: 700; }

.ht-status {
  padding: 2px 8px;
  border-radius: 100px;
  font-size: .67rem;
  font-weight: 700;
}
.ht-status.win     { background: rgba(34,212,123,.15); color: var(--green); }
.ht-status.loss    { background: rgba(255,82,82,.15);  color: var(--red); }
.ht-status.pending { background: rgba(245,200,66,.15); color: var(--gold); }
.ht-status.none    { background: rgba(255,255,255,.05); color: var(--text-muted); }
.ht-signal-none    { color: var(--text-muted); font-style: italic; }

/* ══════════════════════════════════════════
   TOAST
══════════════════════════════════════════ */
#toastContainer {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.result-toast {
  padding: 11px 18px;
  border-radius: var(--radius-lg);
  font-size: .86rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
  animation: toastIn .4s cubic-bezier(.34,1.56,.64,1), toastOut .4s 2.5s ease forwards;
  box-shadow: 0 8px 28px rgba(0,0,0,.4);
}
.result-toast.win  { background: rgba(34,212,123,.15); border: 1px solid rgba(34,212,123,.4);  color: var(--green); }
.result-toast.loss { background: rgba(255,82,82,.15);  border: 1px solid rgba(255,82,82,.4);   color: var(--red); }
.result-toast.tie  { background: rgba(34,212,123,.1);  border: 1px solid rgba(34,212,123,.25); color: var(--green); }
@keyframes toastIn  { from{opacity:0;transform:translateY(20px) scale(.9)} to{opacity:1;transform:translateY(0) scale(1)} }
@keyframes toastOut { from{opacity:1} to{opacity:0;transform:translateY(10px)} }

/* ══════════════════════════════════════════
   ABA JOGO AO VIVO
   Ocupa exatamente a altura restante da viewport
══════════════════════════════════════════ */
#tab-jogo         { display: none; }
#tab-jogo.active  {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  overflow: hidden;
}

.game-split-layout {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* Área do game */
.game-area {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 10px;
  overflow: hidden;
}

.game-window-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-card2);
  border: 1px solid var(--border-bright);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 44px rgba(0,0,0,.5);
}

.gwc-titlebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  gap: 8px;
}
.gwc-title {
  display: flex; align-items: center; gap: 8px;
  font-size: .81rem; font-weight: 700; color: var(--text-primary);
}
.gwc-title i { color: var(--gold); }
.gwc-live-badge {
  font-size: .58rem; font-weight: 800; color: var(--green);
  background: rgba(34,212,123,.1); border: 1px solid rgba(34,212,123,.22);
  padding: 2px 7px; border-radius: 100px; animation: pulse 2s infinite;
}
.gwc-controls { display: flex; align-items: center; gap: 5px; }
.gwc-btn {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--border); border-radius: 7px;
  color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; transition: all var(--transition); text-decoration: none;
}
.gwc-btn:hover { background: rgba(255,255,255,.1); color: var(--text-primary); border-color: var(--border-bright); }
.gwc-btn.gwc-expand { background: rgba(245,200,66,.09); border-color: rgba(245,200,66,.22); color: var(--gold); }
.gwc-btn.gwc-expand:hover { background: rgba(245,200,66,.18); }

.gwc-body {
  flex: 1; min-height: 0;
  position: relative;
  background: #000;
}
#gameIframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: none; display: none;
}

.gwc-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  background: var(--bg-card2); z-index: 10; gap: 12px;
}
.gwc-spinner {
  width: 34px; height: 34px;
  border: 3px solid rgba(255,255,255,.07);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.gwc-loading p { color: var(--text-secondary); font-size: .82rem; }

.gwc-blocked {
  position: absolute; inset: 0;
  background: var(--bg-card2);
  display: none;
  flex-direction: column;
  align-items: center; justify-content: center;
  z-index: 15; padding: 20px; overflow-y: auto; text-align: center;
}
.gwc-blocked-inner { max-width: 560px; width: 100%; }
.gwc-blocked-icon  {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(245,200,66,.1); border: 1px solid rgba(245,200,66,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; color: var(--gold); margin: 0 auto 14px;
}
.gwc-blocked-inner h3 { font-size: .94rem; font-weight: 700; margin-bottom: 7px; }
.gwc-blocked-inner > p { font-size: .81rem; color: var(--text-secondary); line-height: 1.6; margin-bottom: 16px; }

.gwc-steps {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  margin: 0 auto 16px; text-align: left;
}
.gwc-step {
  display: flex; align-items: flex-start; gap: 8px;
  background: rgba(255,255,255,.03); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 10px;
}
.gwc-step-n {
  width: 20px; height: 20px; flex-shrink: 0;
  background: rgba(245,200,66,.1); border: 1px solid rgba(245,200,66,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .64rem; font-weight: 800; color: var(--gold);
}
.gwc-step-txt { font-size: .72rem; color: var(--text-secondary); line-height: 1.5; }
.gwc-step-txt strong { color: var(--text-primary); }

kbd {
  background: rgba(255,255,255,.08); border: 1px solid var(--border-bright);
  border-radius: 4px; padding: 1px 5px; font-size: .72rem; font-family: monospace;
}

.gwc-blocked-btns { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-bottom: 12px; }
.gwc-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 15px; border-radius: 10px;
  font-size: .78rem; font-weight: 700;
  cursor: pointer; transition: all var(--transition); text-decoration: none; border: none;
}
.gwc-action-btn.gold  { background: linear-gradient(135deg,#f5c842,#e0a400); color: #0a0b0f; }
.gwc-action-btn.gold:hover { transform: translateY(-2px); box-shadow: var(--gold-glow); }
.gwc-action-btn.ghost { background: rgba(255,255,255,.06); border: 1px solid var(--border-bright); color: var(--text-primary); }
.gwc-action-btn.ghost:hover { background: rgba(255,255,255,.1); }
.gwc-action-btn.proxy { background: var(--player-bg); border: 1px solid var(--player-bd); color: var(--player); }
.gwc-action-btn.proxy:hover { background: rgba(79,163,255,.22); }

.gwc-tip {
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 13px;
  display: flex; align-items: flex-start; gap: 7px;
  text-align: left; font-size: .72rem; color: var(--text-muted); line-height: 1.6;
}
.gwc-tip i { color: var(--gold); flex-shrink: 0; margin-top: 2px; }

/* Divisor redimensionável */
.game-resize-handle {
  width: 5px; flex-shrink: 0;
  background: var(--border); cursor: col-resize;
  display: flex; align-items: center; justify-content: center;
  transition: background .2s; z-index: 10;
}
.game-resize-handle:hover,
.game-resize-handle.dragging { background: rgba(245,200,66,.25); }
.game-resize-handle::after {
  content: '';
  width: 3px; height: 32px;
  background: repeating-linear-gradient(to bottom, var(--border-bright) 0, var(--border-bright) 2px, transparent 2px, transparent 6px);
  border-radius: 2px;
}

/* Painel lateral de sinais (tab Jogo) */
.game-signal-panel {
  width: 300px;
  min-width: 200px;
  max-width: 460px;
  flex-shrink: 0;
  background: var(--bg-dark);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: width .28s ease, min-width .28s ease;
}
.game-signal-panel.collapsed {
  width: 40px !important;
  min-width: 40px !important;
}
.game-signal-panel.collapsed .gsp-body-content {
  opacity: 0;
  pointer-events: none;
}

.gsp-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px;
  background: rgba(255,255,255,.025);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; white-space: nowrap; overflow: hidden;
}
.gsp-head-title {
  display: flex; align-items: center; gap: 6px;
  font-size: .78rem; font-weight: 700; color: var(--text-secondary);
}
.gsp-head-title i { color: var(--gold); }
.gsp-head-right { display: flex; align-items: center; gap: 5px; }
.gsp-live-badge {
  font-size: .56rem; font-weight: 800; color: var(--green);
  background: rgba(34,212,123,.1); border: 1px solid rgba(34,212,123,.22);
  padding: 2px 6px; border-radius: 100px;
}
.gsp-collapse-btn {
  width: 24px; height: 24px; background: transparent;
  border: 1px solid var(--border); border-radius: 6px; cursor: pointer;
  color: var(--text-muted); display: flex; align-items: center; justify-content: center;
  font-size: .64rem; transition: all var(--transition); flex-shrink: 0;
}
.gsp-collapse-btn:hover { background: rgba(255,255,255,.07); color: var(--text-primary); }
#panelChevron { transition: transform .25s; }
.game-signal-panel.collapsed #panelChevron { transform: rotate(180deg); }

.gsp-body-content {
  flex: 1; overflow-y: auto;
  display: flex; flex-direction: column;
  transition: opacity .22s;
}
.gsp-body-content::-webkit-scrollbar { width: 3px; }
.gsp-body-content::-webkit-scrollbar-thumb { background: #222530; border-radius: 3px; }

.gsp-result-bar {
  padding: 10px 11px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.gsp-result-bar.has-signal { background: rgba(245,200,66,.04); border-bottom-color: rgba(245,200,66,.18); }
.gsp-result-label {
  display: flex; align-items: center; gap: 6px;
  font-size: .66rem; font-weight: 600; color: var(--text-muted); margin-bottom: 7px;
}
.gsp-result-bar.has-signal .gsp-result-label { color: var(--gold); }
.gsp-result-btns { display: flex; gap: 5px; }
.gsp-btn {
  flex: 1; padding: 7px 3px; border-radius: 7px;
  font-size: .67rem; font-weight: 800;
  cursor: pointer; border: 1.5px solid transparent;
  transition: all var(--transition); text-align: center;
}
.gsp-btn.player { background: var(--player-bg); border-color: var(--player-bd); color: var(--player); }
.gsp-btn.player:hover { background: rgba(79,163,255,.22); transform: translateY(-1px); }
.gsp-btn.banker { background: var(--banker-bg); border-color: var(--banker-bd); color: var(--banker); }
.gsp-btn.banker:hover { background: rgba(255,82,82,.22); transform: translateY(-1px); }
.gsp-btn.tie    { background: var(--tie-bg);    border-color: var(--tie-bd);    color: var(--tie); }
.gsp-btn.tie:hover    { background: rgba(34,212,123,.22); transform: translateY(-1px); }
.gsp-btn:active { transform: scale(.95); }

.gsp-active-signal {
  padding: 12px; border-bottom: 1px solid var(--border);
  flex-shrink: 0; min-height: 100px;
  display: flex; flex-direction: column; justify-content: center;
}
.gsp-sig-placeholder {
  display: flex; flex-direction: column; align-items: center;
  gap: 7px; color: var(--text-muted); font-size: .76rem; padding: 10px 0; text-align: center;
}
.gsp-sig-placeholder i { font-size: 1.3rem; }
.gsp-sig-direction {
  font-family: var(--font-display); font-size: 1.4rem; font-weight: 900;
  margin-bottom: 7px; display: flex; align-items: center; gap: 8px;
}
.gsp-sig-direction.player { color: var(--player); }
.gsp-sig-direction.banker { color: var(--banker); }
.gsp-sig-direction.tie    { color: var(--tie); }
.gsp-sig-badge {
  font-size: .6rem; font-weight: 700; padding: 2px 8px; border-radius: 100px;
}
.gsp-sig-badge.high   { background: rgba(34,212,123,.14); color: var(--green); }
.gsp-sig-badge.medium { background: rgba(245,200,66,.14); color: var(--gold); }
.gsp-sig-badge.low    { background: rgba(255,82,82,.14);  color: var(--red); }
.gsp-sig-rows { display: flex; flex-direction: column; gap: 3px; }
.gsp-sig-row  {
  display: flex; justify-content: space-between; font-size: .67rem;
  padding: 4px 7px; background: rgba(255,255,255,.02);
  border-radius: 6px; border: 1px solid var(--border);
}
.gsp-sig-key  { color: var(--text-muted); }
.gsp-sig-val  { font-weight: 700; color: var(--text-primary); }
.gsp-sig-alert {
  margin-top: 7px; padding: 5px 8px;
  background: rgba(245,200,66,.06); border: 1px solid rgba(245,200,66,.18);
  border-radius: 6px; font-size: .62rem; color: var(--gold); line-height: 1.4;
}

.gsp-section { padding: 9px 11px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.gsp-section-label {
  font-size: .57rem; font-weight: 700; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 1px; margin-bottom: 6px;
  display: flex; align-items: center; gap: 4px;
}
.gsp-section-label i { color: var(--gold); }

/* GSP bead road — coluna por coluna, 6 linhas, scroll horizontal */
.gsp-bead-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #c8b97a #f0ead8;
}
.gsp-bead-scroll::-webkit-scrollbar       { height: 3px; }
.gsp-bead-scroll::-webkit-scrollbar-thumb { background: #c8b97a; border-radius: 3px; }
.gsp-bead-scroll::-webkit-scrollbar-track { background: #f0ead8; }

.gsp-bead-row {
  display: flex;
  flex-direction: row;
  gap: 0;
  width: max-content;
  background: #fff;
  background-image:
    repeating-linear-gradient(to right, #ddd 0, #ddd 1px, transparent 1px, transparent 24px),
    repeating-linear-gradient(to bottom, #ddd 0, #ddd 1px, transparent 1px, transparent 24px);
  background-size: 24px 24px;
  padding: 1px 0 0 1px;
}
.gsp-bead-col {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.gsp-bead {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .52rem; font-weight: 900; flex-shrink: 0;
  line-height: 1; color: #fff;
  margin: 2px;
  text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.gsp-bead.player {
  background: radial-gradient(circle at 38% 35%, #5ab0ff, #1a6fd4);
  border: 1.5px solid #1458b0;
  box-shadow: inset 0 1px 3px rgba(255,255,255,.35), 0 1px 4px rgba(26,111,212,.5);
}
.gsp-bead.banker {
  background: radial-gradient(circle at 38% 35%, #ff6b6b, #cc1a1a);
  border: 1.5px solid #a01010;
  box-shadow: inset 0 1px 3px rgba(255,255,255,.35), 0 1px 4px rgba(204,26,26,.5);
}
.gsp-bead.tie {
  background: radial-gradient(circle at 38% 35%, #ffd84d, #c8880a);
  border: 1.5px solid #a06a00;
  box-shadow: inset 0 1px 3px rgba(255,255,255,.4),  0 1px 4px rgba(200,136,10,.5);
  color: #fff;
}
.gsp-bead.gsp-bead-empty {
  background: transparent; border: none; box-shadow: none; pointer-events: none;
}

.gsp-stats {
  display: grid; grid-template-columns: repeat(4,1fr);
  padding: 9px 11px; gap: 5px;
  border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.gsp-stat     { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.gsp-stat-val { font-family: var(--font-display); font-size: .87rem; font-weight: 800; }
.gsp-stat-lbl { font-size: .54rem; color: var(--text-muted); text-transform: uppercase; }

.gsp-feed-wrap { flex: 1; overflow: hidden; min-height: 0; display: flex; flex-direction: column; }
.gsp-feed {
  display: flex; flex-direction: column; gap: 5px;
  overflow-y: auto; flex: 1; padding: 9px 11px;
}
.gsp-feed-card {
  background: rgba(255,255,255,.02); border: 1px solid var(--border);
  border-left: 2px solid transparent;
  border-radius: 7px; padding: 7px 9px;
  display: flex; align-items: center; gap: 7px; font-size: .7rem;
}
.gsp-feed-card.win     { border-left-color: var(--green); }
.gsp-feed-card.loss    { border-left-color: var(--red); }
.gsp-feed-card.pending { border-left-color: var(--gold); }
.gsp-feed-dir { font-weight: 800; font-size: .74rem; min-width: 44px; flex-shrink: 0; }
.gsp-feed-dir.player { color: var(--player); }
.gsp-feed-dir.banker { color: var(--banker); }
.gsp-feed-dir.tie    { color: var(--tie); }
.gsp-feed-info   { flex: 1; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gsp-feed-status { font-size: .66rem; flex-shrink: 0; }

.gsp-streak {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 11px; font-size: .71rem; flex-shrink: 0;
  border-top: 1px solid var(--border);
}
.gsp-streak-label { color: var(--text-muted); }
.gsp-streak-val   { font-weight: 800; font-family: var(--font-display); }

/* Modo expandido */
.game-split-layout.game-expanded .game-signal-panel,
.game-split-layout.game-expanded .game-resize-handle { display: none; }
.game-split-layout.game-expanded .game-area { padding: 0; }
.game-split-layout.game-expanded .game-window-card { border-radius: 0; border: none; }

/* ══════════════════════════════════════════
   ANIMAÇÕES
══════════════════════════════════════════ */
@keyframes spin    { from{transform:rotate(0deg)} to{transform:rotate(360deg)} }
@keyframes slideIn { from{opacity:0;transform:translateX(-8px)} to{opacity:1;transform:translateX(0)} }

/* ══════════════════════════════════════════
   RESPONSIVIDADE
══════════════════════════════════════════ */

/* ≤1280px: KPIs em 3 colunas */
@media (max-width: 1280px) {
  .kpi-strip      { grid-template-columns: repeat(3, 1fr); }
  .charts-row     { grid-template-columns: 1fr; }
  #tab-painel     { padding: 18px 18px 80px; }
}

/* ≤1100px: oculta nav-links */
@media (max-width: 1100px) {
  .nav-container--dash .nav-links { display: none; }
  .nav-container--dash .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px; right: 0;
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 0 0 var(--radius-md) var(--radius-md);
    padding: 12px;
    gap: 4px;
    z-index: 999;
    min-width: 160px;
  }
  .nav-toggle { display: flex !important; }
}

/* ≤960px: sidebar vira drawer */
@media (max-width: 960px) {
  .sidebar {
    position: fixed;
    left: -270px;
    top: 64px;
    z-index: 900;
    transition: left .3s ease;
  }
  .sidebar.open { left: 0; box-shadow: 12px 0 40px rgba(0,0,0,.5); }
  .kpi-strip      { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-top  { grid-template-columns: 1fr; }
  #tab-painel     { padding: 14px 14px 80px; }
  .game-split-layout { flex-direction: column; }
  .game-area      { padding: 8px; }
  .game-signal-panel {
    width: 100% !important; min-width: 100% !important; max-width: 100% !important;
    height: 260px; border-left: none; border-top: 1px solid var(--border);
  }
  .game-resize-handle { display: none; }
  .gwc-steps { grid-template-columns: 1fr; }
}

/* ≤600px: mobile */
@media (max-width: 600px) {
  .kpi-strip  { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .kpi-card   { padding: 11px 12px; gap: 8px; }
  .kpi-value  { font-size: 1rem; }
  .feed-card  { grid-template-columns: 52px 1fr; grid-template-rows: auto auto; }
  .feed-conf, .feed-status { display: none; }
  .dash-title h1 { font-size: 1.1rem; }
  .dash-tab-btn span:not(.tab-live-dot) { display: none; }
  .dash-tab-btn { padding: 7px 10px; }
  .mr-hint    { display: none; }
  .mr-btn     { padding: 8px 12px; font-size: .78rem; }
  .charts-row { grid-template-columns: 1fr; }
}
