:root {
  --bg: #0d1117;
  --panel: #161b22;
  --panel-2: #1f262e;
  --panel-3: #262d36;
  --text: #e6edf3;
  --muted: #9ba8b3;
  --muted-2: #6c7681;
  --border: #2a313a;
  --border-strong: #3a4250;
  --accent: #4f8cff;
  --accent-2: #2c5fcc;
  --green: #2ea043;
  --red: #f85149;
  --yellow: #d4a72c;
  --void: #6c7681;

  /* Scale de espaçamento e raios consistentes */
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.4);

  --tx-fast: 0.12s ease;
  --tx-base: 0.2s ease;
}
* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Oxygen, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, rgba(79, 140, 255, 0.06), transparent 60%),
    radial-gradient(900px 500px at 0% 110%, rgba(46, 160, 67, 0.04), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
/* Números monospaced em pílulas e tabelas pra alinhamento visual */
.summary .pill, .kpi .value, table td, .quota-pill {
  font-variant-numeric: tabular-nums;
}
::selection { background: rgba(79, 140, 255, 0.35); }

/* ===== Chart Loader (mini, em botões) ===== */
.chart-loader {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 22px;
  padding: 0 2px;
}
.chart-loader span {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: linear-gradient(to top, #2ea043 0%, #4f8cff 100%);
  transform-origin: bottom center;
  animation: chart-bar 1.1s ease-in-out infinite;
  opacity: 0.85;
}
.chart-loader span:nth-child(1) { animation-delay: 0.00s; height: 35%; }
.chart-loader span:nth-child(2) { animation-delay: 0.10s; height: 55%; }
.chart-loader span:nth-child(3) { animation-delay: 0.20s; height: 70%; }
.chart-loader span:nth-child(4) { animation-delay: 0.30s; height: 85%; }
.chart-loader span:nth-child(5) { animation-delay: 0.40s; height: 100%; }
@keyframes chart-bar {
  0%, 100% { transform: scaleY(0.25); opacity: 0.45; }
  50%      { transform: scaleY(1);    opacity: 1; }
}
.chart-loader.lg { height: 36px; gap: 4px; }
.chart-loader.lg span { width: 6px; border-radius: 3px; }
.chart-loader.sm { height: 16px; gap: 2px; }
.chart-loader.sm span { width: 3px; }

/* Texto + loader inline (status nos modais) */
.loading-line {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.loading-line .chart-loader { flex-shrink: 0; }

/* Botão em estado loading (substitui conteúdo interno) */
button.is-loading {
  pointer-events: none;
  position: relative;
}
button.is-loading > *:not(.chart-loader) { visibility: hidden; }
button.is-loading .chart-loader {
  position: absolute;
  inset: 0;
  margin: auto;
  display: inline-flex;
}
button.is-loading.btn-primary .chart-loader span {
  background: linear-gradient(to top, rgba(255,255,255,0.7), white);
}

/* Material Symbols (ícones) */
.material-symbols-rounded, .icon {
  font-family: 'Material Symbols Rounded';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  user-select: none;
  vertical-align: middle;
}
.icon-sm { font-size: 16px; }
.icon-md { font-size: 20px; }
.icon-lg { font-size: 24px; }
.icon-fill { font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24; }

/* ===== Scrollbar custom (WebKit + Firefox) ===== */
* {
  scrollbar-width: thin;
  scrollbar-color: #2c333d var(--bg);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: var(--bg);
  border-radius: 8px;
}
*::-webkit-scrollbar-thumb {
  background: #2c333d;
  border-radius: 8px;
  border: 2px solid var(--bg);
}
*::-webkit-scrollbar-thumb:hover {
  background: #3a4250;
}
*::-webkit-scrollbar-thumb:active {
  background: var(--accent);
}
*::-webkit-scrollbar-corner { background: var(--bg); }
/* ===== Shell: sidebar + main ===== */
body.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  z-index: 50;
}
.sidebar-brand {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 72px;
  flex-shrink: 0;
}
.sidebar-brand .brand-logo {
  max-width: 100%;
  max-height: 56px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.sidebar-nav {
  flex: 1;
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.sidebar-nav .tab {
  background: transparent;
  color: var(--muted);
  border: none;
  border-left: 3px solid transparent;
  border-radius: var(--r-md);
  padding: 10px 14px 10px 11px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: background var(--tx-fast), color var(--tx-fast);
}
.sidebar-nav .tab .icon {
  font-size: 20px;
  color: var(--muted-2);
  transition: color var(--tx-fast);
}
.sidebar-nav .tab:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.sidebar-nav .tab:hover .icon { color: var(--muted); }
.sidebar-nav .tab.active {
  background: linear-gradient(90deg, rgba(79,140,255,0.18), rgba(44,95,204,0.05));
  color: var(--text);
  border-left-color: var(--accent);
}
.sidebar-nav .tab.active .icon { color: var(--accent); font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24; }

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.user-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: var(--r-md);
  background: var(--panel-2);
}
.user-card .user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #4f8cff 0%, #2c5fcc 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}
.user-card .user-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.user-card .user-name {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card .user-email {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.user-card .user-plan {
  display: inline-block;
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  margin-top: 2px;
  letter-spacing: 0.4px;
  align-self: flex-start;
}

.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Topbar minimalista — só pílulas à direita.
   Altura = altura do sidebar-brand pra a borda bottom alinhar. */
.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 28px;
  background: rgba(22, 27, 34, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
  height: 72px;
  flex-shrink: 0;
}
.topbar .grow { flex: 1; }
.tab-content {
  display: none;
  padding: 24px 28px 32px;
  animation: tab-fade 0.2s ease-out;
}
.tab-content.active { display: block; }
@keyframes tab-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.filters input, .filters select, .filters button {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 14px;
  font-size: 13px;
  height: 40px;
  transition: border-color var(--tx-fast), box-shadow var(--tx-fast), background var(--tx-fast);
}
.filters button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  background: var(--panel-2);
  font-weight: 500;
}
.filters input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,140,255,0.15); }
.filters button:hover { border-color: var(--border-strong); background: var(--panel-3); }
.filter-search {
  flex: 1 1 280px;
  min-width: 240px;
  max-width: 480px;
}
.filter-search:focus { outline: none !important; border-color: var(--accent) !important; }

.filters .filter-dd {
  flex: 0 0 auto;        /* não cresce nem encolhe */
  width: auto;
  min-width: 0;
  display: inline-block;
}
.filters .filter-dd .dd-trigger {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 9px 30px 9px 14px;
  font-size: 13px;
  height: 40px;
  width: auto;
  min-width: 150px;       /* ~"Todos jogos" */
  transition: border-color var(--tx-fast);
  max-width: 220px;
}
.filters button { cursor: pointer; }
.filters button:hover { background: var(--panel-2); }
.grow { flex: 1; }

/* ===== Indicadores (cards de resumo) =====
   Flex wrap (não grid) pra cada card poder ter MIN-WIDTH próprio:
   - default: 165px (Total, Resolvidas, Pendentes)
   - .sc-compact: 130px (Greens, Reds, ROI — números curtos)
   - .sc-wide: 215px (Lucro — pode ter "+R$ 14.485,04" sem quebrar) */
.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.summary .stat-card {
  flex: 1 1 165px;
  min-width: 165px;
}
.summary .stat-card.sc-compact {
  flex: 1 1 130px;
  min-width: 130px;
}
.summary .stat-card.sc-wide {
  flex: 1.3 1 215px;
  min-width: 215px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: hidden;
  transition: transform var(--tx-fast), border-color var(--tx-fast), box-shadow var(--tx-fast);
  cursor: default;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--sc-tint, transparent), transparent 60%);
  opacity: 0;
  transition: opacity var(--tx-base);
  pointer-events: none;
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--sc-border, var(--border-strong));
  box-shadow: var(--shadow-md);
}
.stat-card:hover::before { opacity: 1; }
.stat-card .sc-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sc-icon-bg, rgba(79, 140, 255, 0.12));
  color: var(--sc-icon-color, var(--accent));
  flex-shrink: 0;
}
.stat-card .sc-icon .icon { font-size: 22px; }
.stat-card .sc-content { min-width: 0; flex: 1; }
.stat-card .sc-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  font-weight: 600;
  margin-bottom: 2px;
}
.stat-card .sc-value {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.3px;
  font-variant-numeric: tabular-nums;
  /* Nunca quebra o número em 2 linhas — se não couber, reduz fonte (clamp). */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Lucro: número grande pode ser "R$ 999.999,99". Dá um pouquinho mais de fôlego
   pro container e usa clamp pra ajustar fonte automaticamente em telas estreitas. */
.stat-card.sc-wide .sc-value {
  font-size: clamp(18px, 2.2vw, 22px);
}
.stat-card .sc-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* Variantes coloridas */
.stat-card.sc-green {
  --sc-icon-bg: rgba(46, 160, 67, 0.14);
  --sc-icon-color: var(--green);
  --sc-tint: rgba(46, 160, 67, 0.08);
  --sc-border: rgba(46, 160, 67, 0.5);
}
.stat-card.sc-red {
  --sc-icon-bg: rgba(248, 81, 73, 0.14);
  --sc-icon-color: var(--red);
  --sc-tint: rgba(248, 81, 73, 0.08);
  --sc-border: rgba(248, 81, 73, 0.5);
}
.stat-card.sc-yellow {
  --sc-icon-bg: rgba(212, 167, 44, 0.14);
  --sc-icon-color: var(--yellow);
  --sc-tint: rgba(212, 167, 44, 0.08);
  --sc-border: rgba(212, 167, 44, 0.5);
}
.stat-card.sc-muted {
  --sc-icon-bg: rgba(155, 168, 179, 0.10);
  --sc-icon-color: var(--muted);
  --sc-border: var(--border-strong);
}
.stat-card.sc-accent {
  --sc-icon-bg: rgba(79, 140, 255, 0.14);
  --sc-icon-color: var(--accent);
  --sc-tint: rgba(79, 140, 255, 0.06);
  --sc-border: var(--accent);
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: auto;
  max-height: calc(100vh - 260px);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; }
thead {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  z-index: 1;
  box-shadow: 0 1px 0 var(--border);
}
th, td {
  padding: 14px 18px;
  text-align: left;
  border-bottom: 1px solid rgba(42, 49, 58, 0.6);
  font-size: 13.5px;
  vertical-align: middle;
}
th {
  font-weight: 600;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 14px 20px;
  white-space: nowrap;
}
/* Primeira e última coluna grudam nas bordas */
th:first-child, td:first-child { padding-left: 24px; }
th:last-child, td:last-child {
  padding-right: 24px;
  text-align: right;
  white-space: nowrap;
}

/* Bets table — larguras balanceadas, espaçamento melhor pras numéricas
   IMPORTANTE: a 1ª coluna passou a ser checkbox (multi-select).
   Numeração das colunas: 1=check, 2=Data, 3=Tipster, 4=Jogo, 5=Aposta,
                          6=Mercado/Seleção, 7=Odd, 8=Un., 9=Stake,
                          10=Status, 11=Lucro, 12=Ações */
#bets-table { min-width: 1300px; table-layout: auto; width: 100%; }
#bets-table th, #bets-table td { white-space: nowrap; }
#bets-table th:nth-child(2),  /* Data */
#bets-table td:nth-child(2) { width: 138px; }
#bets-table th:nth-child(3),  /* Tipster */
#bets-table td:nth-child(3) { width: 160px; white-space: normal; }
#bets-table th:nth-child(4),  /* Jogo */
#bets-table td:nth-child(4) { width: 110px; }
#bets-table th:nth-child(5),  /* Aposta */
#bets-table td:nth-child(5) { width: 240px; white-space: normal; }
#bets-table th:nth-child(6),  /* Mercado / Seleção */
#bets-table td:nth-child(6) { width: 240px; white-space: normal; }
#bets-table th:nth-child(7),  /* Odd */
#bets-table td:nth-child(7)  { width: 92px; text-align: center; padding-left: 8px; padding-right: 8px; }
#bets-table th:nth-child(8),  /* Un. */
#bets-table td:nth-child(8)  { width: 86px; text-align: center; padding-left: 8px; padding-right: 8px; }
#bets-table th:nth-child(9),  /* Stake */
#bets-table td:nth-child(9)  { width: 110px; padding-left: 12px; padding-right: 12px; }
#bets-table th:nth-child(10), /* Status */
#bets-table td:nth-child(10) { width: 102px; text-align: center; padding-left: 8px; padding-right: 8px; }
#bets-table th:nth-child(11), /* Lucro */
#bets-table td:nth-child(11) { width: 124px; padding-left: 12px; padding-right: 12px; }
#bets-table th:nth-child(12), /* Ações */
#bets-table td:nth-child(12) { width: 122px; padding-left: 6px; padding-right: 18px; }

tbody tr {
  transition: background var(--tx-fast);
}
tbody tr:hover { background: rgba(79, 140, 255, 0.04); }
tbody tr:last-child td { border-bottom: none; }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.status-pending { background: rgba(212, 167, 44, 0.12); color: var(--yellow); border-color: rgba(212, 167, 44, 0.25); }
.status-warn    { background: rgba(247, 184, 1, 0.14); color: var(--yellow, #f7b801); border-color: rgba(247, 184, 1, 0.4); cursor: pointer; }
.status-warn:hover { background: rgba(247, 184, 1, 0.22); }
.status-warn .icon { font-size: 14px; }
.status-green   { background: rgba(46, 160, 67, 0.14);  color: var(--green);  border-color: rgba(46, 160, 67, 0.3); }
.status-red     { background: rgba(248, 81, 73, 0.14);  color: var(--red);    border-color: rgba(248, 81, 73, 0.3); }
.status-void    { background: rgba(108, 118, 129, 0.15); color: var(--void);  border-color: rgba(108, 118, 129, 0.3); }

.profit-pos { color: var(--green); font-weight: 600; }
.profit-neg { color: var(--red); font-weight: 600; }
.profit-zero { color: var(--muted); }

td.actions {
  text-align: right;
  padding-right: 22px;
  white-space: nowrap;
}
td.actions button + button { margin-left: 6px; }
.actions button {
  background: var(--panel-2);
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
  font-size: 13px;
  cursor: pointer;
  transition: all var(--tx-fast);
  padding: 0;
}
/* Cores nativas por ação — visível desde o estado normal */
.actions .btn-green {
  color: var(--green);
  background: rgba(46, 160, 67, 0.10);
  border-color: rgba(46, 160, 67, 0.35);
}
.actions .btn-red {
  color: var(--red);
  background: rgba(248, 81, 73, 0.10);
  border-color: rgba(248, 81, 73, 0.35);
}
.actions .btn-more {
  color: var(--muted);
}
.actions button:hover {
  background: var(--panel-2);
  border-color: var(--border-strong);
  color: var(--text);
}
.actions .btn-green:hover {
  background: rgba(46, 160, 67, 0.20);
  border-color: var(--green);
  box-shadow: 0 0 0 2px rgba(46, 160, 67, 0.15);
}
.actions .btn-red:hover {
  background: rgba(248, 81, 73, 0.20);
  border-color: var(--red);
  box-shadow: 0 0 0 2px rgba(248, 81, 73, 0.15);
}
.actions .btn-more:hover {
  color: var(--text);
  border-color: var(--border-strong);
  background: var(--panel-3);
}

td.editable { cursor: pointer; }
td.editable:hover { background: var(--panel-2); }

/* Quando uma célula entra em modo edição, reduz padding pra dar mais espaço pro input.
   A classe .is-editing é adicionada via JS em editCell(). */
td.editable.is-editing {
  padding-left: 6px !important;
  padding-right: 6px !important;
}

td input.inline {
  width: 100%;
  min-width: 0;     /* permite encolher dentro de células estreitas */
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  padding: 6px 8px;
  font-size: 13.5px;
  font-variant-numeric: tabular-nums;  /* dígitos alinhados */
  outline: none;
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
  text-align: inherit;  /* herda center das colunas Odd/Un./Status */
}

/* Esconde spinners do <input type="number"> — gastam ~16px e ficam feios em
   células estreitas. A validação numérica continua via inputmode + step. */
td input.inline[type="number"]::-webkit-outer-spin-button,
td input.inline[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
td input.inline[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ===== Dashboard toolbar ===== */
.stats-toolbar {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 22px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 10px 14px;
  box-shadow: var(--shadow-sm);
}
.stats-toolbar::before {
  content: "calendar_month";
  font-family: 'Material Symbols Rounded';
  font-size: 20px;
  color: var(--muted);
  font-variation-settings: 'FILL' 0;
  margin-left: 4px;
}
.presets {
  display: flex;
  gap: 2px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 4px;
}
.presets button {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 18px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.2px;
  transition: all var(--tx-fast);
}
.presets button:hover { color: var(--text); background: var(--panel-2); }
.presets button.active {
  background: linear-gradient(135deg, #4f8cff, #2c5fcc);
  color: white;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.3);
  font-weight: 600;
}
.stats-toolbar .date-range {
  background: var(--bg);
  height: 40px;
  padding: 0 14px;
}
.stats-toolbar .date-range:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,140,255,0.15);
}
.date-range {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 12px;
  height: 40px;
  transition: border-color var(--tx-fast);
}
.date-range:hover { border-color: var(--border-strong); }
.date-range input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 13px;
  padding: 9px 4px;
  width: 110px;
  cursor: pointer;
  height: 38px;
}
.date-range input:focus { outline: none; }
.date-range .sep { color: var(--muted); font-size: 12px; }

/* flatpickr ajustes pra combinar com o tema */
.flatpickr-calendar.dark { background: var(--panel); border: 1px solid var(--border); }

.kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 1400px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  min-width: 0;
  position: relative;
  overflow: hidden;
  transition: transform var(--tx-fast), border-color var(--tx-fast), box-shadow var(--tx-fast);
}
.kpi::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.025), transparent 60%);
  pointer-events: none;
}
.kpi:hover {
  transform: translateY(-2px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}
.kpi .label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.kpi .value {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi .sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.grid-charts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
@media (max-width: 1100px) {
  .grid-charts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .grid-charts { grid-template-columns: 1fr; }
}
.card.chart-large { grid-column: 1 / -1; }
.card.chart-large canvas { max-height: 320px; }

.form-card {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 14px 18px;
  flex-wrap: wrap;
}
.form-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  color: var(--muted);
}
.form-card-header .icon { color: var(--accent); }
.form-card-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}
.form-card-count {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
}
.recent-form {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  flex: 1;
  align-items: center;
  min-width: 200px;
}
.recent-form-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.recent-form-stats .rfs-item { display: flex; flex-direction: column; align-items: flex-end; }
.recent-form-stats .rfs-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}
.recent-form-stats .rfs-value {
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.form-pill {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  color: white;
  transition: transform var(--tx-fast);
}
.form-pill:hover { transform: scale(1.12); }
.form-pill.green { background: var(--green); }
.form-pill.red { background: var(--red); }
.form-pill.void { background: var(--void); }
.form-pill.pending {
  background: rgba(212, 167, 44, 0.18);
  color: var(--yellow);
  border: 1px solid rgba(212, 167, 44, 0.4);
}

.kpi.kpi-highlight {
  background: linear-gradient(135deg, rgba(46,160,67,0.15), rgba(79,140,255,0.05));
  border-color: rgba(46,160,67,0.4);
}
.kpi.kpi-warning {
  background: linear-gradient(135deg, rgba(248,81,73,0.15), rgba(248,81,73,0.05));
  border-color: rgba(248,81,73,0.4);
}
/* (definição mesclada acima) */
.grid-tables {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  align-items: start;
}

/* Wrapper do ranking de tipsters: scroll vertical quando passa do tamanho
   do card vizinho (maiores greens & perdas, ~10+10 itens). Mantém visual
   equilibrado mesmo com 20+ tipsters. */
.tipsters-scroll {
  max-height: 581px;
  overflow-y: auto;
  /* sticky header pra continuar visível durante o scroll */
}
.tipsters-scroll table { width: 100%; }
.tipsters-scroll thead th {
  position: sticky;
  top: 0;
  background: var(--panel);
  z-index: 1;
}
.rank-card h3.green { color: var(--green); }
.rank-card h3.red { color: var(--red); }
.rank-card h3.green .icon { color: var(--green); }
.rank-card h3.red .icon { color: var(--red); }
.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--tx-base);
}
.card h3 {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.card h3 .icon { color: var(--accent); }
.card-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.card-toolbar h3 { flex: 1; }
.card-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.card-nav button {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 6px;
  width: 26px;
  height: 26px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-nav button:hover:not(:disabled) { border-color: var(--accent); }
.card-nav button:disabled { opacity: 0.4; cursor: not-allowed; }
.card-range {
  font-size: 11px;
  color: var(--muted);
  min-width: 110px;
  text-align: center;
}
.card canvas { max-height: 280px; }
.dual { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.dual-col { display: flex; flex-direction: column; gap: 8px; }
.dual h4 {
  margin: 0;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}
.dual h4.green { color: var(--green); }
.dual h4.red { color: var(--red); }
.dual h4 .icon { font-size: 14px; }

/* Lista ranqueada (Top / Bottom) */
.rank-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  counter-reset: rank;
}
.rank-list li {
  counter-increment: rank;
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--panel-2);
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  transition: border-color var(--tx-fast), background var(--tx-fast);
}
.rank-list li:hover {
  border-color: var(--border);
  background: var(--panel-3);
}
.rank-list li::before {
  content: counter(rank);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg);
  border-radius: 50%;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Top 1, 2, 3 destaques */
.rank-list li:nth-child(1)::before {
  background: linear-gradient(135deg, #FFD700, #c9a200);
  color: #000;
}
.rank-list li:nth-child(2)::before {
  background: linear-gradient(135deg, #c0c0c0, #8e8e8e);
  color: #000;
}
.rank-list li:nth-child(3)::before {
  background: linear-gradient(135deg, #cd7f32, #8e5a23);
  color: #fff;
}
.rank-list .rl-info {
  min-width: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rank-list .rl-title {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-list .rl-meta {
  font-size: 10.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-list .rl-profit {
  font-size: 13px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rank-list .empty {
  padding: 24px 10px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  background: transparent;
}
.rank-list .empty::before { display: none; }

/* Em telas estreitas, vira coluna única */
@media (max-width: 600px) {
  .dual { grid-template-columns: 1fr; }
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  animation: modal-fade-in 0.18s ease-out;
}
.modal.hidden { display: none; }
@keyframes modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
.modal-content {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 28px;
  width: min(640px, 92vw);
  max-height: 90vh;
  overflow: auto;
  position: relative;
  box-shadow: var(--shadow-lg);
  animation: modal-slide-in 0.2s ease-out;
}
@keyframes modal-slide-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
.modal .close {
  position: absolute;
  top: 12px; right: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 30px;
  height: 30px;
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--tx-fast);
}
.modal .close:hover { color: var(--text); border-color: var(--border-strong); }
.modal img { max-width: 100%; border-radius: 6px; margin-top: 12px; }

/* ===== Confirm modal ===== */
/* z-index acima das modals normais (100) — caso alguma fique aberta por trás,
   a confirmação sempre fica na frente. Defesa em profundidade. */
#confirm-modal { z-index: 200; }
.confirm-modal-content {
  width: min(420px, 92vw) !important;
  padding: 28px 24px 20px !important;
}
.confirm-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: rgba(248, 81, 73, 0.15);
  color: var(--red);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  margin: 0 auto 14px;
}
.confirm-icon.info {
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
}
.confirm-icon.warn {
  background: rgba(212, 167, 44, 0.15);
  color: var(--yellow);
}
.confirm-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
}
.confirm-actions button {
  min-width: 110px;
  padding: 9px 16px;
}
.btn-danger {
  background: var(--red);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  cursor: pointer;
  font-weight: 500;
}
.btn-danger:hover { background: #d8453d; }

.modal-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 14px;
}
.modal-summary > div { display: flex; flex-direction: column; gap: 2px; }
.modal-summary .lbl { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; }

.legs-form { display: flex; flex-direction: column; gap: 10px; }
.leg-edit {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.leg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.leg-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.leg-grid label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11px;
  color: var(--muted);
}
.leg-grid input[type="text"], .leg-grid input[type="number"], .leg-grid input:not([type]) {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 13px;
}
.leg-grid input:focus { border-color: var(--accent); outline: none; }
.leg-grid .checkbox-label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.btn-primary {
  background: linear-gradient(135deg, #4f8cff 0%, #2c5fcc 100%);
  color: white;
  border: none;
  border-radius: var(--r-md);
  padding: 9px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.2px;
  box-shadow: 0 2px 8px rgba(79, 140, 255, 0.25);
  transition: all var(--tx-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-primary:hover {
  filter: brightness(1.08);
  box-shadow: 0 4px 14px rgba(79, 140, 255, 0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

/* Botão "Nova bet" — destaque extra dentro da toolbar de filtros */
#btn-new-bet.btn-primary {
  background: linear-gradient(135deg, #2ea043 0%, #1f7a32 100%);
  padding: 10px 20px;
  font-size: 13.5px;
  font-weight: 700;
  height: 40px;
  box-shadow:
    0 4px 14px rgba(46, 160, 67, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}
#btn-new-bet.btn-primary:hover {
  filter: brightness(1.1);
  box-shadow:
    0 6px 20px rgba(46, 160, 67, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transform: translateY(-1px);
}
#btn-new-bet .icon { font-size: 18px; }
.btn-secondary {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--tx-fast);
}
.btn-secondary:hover { border-color: var(--border-strong); background: var(--panel-3); }
.btn-tiny {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--red);
  border-radius: 4px;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 12px;
}
.btn-tiny:hover { border-color: var(--red); }

/* edição inline mercado/seleção (3 inputs em coluna) */
.ms-edit { display: flex; flex-direction: column; gap: 4px; }
.ms-edit input { width: 100%; }

/* Cursor de edição nas células */
td.editable {
  position: relative;
}
td.editable::after {
  content: "✎";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  color: var(--muted);
  font-size: 11px;
  transition: opacity 0.15s;
  pointer-events: none;
}
td.editable:hover::after { opacity: 0.6; }

td.cell-link {
  cursor: pointer;
  position: relative;
}
td.cell-link::after {
  content: "🔍";
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0;
  font-size: 11px;
  transition: opacity 0.15s;
  pointer-events: none;
}
td.cell-link:hover::after { opacity: 0.7; }

/* ===== Dropdown custom (inline edit + filtros) ===== */
.dd {
  position: relative;
  display: inline-block;
}
.dd-trigger {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 5px 24px 5px 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
  position: relative;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
/* Em células da tabela, o trigger ocupa a largura toda */
td .dd, td .dd-trigger { width: 100%; }

/* Variante "block" — usada em forms onde o dropdown deve preencher toda a
   linha (igual a um <select>). Aplicada no upload manual e contextos similares.
   Estiliza tanto o wrapper quanto o trigger (botão clicável por dentro). */
.dd.dd-block {
  display: block;
  width: 100%;
}
.dd.dd-block .dd-trigger {
  display: block;
  width: 100%;
  padding: 11px 32px 11px 14px;
  font-size: 14px;
  min-height: 42px;
  background: var(--bg);
  border-color: var(--border);
}
.dd.dd-block .dd-trigger:hover {
  border-color: var(--accent);
}
.dd.dd-block .dd-trigger::after {
  font-size: 12px;
  right: 12px;
}

.dd-trigger::after {
  content: "▾";
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 10px;
}
.dd-menu {
  position: fixed;       /* flutua por cima de qualquer overflow */
  min-width: 180px;
  max-width: 320px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 9000;
  padding: 4px;
}
.dd-search {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  color: var(--text);
  font-size: 12px;
  margin-bottom: 4px;
}
.dd-search:focus { outline: none; border-color: var(--accent); }
.dd-option {
  padding: 9px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--tx-fast);
}
.dd-option .icon { color: var(--muted); }
.dd-option:hover { background: var(--panel-2); }
.dd-option.selected { background: rgba(79, 140, 255, 0.15); color: var(--accent); }
.dd-option .check { color: var(--accent); font-size: 14px; margin-left: auto; }
.dd-empty { padding: 10px; color: var(--muted); font-size: 12px; text-align: center; }

/* Quando o dropdown é usado como filtro no toolbar, fica menor */
.filters .dd-trigger { padding: 6px 24px 6px 10px; }

/* ===== Drop zone (upload manual de bet) ===== */
.drop-zone {
  border: 2px dashed var(--border);
  border-radius: 10px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  background: var(--panel-2);
  transition: all 0.15s;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.drop-zone:hover, .drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.05);
}
.drop-zone .dz-empty {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}
.drop-zone .dz-empty strong { color: var(--text); font-weight: 500; }
.dz-preview {
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
}
.dz-preview.hidden { display: none; }
.drop-zone:has(.dz-preview:not(.hidden)) .dz-empty { display: none; }

/* Hint informativo dentro da modal de upload (explica que units é opcional
   quando o print já tem o valor monetário). Tom suave pra não competir com
   o conteúdo principal. */
.upload-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(79, 140, 255, 0.08);
  border: 1px solid rgba(79, 140, 255, 0.22);
  border-radius: var(--r-md);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}
.upload-hint > .icon {
  color: var(--accent);
  font-size: 18px;
  margin-top: 1px;
  flex-shrink: 0;
}
.upload-hint strong { color: var(--text); font-weight: 600; }
.upload-hint code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-family: var(--mono, ui-monospace, monospace);
  color: var(--text);
}

/* ===== Toasts ===== */
.toasts {
  position: fixed;
  top: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  background: var(--panel);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 8px;
  padding: 12px 16px 12px 14px;
  min-width: 280px;
  max-width: 420px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  pointer-events: auto;
  animation: toast-in 0.25s ease-out;
}
.toast.toast-success { border-left-color: var(--green); }
.toast.toast-error   { border-left-color: var(--red); }
.toast.toast-warn    { border-left-color: var(--yellow); }
.toast.toast-info    { border-left-color: var(--accent); }
.toast .icon { font-size: 18px; line-height: 1; }
.toast .body { flex: 1; font-size: 13px; line-height: 1.4; }
.toast .body .title { font-weight: 600; margin-bottom: 2px; }
.toast .body .desc { color: var(--muted); font-size: 12px; word-break: break-word; }
.toast .close {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 16px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.toast .close:hover { color: var(--text); }
.toast.fade-out { animation: toast-out 0.2s ease-in forwards; }

@keyframes toast-in {
  from { transform: translateX(20px); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}
@keyframes toast-out {
  from { transform: translateX(0); opacity: 1; }
  to   { transform: translateX(20px); opacity: 0; }
}

.game-tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
}
.game-cs { background: #d97706; color: white; }
.game-lol { background: #c084fc; color: white; }
.game-valorant { background: #ef4444; color: white; }
.game-dota { background: #dc2626; color: white; }
.game-other { background: #6b7280; color: white; }

/* Categorias de jogos (aba Config) */
.games-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.game-card {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px 7px 14px;
  font-size: 13px;
  transition: border-color var(--tx-fast);
}
.game-card:hover { border-color: var(--border-strong); }
.game-card .gc-dot {
  width: 12px; height: 12px; border-radius: 50%;
}
.game-card .gc-emoji { font-size: 14px; }
.game-card .gc-label { font-weight: 500; }
.game-card .gc-code { color: var(--muted); font-size: 11px; }
.game-card .gc-del {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  line-height: 1;
}
.game-card .gc-del:hover { color: var(--red); }

.add-game-form {
  display: grid;
  grid-template-columns: 1fr 1fr 70px 60px auto;
  gap: 8px;
  align-items: stretch;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.add-game-form input[type="text"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  color: var(--text);
  font-size: 13px;
  transition: border-color var(--tx-fast), box-shadow var(--tx-fast);
}
.add-game-form input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
.add-game-form input[type="color"] {
  width: 100%;
  height: 100%;
  min-height: 38px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg);
  cursor: pointer;
  padding: 2px;
}
.add-game-form .btn-primary {
  white-space: nowrap;
  padding: 0 16px;
  height: 100%;
  min-height: 38px;
}
@media (max-width: 700px) {
  .add-game-form { grid-template-columns: 1fr 1fr; }
  .add-game-form .btn-primary { grid-column: 1 / -1; }
}

/* Empilha múltiplos cards na MESMA coluna do grid (Conta Telegram + Trocar senha) */
.config-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
/* Na aba Operação, os cards do grid se esticam pra mesma altura — assim
   "Configurações gerais" alinha com o stack "Conta Telegram + Trocar senha". */
#tab-config .grid-tables { align-items: stretch; }

/* ===== Config tab — formulários no padrão ===== */
.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 4px;
}
.form-row label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.form-row input,
.form-row select {
  width: 100%;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--tx-fast), box-shadow var(--tx-fast);
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
.form-row input::placeholder { color: var(--muted-2); }

.acc-info {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
}
.acc-info::before {
  content: "check_circle";
  font-family: 'Material Symbols Rounded';
  font-size: 26px;
  color: var(--green);
  font-variation-settings: 'FILL' 1;
  flex-shrink: 0;
}
.acc-info > div { display: flex; flex-direction: column; gap: 2px; }
#tg-logout {
  margin-top: 12px;
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all var(--tx-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
#tg-logout:hover {
  border-color: var(--red);
  background: rgba(248, 81, 73, 0.08);
}

.login-flow {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.login-flow .step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.login-flow .step.hidden { display: none; }
.login-flow label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.login-flow input {
  width: 100%;
  box-sizing: border-box;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color var(--tx-fast), box-shadow var(--tx-fast);
}
.login-flow input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 140, 255, 0.15);
}
.login-flow input::placeholder { color: var(--muted-2); }
.login-flow button {
  background: linear-gradient(135deg, #4f8cff 0%, #2c5fcc 100%);
  color: white;
  border: none;
  border-radius: var(--r-md);
  padding: 11px 18px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  align-self: flex-start;
  box-shadow: 0 2px 8px rgba(79,140,255,0.25);
  transition: all var(--tx-fast);
}
.login-flow button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(79,140,255,0.35);
}
.opt-pwd.hidden { display: none; }
.opt-pwd { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }

/* Guia "Como pegar credenciais" */
.how-to {
  margin-top: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.how-to summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
  user-select: none;
}
.how-to summary::-webkit-details-marker { color: var(--muted); }
.how-to[open] summary { margin-bottom: 10px; }
.steps-guide {
  margin: 8px 0 0;
  padding-left: 22px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
}
.steps-guide li { margin-bottom: 4px; }
.steps-guide a { color: var(--accent); }
.steps-guide code {
  background: var(--bg);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.steps-guide strong { color: var(--text); }

/* ===== Lista vertical de grupos (nova) ===== */
.groups-header {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.muted-pill {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 12px;
}
.groups-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.groups-toolbar input[type="text"] {
  flex: 1;
  min-width: 240px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  color: var(--text);
  font-size: 13px;
}
.filter-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
}

.groups-list-v {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.group-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  transition: border-color 0.15s, background 0.15s;
}
.group-row:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.06);
}
.group-row.is-monitored {
  border-color: rgba(46, 160, 67, 0.5);
  background: rgba(46, 160, 67, 0.06);
}
.group-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2c5fcc, #4f8cff);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: white;
  font-size: 15px;
  flex-shrink: 0;
  overflow: hidden;
}
.group-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.group-info { flex: 1; min-width: 0; }
.group-info .name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.group-info .meta {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}

/* Multiplicador de unidades */
.group-mult {
  display: flex;
  align-items: center;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  flex-shrink: 0;
}
.group-mult .mult-input {
  width: 56px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 4px 6px;
  font-size: 13px;
  text-align: center;
}
.group-mult .mult-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* .group-text-only-toggle: estilo movido pro <style> inline em index.html
   (mesmo motivo do .info-banner — garantir render correto em prod mesmo
   com style.css cacheado). */

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #3a414a;
  border-radius: 24px;
  transition: .2s;
}
.switch .slider:before {
  position: absolute;
  content: "";
  height: 18px; width: 18px;
  left: 3px; top: 3px;
  background: white;
  border-radius: 50%;
  transition: .2s;
}
.switch input:checked + .slider { background: var(--green); }
.switch input:checked + .slider:before { transform: translateX(20px); }

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.pagination button {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--muted);
  border-radius: var(--r-sm);
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
  min-width: 32px;
  transition: all var(--tx-fast);
  font-weight: 500;
}
.pagination button:hover:not(:disabled) {
  border-color: var(--border-strong);
  color: var(--text);
}
.pagination button.active {
  background: linear-gradient(135deg, #4f8cff, #2c5fcc);
  border-color: var(--accent);
  color: white;
  box-shadow: 0 2px 6px rgba(79, 140, 255, 0.3);
}
.pagination button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.pagination .ellipsis {
  padding: 5px 4px;
  color: var(--muted);
  font-size: 13px;
}
.empty-state {
  text-align: center;
  padding: 30px;
  color: var(--muted);
  font-size: 13px;
}

#tg-status-pill {
  font-size: 12px;
  padding: 4px 10px;
}
header .grow { flex: 1; }

/* Pílula de quota no header */
.quota-pill {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}
.quota-pill:hover { border-color: var(--accent); }
.quota-pill .qp-bar {
  width: 80px;
  height: 8px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.quota-pill .qp-fill {
  display: block;  /* span é inline por padrão e ignora `width` — sem isso, a barra fica vazia */
  height: 100%;
  min-width: 2px;  /* mostra um traço mesmo com 1-2% pra confirmar que tá renderizando */
  background: linear-gradient(90deg, #2ea043, #4f8cff);
  transition: width 0.3s;
}

/* WARNING (>= 80%): amarelo + pulse sutil + CTA piscando */
.quota-pill.warning {
  border-color: rgba(247,184,1,0.55);
  background: rgba(247,184,1,0.08);
  animation: qp-pulse-warning 2.4s ease-in-out infinite;
}
.quota-pill.warning .qp-fill {
  background: linear-gradient(90deg, #f7b801, #f97316);
}
@keyframes qp-pulse-warning {
  0%, 100% { box-shadow: 0 0 0 0 rgba(247,184,1,0.0); }
  50%      { box-shadow: 0 0 0 4px rgba(247,184,1,0.18); }
}

/* DANGER (>= 100% ou cota expirou): vermelho + pulse mais forte */
.quota-pill.danger {
  background: rgba(248, 81, 73, 0.14);
  border-color: var(--red);
  color: var(--red);
  font-weight: 600;
  animation: qp-pulse-danger 1.6s ease-in-out infinite;
}
.quota-pill.danger .qp-fill { background: var(--red); }
@keyframes qp-pulse-danger {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248,81,73,0.0); }
  50%      { box-shadow: 0 0 0 5px rgba(248,81,73,0.25); }
}

.quota-pill .qp-plan {
  background: rgba(79, 140, 255, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 10px;
  text-transform: uppercase;
  font-weight: 700;
}

/* CTA de upgrade dentro da pill (piscando devagar pra chamar atenção) */
.qp-cta-upgrade {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, #f7b801, #f97316);
  color: #1a1a1a;
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  animation: qp-cta-blink 1.6s ease-in-out infinite;
  white-space: nowrap;
}
.qp-cta-upgrade .icon { font-size: 13px; }
.qp-cta-upgrade.danger {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  color: #fff;
  animation: qp-cta-blink 1.0s ease-in-out infinite;
}
@keyframes qp-cta-blink {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.72; transform: scale(1.04); }
}

/* Modal de upgrade */
.upgrade-modal-content {
  width: min(1100px, 96vw) !important;
  padding: 32px !important;
}
.upgrade-header { text-align: center; margin-bottom: 18px; }

/* Banner de cupom — chamativo mas elegante, dourado sutil */
.upgrade-coupon-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(247,184,1,0.10), rgba(247,184,1,0.04));
  border: 1px solid rgba(247,184,1,0.35);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.upgrade-coupon-banner::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(180px 60px at 100% 50%, rgba(247,184,1,0.10), transparent);
  pointer-events: none;
}
.upgrade-coupon-banner .ucb-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.upgrade-coupon-banner .ucb-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}
.upgrade-coupon-banner strong {
  font-size: 14.5px;
  color: var(--text);
}
.upgrade-coupon-banner code {
  background: rgba(247,184,1,0.18);
  border: 1px dashed rgba(247,184,1,0.55);
  color: #f7b801;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  user-select: all;
}
.upgrade-coupon-banner small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

/* Footer com info de confiança */
.upgrade-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.upgrade-trust {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
}
.upgrade-trust span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.upgrade-trust .icon { color: var(--green); }
.plans-grid {
  display: grid;
  /* 5 planos em uma linha em telas largas; auto-fit quebra naturalmente
     em 4/3/2/1 colunas conforme a tela diminui. */
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px;
}
.plan-card {
  background: var(--panel-2);
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 20px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: center;
  transition: all 0.2s;
}
.plan-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
}
.plan-card.recommended {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(79,140,255,0.08), var(--panel-2));
  position: relative;
}
.plan-card.recommended::before {
  content: "MAIS POPULAR";
  position: absolute;
  top: -10px; left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #4f8cff, #2c5fcc);
  color: white;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.5px;
}
.plan-card .pc-name { font-size: 14px; font-weight: 600; color: var(--muted); }
.plan-card .pc-price { font-size: 23px; font-weight: 800; white-space: nowrap; }
.plan-card .pc-price .currency { font-size: 13px; color: var(--muted); margin-right: 2px; }
.plan-card .pc-period { font-size: 11px; color: var(--muted); margin-top: -8px; }
.plan-card .pc-bets { font-size: 13px; color: var(--text); margin: 4px 0; }
.plan-card .pc-bets strong { color: var(--accent); font-size: 18px; }
.plan-card .pc-cta {
  background: linear-gradient(135deg, #4f8cff, #2c5fcc);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-top: auto;
}
.plan-card .pc-cta:hover { filter: brightness(1.05); }
.plan-card.current .pc-cta {
  background: var(--panel);
  color: var(--muted);
  cursor: default;
}

/* Links de "fale conosco" / "feedback" — sutis, sem borda */
.sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 2px 0;
}
.sidebar-link {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: all var(--tx-fast);
  font-family: inherit;
  text-align: left;
}
.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.sidebar-link .icon { color: var(--muted-2); transition: color var(--tx-fast); }
.sidebar-link:hover .icon { color: var(--accent); }

/* Botões principais da sidebar-footer (logout, portal) */
.sidebar-footer > button {
  width: 100%;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--r-md);
  padding: 9px 12px;
  cursor: pointer;
  font-size: 13px;
  text-align: center;
  transition: all var(--tx-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.sidebar-footer #user-logout { color: var(--red); }
.sidebar-footer #user-logout:hover {
  border-color: var(--red);
  background: rgba(248, 81, 73, 0.08);
}
.sidebar-footer #user-portal {
  color: var(--accent);
}
.sidebar-footer #user-portal:hover {
  border-color: var(--accent);
  background: rgba(79, 140, 255, 0.08);
}
.sidebar-footer #user-portal.hidden { display: none; }
#tg-refresh-groups {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  cursor: pointer;
}
#tg-refresh-groups:hover { border-color: var(--accent); }

