/* =============================================
   SPIDER - Setup Styles
   ============================================= */

.setup-container {
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #e4e8ec 100%);
  padding: 40px 20px;
}

/* Header */
.setup-header {
  text-align: center;
  margin-bottom: 40px;
  animation: fadeInDown 0.6s ease-out;
}

.setup-logo {
  height: 70px;
  transform: scaleY(-1);
  margin-bottom: 16px;
  filter: drop-shadow(0 4px 6px rgba(0, 200, 83, 0.2));
}

.setup-header h1 {
  font-size: 28px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.setup-header p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Progress Bar */
.setup-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 700px;
  margin: 0 auto 40px;
  animation: fadeIn 0.6s ease-out 0.2s backwards;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--text-secondary);
  transition: all 0.3s;
}

.progress-step.active .step-number,
.progress-step.completed .step-number {
  background: var(--primary);
  border-color: var(--primary);
  color: white;
}

.progress-step.completed .step-number::after {
  content: '\2713';
  position: absolute;
}

.step-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 8px;
  font-weight: 500;
  transition: color 0.3s;
}

.progress-step.active .step-label,
.progress-step.completed .step-label {
  color: var(--primary);
}

.progress-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  margin: 0 8px;
  margin-bottom: 28px;
  transition: background 0.3s;
}

.progress-line.active {
  background: var(--primary);
}

/* Content */
.setup-content {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  border-radius: 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  animation: fadeInUp 0.6s ease-out 0.3s backwards;
}

.setup-step {
  display: none;
  padding: 40px;
}

.setup-step.active {
  display: block;
  animation: fadeIn 0.4s ease-out;
}

.step-header {
  text-align: center;
  margin-bottom: 32px;
}

.step-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 28px;
  color: white;
}

.step-header h2 {
  font-size: 24px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.step-header p {
  color: var(--text-secondary);
}

.step-body {
  max-width: 600px;
  margin: 0 auto;
}

/* Setup List (Bancos) */
.setup-list {
  margin-bottom: 20px;
}

.setup-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: 10px;
  margin-bottom: 12px;
  animation: fadeInUp 0.3s ease-out;
}

.setup-list-item-info {
  display: flex;
  align-items: center;
  gap: 12px;
}

.setup-list-item-icon {
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 18px;
}

.setup-list-item-name {
  font-weight: 600;
  color: var(--text-primary);
}

.setup-list-item-detail {
  font-size: 13px;
  color: var(--text-secondary);
}

.setup-list-item-actions {
  display: flex;
  gap: 8px;
}

.btn-add {
  width: 100%;
  padding: 16px;
  border: 2px dashed var(--border-color);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 10px;
  transition: all 0.2s;
}

.btn-add:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(0, 200, 83, 0.05);
}

/* Setup Checklist (Naturezas/Centros) */
.setup-actions-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 20px;
}

.setup-checklist {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid var(--border-color);
  border-radius: 10px;
  margin-bottom: 20px;
}

.checklist-group {
  border-bottom: 1px solid var(--border-color);
}

.checklist-group:last-child {
  border-bottom: none;
}

.checklist-group-header {
  padding: 12px 16px;
  background: var(--bg-primary);
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background 0.2s;
}

.checklist-group-header:hover {
  background: #eef2f5;
}

.checklist-group-header i {
  color: var(--primary);
  transition: transform 0.2s;
}

.checklist-group.collapsed .checklist-group-header i {
  transform: rotate(-90deg);
}

.checklist-group-items {
  padding: 8px 0;
}

.checklist-group.collapsed .checklist-group-items {
  display: none;
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s;
}

.checklist-item:hover {
  background: rgba(0, 200, 83, 0.05);
}

.checklist-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-right: 12px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item-info {
  flex: 1;
}

.checklist-item-codigo {
  font-weight: 600;
  color: var(--text-primary);
  margin-right: 8px;
}

.checklist-item-descricao {
  color: var(--text-secondary);
}

.checklist-item-tipo {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.checklist-item-tipo.receita {
  background: rgba(0, 200, 83, 0.1);
  color: var(--success);
}

.checklist-item-tipo.despesa {
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
}

/* Review Section */
.review-section {
  margin-bottom: 24px;
  padding: 20px;
  background: var(--bg-primary);
  border-radius: 10px;
}

.review-section h3 {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.review-section h3 i {
  color: var(--primary);
}

.review-content {
  color: var(--text-primary);
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-color);
}

.review-item:last-child {
  border-bottom: none;
}

.review-label {
  color: var(--text-secondary);
}

.review-value {
  font-weight: 500;
}

.review-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.review-tag {
  display: inline-block;
  padding: 4px 10px;
  background: white;
  border-radius: 20px;
  font-size: 12px;
  color: var(--text-primary);
}

/* Setup Tip */
.setup-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(59, 130, 246, 0.1);
  border-radius: 8px;
  font-size: 13px;
  color: var(--info);
}

.setup-tip i {
  font-size: 16px;
}

/* Navigation */
.setup-navigation {
  max-width: 800px;
  margin: 24px auto 0;
  display: flex;
  justify-content: space-between;
  animation: fadeIn 0.6s ease-out 0.4s backwards;
}

.setup-navigation .btn {
  min-width: 140px;
}

/* Success Modal */
.success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  font-size: 40px;
  color: white;
  animation: scaleIn 0.5s ease-out;
}

/* Empty State */
.setup-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-secondary);
}

.setup-empty i {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

/* Responsive */
@media (max-width: 768px) {
  .setup-container {
    padding: 20px 16px;
  }

  .setup-progress {
    overflow-x: auto;
    padding-bottom: 10px;
  }

  .step-label {
    font-size: 10px;
    white-space: nowrap;
  }

  .setup-step {
    padding: 24px 20px;
  }

  .step-icon {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }

  .setup-actions-bar {
    flex-direction: column;
  }

  .setup-navigation {
    flex-direction: column-reverse;
    gap: 12px;
  }

  .setup-navigation .btn {
    width: 100%;
  }

  #btn-voltar {
    visibility: visible !important;
  }
}
