/* Sprint Robos Alerta ao Vivo (26/05/2026).
   Espelha a paleta dark do painel (--bg/--card/--accent/--text) +
   tokens proprios pra status (firing/success/warning). */

.rb-shell {
  margin-left: 240px;
  padding: 24px 32px 64px;
  min-height: 100vh;
  transition: margin-left 0.18s ease;
}
body[data-app-sidebar-collapsed="true"] .rb-shell { margin-left: 64px; }

.rb-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 18px; flex-wrap: wrap;
}
.rb-header h1 { font-size: 22px; margin: 0 0 4px; color: var(--text); font-weight: 700; }
.rb-sub { color: var(--text3); font-size: 12px; margin: 0; max-width: 760px; line-height: 1.55; }
.rb-actions { display: flex; align-items: center; gap: 8px; }
.rb-btn {
  padding: 8px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-size: 12px; cursor: pointer;
  font-weight: 600; transition: all 0.15s; font-family: inherit;
}
.rb-btn:hover:not(:disabled) { border-color: var(--accent); }
.rb-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rb-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.rb-btn:disabled { opacity: 0.55; cursor: not-allowed; }

.rb-status {
  font-size: 12px; color: var(--text3);
  padding: 10px 14px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--card);
  margin-bottom: 16px;
}

/* KPIs */
.rb-kpis {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.rb-kpi {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 14px 16px;
}
.rb-kpi .kpi-label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text3); font-weight: 700; margin-bottom: 6px;
}
.rb-kpi .kpi-value { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.1; margin-bottom: 4px; }
.rb-kpi .hint { font-size: 11px; color: var(--text3); }