/* === Toggle "Levar pendentes pro dia atual" (aba bets) === */
.bet-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--panel);
  transition: border-color .12s, color .12s;
}
.bet-toggle:hover { border-color: var(--accent); color: var(--text); }
.bet-toggle input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px; height: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background .12s, border-color .12s;
}
.bet-toggle input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.bet-toggle input[type="checkbox"]:checked::after {
  content: "";
  width: 8px; height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}

/* ============================================================ */
/* === Modal Loader (Nova bet) — bilhete sendo escaneado pela IA */
/* ============================================================ */

/* O modal-content vira "stage": o body normal + o loader sobreposto. */
.modal-content { position: relative; }

/* Body normal — anima opacidade quando entra em loading. */
.upload-body {
  transition: opacity .25s ease, transform .25s ease, filter .25s ease;
}
.modal-content.is-loading .upload-body {
  opacity: 0;
  transform: scale(.96);
  filter: blur(4px);
  pointer-events: none;
}

/* Container do loader — cobre toda a área da modal. */
.modal-loader {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px;
  background: linear-gradient(180deg, rgba(13,17,23,.92), rgba(13,17,23,.98));
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  overflow: hidden;
  z-index: 5;
}
.modal-content.is-loading .modal-loader {
  opacity: 1;
  pointer-events: auto;
}

