/* ── Impulsos Page — Points-Based Boosting ───────────────────────────────── */

.impulsos-container { max-width: 960px; margin: 0 auto; padding: 24px 16px 40px; }
.impulsos-container h1 { font-size: 24px; color: #fff; margin: 0 0 20px; }
.impulsos-container h2 { font-size: 18px; color: #ccc; margin: 32px 0 16px; padding-bottom: 8px; border-bottom: 1px solid #2a2d3a; }

/* ── Points Balance Card ────────────────────────────────────────────────── */

.pontos-saldo-card {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(135deg, #1f222f, #252836);
  border: 1px solid #ffcc00; border-radius: 10px;
  padding: 16px 20px; margin-bottom: 28px;
}
.pontos-saldo-icon { font-size: 24px; }
.pontos-saldo-label { color: #aaa; font-size: 14px; }
.pontos-saldo-valor { font-size: 22px; font-weight: 800; color: #ffcc00; }
.pontos-saldo-btn {
  margin-left: auto; padding: 8px 18px;
  background: #ff3366; color: #fff; border: none; border-radius: 6px;
  font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
  transition: background 0.2s;
}
.pontos-saldo-btn:hover { background: #ff4d7a; }

/* ── New Impulse Section ───────────────────────────────────────────────── */

.impulso-novo-section {
  background: #1f222f; border: 1px solid #32364c; border-radius: 10px;
  padding: 24px;
}

.impulso-field { margin-bottom: 20px; }
.impulso-field label { display: block; color: #aaa; font-size: 13px; font-weight: 600; margin-bottom: 8px; }

/* Tier Selector */
.impulso-tier-selector { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.impulso-tier-card {
  background: #252836; border: 2px solid #32364c; border-radius: 8px;
  padding: 16px 12px; text-align: center; cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
}
.impulso-tier-card:hover { border-color: #555; }
.impulso-tier-card.selected { border-color: #ffcc00; box-shadow: 0 0 12px rgba(255,204,0,0.12); }
.impulso-tier-card.tier-ouro.selected { border-color: #ffcc00; box-shadow: 0 0 20px rgba(255,204,0,0.15); }
.impulso-tier-card.tier-prata.selected { border-color: #c0c0c0; box-shadow: 0 0 12px rgba(192,192,192,0.12); }
.impulso-tier-card.tier-bronze.selected { border-color: #cd7f32; box-shadow: 0 0 12px rgba(205,127,50,0.12); }

.tier-emoji { font-size: 28px; }
.tier-nome { font-size: 15px; font-weight: 700; color: #fff; }
.tier-custo { font-size: 12px; color: #888; }

/* Days Input */
.impulso-dias-input {
  display: flex; align-items: center; gap: 12px;
}
.impulso-dias-input input[type="range"] {
  flex: 1; height: 6px;
  -webkit-appearance: none; appearance: none;
  background: #32364c; border-radius: 3px; outline: none;
}
.impulso-dias-input input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 20px; height: 20px; border-radius: 50%;
  background: #ff3366; cursor: pointer; border: none;
}
.impulso-dias-input input[type="number"] {
  width: 72px; padding: 8px 10px; background: #1a1c23; border: 1px solid #32364c;
  border-radius: 6px; color: #fff; font-size: 14px; text-align: center;
  font-family: inherit; box-sizing: border-box;
}
.impulso-dias-input input[type="number"]:focus { outline: none; border-color: #ff3366; }

/* Toggle Switch */
.toggle-label {
  display: flex !important; align-items: center; gap: 10px; cursor: pointer;
}
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: #32364c; border-radius: 12px; transition: background 0.2s;
}
.toggle-slider::before {
  content: ''; position: absolute; left: 3px; bottom: 3px;
  width: 18px; height: 18px; background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.toggle-switch input:checked + .toggle-slider { background: #4caf50; }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }
.toggle-hint { display: block; color: #666; font-size: 12px; margin-top: 4px; margin-left: 54px; }

/* Cost Preview */
.impulso-custo-preview {
  background: #252836; border-radius: 8px; padding: 14px 18px;
  margin: 20px 0; text-align: center;
}
.impulso-custo-preview span { color: #ccc; font-size: 15px; }
.impulso-custo-preview strong { color: #ffcc00; font-size: 18px; }
.custo-detalhe { display: block; color: #888 !important; font-size: 12px !important; margin-top: 4px; }

/* Activate Button */
.btn-ativar-impulso {
  width: 100%; padding: 14px; background: #ffcc00; color: #121212; border: none;
  border-radius: 6px; font-size: 16px; font-weight: 700; cursor: pointer;
  transition: background 0.2s;
}
.btn-ativar-impulso:hover { background: #ffd633; }
.btn-ativar-impulso:disabled { background: #32364c; color: #666; cursor: not-allowed; }

.impulso-error {
  background: rgba(255,51,102,0.1); border: 1px solid #ff3366; color: #ff3366;
  border-radius: 6px; padding: 10px 14px; font-size: 13px; margin-top: 12px;
}

/* ── Active Impulses List ───────────────────────────────────────────────── */

.impulsos-ativos-list { display: flex; flex-direction: column; gap: 10px; }

.impulso-ativo-row {
  background: #1f222f; border: 1px solid #32364c; border-radius: 8px;
  padding: 14px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
}
.impulso-ativo-row.nivel-ouro { border-left: 3px solid #ffd700; }
.impulso-ativo-row.nivel-prata { border-left: 3px solid #c0c0c0; }
.impulso-ativo-row.nivel-bronze { border-left: 3px solid #cd7f32; }

.ativo-info { flex: 1; min-width: 200px; display: flex; flex-direction: column; gap: 4px; }
.ativo-titulo { font-size: 15px; font-weight: 600; color: #fff; }
.ativo-nivel { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 4px; display: inline-block; }
.ativo-nivel.ouro { background: rgba(255,215,0,0.15); color: #ffd700; }
.ativo-nivel.prata { background: rgba(192,192,192,0.15); color: #c0c0c0; }
.ativo-nivel.bronze { background: rgba(205,127,50,0.15); color: #cd7f32; }

.auto-renova-badge {
  display: inline-block; background: rgba(76,175,80,0.15); color: #4caf50;
  padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600;
}

.ativo-meta { display: flex; gap: 12px; align-items: center; }
.ativo-dias { font-size: 13px; color: #aaa; white-space: nowrap; }
.ativo-dias.expirando { color: #e74c3c; font-weight: 600; }
.ativo-custo-diario { font-size: 12px; color: #666; }

.ativo-actions { display: flex; gap: 8px; align-items: center; }
.ativo-btn-remover {
  padding: 6px 14px; background: transparent; border: 1px solid #e74c3c; color: #e74c3c;
  border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.ativo-btn-remover:hover { background: rgba(231,76,60,0.1); }
.ativo-btn-cancelar-renov {
  padding: 6px 14px; background: transparent; border: 1px solid #ff9800; color: #ff9800;
  border-radius: 5px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.ativo-btn-cancelar-renov:hover { background: rgba(255,152,0,0.1); }

/* ── Histórico Table ───────────────────────────────────────────────────── */

.impulsos-historico-table-wrap { overflow-x: auto; }
.impulsos-table { width: 100%; border-collapse: collapse; }
.impulsos-table th, .impulsos-table td {
  text-align: left; padding: 10px 14px; border-bottom: 1px solid #2a2d3a;
  font-size: 13px;
}
.impulsos-table th { color: #888; font-weight: 600; font-size: 12px; text-transform: uppercase; }
.impulsos-table td { color: #ccc; }

.tipo-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.tipo-compra { background: rgba(76,175,80,0.15); color: #4caf50; }
.tipo-gasto { background: rgba(255,51,102,0.15); color: #ff3366; }
.tipo-renovacao { background: rgba(255,152,0,0.15); color: #ff9800; }
.tipo-cancelado { background: rgba(231,76,60,0.15); color: #e74c3c; }
.tipo-bonus { background: rgba(255,204,0,0.15); color: #ffcc00; }
.tipo-admin { background: rgba(59,130,246,0.15); color: #3b82f6; }

.pontos-positivo { color: #4caf50; font-weight: 600; }
.pontos-negativo { color: #ff3366; font-weight: 600; }

/* ── Empty State + Select ──────────────────────────────────────────────── */

.impulso-empty { color: #666; text-align: center; padding: 32px 16px; font-size: 14px; }

.form-select {
  width: 100%; padding: 11px 14px; background: #1a1c23; border: 1px solid #32364c;
  border-radius: 6px; color: #ccc; font-size: 14px; font-family: inherit;
  box-sizing: border-box;
}
.form-select:focus { outline: none; border-color: #ff3366; }
.form-select option { background: #1a1c23; color: #fff; }

/* ── Responsive ────────────────────────────────────────────────────────── */

@media (max-width: 768px) {
  .impulso-tier-selector { grid-template-columns: 1fr; }
  .impulso-ativo-row { flex-direction: column; align-items: flex-start; }
  .ativo-actions { width: 100%; justify-content: flex-end; }
  .pontos-saldo-card { justify-content: center; text-align: center; }
  .pontos-saldo-btn { margin-left: 0; }
}

@media (max-width: 480px) {
  .impulsos-container { padding: 10px 4px; }
  .impulso-novo-section { padding: 16px 12px; }
  .impulso-ativo-row { gap: 8px; padding: 12px; }
  .ativo-meta { flex-direction: column; gap: 4px; align-items: flex-start; }
}
