/* ============================================
   GUIDED INVESTMENT — Painel Lateral
   ============================================ */

/* Botão flutuante de ativação */
#guided-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1040;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1e40af, #3b82f6);
  border: none;
  box-shadow: 0 4px 16px rgba(59,130,246,0.45);
  color: #fff;
  font-size: 1.2rem;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#guided-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(59,130,246,0.6);
}
#guided-btn .badge-step {
  position: absolute;
  top: -4px;
  right: -4px;
  background: #f59e0b;
  color: #000;
  font-size: 10px;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--bs-gray-900, #111);
}

/* Painel lateral */
#guided-panel {
  position: fixed;
  top: 0;
  right: -380px;
  width: 360px;
  height: 100vh;
  background: var(--bs-gray-900, #111827);
  border-left: 1px solid var(--bs-gray-700, #374151);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transition: right 0.3s cubic-bezier(0.4,0,0.2,1);
  box-shadow: -4px 0 24px rgba(0,0,0,0.4);
}
#guided-panel.open {
  right: 0;
}

/* Overlay */
#guided-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1049;
}
#guided-overlay.open {
  display: block;
}

/* Header do painel */
.guided-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--bs-gray-700, #374151);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.guided-header-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-light, #f9fafb);
  display: flex;
  align-items: center;
  gap: 8px;
}
.guided-header-title i {
  color: #3b82f6;
}
.guided-close {
  background: none;
  border: none;
  color: var(--bs-gray-400, #9ca3af);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px;
  border-radius: 4px;
  transition: color 0.2s;
}
.guided-close:hover { color: #fff; }

/* Progress bar */
.guided-progress {
  padding: 10px 18px 0;
  flex-shrink: 0;
}
.guided-progress-bar {
  height: 4px;
  background: var(--bs-gray-700, #374151);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 6px;
}
.guided-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #1e40af, #3b82f6);
  border-radius: 2px;
  transition: width 0.4s ease;
}
.guided-progress-label {
  font-size: 11px;
  color: var(--bs-gray-400, #9ca3af);
  display: flex;
  justify-content: space-between;
}

/* Steps indicator */
.guided-steps {
  display: flex;
  gap: 6px;
  padding: 10px 18px;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.guided-steps::-webkit-scrollbar { display: none; }
.guided-step-dot {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--bs-gray-600, #4b5563);
  background: transparent;
  color: var(--bs-gray-400, #9ca3af);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}
.guided-step-dot.active {
  border-color: #3b82f6;
  background: #1e40af;
  color: #fff;
}
.guided-step-dot.done {
  border-color: #059669;
  background: #064e3b;
  color: #34d399;
}
.guided-step-dot:hover:not(.active) {
  border-color: #6b7280;
  color: #d1d5db;
}
.guided-step-dot .step-tooltip {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: #1f2937;
  color: #f9fafb;
  font-size: 10px;
  white-space: nowrap;
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid #374151;
  pointer-events: none;
  z-index: 10;
}
.guided-step-dot:hover .step-tooltip { display: block; }

/* Conteúdo principal do painel */
.guided-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--bs-gray-600, #4b5563) transparent;
}
.guided-content::-webkit-scrollbar { width: 4px; }
.guided-content::-webkit-scrollbar-thumb {
  background: var(--bs-gray-600, #4b5563);
  border-radius: 2px;
}

/* Step content */
.guided-step-title {
  font-size: 15px;
  font-weight: 700;
  color: #f9fafb;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.guided-step-title .step-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #1e3a8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.guided-step-desc {
  font-size: 13px;
  color: #9ca3af;
  line-height: 1.55;
  margin-bottom: 14px;
}

/* Dica do passo */
.guided-tip {
  background: rgba(59,130,246,0.08);
  border: 1px solid rgba(59,130,246,0.25);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #93c5fd;
  line-height: 1.5;
  margin-bottom: 14px;
}
.guided-tip i { margin-right: 6px; color: #3b82f6; }

/* Checklist do passo */
.guided-checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
}
.guided-checklist li {
  font-size: 12px;
  color: #d1d5db;
  padding: 5px 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}
.guided-checklist li:last-child { border-bottom: none; }
.guided-checklist li i {
  margin-top: 2px;
  flex-shrink: 0;
  color: #6b7280;
}
.guided-checklist li.done i { color: #34d399; }
.guided-checklist li.done span { color: #6b7280; text-decoration: line-through; }

/* Botão de ação do passo */
.guided-action {
  display: block;
  width: 100%;
  padding: 9px 14px;
  background: linear-gradient(135deg, #1e40af, #2563eb);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: opacity 0.2s, transform 0.1s;
  margin-bottom: 8px;
}
.guided-action:hover {
  opacity: 0.9;
  transform: translateY(-1px);
  color: #fff;
}
.guided-action.secondary {
  background: transparent;
  border: 1px solid var(--bs-gray-600, #4b5563);
  color: #9ca3af;
}
.guided-action.secondary:hover { color: #fff; border-color: #6b7280; }
.guided-action.success {
  background: linear-gradient(135deg, #065f46, #059669);
}

/* Highlight contextual — destaca elemento na página */
.guided-highlight {
  box-shadow: 0 0 0 3px #3b82f6, 0 0 20px rgba(59,130,246,0.3) !important;
  border-radius: 6px;
  transition: box-shadow 0.3s;
  position: relative;
  z-index: 1;
}

/* Nota de rodapé */
.guided-footer {
  padding: 10px 18px;
  border-top: 1px solid var(--bs-gray-700, #374151);
  flex-shrink: 0;
}
.guided-footer-note {
  font-size: 10px;
  color: var(--bs-gray-500, #6b7280);
  text-align: center;
  line-height: 1.4;
}

/* Nav footer */
.guided-nav {
  padding: 12px 18px;
  display: flex;
  gap: 8px;
  border-top: 1px solid var(--bs-gray-700, #374151);
  flex-shrink: 0;
}
.guided-nav-btn {
  flex: 1;
  padding: 8px;
  border-radius: 7px;
  border: 1px solid var(--bs-gray-600, #4b5563);
  background: transparent;
  color: #9ca3af;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}
.guided-nav-btn:hover { color: #fff; border-color: #6b7280; }
.guided-nav-btn.primary {
  background: #1e40af;
  border-color: #1e40af;
  color: #fff;
}
.guided-nav-btn.primary:hover { background: #1d4ed8; }
.guided-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* Responsive */
@media (max-width: 480px) {
  #guided-panel { width: 100vw; }
  #guided-btn { bottom: 16px; right: 16px; }
}