/* Glow pulsante de fundo */
.ml-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 35%, rgba(79,140,255,.18), transparent 60%);
  animation: ml-glow-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ml-glow-pulse {
  0%, 100% { opacity: .55; }
  50%      { opacity: 1; }
}

/* Wrapper do ticket — onde a scanline corre */
.ml-ticket-wrap {
  position: relative;
  width: 140px;
  height: 170px;
  filter: drop-shadow(0 8px 20px rgba(0,0,0,.5));
  animation: ml-float 3s ease-in-out infinite;
}
@keyframes ml-float {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50%      { transform: translateY(-4px) rotate(1deg); }
}

.ml-ticket { width: 100%; height: 100%; display: block; }

/* Barras "lendo" pulsam em sequência */
.ml-bar {
  animation: ml-bar-pulse 1.6s ease-in-out infinite;
  transform-origin: left center;
}
.ml-bar1 { animation-delay: 0s; }
.ml-bar2 { animation-delay: .15s; }
.ml-bar3 { animation-delay: .3s; }
.ml-bar4 { animation-delay: .45s; }
.ml-bar5 { animation-delay: .6s; }
@keyframes ml-bar-pulse {
  0%, 100% { fill: #2a313a; }
  50%      { fill: #4f8cff; }
}

.ml-odd       { animation: ml-odd-glow 1.6s ease-in-out infinite; }
.ml-odd-text  { animation: ml-odd-text-pulse 1.6s ease-in-out infinite; }
@keyframes ml-odd-glow {
  0%, 100% { stroke: #2c5fcc; filter: drop-shadow(0 0 0 transparent); }
  50%      { stroke: #4f8cff; filter: drop-shadow(0 0 6px #4f8cff); }
}
@keyframes ml-odd-text-pulse {
  0%, 100% { fill: #4f8cff; }
  50%      { fill: #ffffff; }
}

/* Scanline horizontal — beam tipo Tron percorrendo o ticket */
.ml-scanline {
  position: absolute;
  left: 4%;
  right: 4%;
  height: 3px;
  top: 0;
  border-radius: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(79,140,255,.3) 20%,
    rgba(79,140,255,1) 50%,
    rgba(79,140,255,.3) 80%,
    transparent 100%
  );
  box-shadow:
    0 0 8px rgba(79,140,255,.9),
    0 0 16px rgba(79,140,255,.5);
  animation: ml-scan 2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes ml-scan {
  0%   { top: 4%;  opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}

/* Texto da etapa */
.ml-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text);
  font-weight: 500;
  letter-spacing: .2px;
  z-index: 1;
}
.ml-icon {
  font-size: 18px;
  display: inline-block;
  animation: ml-icon-bounce .9s ease-in-out infinite;
}
@keyframes ml-icon-bounce {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}
.ml-msg { color: var(--text); }
.ml-dots {
  display: inline-block;
  width: 22px;
  text-align: left;
  color: var(--accent);
  letter-spacing: 1px;
}
.ml-dots > span {
  display: inline-block;
  opacity: 0;
  animation: ml-dot-fade 1.2s infinite;
}
.ml-dots > span:nth-child(1) { animation-delay: 0s; }
.ml-dots > span:nth-child(2) { animation-delay: .2s; }
.ml-dots > span:nth-child(3) { animation-delay: .4s; }
@keyframes ml-dot-fade {
  0%, 100% { opacity: 0; }
  35%, 65% { opacity: 1; }
}

/* Barra de progresso indeterminada */
.ml-progress {
  width: 220px;
  max-width: 70%;
  height: 4px;
  border-radius: 2px;
  background: var(--panel-3);
  overflow: hidden;
  z-index: 1;
}
.ml-progress-fill {
  width: 35%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: ml-progress 1.5s ease-in-out infinite;
}
@keyframes ml-progress {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(370%); }
}

/* Reduz movimento se o usuário pediu (a11y) */
@media (prefers-reduced-motion: reduce) {
  .ml-ticket-wrap, .ml-icon, .ml-glow, .ml-bar, .ml-odd, .ml-odd-text {
    animation: none !important;
  }
  .ml-scanline { animation-duration: 4s; }
}

/* ============================================================ */
/* === Multi-select de bets (checkbox + barra de ações) ======== */
/* ============================================================ */

#bets-table th.col-select,
#bets-table td.col-select {
  width: 36px;
  padding-left: 14px;
  padding-right: 4px;
  vertical-align: middle;
}

.bets-checkbox {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  padding: 2px;
}
.bets-checkbox input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 4px;
  background: var(--panel-2);
  cursor: pointer;
  display: inline-grid;
  place-content: center;
  transition: background .12s, border-color .12s;
  position: relative;
}
.bets-checkbox input[type="checkbox"]:hover {
  border-color: var(--accent);
}
.bets-checkbox input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
.bets-checkbox input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 4px;
  border-left: 2px solid white;
  border-bottom: 2px solid white;
  transform: rotate(-45deg) translate(1px, -1px);
}
/* Estado indeterminate (header com seleção parcial) */
.bets-checkbox input[type="checkbox"]:indeterminate {
  background: var(--accent);
  border-color: var(--accent);
}
.bets-checkbox input[type="checkbox"]:indeterminate::after {
  content: "";
  width: 8px;
  height: 2px;
  background: white;
  border: none;
  transform: none;
}

/* Linha selecionada */
#bets-table tr.is-selected {
  background: rgba(79, 140, 255, .08);
  box-shadow: inset 3px 0 0 var(--accent);
}
#bets-table tr.is-selected td {
  background: transparent;
}