/* Tabs */
.rb-tabs {
  display: flex; gap: 2px; border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.rb-tab {
  padding: 10px 16px; font-size: 12px; color: var(--text2); cursor: pointer;
  border: none; background: transparent; border-bottom: 2px solid transparent;
  font-weight: 600; font-family: inherit;
}
.rb-tab:hover { color: var(--text); }
.rb-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.rb-badge {
  display: inline-block; margin-left: 6px; background: var(--accent); color: #fff;
  font-size: 10px; padding: 1px 7px; border-radius: 8px; font-weight: 700;
}

.rb-tab-panel { min-height: 360px; }

/* Empty state */
.rb-empty {
  text-align: center; padding: 60px 20px;
  background: var(--card); border: 1px dashed var(--border); border-radius: 12px;
}
.rb-empty-icon { font-size: 42px; margin-bottom: 12px; }
.rb-empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.rb-empty-sub { font-size: 12px; color: var(--text3); max-width: 480px; margin: 0 auto; line-height: 1.55; }

/* Robot grid - sera populado em Sprint 2 */
.rb-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

.rb-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
  padding: 16px; transition: border-color 0.15s; position: relative;
}
.rb-card:hover { border-color: var(--accent); }
.rb-card.firing { border-color: var(--warning); box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15); }
.rb-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.rb-card-name { font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; }
.rb-card-name .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); flex-shrink: 0; }
.rb-card-name .dot.off { background: var(--text3); }
.rb-card-name .dot.firing { background: var(--warning); animation: rb-pulse 1s infinite; }
@keyframes rb-pulse { 0%,100%{opacity:1} 50%{opacity:0.4} }
.rb-card-desc { font-size: 11px; color: var(--text3); line-height: 1.5; margin-bottom: 10px; min-height: 0; }
.rb-toggle {
  width: 34px; height: 18px; background: var(--text3); border-radius: 9px;
  position: relative; cursor: pointer; flex-shrink: 0; border: none;
  transition: background 0.15s;
}
.rb-toggle.on { background: var(--success); }
.rb-toggle::after {
  content: ''; position: absolute; width: 14px; height: 14px; background: #fff;
  border-radius: 50%; top: 2px; left: 2px; transition: left 0.15s;
}
.rb-toggle.on::after { left: 18px; }
.rb-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 12px; min-height: 22px; }
.rb-chip {
  font-size: 10px; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text2); padding: 3px 8px; border-radius: 10px; font-weight: 600;
  white-space: nowrap;
}
.rb-chip.time { border-color: rgba(79, 142, 247, 0.5); color: #7faaff; }
.rb-chip.score { border-color: rgba(52, 211, 153, 0.5); color: #5dd7a8; }
.rb-chip.shots { border-color: rgba(251, 191, 36, 0.5); color: #fcc847; }
.rb-chip.adv { border-color: rgba(168, 85, 247, 0.5); color: #c084fc; }
.rb-chip.cards { border-color: rgba(239, 68, 68, 0.5); color: #f87171; }
.rb-chip.goal {
  border-color: rgba(34, 197, 94, 0.6);
  color: #4ade80;
  background: rgba(34, 197, 94, 0.10);
  font-weight: 700;
}
/* Aviso de falha na entrega do WhatsApp (ultimo disparo nao notificou). */
.rb-notify-warn {
  display: flex; align-items: flex-start; gap: 6px;
  margin: 0 0 10px; padding: 7px 10px; border-radius: 8px;
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f8a4a4; font-size: 10.5px; line-height: 1.4; font-weight: 600;
  cursor: help;
}
.rb-notify-warn-ic { flex: 0 0 auto; }
.rb-notify-warn-txt {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.rb-card-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px;
  padding-top: 10px; border-top: 1px dashed var(--border); margin-bottom: 10px;
}
.rb-card-stat .l { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.rb-card-stat .v { font-size: 15px; font-weight: 800; color: var(--text); margin-top: 2px; }
.rb-card-stat .v.hit { color: var(--success); }
.rb-card-stat.clickable { cursor: pointer; border-radius: 6px; padding: 4px 6px; margin: -4px -6px; transition: background 0.15s; }
.rb-card-stat.clickable:hover { background: rgba(79, 142, 247, 0.08); }
.rb-card-stat.clickable .v::after {
  content: '🔍'; font-size: 10px; margin-left: 5px; opacity: 0; transition: opacity 0.15s;
}
.rb-card-stat.clickable:hover .v::after { opacity: 0.7; }
.rb-card-actions { display: flex; gap: 6px; }
.rb-card-actions button {
  flex: 1; padding: 6px 8px; font-size: 11px; background: transparent;
  border: 1px solid var(--border); color: var(--text2); border-radius: 5px;
  cursor: pointer; font-weight: 600; font-family: inherit;
}
.rb-card-actions button:hover { border-color: var(--accent); color: var(--text); }
.rb-card-actions button.danger:hover { border-color: var(--danger); color: var(--danger); }

/* DRAWER */
/* Garantir que [hidden] sobrescreve display:flex/grid das nossas classes */
.rb-drawer[hidden], .rb-overlay[hidden], .rb-toast-stack:empty,
.rb-tab-panel[hidden], .rb-help[hidden], .rb-preview-box[hidden],
#rbWhatsappConfigured[hidden], #rbWhatsappEdit[hidden],
.rb-modal[hidden] { display: none !important; }

.rb-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.5);
  z-index: 90; backdrop-filter: blur(2px);
  animation: rb-overlay-in 0.18s ease;
}
@keyframes rb-overlay-in { from { opacity: 0 } to { opacity: 1 } }
.rb-drawer {
  position: fixed; top: 0; right: 0; width: 540px; height: 100vh;
  background: var(--bg2, var(--card)); border-left: 1px solid var(--border);
  box-shadow: -12px 0 48px rgba(0,0,0,0.5);
  display: flex; flex-direction: column; z-index: 100;
  animation: rb-drawer-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes rb-drawer-in { from { transform: translateX(540px) } to { transform: translateX(0) } }
.rb-drawer-head {
  padding: 18px 22px 14px; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border);
}
.rb-drawer-head h2 { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.rb-drawer-sub { font-size: 11px; color: var(--text3); line-height: 1.5; }
.rb-drawer-close {
  background: transparent; border: none; color: var(--text3);
  font-size: 22px; cursor: pointer; padding: 0 4px; line-height: 1;
}
.rb-drawer-close:hover { color: var(--text); }
.rb-drawer-body { padding: 14px 22px; flex: 1; overflow-y: auto; }
.rb-drawer-foot {
  padding: 14px 22px; border-top: 1px solid var(--border);
  display: flex; gap: 8px;
}
.rb-drawer-foot .rb-btn { flex: 1; }

.rb-section { margin-bottom: 20px; }
.rb-section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.rb-section-title::before {
  content: ''; width: 3px; height: 12px; background: var(--accent); border-radius: 2px;
}
.rb-field { margin-bottom: 10px; }
.rb-field label { display: block; font-size: 11px; color: var(--text2); margin-bottom: 4px; font-weight: 600; }
.rb-field input, .rb-field select, .rb-field textarea {
  width: 100%; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 7px 10px; border-radius: 5px;
  font-size: 12px; font-family: inherit;
}
.rb-field input:focus, .rb-field select:focus { outline: none; border-color: var(--accent); }
.rb-field-hint { font-size: 9px; color: var(--text3); font-weight: 400; display: block; margin-top: 1px; }
.rb-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rb-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; }

.rb-preview-box {
  background: rgba(79, 142, 247, 0.08); border: 1px solid rgba(79, 142, 247, 0.3);
  border-radius: 8px; padding: 10px 12px; font-size: 11px; color: #7faaff;
  margin: 14px 0;
}
.rb-preview-box.success { background: rgba(52, 211, 153, 0.08); border-color: rgba(52, 211, 153, 0.3); color: #5dd7a8; }
.rb-preview-box.error { background: rgba(239, 68, 68, 0.08); border-color: rgba(239, 68, 68, 0.3); color: #f87171; }
.rb-preview-box strong { color: var(--text); }

.rb-help {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px 12px; font-size: 11px; color: var(--text2); margin-top: 8px;
}
.rb-help strong { color: var(--text); }
.rb-help ol { margin: 6px 0 6px 18px; }
.rb-help li { margin-bottom: 3px; }
.rb-help code { background: var(--bg); padding: 1px 5px; border-radius: 3px; font-size: 10px; }
.rb-help a { color: var(--accent); }

@media (max-width: 640px) {
  .rb-drawer { width: 100%; }
  .rb-row-3 { grid-template-columns: 1fr 1fr; }
}

/* SOM com prévia + volume */
.rb-sound-row { display: flex; gap: 6px; align-items: stretch; }
.rb-sound-row select { flex: 1; }
.rb-sound-preview {
  width: 34px; padding: 0; background: var(--bg3); border: 1px solid var(--border);
  color: var(--accent); border-radius: 5px; cursor: pointer; font-size: 13px;
  font-family: inherit; transition: all 0.15s; flex-shrink: 0;
}
.rb-sound-preview:hover:not(:disabled) { background: var(--accent); color: #fff; border-color: var(--accent); }
.rb-sound-preview:disabled { opacity: 0.4; cursor: not-allowed; }
.rb-sound-preview.playing { background: var(--success); color: #fff; border-color: var(--success); }

.rb-volume-label {
  font-size: 10px; color: var(--text3); font-weight: 600;
  background: var(--bg3); padding: 1px 6px; border-radius: 8px;
  margin-left: 6px;
}
.rb-volume-slider {
  width: 100%; margin-top: 6px;
  -webkit-appearance: none; appearance: none;
  height: 4px; background: var(--border); border-radius: 2px;
  outline: none; cursor: pointer;
}
.rb-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 14px; height: 14px; background: var(--accent);
  border-radius: 50%; cursor: pointer; border: 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.rb-volume-slider::-moz-range-thumb {
  width: 14px; height: 14px; background: var(--accent);
  border-radius: 50%; cursor: pointer; border: 0;
}
.rb-volume-slider:disabled { opacity: 0.4; cursor: not-allowed; }

/* CONDIÇÕES DINÂMICAS */
.rb-section-title { display: flex; justify-content: space-between; align-items: center; }
.rb-condition-counter {
  font-size: 9px; background: var(--bg3); color: var(--text3);
  padding: 2px 7px; border-radius: 8px; font-weight: 700;
  letter-spacing: 0.04em; text-transform: none;
}
.rb-conditions-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.rb-conditions-list:empty { margin-bottom: 0; }
.rb-conditions-empty {
  font-size: 11px; color: var(--text3); padding: 10px 12px;
  background: var(--bg3); border: 1px dashed var(--border); border-radius: 6px;
  text-align: center; margin-bottom: 8px;
}
.rb-conditions-list:not(:empty) + .rb-conditions-empty { display: none; }
.rb-condition-row {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr 0.7fr 0.9fr auto;
  gap: 6px; align-items: center;
  background: var(--bg3); border: 1px solid var(--border);
  padding: 6px 8px; border-radius: 6px;
}
.rb-condition-row.between {
  grid-template-columns: 1.4fr 0.85fr 0.7fr 0.9fr 0.9fr auto;
}
.rb-condition-row select, .rb-condition-row input {
  background: var(--bg2, var(--card)); border: 1px solid var(--border);
  color: var(--text); padding: 5px 7px; border-radius: 4px;
  font-size: 11px; font-family: inherit; width: 100%;
}
.rb-condition-row select:focus, .rb-condition-row input:focus {
  outline: none; border-color: var(--accent);
}
.rb-condition-remove {
  width: 24px; height: 24px; padding: 0;
  background: transparent; border: 1px solid var(--border);
  color: var(--text3); border-radius: 4px; cursor: pointer;
  font-size: 14px; line-height: 1; font-family: inherit;
  display: flex; align-items: center; justify-content: center;
}
.rb-condition-remove:hover { border-color: var(--danger); color: var(--danger); }

.rb-add-condition-btn {
  width: 100%; padding: 8px 12px; background: transparent;
  border: 1px dashed var(--accent); color: var(--accent);
  border-radius: 6px; cursor: pointer; font-size: 12px;
  font-family: inherit; font-weight: 600; transition: all 0.15s;
}
.rb-add-condition-btn:hover { background: rgba(79, 142, 247, 0.08); }

/* Multi-select de ligas */
.rb-leagues-counter {
  font-size: 9px; background: var(--bg3); color: var(--text3);
  padding: 2px 8px; border-radius: 8px; font-weight: 600;
  letter-spacing: 0.04em; text-transform: none; margin-left: 6px;
}
.rb-leagues-counter.active { background: rgba(79, 142, 247, 0.15); color: var(--accent); }
.rb-leagues-box {
  background: var(--bg3); border: 1px solid var(--border); border-radius: 6px;
  overflow: hidden;
}
.rb-leagues-toolbar {
  display: flex; gap: 6px; padding: 6px 8px;
  background: var(--bg2, var(--card)); border-bottom: 1px solid var(--border);
  align-items: center;
}
.rb-leagues-search {
  flex: 1; background: var(--bg3); border: 1px solid var(--border);
  color: var(--text); padding: 5px 9px; border-radius: 4px;
  font-size: 11px; font-family: inherit; outline: none;
}
.rb-leagues-search:focus { border-color: var(--accent); }
.rb-leagues-search::-webkit-search-cancel-button { filter: invert(0.8); }
.rb-link-btn {
  background: none; border: 0; color: var(--accent); font-size: 11px;
  cursor: pointer; font-family: inherit; font-weight: 600; padding: 4px 6px;
  white-space: nowrap;
}
.rb-link-btn:hover { color: var(--text); }
/* Lista vertical compacta tipo combobox */
.rb-leagues-list {
  max-height: 280px; overflow-y: auto;
  background: var(--bg2, var(--card));
}
.rb-leagues-loading, .rb-leagues-empty {
  padding: 14px; text-align: center;
  font-size: 11px; color: var(--text3);
}
.rb-league-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 12px; font-size: 12px; cursor: pointer;
  border-bottom: 1px solid var(--border); transition: background 0.1s;
  user-select: none;
  margin: 0;
}
.rb-league-item:last-child { border-bottom: 0; }
.rb-league-item:hover { background: rgba(79, 142, 247, 0.10); }
.rb-league-item input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  margin: 0;
  flex-shrink: 0;
  width: 14px;
  height: 14px;
}
.rb-league-item .lg-name {
  color: var(--text); font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.rb-league-item .lg-country {
  color: var(--text2); font-size: 10px; font-weight: 500;
  white-space: nowrap; flex-shrink: 0;
}
.rb-league-item .lg-count {
  color: var(--text3); font-size: 9px;
  background: var(--bg3); padding: 1px 6px; border-radius: 8px;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
  min-width: 28px; text-align: center;
}
.rb-league-item input:checked ~ .lg-name { color: var(--accent); }
/* Scrollbar mais discreta */
.rb-leagues-list::-webkit-scrollbar { width: 8px; }
.rb-leagues-list::-webkit-scrollbar-track { background: transparent; }
.rb-leagues-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.rb-leagues-list::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* WhatsApp configurado (estado) */
.rb-wa-configured {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; padding: 10px 14px;
  background: rgba(52, 211, 153, 0.08); border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 8px;
}
.rb-wa-info { flex: 1; min-width: 0; }
.rb-wa-status { font-size: 11px; font-weight: 700; color: var(--success); margin-bottom: 3px; }
.rb-wa-phone { font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.rb-wa-hint { font-size: 10px; color: var(--text3); line-height: 1.4; }

/* DISPATCHES FEED */
.rb-dispatches-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 10px; padding: 10px 14px; background: var(--card);
  border: 1px solid var(--border); border-radius: 8px; margin-bottom: 12px;
}
.rb-dispatches-status { font-size: 12px; color: var(--text2); }
.rb-inline-toggle {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11px;
  color: var(--text2); cursor: pointer;
}
.rb-inline-toggle input { accent-color: var(--accent); cursor: pointer; }

.rb-dispatches-list { display: flex; flex-direction: column; gap: 8px; }
.rb-dispatch {
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; display: grid;
  grid-template-columns: auto 1fr auto; gap: 12px; align-items: center;
  animation: rb-dispatch-in 0.3s ease;
}
@keyframes rb-dispatch-in { from { opacity: 0; transform: translateY(-4px) } to { opacity: 1; transform: translateY(0) } }
.rb-dispatch.fresh { border-color: var(--warning); box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.15); }
.rb-dispatch .icon {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(79, 142, 247, 0.12); color: #7faaff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.rb-dispatch.fresh .icon { background: rgba(251, 191, 36, 0.18); color: #fcc847; }
.rb-dispatch .body .robot { font-size: 12px; font-weight: 700; color: var(--text); }
.rb-dispatch .body .match { font-size: 12px; color: var(--text2); margin-top: 2px; }
.rb-dispatch .body .meta { font-size: 10px; color: var(--text3); margin-top: 3px; }
.rb-dispatch .when { font-size: 10px; color: var(--text3); text-align: right; white-space: nowrap; }
.rb-dispatch .score {
  font-size: 14px; font-weight: 800; color: var(--text);
  background: var(--bg3); padding: 2px 10px; border-radius: 8px;
  display: inline-block; margin-left: 8px;
}

/* MODAL: quebra por liga */
.rb-modal {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: min(700px, 92vw); max-height: 80vh;
  background: var(--bg2, var(--card)); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
  z-index: 110; display: flex; flex-direction: column;
  animation: rb-modal-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes rb-modal-in {
  from { opacity: 0; transform: translate(-50%, -45%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.rb-modal-head {
  padding: 16px 20px 12px; display: flex; justify-content: space-between;
  align-items: flex-start; gap: 12px; border-bottom: 1px solid var(--border);
}
.rb-modal-head h2 { font-size: 15px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.rb-modal-sub { font-size: 11px; color: var(--text3); line-height: 1.5; }
.rb-modal-body { padding: 14px 20px 20px; overflow-y: auto; flex: 1; }

.rb-league-rank {
  display: grid;
  grid-template-columns: 32px 1fr auto auto 90px;
  gap: 10px; align-items: center;
  padding: 8px 10px; border-radius: 6px;
  border-bottom: 1px solid var(--border); font-size: 12px;
}
.rb-league-rank:hover { background: rgba(79, 142, 247, 0.06); }
.rb-league-rank .rank-num {
  font-size: 12px; font-weight: 800; color: var(--text3); text-align: center;
}
.rb-league-rank .rank-num.gold { color: #fcc847; }
.rb-league-rank .rank-num.silver { color: #cbd5e1; }
.rb-league-rank .rank-num.bronze { color: #d97706; }
.rb-league-rank .name { color: var(--text); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-league-rank .country { color: var(--text3); font-size: 10px; }
.rb-league-rank .stats { color: var(--text2); font-size: 10px; white-space: nowrap; text-align: right; }
.rb-league-rank .hit-rate {
  font-weight: 800; font-size: 14px; text-align: right; min-width: 60px;
  font-variant-numeric: tabular-nums;
}
.rb-league-rank .hit-rate.good { color: var(--success); }
.rb-league-rank .hit-rate.mid { color: var(--warning); }
.rb-league-rank .hit-rate.low { color: var(--danger); }
.rb-league-bar {
  grid-column: 1 / -1; height: 3px; background: var(--bg3); border-radius: 2px; overflow: hidden;
  margin-top: 6px;
}
.rb-league-bar > div { height: 100%; background: var(--accent); }

/* Drilldown dos jogos por liga (06/06/2026) */
.rb-league-block { border-bottom: 1px solid var(--border); }
.rb-league-block .rb-league-rank { border-bottom: 0; }
.rb-stats-clickable { cursor: pointer; color: var(--accent) !important; text-decoration: underline dotted; }
.rb-stats-clickable:hover { color: var(--text) !important; }
.rb-drill-caret { font-size: 9px; }
.rb-league-drill {
  padding: 4px 0 10px 36px;
  display: flex; flex-direction: column; gap: 4px;
}
/* drilldown colapsado por padrao (nao havia regra .hidden nesta pagina). */
.rb-league-drill.hidden { display: none; }
.rb-drill-row {
  display: grid; grid-template-columns: 54px 1fr auto; align-items: center;
  gap: 10px; padding: 5px 10px; border-radius: 6px; background: var(--bg3);
  font-size: 11px;
}
.rb-drill-res {
  font-size: 9px; font-weight: 800; text-align: center; border-radius: 4px;
  padding: 2px 0; letter-spacing: .03em;
}
.rb-drill-res.win { color: #22c55e; background: rgba(34,197,94,0.14); }
.rb-drill-res.loss { color: #ef4444; background: rgba(239,68,68,0.14); }
.rb-drill-res.push { color: var(--text3); background: var(--bg2); }
.rb-drill-teams { color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rb-drill-teams b { color: var(--accent); font-variant-numeric: tabular-nums; }
.rb-drill-meta { color: var(--text3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Excluir/incluir liga (06/06/2026) */
.rb-league-toggle {
  border: 1px solid var(--border); background: var(--bg2); color: var(--text2);
  font-size: 10px; font-weight: 700; border-radius: 5px; padding: 1px 7px;
  cursor: pointer; transition: all .15s;
}
.rb-league-toggle:hover { border-color: var(--danger); color: var(--danger); }
.rb-league-toggle.is-excluded { border-color: var(--success); color: var(--success); background: rgba(34,197,94,0.08); }
.rb-league-toggle.is-excluded:hover { border-color: var(--success); }
.rb-league-extag {
  font-size: 8px; font-weight: 800; letter-spacing: .04em; color: var(--danger);
  border: 1px solid var(--danger); border-radius: 4px; padding: 1px 5px; margin-left: 6px;
  vertical-align: middle;
}
.rb-league-block.league-excluded { opacity: 0.5; }
.rb-league-block.league-excluded .rb-league-bar > div { background: var(--text3); }

.rb-breakdown-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid var(--border);
}
.rb-breakdown-summary .item {
  background: var(--bg3); border-radius: 6px; padding: 10px 12px;
  text-align: center;
}
.rb-breakdown-summary .item .l { font-size: 9px; color: var(--text3); text-transform: uppercase; font-weight: 700; }
.rb-breakdown-summary .item .v { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 2px; }
.rb-breakdown-summary .item .v.hit { color: var(--success); }

/* TOAST */
.rb-toast-stack {
  position: fixed; top: 16px; right: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
  pointer-events: none;
}
.rb-toast {
  background: var(--card); border: 1px solid var(--warning);
  border-left: 4px solid var(--warning); border-radius: 8px;
  padding: 10px 14px; box-shadow: 0 6px 24px rgba(0,0,0,0.35);
  pointer-events: auto; animation: rb-toast-in 0.25s ease;
}
@keyframes rb-toast-in { from { opacity: 0; transform: translateX(40px) } to { opacity: 1; transform: translateX(0) } }
.rb-toast .t-head { font-size: 12px; font-weight: 700; color: var(--text); margin-bottom: 3px; }
.rb-toast .t-body { font-size: 11px; color: var(--text2); }
.rb-toast .t-close {
  position: absolute; top: 4px; right: 6px; background: none; border: none;
  color: var(--text3); font-size: 14px; cursor: pointer;
}
