/* Loading skeleton dinamis */
@keyframes shimmer {
  0% { background-position: -468px 0; }
  100% { background-position: 468px 0; }
}
.skeleton {
  background: #e2e8f0;
  background-image: linear-gradient(90deg, #e2e8f0 0px, #f1f5f9 40px, #e2e8f0 80px);
  background-size: 600px;
  animation: shimmer 1.4s infinite linear;
  border-radius: 6px;
}
.dark .skeleton {
  background: #1e293b;
  background-image: linear-gradient(90deg, #1e293b 0px, #334155 40px, #1e293b 80px);
}

/* Transisi halus default */
button, a, .card { transition: all 0.2s ease; }

/* Scrollbar tipis untuk kolom kanban */
.thin-scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.thin-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.dark .thin-scroll::-webkit-scrollbar-thumb { background: #475569; }

/* Kartu pipeline saat di-drag */
.dragging { opacity: 0.5; transform: rotate(1deg); }
.drop-active { outline: 2px dashed #2563EB; outline-offset: -4px; }

/* Toast */
#toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: 0.5rem; }
.toast { animation: slideIn 0.25s ease; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* Modal */
.modal-backdrop { animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }


/* SweetAlert2 Modern Custom */
.swal2-modern-popup {
  border-radius: 20px !important;
  padding: 32px 28px 24px !important;
  box-shadow: 0 25px 60px rgba(0,0,0,0.15) !important;
  border: 1px solid rgba(226,232,240,0.8) !important;
  max-width: 380px !important;
}
.swal2-modern-confirm {
  border-radius: 12px !important;
  padding: 12px 28px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  letter-spacing: 0.025em !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.3) !important;
  transition: all 0.2s ease !important;
}
.swal2-modern-confirm:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(37,99,235,0.4) !important;
}
.dark .swal2-modern-popup {
  background: #1e293b !important;
  border-color: #334155 !important;
}
.dark .swal2-modern-popup h2 {
  color: #f1f5f9 !important;
}
.dark .swal2-modern-popup p {
  color: #94a3b8 !important;
}
.dark .swal2-modern-popup div[style*="background:#f0f9ff"] {
  background: #0c4a6e !important;
  border-color: #075985 !important;
}
.dark .swal2-modern-popup span[style*="color:#0284c7"] {
  color: #38bdf8 !important;
}


/* Wizard Step Indicator */
.wizard-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 0.25rem 0;
  margin-bottom: 0.5rem;
}

.wizard-step-item {
  display: flex;
  align-items: center;
  gap: 0;
}

.wizard-step-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  border: 2px solid #e2e8f0;
  background: #fff;
  color: #94a3b8;
  transition: all 0.3s ease;
  position: relative;
  flex-shrink: 0;
}
.dark .wizard-step-circle {
  border-color: #334155;
  background: #1e293b;
  color: #64748b;
}

.wizard-step-circle.active {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}

.wizard-step-circle.completed {
  border-color: #22c55e;
  background: #22c55e;
  color: #fff;
}

.wizard-step-line {
  width: 16px;
  height: 2px;
  background: #e2e8f0;
  transition: background 0.3s ease;
  flex-shrink: 0;
}
.dark .wizard-step-line {
  background: #334155;
}
.wizard-step-line.completed {
  background: #22c55e;
}

/* Option Cards */
.wizard-option-card {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
  user-select: none;
}
.dark .wizard-option-card {
  border-color: #334155;
  background: #1e293b;
}
.wizard-option-card:hover {
  border-color: #93c5fd;
  background: #f0f9ff;
}
.dark .wizard-option-card:hover {
  border-color: #1e40af;
  background: #172554;
}
.wizard-option-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.dark .wizard-option-card.selected {
  border-color: #3b82f6;
  background: #1e3a5f;
}
.wizard-option-card .option-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  color: #64748b;
  flex-shrink: 0;
  transition: all 0.2s ease;
}
.dark .wizard-option-card .option-icon {
  background: #334155;
  color: #94a3b8;
}
.wizard-option-card.selected .option-icon {
  background: #2563eb;
  color: #fff;
}
.wizard-option-card .option-label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}
.dark .wizard-option-card .option-label {
  color: #e2e8f0;
}
.wizard-option-card.selected .option-label {
  color: #1e40af;
}
.dark .wizard-option-card.selected .option-label {
  color: #93c5fd;
}

/* Wizard Step Content Animation */
.wizard-step-content {
  animation: wizardFadeIn 0.3s ease;
}
@keyframes wizardFadeIn {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Review Summary */
.review-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f5f9;
  font-size: 0.8125rem;
}
.dark .review-row {
  border-bottom-color: #1e293b;
}
.review-label {
  color: #64748b;
  font-weight: 500;
}
.review-value {
  color: #1e293b;
  font-weight: 600;
  text-align: right;
  max-width: 60%;
}
.dark .review-value {
  color: #e2e8f0;
}

/* Service Grid */
.wizard-service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 0.5rem;
}

/* Probability Cards */
.wizard-prob-card {
  padding: 0.625rem;
  border: 2px solid #e2e8f0;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #fff;
}
.dark .wizard-prob-card {
  border-color: #334155;
  background: #1e293b;
}
.wizard-prob-card:hover {
  border-color: #93c5fd;
}
.wizard-prob-card.selected {
  border-color: #2563eb;
  background: #eff6ff;
}
.dark .wizard-prob-card.selected {
  border-color: #3b82f6;
  background: #1e3a5f;
}
.wizard-prob-card .prob-value {
  font-size: 1.25rem;
  font-weight: 800;
  color: #2563eb;
}
.dark .wizard-prob-card .prob-value {
  color: #60a5fa;
}
.wizard-prob-card .prob-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  margin-top: 0.5rem;
  overflow: hidden;
}
.dark .wizard-prob-card .prob-bar {
  background: #334155;
}
.wizard-prob-card .prob-bar-fill {
  height: 100%;
  border-radius: 2px;
  background: #2563eb;
  transition: width 0.3s ease;
}

/* Progress bar pulse dot */
.progress-pulse-dot {
  position: absolute;
  right: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px 2px rgba(34, 197, 94, 0.6);
  z-index: 2;
}
.progress-pulse-dot::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.5);
  animation: progressPulse 1.2s ease-out infinite;
}
.progress-pulse-dot::after {
  content: '';
  position: absolute;
  inset: -10px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.3);
  animation: progressPulse 1.2s ease-out 0.4s infinite;
}
@keyframes progressPulse {
  0% { transform: scale(0.5); opacity: 1; }
  70% { transform: scale(2.5); opacity: 0; }
  100% { transform: scale(2.5); opacity: 0; }
}