/* ===== Barra flutuante de ações em lote ===== */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(0);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 12px 10px 18px;
  background: linear-gradient(180deg, #1f262e, #161b22);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow:
    0 12px 40px rgba(0, 0, 0, .55),
    0 0 0 1px rgba(79, 140, 255, .15);
  animation: bulk-slide-up .25s ease;
  max-width: calc(100vw - 24px);
  flex-wrap: wrap;
}
.bulk-bar.hidden {
  display: none;
}
@keyframes bulk-slide-up {
  from { transform: translateX(-50%) translateY(20px); opacity: 0; }
  to   { transform: translateX(-50%) translateY(0); opacity: 1; }
}

.bb-count {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 14px;
  white-space: nowrap;
  padding-right: 10px;
  border-right: 1px solid var(--border);
}
.bb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  font-weight: 700;
  font-size: 13px;
}
.bb-count strong { color: var(--accent); font-size: 16px; }

.bb-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.bb-actions button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  cursor: pointer;
  transition: background .12s, border-color .12s, transform .08s;
}
.bb-actions button:hover { transform: translateY(-1px); }
.bb-actions button:active { transform: translateY(0); }
.bb-actions button[disabled] {
  opacity: .55;
  cursor: not-allowed;
  transform: none !important;
}
.bb-actions .btn-green   { border-color: rgba(46,160,67,.5);  color: #4cc060; }
.bb-actions .btn-green:hover   { background: rgba(46,160,67,.12); border-color: var(--green); }
.bb-actions .btn-red     { border-color: rgba(248,81,73,.5);  color: #ff7b73; }
.bb-actions .btn-red:hover     { background: rgba(248,81,73,.12); border-color: var(--red); }
.bb-actions .btn-void    { border-color: rgba(150,150,160,.4); color: var(--muted); }
.bb-actions .btn-void:hover    { background: rgba(150,150,160,.12); border-color: var(--muted-2); }
.bb-actions .btn-pending { border-color: rgba(212,167,44,.5); color: #e6c25e; }
.bb-actions .btn-pending:hover { background: rgba(212,167,44,.12); border-color: var(--yellow); }
.bb-actions .btn-delete  { border-color: rgba(248,81,73,.5);  color: #ff7b73; }
.bb-actions .btn-delete:hover  { background: rgba(248,81,73,.16); border-color: var(--red); }

.bb-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel-3);
  color: var(--muted);
  cursor: pointer;
  transition: background .12s, color .12s;
}
.bb-clear:hover { background: var(--panel-2); color: var(--text); }

@media (max-width: 720px) {
  .bulk-bar {
    left: 12px;
    right: 12px;
    transform: none;
    bottom: 12px;
  }
  @keyframes bulk-slide-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0); opacity: 1; }
  }
}

/* === Dropdown de Export === */
.dd-export { position: relative; display: inline-block; }
.dd-export-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  background: var(--panel);
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  min-width: 160px;
  z-index: 30;
  padding: 4px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dd-export-menu.hidden { display: none; }
.dd-export-menu button {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: none;
  color: var(--text);
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.dd-export-menu button:hover { background: var(--panel-2); color: var(--accent); }

/* ============================================================ */
/* === Modal de Configurações da conta ======================= */
/* ============================================================ */

/* user-card vira botão clicável */
button.user-card {
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 8px;
  transition: background .12s, border-color .12s;
}
button.user-card:hover {
  background: var(--panel-2);
  border-color: var(--border);
}
.user-card-arrow {
  margin-left: auto;
  color: var(--muted);
  opacity: .6;
}
button.user-card:hover .user-card-arrow {
  opacity: 1;
  color: var(--accent);
}

/* Card-link na aba config (acesso rápido) */
.card-info-link {
  cursor: pointer;
  transition: border-color .12s, transform .08s;
}
.card-info-link:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}

/* Modal mais larga p/ caber tabs e conteúdo */
.modal-account {
  max-width: 720px;
  width: calc(100vw - 32px);
}

