/* HISTORICO.CSS - ScorePulse V9.8 */

/* FILTROS */
.hist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}

.hist-filter-group {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hist-filter-label {
  font-size: 9px;
  font-family: var(--font-mono);
  color: var(--text-dim);
  letter-spacing: 1px;
  text-transform: uppercase;
  white-space: nowrap;
}

.hist-select {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--glass-border);
  border-radius: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-family: var(--font-mono);
  padding: 4px 8px;
  cursor: pointer;
  outline: none;
  transition: border-color var(--transition);
}

.hist-select:focus, .hist-select:hover {
  border-color: var(--purple);
  color: var(--text-primary);
}

/* MARKET TABS */
.hist-tabs {
  display: flex;
  gap: 4px;
}

.hist-tab {
  padding: 4px 12px;
  border-radius: 5px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 700;
  cursor: pointer;
  border: 1px solid var(--glass-border);
  background: transparent;
  color: var(--text-dim);
  transition: all var(--transition);
  letter-spacing: 0.5px;
}

.hist-tab:hover { color: var(--text-secondary); border-color: rgba(255,255,255,0.15); }

.hist-tab.active {
  background: rgba(139,92,246,0.15);
  border-color: var(--purple);
  color: var(--purple-bright);
}

/* KPI RESUMO */
.hist-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.hist-kpi {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hist-kpi-label {
  font-size: 9px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.hist-kpi-val {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.hist-kpi-val.total  { color: var(--text-primary); }
.hist-kpi-val.taxa   { color: var(--purple-bright); }
.hist-kpi-val.greens { color: var(--green-bright); }
.hist-kpi-val.reds   { color: var(--red); }

/* TABELA */
.hist-table-wrap {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  overflow-x: auto;
}

.hist-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.hist-table thead th {
  padding: 8px 12px;
  text-align: left;
  font-family: var(--font-mono);
  font-size: 8px;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  text-transform: uppercase;
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
  background: rgba(255,255,255,0.02);
}

.hist-table tbody tr {
  border-bottom: 1px solid rgba(255,255,255,0.04);
  transition: background var(--transition);
}

.hist-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.hist-table tbody tr:last-child { border-bottom: none; }

.hist-table td {
  padding: 7px 12px;
  vertical-align: middle;
  color: var(--text-secondary);
}

/* COLUNAS */
.hist-td-date   { white-space: nowrap; color: var(--text-dim); font-size: 10px; }
.hist-time      { font-size: 9px; color: var(--text-dim); opacity: 0.7; }
.hist-td-league { color: var(--text-dim); font-size: 10px; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-td-match  { font-weight: 600; color: var(--text-primary); min-width: 180px; }
.hist-vs        { color: var(--text-dim); font-size: 9px; margin: 0 4px; }
.hist-td-market { white-space: nowrap; }
.hist-market-code { font-family: var(--font-mono); font-size: 10px; color: var(--purple-bright); font-weight: 700; }
.hist-td-min    { font-family: var(--font-mono); font-size: 10px; color: var(--text-dim); text-align: center; }
.hist-td-conf   { text-align: center; }
.hist-td-result { text-align: center; white-space: nowrap; }

/* CONFIANÇA */
.hist-conf {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}
.hist-conf.high { color: var(--green-bright); background: rgba(16,185,129,0.1); }
.hist-conf.mid  { color: var(--purple-bright); background: rgba(139,92,246,0.1); }
.hist-conf.low  { color: var(--text-dim); background: rgba(255,255,255,0.05); }

/* BADGES */
.hist-badge {
  font-size: 10px;
  font-weight: 700;
  font-family: var(--font-mono);
  padding: 2px 7px;
  border-radius: 4px;
}
.hist-badge.green   { color: var(--green-bright); background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.2); }
.hist-badge.red     { color: var(--red); background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); }
.hist-badge.void    { color: #94a3b8; background: rgba(148,163,184,0.1); border: 1px solid rgba(148,163,184,0.2); }
.hist-badge.pending { color: var(--text-dim); }

/* EMPTY / LOADING */
.hist-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-dim);
  font-size: 12px;
}
.hist-loading {
  color: var(--purple-bright);
  font-family: var(--font-mono);
  font-size: 11px;
  animation: pulse-dot 1.5s infinite;
}

/* ─── SIGNAL BUTTON ─────────────────────────────────────────────────────── */
.hist-signal-btn {
  background: rgba(167,139,250,.1);
  border: 1px solid rgba(167,139,250,.25);
  color: #a78bfa;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.hist-signal-btn:hover { background: rgba(167,139,250,.2); }

/* ─── ADMIN CORRECTION ──────────────────────────────────────────────────── */
.hist-correct-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 11px;
  padding: 1px 4px;
  margin-left: 4px;
  opacity: 0.4;
  transition: opacity .15s;
  vertical-align: middle;
}
.hist-correct-btn:hover { opacity: 1; }

.hist-correct-dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  z-index: 100;
  background: #0d1117;
  border: 1px solid rgba(139,92,246,0.3);
  border-radius: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 150px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.6);
  animation: hist-dropdown-in 0.15s ease-out;
}

@keyframes hist-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hist-correct-title {
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-dim);
  font-family: var(--font-mono);
  padding: 2px 6px 4px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 2px;
}

.hist-correct-opt {
  background: none;
  border: 1px solid transparent;
  border-radius: 5px;
  padding: 5px 10px;
  font-size: 11px;
  font-family: var(--font-mono);
  font-weight: 600;
  cursor: pointer;
  text-align: left;
  transition: background .12s, border-color .12s;
  color: var(--text-secondary);
}
.hist-correct-opt:hover {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.1);
}
.hist-correct-opt.green:hover  { color: var(--green-bright); border-color: rgba(16,185,129,0.3); background: rgba(16,185,129,0.08); }
.hist-correct-opt.red:hover    { color: var(--red); border-color: rgba(239,68,68,0.3); background: rgba(239,68,68,0.06); }
.hist-correct-opt.void:hover   { color: #94a3b8; border-color: rgba(148,163,184,0.3); background: rgba(148,163,184,0.06); }
.hist-correct-opt.cancel       { font-size: 10px; color: var(--text-dim); margin-top: 2px; }
.hist-correct-opt.cancel:hover { color: var(--text-secondary); }