.account-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  padding-bottom: 0;
}
.account-tab {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  border-radius: 4px 4px 0 0;
  transition: color .12s, border-color .12s;
}
.account-tab:hover { color: var(--text); background: var(--panel-2); }
.account-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.account-tab-danger { color: #ff7b73; }
.account-tab-danger.active { color: var(--red); border-bottom-color: var(--red); }

.account-section { display: none; }
.account-section.active { display: block; animation: account-fade .18s ease; }
@keyframes account-fade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.account-row:last-child { border-bottom: none; }
.account-row label { color: var(--muted); }
.account-value { color: var(--text); font-weight: 500; }

.account-help {
  background: var(--panel-2);
  border-left: 3px solid var(--accent);
  padding: 10px 14px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.5;
}

.account-msg {
  margin-top: 10px;
  font-size: 13px;
  min-height: 18px;
}
.account-msg.is-error { color: var(--red); }
.account-msg.is-success { color: var(--green); }

.account-actions-row {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.account-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.account-status-card.is-on {
  border-color: var(--green);
  background: rgba(46,160,67,.08);
}
.account-status-card.is-off {
  border-color: var(--yellow);
  background: rgba(212,167,44,.06);
}
.acc-status-icon { font-size: 26px; }
.acc-status-title { font-weight: 600; color: var(--text); }
.acc-status-desc { color: var(--muted); font-size: 13px; margin-top: 2px; }

/* === Danger banner (usado na seção "Apagar conta") === */
.danger-banner {
  display: flex;
  gap: 12px;
  background: rgba(248,81,73,.08);
  border: 1px solid rgba(248,81,73,.5);
  border-radius: 6px;
  padding: 14px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.danger-banner .icon { color: var(--red); font-size: 22px; flex-shrink: 0; }
.danger-banner strong { color: var(--red); display: block; margin-bottom: 4px; }
.danger-banner small { color: var(--muted); font-size: 12px; line-height: 1.5; }

/* === Activity list === */
.activity-list {
  max-height: 400px;
  overflow-y: auto;
}
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.activity-item:last-child { border-bottom: none; }
.activity-action { font-weight: 500; color: var(--text); }
.activity-meta {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
  text-align: right;
}
.activity-icon-bg {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--panel-3);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 16px;
}
.activity-icon-bg.green { background: rgba(46,160,67,.15); color: var(--green); }
.activity-icon-bg.red   { background: rgba(248,81,73,.15); color: var(--red); }
.activity-icon-bg.yellow{ background: rgba(212,167,44,.15); color: var(--yellow); }
.activity-icon-bg.blue  { background: rgba(79,140,255,.15); color: var(--accent); }
.activity-loading { padding: 40px 0; text-align: center; color: var(--muted); }

/* Botões danger outline e fill */
.btn-danger-outline {
  border-color: rgba(248,81,73,.5) !important;
  color: #ff7b73 !important;
}
.btn-danger-outline:hover {
  background: rgba(248,81,73,.1) !important;
  border-color: var(--red) !important;
}
.btn-danger {
  background: var(--red) !important;
  color: white !important;
  border-color: var(--red) !important;
}
.btn-danger:hover { background: #d44440 !important; }
.btn-danger:disabled {
  background: var(--panel-3) !important;
  color: var(--muted-2) !important;
  border-color: var(--border) !important;
  cursor: not-allowed !important;
  opacity: .7;
}

/* ============================================================ */
/* === Master switch do Planilhador (topbar) =================== */
/* ============================================================ */

.planner-toggle {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px 7px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  user-select: none;
  border: 1px solid var(--border-strong);
  background: var(--panel);
  color: var(--text);
  transition: background .15s, border-color .15s, transform .08s, box-shadow .15s;
  white-space: nowrap;
}
.planner-toggle:hover { transform: translateY(-1px); }
.planner-toggle:active { transform: translateY(0); }

.pt-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  display: inline-block;
}
.pt-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.pt-label { color: var(--muted); font-weight: 500; font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.6px; }
.pt-state { font-weight: 700; font-size: 12.5px; letter-spacing: 0.4px; }

/* ===== Estado ON ===== */
.planner-toggle.is-on {
  border-color: rgba(46, 160, 67, 0.45);
  background: linear-gradient(180deg, rgba(46,160,67,0.12), rgba(46,160,67,0.04));
  box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.4);
}
.planner-toggle.is-on:hover {
  border-color: var(--green);
  background: linear-gradient(180deg, rgba(46,160,67,0.18), rgba(46,160,67,0.06));
}
.planner-toggle.is-on .pt-state { color: var(--green); }
.planner-toggle.is-on .pt-dot {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7);
  animation: pt-pulse-green 1.8s ease-in-out infinite;
}
@keyframes pt-pulse-green {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 160, 67, 0.7); }
  50%      { box-shadow: 0 0 0 6px rgba(46, 160, 67, 0); }
}

/* ===== Estado OFF (precisa chamar atenção!) ===== */
.planner-toggle.is-off {
  border-color: rgba(248, 81, 73, 0.5);
  background: linear-gradient(180deg, rgba(248,81,73,0.16), rgba(248,81,73,0.06));
  animation: pt-attention 2.2s ease-in-out infinite;
}
.planner-toggle.is-off:hover {
  border-color: var(--red);
  background: linear-gradient(180deg, rgba(248,81,73,0.22), rgba(248,81,73,0.08));
}
.planner-toggle.is-off .pt-state { color: var(--red); }
.planner-toggle.is-off .pt-dot {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.7);
  animation: pt-pulse-red 1.4s ease-in-out infinite;
}
@keyframes pt-pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0.7); }
  50%      { box-shadow: 0 0 0 7px rgba(248, 81, 73, 0); }
}
@keyframes pt-attention {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 81, 73, 0); }
  50%      { box-shadow: 0 0 16px 0 rgba(248, 81, 73, 0.25); }
}

/* Estado loading enquanto switcha */
.planner-toggle.is-loading { opacity: 0.7; pointer-events: none; }
.planner-toggle.is-loading .pt-dot { animation: none; opacity: 0.5; }

/* ===== Banner de aviso quando OFF ===== */
.planner-off-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  background: linear-gradient(135deg, rgba(248,81,73,0.14), rgba(248,81,73,0.05));
  border: 1px solid rgba(248, 81, 73, 0.4);
  border-radius: var(--r-md);
  padding: 12px 16px;
  margin: 14px 22px 0 22px;
  font-size: 13px;
  animation: pob-slide-down .25s ease;
}
.planner-off-banner.hidden { display: none; }
@keyframes pob-slide-down {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.planner-off-banner > .icon {
  color: var(--red);
  font-size: 22px;
  flex-shrink: 0;
}
.pob-text { flex: 1; line-height: 1.45; color: var(--text); }
.pob-text strong { color: var(--red); display: block; margin-bottom: 2px; }
.pob-action {
  background: var(--red);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
  white-space: nowrap;
  transition: background .12s, transform .08s;
}
.pob-action:hover { background: #d44440; transform: translateY(-1px); }

/* Variante warn (amarelo) — usada no aviso de email não verificado.
   Mesma estrutura, apenas troca a paleta de cores. */
.planner-off-banner.is-warn {
  background: linear-gradient(135deg, rgba(247,184,1,0.14), rgba(247,184,1,0.04));
  border-color: rgba(247, 184, 1, 0.4);
}
.planner-off-banner.is-warn > .icon { color: var(--yellow, #f7b801); }
.planner-off-banner.is-warn .pob-text strong { color: var(--yellow, #f7b801); }
.planner-off-banner.is-warn .pob-action {
  background: var(--panel-2);
  color: var(--text);
  border: 1px solid var(--border);
}
.planner-off-banner.is-warn .pob-action:hover {
  background: var(--panel);
  border-color: var(--accent);
}

/* Em telas pequenas, banner empilha */
@media (max-width: 720px) {
  .planner-off-banner { flex-wrap: wrap; }
  .pob-action { width: 100%; }
}

/* ============================================================ */
/* === Tipsters manuais (aba Operação) =================== */
/* ============================================================ */

.manual-tipsters-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 280px;
  overflow-y: auto;
}
.manual-tipsters-list:empty::before {
  content: "Nenhum tipster manual cadastrado ainda.";
  color: var(--muted-2);
  font-style: italic;
  font-size: 12.5px;
  display: block;
  padding: 8px 0;
}
.mtipster-item {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 10px;
  transition: border-color .12s;
}
.mtipster-item:hover { border-color: var(--accent); }
.mtipster-item .icon { color: var(--muted); flex-shrink: 0; }
.mtipster-name {
  flex: 1;
  font-size: 13.5px;
  color: var(--text);
  background: transparent;
  border: none;
  outline: none;
  padding: 4px 6px;
  border-radius: 4px;
  min-width: 0;
  font-family: inherit;
}
.mtipster-name:focus {
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}
.mtipster-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.mtipster-actions button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all .12s;
}
.mtipster-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.mtipster-actions .btn-delete:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(248,81,73,.08);
}

.add-tipster-form {
  display: flex;
  gap: 8px;
  align-items: center;
}
.add-tipster-form input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13.5px;
}
.add-tipster-form input:focus {
  outline: none;
  border-color: var(--accent);
}

/* ============================================================ */
/* === Edição inline do nome do grupo Telegram ================== */
/* ============================================================ */

.tg-group-name-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}
.tg-group-name-input {
  flex: 1;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
  min-width: 0;
  font-family: inherit;
  transition: background .12s, border-color .12s;
  text-overflow: ellipsis;
}
.tg-group-name-input:hover {
  background: rgba(255,255,255,0.04);
}
.tg-group-name-input:focus {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,140,255,.2);
}
.tg-group-name-input.is-custom {
  font-style: italic;
  color: var(--accent);
}
.tg-group-name-original {
  display: block;
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 2px;
}

/* ============================================================ */
/* === Lista unificada de tipsters (manual + Telegram) ========= */
/* ============================================================ */

.tipsters-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
  max-height: 320px;
  overflow-y: auto;
}
.tipsters-list:empty::before {
  content: "Nenhum tipster ainda. Adicione manuais aqui ou marque grupos do Telegram como monitorados.";
  color: var(--muted-2);
  font-style: italic;
  font-size: 12.5px;
  display: block;
  padding: 8px 0;
}
.tipster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 10px;
  transition: border-color .12s;
}
.tipster-item:hover { border-color: var(--accent); }

/* Tag de "casa de aposta" na tabela de bets (compacta, neutra) */
.bookmaker-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(79,140,255,0.10);
  border: 1px solid rgba(79,140,255,0.28);
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* Card "Lucro por casa de aposta": tabela à esquerda + doughnut à direita.
   Em telas pequenas (<720px), empilha (tabela em cima, chart embaixo). */
.bookmakers-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 18px;
  align-items: center;
}
.bookmakers-table-wrap { overflow-x: auto; }
.bookmakers-table-wrap table { width: 100%; }
.bookmakers-chart-wrap {
  /* aspect-ratio + max-width mantém o doughnut compacto e proporcional,
     mesmo quando a tabela ao lado é alta. */
  aspect-ratio: 1 / 1;
  max-width: 280px;
  margin: 0 auto;
  width: 100%;
}
@media (max-width: 720px) {
  .bookmakers-layout { grid-template-columns: 1fr; }
  .bookmakers-chart-wrap { max-width: 220px; }
}

.tipster-source-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.tipster-source-badge .icon { font-size: 13px; }
.tipster-source-badge.is-telegram {
  background: rgba(79,140,255,.15);
  color: var(--accent);
  border: 1px solid rgba(79,140,255,.3);
}
.tipster-source-badge.is-manual {
  background: rgba(46,160,67,.12);
  color: var(--green);
  border: 1px solid rgba(46,160,67,.3);
}

.tipster-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.tipster-name-input {
  background: transparent;
  border: 1px solid transparent;
  color: var(--text);
  font-size: 13.5px;
  font-weight: 500;
  padding: 4px 6px;
  border-radius: 4px;
  outline: none;
  width: 100%;
  font-family: inherit;
  transition: background .12s, border-color .12s;
  text-overflow: ellipsis;
}
.tipster-name-input:hover { background: rgba(255,255,255,.04); }
.tipster-name-input:focus {
  background: var(--bg);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,140,255,.2);
}
.tipster-name-input.is-custom {
  font-style: italic;
  color: var(--accent);
}
.tipster-original-hint {
  color: var(--muted-2);
  font-size: 11px;
  padding: 0 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tipster-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}
.tipster-actions button {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
  transition: all .12s;
}
.tipster-actions button:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.tipster-actions .btn-delete:hover {
  border-color: var(--red);
  color: var(--red);
  background: rgba(248,81,73,.08);
}

/* ============================================================ */
/* === Aba Dúvidas (Help) ===================================== */
/* ============================================================ */

.help-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: linear-gradient(135deg, rgba(79,140,255,.12), rgba(79,140,255,.02));
  border: 1px solid rgba(79,140,255,.25);
  border-radius: var(--r-lg, 12px);
  padding: 20px 24px;
  margin-bottom: 24px;
}
.help-hero h2 { font-size: 22px; font-weight: 600; }

.help-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
  margin-bottom: 8px;
}
.help-step {
  position: relative;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 18px 14px 56px;
  transition: border-color .15s, transform .15s;
}
.help-step:hover { border-color: rgba(79,140,255,.4); transform: translateY(-1px); }
.help-step-num {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
}
.help-step h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.help-step p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}
.help-step small {
  color: var(--muted-2);
  font-size: 11.5px;
  font-style: italic;
  display: block;
}
.help-step strong { color: var(--text); }

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.faq-item {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0;
  overflow: hidden;
  transition: border-color .15s;
}
.faq-item[open] { border-color: rgba(79,140,255,.4); }
.faq-item summary {
  cursor: pointer;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--bg);
  color: var(--accent);
  font-weight: 700;
  font-size: 16px;
  transition: transform .15s, background .15s;
  flex-shrink: 0;
}
.faq-item[open] summary::before {
  content: "−";
  background: var(--accent);
  color: #fff;
}
.faq-item p {
  margin: 0;
  padding: 0 18px 16px 50px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}
.faq-item p strong { color: var(--text); }

/* ============================================================ */
/* === Modal de Onboarding (boas-vindas) ====================== */
/* ============================================================ */

.onboarding-modal-content {
  max-width: 520px;
  width: 92vw;
}
.onb-slide {
  display: none;
  text-align: center;
  padding: 8px 12px 16px;
  min-height: 240px;
}
.onb-slide.active { display: block; animation: onbFade .25s ease; }
@keyframes onbFade {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.onb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(79,140,255,.18), rgba(79,140,255,.05));
  border: 1px solid rgba(79,140,255,.3);
  color: var(--accent);
  margin: 8px auto 18px;
}
.onb-slide h2 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 600;
}
.onb-slide p {
  margin: 0 auto 10px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  max-width: 420px;
}
.onb-slide small {
  color: var(--muted-2);
  font-size: 12px;
  font-style: italic;
  display: block;
  margin-top: 8px;
}
.onb-slide strong { color: var(--text); }

.onb-dots {
  display: flex;
  gap: 6px;
  justify-content: center;
  margin: 4px 0 16px;
}
.onb-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
  transition: background .15s, width .15s;
}
.onb-dot.active {
  background: var(--accent);
  width: 22px;
  border-radius: 4px;
}

/* ============================================================ */
/* === Tour guiado (spotlight + tooltip) ====================== */
/* ============================================================ */

#tour-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
}
#tour-spotlight {
  position: fixed;
  border-radius: 10px;
  /* O "buraco" é só essa caixa; o resto da tela escurece via box-shadow gigante */
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .68),
              0 0 0 3px rgba(79, 140, 255, .9),
              0 0 24px 4px rgba(79, 140, 255, .55);
  transition: top .25s ease, left .25s ease,
              width .25s ease, height .25s ease;
  pointer-events: none;
}
#tour-spotlight.no-target {
  /* Quando não há alvo (ex: passo de boas-vindas), centraliza um quadrado vazio */
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .68);
}
#tour-tooltip {
  position: fixed;
  z-index: 9999;
  width: 360px;
  max-width: calc(100vw - 32px);
  background: var(--panel);
  border: 1px solid rgba(79, 140, 255, .35);
  border-radius: var(--r-md);
  padding: 16px 18px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .55);
  pointer-events: auto;
  transition: top .25s ease, left .25s ease, opacity .15s ease;
  animation: tourPop .25s ease;
}
@keyframes tourPop {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
#tour-tooltip h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
}
#tour-tooltip h3 .icon { color: var(--accent); }
#tour-tooltip p {
  margin: 0 0 10px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
#tour-tooltip p strong { color: var(--text); }
.tour-progress {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: .5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.tour-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.tour-actions .grow { flex: 1; }
.tour-actions button {
  font-size: 12.5px;
  padding: 7px 12px;
  border-radius: var(--r-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: inherit;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  transition: all .12s;
}
.tour-actions button:hover { border-color: var(--accent); }
.tour-actions button:disabled { opacity: .4; cursor: not-allowed; }
.tour-actions .tour-skip {
  background: transparent;
  border-color: transparent;
  color: var(--muted-2);
  font-size: 11.5px;
}
.tour-actions .tour-skip:hover { color: var(--text); border-color: transparent; }
.tour-actions .tour-next {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  font-weight: 500;
}
.tour-actions .tour-next:hover { filter: brightness(1.1); }

/* Setinha apontando pro alvo */
.tour-arrow {
  position: absolute;
  width: 14px;
  height: 14px;
  background: var(--panel);
  border: 1px solid rgba(79, 140, 255, .35);
  transform: rotate(45deg);
}
.tour-arrow.top    { top: -8px;  left: 32px;  border-right: 0; border-bottom: 0; }
.tour-arrow.bottom { bottom: -8px; left: 32px; border-left: 0;  border-top: 0; }
.tour-arrow.left   { left: -8px; top: 24px;   border-right: 0; border-top: 0; }
.tour-arrow.right  { right: -8px; top: 24px;  border-left: 0;  border-bottom: 0; }
.tour-arrow.none   { display: none; }

/* Pulse no elemento alvo (opcional, suave) */
@keyframes tourPulse {
  0%, 100% { box-shadow: 0 0 0 9999px rgba(0,0,0,.68),
                          0 0 0 3px rgba(79,140,255,.9),
                          0 0 24px 4px rgba(79,140,255,.55); }
  50%      { box-shadow: 0 0 0 9999px rgba(0,0,0,.68),
                          0 0 0 3px rgba(79,140,255,.9),
                          0 0 32px 8px rgba(79,140,255,.85); }
}
#tour-spotlight.pulse { animation: tourPulse 2s ease-in-out infinite; }

/* ============================================================ */
/* === Aba Afiliados (account modal) ========================== */
/* ============================================================ */

.aff-link-box {
  margin: 16px 0;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(79,140,255,.02));
  border: 1px solid rgba(79,140,255,.25);
  border-radius: var(--r-md);
}
.aff-link-box label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 8px;
}
.aff-link-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.aff-link-row input {
  flex: 1;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 9px 12px;
  font-size: 13px;
  font-family: var(--mono, ui-monospace, monospace);
}
.aff-link-row input:focus {
  outline: none;
  border-color: var(--accent);
}

.aff-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.aff-stat {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
}
.aff-stat-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
}
.aff-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
}

.aff-history {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  max-height: 240px;
  overflow-y: auto;
}
.aff-history-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.aff-history-row:last-child { border-bottom: none; }
.aff-history-row .aff-amount { font-weight: 600; color: var(--green); }
.aff-history-row .aff-status-pending { color: var(--yellow); font-size: 11px; text-transform: uppercase; }
.aff-history-row .aff-status-paid    { color: var(--green);  font-size: 11px; text-transform: uppercase; }
.aff-history-row .aff-status-voided  { color: var(--muted-2); font-size: 11px; text-transform: uppercase; }
.aff-history-row .grow { flex: 1; }

/* ============================================================ */
/* === Banca Pública (configuração + cards na landing) ======== */
/* ============================================================ */

.pubbank-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(79,140,255,.08), rgba(79,140,255,.02));
  border: 1px solid rgba(79,140,255,.22);
  border-radius: var(--r-md);
  flex-wrap: wrap;
}

.pb-tipsters-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px;
}
.pb-tipster-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  transition: background .12s;
  cursor: pointer;
  user-select: none;
}
.pb-tipster-item:hover { background: rgba(255,255,255,.04); }
.pb-tipster-item input[type="checkbox"] {
  width: 16px; height: 16px; cursor: pointer; accent-color: var(--accent);
}
.pb-tipster-item .pb-tip-name { font-size: 13.5px; color: var(--text); flex: 1; }
.pb-tipster-item .pb-tip-source {
  font-size: 10.5px; color: var(--muted-2);
  padding: 2px 8px; border-radius: 999px;
  background: var(--bg); border: 1px solid var(--border);
}

/* ---- Cards na landing (login.html) ---- */
.pubbank-section {
  margin-top: 60px;
  padding: 40px 28px;
  background: linear-gradient(180deg, rgba(79,140,255,.05) 0%, transparent 100%);
  border-top: 1px solid var(--border);
}
.pubbank-section-inner {
  max-width: 1280px;
  margin: 0 auto;
}
.pubbank-section h2 {
  margin: 0 0 6px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.pubbank-section .subtitle {
  color: var(--muted);
  font-size: 14px;
  margin: 0 0 24px;
}
.pubbank-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.pubbank-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 22px 18px;
  cursor: pointer;
  transition: all .15s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;  /* permite flex/grid encolher sem overflow */
}
.pubbank-card:hover {
  border-color: rgba(79,140,255,.5);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.pubbank-card-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 6px;
}
.pubbank-card-name .icon { color: var(--accent); font-size: 18px; }
.pubbank-card-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.pubbank-card-metric {
  background: var(--panel-2);
  border-radius: var(--r-sm);
  padding: 8px 10px;
}
.pubbank-card-metric .label {
  font-size: 10.5px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pubbank-card-metric .value {
  font-size: 17px;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
/* Quando o número é grande (ex: +R$ 9.999.999,00), reduz o tamanho automaticamente */
.pubbank-card-metric .value.is-large { font-size: 14px; }
.pubbank-card-metric .value.is-huge  { font-size: 12px; }
.pubbank-card-metric .value.profit-pos { color: var(--green); }
.pubbank-card-metric .value.profit-neg { color: var(--red); }
.pubbank-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted-2);
  font-size: 11px;
  margin-top: 4px;
}

/* Reações no card da listagem */
.pubbank-card-reactions {
  display: inline-flex; align-items: center; gap: 4px;
}
.pubbank-react-btn {
  display: inline-flex; align-items: center; gap: 4px;
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 3px 8px; border-radius: 999px;
  cursor: pointer; font-size: 11px; line-height: 1;
  transition: all .12s;
}
.pubbank-react-btn:hover:not(:disabled) {
  background: var(--panel-2);
  color: var(--text); border-color: var(--accent);
}
.pubbank-react-btn:disabled { cursor: not-allowed; opacity: .55; }
.pubbank-react-btn .icon { font-size: 14px; }
.pubbank-react-btn .count { font-variant-numeric: tabular-nums; font-weight: 600; }
.pubbank-react-btn.is-active {
  background: rgba(79,140,255,0.15); border-color: var(--accent); color: var(--accent);
}
.pubbank-react-btn.pubbank-react-dislike.is-active {
  background: rgba(248,81,73,0.12); border-color: var(--red); color: var(--red);
}

/* Estatísticas (bets · win rate) à direita do footer */
.pubbank-card-stats {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--muted-2); font-size: 11px;
}
.pubbank-card-stats .dot { opacity: 0.6; }

/* ---- Modal de detalhe ---- */
.pubbank-detail h2 {
  margin: 0 0 4px;
  font-size: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.pubbank-detail .subtitle {
  color: var(--muted);
  font-size: 13px;
  margin: 0 0 18px;
}
.pubbank-detail .stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.pubbank-detail .stat {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px;
}
.pubbank-detail .stat .label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pubbank-detail .stat .value {
  font-size: 20px;
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
/* Auto-shrink quando o número é grande pra não quebrar linha no card */
.pubbank-detail .stat .value.is-large { font-size: 16px; }
.pubbank-detail .stat .value.is-huge  { font-size: 13px; }
.pubbank-detail .stat .value.profit-pos { color: var(--green); }
.pubbank-detail .stat .value.profit-neg { color: var(--red); }
.pubbank-detail .tipsters-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.pubbank-detail .tipsters-table th {
  text-align: left;
  padding: 8px 10px;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.pubbank-detail .tipsters-table td {
  padding: 8px 10px;
  border-top: 1px solid var(--border);
}
.pubbank-detail .tipsters-table tr:hover td { background: rgba(255,255,255,.02); }

/* Form row em 2 colunas (unidade + banca inicial lado a lado) */
.form-row-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 16px;
}
.form-row-2col > div { display: flex; flex-direction: column; gap: 6px; }
.form-row-2col label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.form-row-2col small { line-height: 1.4; }
@media (max-width: 640px) {
  .form-row-2col { grid-template-columns: 1fr; }
}

/* Curva de crescimento da banca (mini-chart no detalhe) */
.pb-growth-chart {
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 12px 14px;
  margin-bottom: 18px;
}
.pb-growth-chart .label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.pb-growth-chart .label .value {
  font-size: 16px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text);
}
.pb-growth-chart canvas { width: 100% !important; height: 180px !important; }

/* ============================================================ */
/* === Comunidade — dashboard de outras bancas =============== */
/* ============================================================ */

/* As duas "views" da aba Comunidade — list (default) e detail (drill-down).
   Sem isso, ambas aparecem juntas porque .hidden não é global no projeto. */
#community-list-view.hidden,
#community-detail-view.hidden { display: none; }

.community-dashboard {
  /* Sem max-width: ocupa todo o espaço disponível do tab content, igual à
     aba Dashboard. Antes 1200px restringia em telas largas. */
  width: 100%;
}
.community-header {
  display: flex;
  flex-direction: column;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--border);
}
.community-header h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.4px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.community-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.community-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
  min-width: 0;
}
.community-kpi .label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 6px;
}
.community-kpi .value {
  font-size: 22px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.3px;
}
.community-kpi .value.is-large { font-size: 18px; }
.community-kpi .value.is-huge  { font-size: 14px; }
.community-kpi .value.profit-pos { color: var(--green); }
.community-kpi .value.profit-neg { color: var(--red); }

.community-chart-box {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  margin-bottom: 18px;
}
.community-chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.community-chart-title {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}
.community-chart-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.community-chart-value.profit-pos { color: var(--green); }
.community-chart-value.profit-neg { color: var(--red); }
.community-chart-box canvas {
  width: 100% !important;
}
.community-chart-box .growth-canvas { height: 280px !important; }
.community-chart-box .monthly-canvas { height: 260px !important; }
/* Wrapper do canvas do doughnut: ele é quem mantém o aspect ratio 1:1,
   garantindo que o Chart.js renderize num quadrado. Sem wrapper, o canvas
   herdava a altura do grid cell (alta quando tem muitos jogos) e o hover
   ficava desalinhado com o desenho (Chart.js usa coordenadas internas). */
.community-chart-box .by-game-wrap {
  width: 100%;
  max-width: 320px;
  aspect-ratio: 1 / 1;
  margin: 0 auto;
  position: relative;
}
.community-chart-box .by-game-wrap > canvas {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
}

/* Header sticky com botão voltar + nome da banca pra dar sensação de "página" */
.community-detail-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
}
.community-back-btn {
  background: var(--panel-2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 14px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .12s;
}
.community-back-btn:hover {
  border-color: var(--accent);
  background: var(--panel);
}

/* Botões sociais (Telegram e X) — usados no header do detalhe e no modal da landing */
.pb-socials {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.pb-social-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  background: var(--panel-2);
  color: var(--text);
  transition: all .12s;
}
.pb-social-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.pb-social-tg {
  border-color: rgba(38, 166, 224, 0.4);
  color: #26a6e0;
}
.pb-social-tg:hover {
  background: rgba(38, 166, 224, 0.12);
  border-color: rgba(38, 166, 224, 0.7);
}
.pb-social-x {
  border-color: rgba(220, 220, 220, 0.3);
  color: #e5e9f0;
}
.pb-social-x:hover {
  background: rgba(220, 220, 220, 0.08);
  border-color: rgba(220, 220, 220, 0.6);
}
.pb-social-ig {
  border-color: rgba(228, 64, 95, 0.4);
  color: #e4405f;
}
.pb-social-ig:hover {
  background: rgba(228, 64, 95, 0.10);
  border-color: rgba(228, 64, 95, 0.7);
}

/* ============================================================ */
/* === Página Banca Pública — layout 2 colunas =============== */
/* ============================================================ */

.pubbank-page {
  width: 100%;
  max-width: 1280px;
}
.pubbank-page-header {
  margin-bottom: 24px;
}
.pubbank-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  gap: 24px;
  align-items: start;
}
.pubbank-config-col { min-width: 0; }
.pubbank-side-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: sticky;
  top: 14px;
}
.pubbank-side-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.pubbank-side-card.pubbank-side-warn {
  background: linear-gradient(135deg, rgba(247,184,1,.06), rgba(247,184,1,.02));
  border-color: rgba(247, 184, 1, 0.25);
}
.pubbank-side-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.pubbank-side-title .icon { color: var(--accent); font-size: 16px; }
.pubbank-side-card.pubbank-side-warn .pubbank-side-title .icon { color: var(--yellow, #f7b801); }
.pubbank-tips {
  margin: 8px 0 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.pubbank-tips li { margin-bottom: 6px; }
.pubbank-tips strong { color: var(--text); }

.pubbank-section-title {
  margin: 22px 0 6px;
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 600;
}

/* Grid de 3 colunas pra inputs (Telegram/X/Instagram) — colapsa em telas pequenas */
.form-row-3col {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}
.form-row-3col > div { display: flex; flex-direction: column; gap: 6px; }
.form-row-3col label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.3px;
}

@media (max-width: 1100px) {
  .pubbank-layout { grid-template-columns: 1fr; }
  .pubbank-side-col { position: static; }
}
@media (max-width: 720px) {
  .form-row-3col { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* === Banca Pública V3 — single column centered ============= */
/* ============================================================ */

.pubbank-v3 {
  width: 100%;
  /* Sem max-width — usa toda a largura da tab, igual à aba Operação */
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-bottom: 100px;     /* espaço pro footer sticky */
}

/* Grid 2 colunas: main (preview + tipsters) | sidebar (identidade + redes + dicas) */
.pubbank-v3-body {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr);
  gap: 18px;
  align-items: start;
}
.pubbank-v3-main {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.pubbank-v3-side {
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: sticky;
  top: 14px;
}

/* Header com toggle inline */
.pubbank-v3-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  padding-bottom: 6px;
}

/* Toggle estilo "switch" — visual moderno (não checkbox padrão) */
.pubbank-v3-switch {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  padding: 8px 14px 8px 8px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: all .15s;
}
.pubbank-v3-switch:hover { border-color: var(--accent); }
.pubbank-v3-switch input { display: none; }
.pubbank-v3-switch-slider {
  position: relative;
  width: 38px;
  height: 22px;
  background: var(--panel-2);
  border-radius: 999px;
  flex-shrink: 0;
  transition: background .2s;
}
.pubbank-v3-switch-slider::before {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  background: var(--muted);
  border-radius: 50%;
  transition: all .2s;
}
.pubbank-v3-switch input:checked ~ .pubbank-v3-switch-slider {
  background: rgba(46, 160, 67, 0.25);
}
.pubbank-v3-switch input:checked ~ .pubbank-v3-switch-slider::before {
  background: var(--green);
  transform: translateX(16px);
}
.pubbank-v3-switch-label {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.pubbank-v3-switch-label strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.pubbank-v3-switch input:not(:checked) ~ .pubbank-v3-switch-label strong { color: var(--muted-2); }
.pubbank-v3-switch input:not(:checked) ~ .pubbank-v3-switch-label strong::after {
  content: " (oculta)";
  font-weight: 400;
  font-size: 11px;
}
.pubbank-v3-switch-label small {
  color: var(--muted-2);
  font-size: 10.5px;
  margin-top: 2px;
}

/* Hero compacto — preview horizontal (não vertical) */
.pubbank-v3-hero {
  background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(46,160,67,.04));
  border: 1px solid rgba(79,140,255,.25);
  border-radius: var(--r-md);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
}
.pubbank-v3-hero-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}
.pubbank-v3-hero-placeholder strong {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--muted);
}
.pubbank-v3-hero-placeholder small { font-size: 12px; color: var(--muted-2); }
.pubbank-v3-hero .pubbank-card {
  width: 100%;
  margin: 0;
  cursor: default;
  background: var(--panel);
}
.pubbank-v3-hero .pubbank-card:hover { transform: none; box-shadow: none; }

/* Sem grids — tudo single column. Os cards ocupam largura total. */
.pubbank-v3-grid,
.pubbank-v3-grid-wide {
  display: contents;
}

.pubbank-v3-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
}
.pubbank-v3-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.pubbank-v3-card-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.pubbank-v3-card-header .icon {
  color: var(--accent);
  font-size: 18px;
}

/* Inputs uniformes */
.pubbank-v3-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
}
.pubbank-v3-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,140,255,0.15);
}
.pubbank-v3-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.45;
}

/* Inputs sociais com cor da rede no border-left */
.pubbank-v3-social-input { position: relative; }
.pubbank-v3-social-input label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.pubbank-v3-social-tg label .icon { color: #26a6e0; }
.pubbank-v3-social-x  label .icon { color: #e5e9f0; }
.pubbank-v3-social-ig label .icon { color: #e4405f; }
.pubbank-v3-social-tg input { border-left: 3px solid rgba(38,166,224,0.5); }
.pubbank-v3-social-x  input { border-left: 3px solid rgba(220,220,220,0.5); }
.pubbank-v3-social-ig input { border-left: 3px solid rgba(228,64,95,0.5); }

/* Tips card */
.pubbank-v3-tips-card .pubbank-tips {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.6;
}
.pubbank-v3-tips-card .pubbank-tips li { margin-bottom: 6px; }
.pubbank-v3-tips-card .pubbank-tips strong { color: var(--text); }

.pubbank-v3-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 12px;
  background: rgba(247, 184, 1, 0.06);
  border: 1px solid rgba(247, 184, 1, 0.25);
  border-radius: var(--r-md);
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}
.pubbank-v3-privacy .icon {
  color: var(--yellow, #f7b801);
  flex-shrink: 0;
  margin-top: 1px;
}
.pubbank-v3-privacy strong { color: var(--text); }

/* Tipsters list — altura razoável (~7 itens). Scroll só se passar disso. */
.pubbank-v3-card .pb-tipsters-list {
  max-height: 330px;
  overflow-y: auto;
  padding-right: 4px;
}

/* Card de Dicas + Privacidade em layout horizontal compacto */
.pubbank-v3-tips-card {
  background: linear-gradient(135deg, rgba(247,184,1,.04), transparent 60%);
}
.pubbank-v3-tips-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 16px;
  align-items: start;
}
.pubbank-v3-tips-grid .pubbank-tips {
  margin: 0;
  padding-left: 20px;
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.55;
}
.pubbank-v3-tips-grid .pubbank-tips li { margin-bottom: 5px; }
@media (max-width: 720px) {
  .pubbank-v3-tips-grid { grid-template-columns: 1fr; }
}

/* Footer com botão salvar sticky no fim da página */
.pubbank-v3-footer {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(180deg, transparent 0%, var(--bg) 30%);
  padding: 16px 0 12px;
  margin-top: -8px;
  z-index: 10;
}
.pubbank-v3-save {
  padding: 12px 32px;
  font-size: 14px;
  font-weight: 600;
  min-width: 220px;
}

/* Responsivo */
@media (max-width: 1100px) {
  .pubbank-v3-body { grid-template-columns: 1fr; }
  .pubbank-v3-side { position: static; }
}
@media (max-width: 720px) {
  .pubbank-v3-header { flex-direction: column; align-items: flex-start; }
  .form-row-3col { grid-template-columns: 1fr; }
}

/* ============================================================ */
/* === Painel Admin ========================================== */
/* ============================================================ */

.admin-page {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.admin-header {
  padding-bottom: 6px;
}

/* KPIs grandes no topo */
.admin-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}
.admin-kpi {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.admin-kpi-label {
  font-size: 11px;
  color: var(--muted-2);
  text-transform: uppercase;
  letter-spacing: 0.3px;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.admin-kpi-value {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.4px;
  color: var(--text);
}
.admin-kpi-sub {
  font-size: 11px;
  color: var(--muted-2);
  margin-top: 2px;
}

/* Card com filtros e tabela */
.admin-card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 18px 20px;
}
.admin-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.admin-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.admin-input {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 12px;
  font-size: 13px;
  font-family: inherit;
}
.admin-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Tabela */
.admin-table-wrap {
  overflow-x: auto;
  max-height: 600px;
  overflow-y: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  position: sticky;
  top: 0;
  background: var(--panel-2);
  color: var(--muted);
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table .col-email {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.admin-table .col-name {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}

/* Tag de plano */
.plan-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.plan-tag[data-plan="trial"]     { background: rgba(108,118,129,.15);   color: var(--muted); border: 1px solid rgba(108,118,129,.3); }
.plan-tag[data-plan="starter"]   { background: rgba(79,140,255,.12);    color: var(--accent); border: 1px solid rgba(79,140,255,.3); }
.plan-tag[data-plan="pro"]       { background: rgba(46,160,67,.12);     color: var(--green); border: 1px solid rgba(46,160,67,.3); }
.plan-tag[data-plan="plus"]      { background: rgba(168,85,247,.14);    color: #a855f7; border: 1px solid rgba(168,85,247,.4); }
.plan-tag[data-plan="premium"]   { background: rgba(247,184,1,.14);     color: var(--yellow, #f7b801); border: 1px solid rgba(247,184,1,.4); }
.plan-tag[data-plan="elite"]     { background: linear-gradient(135deg, rgba(232,168,56,.18), rgba(176,108,32,.22)); color: #e8a838; border: 1px solid rgba(232,168,56,.45); }
.plan-tag[data-plan="suspended"] { background: rgba(248,81,73,.14);     color: var(--red); border: 1px solid rgba(248,81,73,.4); }

/* Status circle */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot.active   { background: var(--green); box-shadow: 0 0 8px rgba(46,160,67,.5); }
.status-dot.inactive { background: var(--muted-2); }

/* Ações na linha */
.admin-row-actions {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}
.admin-row-actions button {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  padding: 5px 9px;
  border-radius: var(--r-sm);
  font-size: 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all .12s;
}
.admin-row-actions button:hover {
  color: var(--text);
  border-color: var(--accent);
}
.admin-row-actions .btn-danger {
  color: var(--red);
  border-color: rgba(248,81,73,.3);
}
.admin-row-actions .btn-danger:hover {
  background: rgba(248,81,73,.08);
  border-color: var(--red);
}
.admin-row-actions .btn-warn {
  color: var(--yellow, #f7b801);
  border-color: rgba(247,184,1,.3);
}
.admin-row-actions .btn-warn:hover {
  background: rgba(247,184,1,.08);
  border-color: var(--yellow, #f7b801);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted-2);
}

/* ============================================================================
   Comunidade — sub-abas (Feed / Bancas) + Feed de posts
   ============================================================================ */
.community-subtabs {
  display: flex; gap: 4px; margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
}
.community-subtab {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: none; color: var(--muted);
  padding: 10px 16px; cursor: pointer; font-size: 14px; font-weight: 500;
  border-bottom: 2px solid transparent; transition: all .12s;
}
.community-subtab:hover { color: var(--text); }
.community-subtab.is-active {
  color: var(--accent); border-bottom-color: var(--accent);
}
.community-subtab-content.hidden { display: none; }

.community-feed-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 16px;
}
.community-feed-header code {
  background: var(--panel-2); padding: 1px 5px; border-radius: 3px;
  font-size: 11.5px;
}

/* Composer */
.feed-composer {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: 12px;
  padding: 14px; margin-bottom: 18px;
}
.feed-composer-body { display: flex; flex-direction: column; gap: 10px; }
.feed-composer textarea {
  width: 100%; resize: vertical; min-height: 70px;
  background: var(--bg, var(--panel-2)); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text);
  font-family: inherit; font-size: 14px; line-height: 1.5;
}
.feed-composer textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,140,255,0.15);
}
.feed-composer-actions {
  display: flex; align-items: center; justify-content: space-between;
}
.feed-composer.is-locked .feed-composer-body { display: none; }
.feed-composer-locked {
  display: flex; align-items: center; gap: 14px;
  padding: 4px 6px;
}
.feed-composer-locked .icon {
  font-size: 32px; color: var(--accent); flex-shrink: 0;
}
.feed-composer-locked strong { display: block; font-size: 14px; color: var(--text); margin-bottom: 2px; }
.feed-composer-locked small { color: var(--muted-2); font-size: 12.5px; }

/* Lista de posts */
.feed-posts-list { display: flex; flex-direction: column; gap: 12px; }

.feed-post {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; padding: 14px;
}
.feed-post-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.feed-post-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6b8cff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; flex-shrink: 0;
}
.feed-post-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.feed-post-meta strong { font-size: 14px; color: var(--text); }
.feed-post-meta small { font-size: 11.5px; }
.feed-post-del {
  background: transparent; border: none; color: var(--muted-2);
  cursor: pointer; padding: 4px 8px; border-radius: 4px;
}
.feed-post-del:hover { color: var(--red); background: rgba(248,81,73,0.08); }

.feed-post-body {
  font-size: 14.5px; line-height: 1.55; color: var(--text);
  word-wrap: break-word; overflow-wrap: break-word;
  white-space: pre-wrap; padding: 4px 0 10px;
}
.feed-post-body a { color: var(--accent); text-decoration: none; }
.feed-post-body a:hover { text-decoration: underline; }
.feed-post-body strong { font-weight: 700; }
.feed-post-body em { font-style: italic; }

.feed-post-actions {
  display: flex; align-items: center; gap: 8px;
  padding-top: 10px; border-top: 1px solid var(--border);
}
.feed-action-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent; border: 1px solid transparent;
  color: var(--muted); padding: 5px 12px; border-radius: 999px;
  cursor: pointer; font-size: 13px; transition: all .12s;
}
.feed-action-btn:hover:not(:disabled) {
  background: var(--panel-2); color: var(--text);
}
.feed-action-btn:disabled { cursor: not-allowed; opacity: .5; }
.feed-action-btn.is-active {
  color: #f55a7d;
}
.feed-action-btn .count { font-variant-numeric: tabular-nums; font-weight: 600; }

/* Comments do post */
.feed-post-comments {
  margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border);
}
.feed-post-comments.hidden { display: none; }

.feed-comments-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 10px; }

.feed-comment {
  display: flex; gap: 10px;
  background: var(--panel-2); border-radius: 8px; padding: 10px;
}
.feed-comment-avatar {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, #5f6caf, #8b96d4);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12px;
}
.feed-comment-body { flex: 1; min-width: 0; }
.feed-comment-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 3px;
}
.feed-comment-head strong { font-size: 12.5px; color: var(--text); }
.feed-comment-head small { font-size: 11px; }
.feed-comment-del {
  margin-left: auto; background: transparent; border: none;
  color: var(--muted-2); cursor: pointer; padding: 2px 5px;
}
.feed-comment-del:hover { color: var(--red); }
.feed-comment-text {
  font-size: 13px; line-height: 1.45; color: var(--text);
  word-wrap: break-word; overflow-wrap: break-word;
}
.feed-comment-text a { color: var(--accent); text-decoration: none; }
.feed-comment-text strong { font-weight: 700; }
.feed-comment-text em { font-style: italic; }

.feed-comment-form {
  display: flex; gap: 8px; align-items: flex-end;
}
.feed-comment-form textarea {
  flex: 1; resize: vertical; min-height: 36px;
  background: var(--bg, var(--panel-2)); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 10px; color: var(--text);
  font-family: inherit; font-size: 13px; line-height: 1.4;
}
.feed-comment-form textarea:focus {
  outline: none; border-color: var(--accent);
}

.feed-load-more { text-align: center; padding: 14px 0; }
.feed-load-more button { width: 100%; max-width: 280px; }

/* ============================================================================
   DM — Mensagens (chat 1:1)
   ============================================================================ */
.dm-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--red, #f85149); color: #fff;
  font-size: 10.5px; font-weight: 700; line-height: 1;
  padding: 2px 6px; border-radius: 999px; min-width: 16px;
  margin-left: 4px;
}
.dm-badge.hidden { display: none; }

.dm-layout {
  display: grid; grid-template-columns: 280px 1fr;
  gap: 16px; min-height: 540px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden;
}
@media (max-width: 720px) {
  .dm-layout { grid-template-columns: 1fr; min-height: auto; }
}

.dm-sidebar {
  display: flex; flex-direction: column;
  border-right: 1px solid var(--border);
  background: var(--panel-2);
}
.dm-sidebar-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-bottom: 1px solid var(--border);
}

.dm-conv-list { flex: 1; overflow-y: auto; max-height: 540px; }

.dm-conv-item {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px;
  background: transparent; border: none; border-bottom: 1px solid var(--border);
  color: var(--text); text-align: left; cursor: pointer;
  transition: background .12s;
}
.dm-conv-item:hover { background: rgba(255,255,255,0.03); }
.dm-conv-item.is-active { background: rgba(79,140,255,0.10); }
.dm-conv-item.is-blocked .dm-conv-name { color: var(--muted-2); }

.dm-conv-avatar {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6b8cff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.dm-conv-meta { flex: 1; min-width: 0; }
.dm-conv-name {
  display: flex; align-items: center; gap: 4px;
  font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-conv-preview {
  font-size: 11.5px; color: var(--muted-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dm-conv-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 4px;
  flex-shrink: 0;
}
.dm-conv-unread {
  background: var(--accent); color: #fff;
  font-size: 10.5px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; min-width: 18px; text-align: center;
}

/* Thread */
.dm-thread {
  display: flex; flex-direction: column;
  background: var(--panel);
}
.dm-thread-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--border);
}
.dm-thread-peer {
  display: flex; align-items: center; gap: 10px;
  font-size: 15px;
}
.dm-thread-actions { display: flex; gap: 6px; }

.dm-empty-state {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
  padding: 40px 20px; color: var(--muted);
}

.dm-messages {
  flex: 1; overflow-y: auto; padding: 16px;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 440px;
  scroll-behavior: smooth;
}

.dm-msg {
  display: flex; flex-direction: column; gap: 2px; max-width: 78%;
}
.dm-msg.is-mine { align-self: flex-end; align-items: flex-end; }
.dm-msg.is-theirs { align-self: flex-start; align-items: flex-start; }

.dm-msg-bubble {
  padding: 8px 12px; border-radius: 14px;
  font-size: 14px; line-height: 1.4;
  word-wrap: break-word; overflow-wrap: break-word;
  white-space: pre-wrap;
}
.dm-msg.is-mine .dm-msg-bubble {
  background: var(--accent); color: #fff;
  border-bottom-right-radius: 4px;
}
.dm-msg.is-theirs .dm-msg-bubble {
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.dm-msg-bubble a { color: inherit; text-decoration: underline; }
.dm-msg-bubble strong { font-weight: 700; }
.dm-msg-bubble em { font-style: italic; }
.dm-msg-time { font-size: 10.5px; color: var(--muted-2); padding: 0 6px; }

.dm-composer {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 12px 14px; border-top: 1px solid var(--border);
  background: var(--panel-2);
}
.dm-composer textarea {
  flex: 1; resize: none; max-height: 120px; min-height: 36px;
  background: var(--bg, var(--panel)); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 12px; color: var(--text);
  font-family: inherit; font-size: 14px; line-height: 1.4;
}
.dm-composer textarea:focus {
  outline: none; border-color: var(--accent);
}

.dm-blocked-banner {
  padding: 12px 16px; background: rgba(248,81,73,0.08);
  border-top: 1px solid rgba(248,81,73,0.25);
  color: var(--muted); font-size: 13px; text-align: center;
}

/* ============================================================================
   Admin — Moderação de reports
   ============================================================================ */
.admin-reports-list {
  display: flex; flex-direction: column; gap: 12px;
  padding: 8px 0;
}

.admin-report {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}

.admin-report-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}

.report-type-badge {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 11px; font-weight: 600;
  background: var(--panel); border: 1px solid var(--border); color: var(--muted);
}
.report-type-post { color: #6b8cff; border-color: rgba(107,140,255,0.35); background: rgba(107,140,255,0.10); }
.report-type-post_comment { color: #6b8cff; border-color: rgba(107,140,255,0.35); background: rgba(107,140,255,0.10); }
.report-type-bankroll_comment { color: #4caf50; border-color: rgba(76,175,80,0.35); background: rgba(76,175,80,0.10); }
.report-type-dm { color: #ff9b6b; border-color: rgba(255,155,107,0.35); background: rgba(255,155,107,0.10); }
.report-type-user { color: #f55a7d; border-color: rgba(245,90,125,0.35); background: rgba(245,90,125,0.10); }

.report-status {
  display: inline-flex; align-items: center;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px;
}
.report-status-pending {
  color: var(--yellow,#f7b801);
  background: rgba(247,184,1,0.12); border: 1px solid rgba(247,184,1,0.3);
}
.report-status-reviewed {
  color: var(--green,#2ea043);
  background: rgba(46,160,67,0.12); border: 1px solid rgba(46,160,67,0.3);
}
.report-status-dismissed {
  color: var(--muted-2);
  background: rgba(255,255,255,0.04); border: 1px solid var(--border);
}

.admin-report-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
}
.admin-report .lbl {
  font-size: 10.5px; color: var(--muted-2); text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 2px;
}
.admin-report .val { font-size: 13px; color: var(--text); }

.admin-report-reason .val,
.admin-report-preview .val {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 6px; padding: 8px 10px;
  font-size: 13px; line-height: 1.45;
  word-wrap: break-word; overflow-wrap: break-word;
  max-height: 140px; overflow-y: auto;
}
.admin-report-preview .val a { color: var(--accent); text-decoration: none; }
.admin-report-preview .val strong { font-weight: 700; }
.admin-report-preview .val em { font-style: italic; }

.report-actions {
  display: flex; gap: 8px; flex-wrap: wrap;
  padding-top: 6px; border-top: 1px solid var(--border);
}
.report-actions button { font-size: 12px; }

/* Tabela "Users de alto consumo" — linhas em prejuízo ganham fundo vermelho sutil */
.admin-hc-loss { background: rgba(248,81,73,0.06); }
.admin-hc-loss:hover { background: rgba(248,81,73,0.10); }
#admin-hc-card .admin-table th { font-size: 12px; }
#admin-hc-card .admin-table td { font-size: 13px; padding: 8px 10px; }

/* ============================================================================
   Comunidade — bloco social (reactions + comments) no detail de banca pública
   ============================================================================ */
.community-social { display: flex; flex-direction: column; gap: 18px; }

.community-social-reactions {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.community-react-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  color: var(--muted); padding: 7px 14px; border-radius: 999px;
  cursor: pointer; font-size: 14px; font-weight: 500;
  transition: all .15s; user-select: none;
}
.community-react-btn:hover:not(:disabled) {
  background: var(--panel-3, rgba(255,255,255,0.04));
  color: var(--text); border-color: var(--accent);
}
.community-react-btn:disabled { opacity: .5; cursor: not-allowed; }
.community-react-btn.is-active {
  background: rgba(79,140,255,0.15); border-color: var(--accent);
  color: var(--accent);
}
.community-react-btn.community-react-dislike.is-active {
  background: rgba(248,81,73,0.12); border-color: var(--red);
  color: var(--red);
}
.community-react-count { font-variant-numeric: tabular-nums; font-weight: 600; }

.community-comments-wrap { display: flex; flex-direction: column; gap: 14px; }

.community-comment-form {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px;
}
.community-comment-form textarea {
  width: 100%; min-height: 60px; resize: vertical;
  background: var(--bg, var(--panel)); border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px; color: var(--text);
  font-family: inherit; font-size: 14px; line-height: 1.45;
}
.community-comment-form textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(79,140,255,0.15);
}
.community-comment-form-actions {
  display: flex; align-items: center; justify-content: space-between;
}

.community-comments-list { display: flex; flex-direction: column; gap: 12px; }

.community-comment {
  display: flex; gap: 12px;
  padding: 12px; background: var(--panel-2);
  border: 1px solid var(--border); border-radius: 10px;
}
.community-comment-avatar {
  flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #6b8cff);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
}
.community-comment-body { flex: 1; min-width: 0; }
.community-comment-header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 4px;
}
.community-comment-header strong { font-size: 13.5px; color: var(--text); }
.community-comment-header small { font-size: 11.5px; }
.community-comment-del {
  margin-left: auto; background: transparent; border: none;
  color: var(--muted-2); cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.community-comment-del:hover { color: var(--red); background: rgba(248,81,73,0.08); }
.community-comment-text {
  font-size: 14px; line-height: 1.5; color: var(--text);
  word-wrap: break-word; overflow-wrap: break-word;
}
.community-comment-text a { color: var(--accent); text-decoration: none; }
.community-comment-text a:hover { text-decoration: underline; }
.community-comment-text strong { font-weight: 700; }
.community-comment-text em { font-style: italic; }

.community-comments-more {
  text-align: center; padding: 8px 0;
}
.community-comments-more button { width: 100%; max-width: 280px; }

/* Linha clicável da tabela de admin (abre modal de detalhes) */
.admin-row-clickable { cursor: pointer; transition: background .12s; }
.admin-row-clickable:hover { background: rgba(255,255,255,0.025); }
.admin-row-clickable .admin-row-actions button { cursor: pointer; }

/* Modal de detalhes do usuário */
.admin-detail-section {
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.admin-detail-section:last-child { border-bottom: none; margin-bottom: 0; }
.admin-detail-section h3 {
  margin: 0 0 10px 0; font-size: 13px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600;
}
.admin-detail-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 16px;
}
.admin-detail-grid .lbl {
  font-size: 11px; color: var(--muted-2); text-transform: uppercase;
  letter-spacing: 0.3px; margin-bottom: 2px;
}
.admin-detail-grid .val {
  font-size: 14px; color: var(--text); font-weight: 500;
  word-break: break-all;
}
.admin-detail-grid .val.empty { color: var(--muted-2); font-weight: 400; font-style: italic; }
.admin-detail-grid .val.money { font-variant-numeric: tabular-nums; }
.admin-detail-grid .val.money.green { color: var(--green); }
.admin-detail-grid .val.money.yellow { color: var(--yellow, #f7b801); }
.admin-pix-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--border);
  padding: 8px 10px; border-radius: var(--r-sm);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 12.5px; word-break: break-all;
}
.admin-pix-box .copy-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--muted); padding: 3px 7px; border-radius: 4px;
  font-size: 11px; cursor: pointer; flex-shrink: 0;
}
.admin-pix-box .copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* .info-banner: estilo movido pro <style> inline em index.html
   (motivo: garante que renderize estilizado mesmo se o style.css estiver
   em cache antigo no browser/CDN — o HTML sempre vem fresh, no-store). */

/* Tag pequena de jogo (na tabela de distribuição) — cores casam com a doughnut */
.game-tag-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--panel-2);
  border: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}
.game-tag-mini::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--game-color, var(--muted));
}
.game-tag-mini[data-game="cs"]       { --game-color: #d97706; }
.game-tag-mini[data-game="lol"]      { --game-color: #c084fc; }
.game-tag-mini[data-game="valorant"] { --game-color: #ef4444; }
.game-tag-mini[data-game="dota"]     { --game-color: #dc2626; }
.game-tag-mini[data-game="futebol"]  { --game-color: #16a34a; }
.game-tag-mini[data-game="basquete"] { --game-color: #f97316; }
.game-tag-mini[data-game="tenis"]    { --game-color: #eab308; }
.game-tag-mini[data-game="mma"]      { --game-color: #b91c1c; }
.game-tag-mini[data-game="other"]    { --game-color: #6b7280; }

/* Responsivo: distribuição por jogo empilha em telas pequenas */
@media (max-width: 720px) {
  .community-chart-box > div[style*="grid-template-columns:1fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
}

/* Select nativo do sort da Comunidade */
.community-sort-select {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 8px 32px 8px 12px;
  font-size: 13px;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%237d8590' d='M6 8L0 0h12z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  cursor: pointer;
}
.community-sort-select:focus {
  outline: none;
  border-color: var(--accent);
}
.community-sort-select option {
  background: var(--panel);
  color: var(--text);
}
