/* ============================================
   CAMPAIGN WIZARD - MODERN MOOD DESIGN SYSTEM
   Gamified Experience with Brand Identity
   ============================================ */

/* === MODERN MOOD DESIGN TOKENS === */
:root {
  --mm-creme: #F8F3EB;
  --mm-black: #141414;
  --mm-lima: #E0F431;
  --mm-orange: #EC7014;
  --mm-pink: #F1B3C2;
  --mm-shadow-sm: 4px 4px 0 0;
  --mm-shadow-md: 6px 6px 0 0;
  --mm-radius: 6px;
  --mm-border: 2px solid var(--mm-black);
}

/* === WIZARD OVERLAY === */
.campaign-wizard-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(20, 20, 20, 0.7);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.campaign-wizard-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* === WIZARD CONTAINER === */
.campaign-wizard {
  width: 95%;
  max-width: 1100px;
  max-height: 90vh;
  background: #ffffff;
  border: var(--mm-border);
  border-radius: var(--mm-radius);
  box-shadow: 8px 8px 0 0 var(--mm-black);
  display: flex;
  flex-direction: column;
  transform: scale(0.95) translateY(20px);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.campaign-wizard-overlay.active .campaign-wizard {
  transform: scale(1) translateY(0);
}

/* === WIZARD HEADER === */
.wizard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  background: var(--mm-lima);
  color: var(--mm-black);
  position: relative;
  border-bottom: var(--mm-border);
}

.wizard-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
  z-index: 1;
}

.wizard-logo {
  width: 42px;
  height: 42px;
  background: var(--mm-black);
  border-radius: var(--mm-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  border: 2px solid var(--mm-black);
  box-shadow: var(--mm-shadow-sm) var(--mm-orange);
}

.wizard-title {
  font-family: 'Dela Gothic One', 'Arial Black', sans-serif;
  font-size: 1rem;
  font-weight: 400;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.wizard-subtitle {
  font-size: 0.8rem;
  opacity: 0.7;
  margin-top: 2px;
}

.wizard-close {
  width: 36px;
  height: 36px;
  border: 2px solid var(--mm-black);
  background: var(--mm-black);
  color: var(--mm-lima);
  border-radius: var(--mm-radius);
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  z-index: 1;
  box-shadow: 2px 2px 0 0 var(--mm-orange);
}

.wizard-close:hover {
  transform: translate(-2px, -2px);
  box-shadow: 4px 4px 0 0 var(--mm-orange);
}

/* === PROGRESS BAR === */
.wizard-progress-container {
  padding: 0 28px;
  background: var(--mm-creme);
  border-bottom: var(--mm-border);
}

.wizard-progress-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 0;
  position: relative;
}

.wizard-progress-bar::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 40px;
  right: 40px;
  height: 4px;
  background: #e5e7eb;
  transform: translateY(-50%);
  border-radius: 2px;
  border: 1px solid var(--mm-black);
}

.wizard-progress-fill {
  position: absolute;
  top: 50%;
  left: 40px;
  height: 4px;
  background: var(--mm-lima);
  transform: translateY(-50%);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--mm-black);
}

.wizard-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.3s;
}

.wizard-step-circle {
  width: 44px;
  height: 44px;
  border-radius: var(--mm-radius);
  background: white;
  border: 2px solid var(--mm-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: all 0.2s ease;
  box-shadow: 2px 2px 0 0 var(--mm-black);
}

.wizard-step-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: color 0.3s;
}

.wizard-step.active .wizard-step-circle {
  background: var(--mm-lima);
  border-color: var(--mm-black);
  transform: scale(1.1);
  box-shadow: 4px 4px 0 0 var(--mm-orange);
}

.wizard-step.active .wizard-step-label {
  color: var(--mm-black);
  font-weight: 700;
}

.wizard-step.completed .wizard-step-circle {
  background: var(--mm-black);
  border-color: var(--mm-black);
  box-shadow: 2px 2px 0 0 var(--mm-lima);
}

.wizard-step.completed .wizard-step-circle span {
  display: none;
}

.wizard-step.completed .wizard-step-circle::after {
  content: '✓';
  color: var(--mm-lima);
  font-weight: 700;
  font-size: 1.1rem;
}

/* === XP BAR (Gamification) - Modern Mood Style === */
.wizard-xp-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 28px;
  background: var(--mm-pink);
  border-bottom: var(--mm-border);
}

.wizard-xp-icon {
  font-size: 1.4rem;
  animation: bounce 2s infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.wizard-xp-info {
  flex: 1;
}

.wizard-xp-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--mm-black);
}

.wizard-xp-progress {
  height: 8px;
  background: rgba(255, 255, 255, 0.6);
  border-radius: 4px;
  margin-top: 4px;
  overflow: hidden;
  border: 1px solid var(--mm-black);
}

.wizard-xp-fill {
  height: 100%;
  background: var(--mm-lima);
  border-radius: 3px;
  transition: width 0.5s ease;
}

.wizard-xp-badge {
  padding: 6px 12px;
  background: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  color: #92400e;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* === WIZARD BODY === */
.wizard-body {
  flex: 1;
  overflow-y: auto;
  padding: 28px;
}

.wizard-step-content {
  display: none;
  animation: slideIn 0.4s ease;
}

.wizard-step-content.active {
  display: block;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.wizard-step-header {
  margin-bottom: 28px;
}

.wizard-step-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #EC7014 0%, #f59e0b 100%);
  color: white;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: 12px;
}

.wizard-step-title {
  font-size: 1.6rem;
  font-weight: 800;
  color: #141414;
  margin-bottom: 8px;
  letter-spacing: -0.02em;
}

.wizard-step-description {
  font-size: 0.95rem;
  color: #6b7280;
  max-width: 500px;
  line-height: 1.6;
}

/* === OPTION CARDS === */
.option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 24px;
}

.option-card {
  position: relative;
  padding: 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #EC7014, #f59e0b);
  transform: scaleX(0);
  transition: transform 0.3s;
}

.option-card:hover {
  border-color: #fbbf24;
  transform: translateY(-4px);
  box-shadow: 0 12px 30px rgba(236, 112, 20, 0.15);
}

.option-card:hover::before {
  transform: scaleX(1);
}

.option-card.selected {
  border-color: #EC7014;
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 100%);
}

.option-card.selected::before {
  transform: scaleX(1);
}

.option-card.selected::after {
  content: '✓';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
}

.option-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  margin-bottom: 16px;
  transition: all 0.3s;
}

.option-card:hover .option-icon,
.option-card.selected .option-icon {
  background: linear-gradient(135deg, #EC7014 0%, #f59e0b 100%);
  transform: scale(1.1) rotate(-5deg);
}

.option-card:hover .option-icon span,
.option-card.selected .option-icon span {
  filter: brightness(0) invert(1);
}

.option-title {
  font-size: 1rem;
  font-weight: 700;
  color: #141414;
  margin-bottom: 6px;
}

.option-description {
  font-size: 0.85rem;
  color: #6b7280;
  line-height: 1.5;
}

.option-badge {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 10px;
  background: #dbeafe;
  color: #1d4ed8;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 600;
}

.option-badge.popular {
  background: linear-gradient(135deg, #EC7014, #f59e0b);
  color: white;
}

.option-badge.new {
  background: #d1fae5;
  color: #047857;
}

/* === GOAL SELECTION (Step 1) === */
.goal-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.goal-card {
  padding: 20px;
  background: #f9fafb;
  border: 2px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.goal-card:hover {
  background: #fff7ed;
  border-color: #fed7aa;
}

.goal-card.selected {
  background: #fff7ed;
  border-color: #EC7014;
}

.goal-card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.goal-card-icon {
  font-size: 1.3rem;
}

.goal-card-title {
  font-weight: 600;
  color: #141414;
}

.goal-card-desc {
  font-size: 0.85rem;
  color: #6b7280;
}

/* === FORM FIELDS === */
.wizard-form-group {
  margin-bottom: 24px;
}

.wizard-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-weight: 600;
  color: #374151;
  font-size: 0.9rem;
}

.wizard-label-icon {
  font-size: 1rem;
}

.wizard-input {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.2s;
  background: white;
}

.wizard-input:focus {
  outline: none;
  border-color: #EC7014;
  box-shadow: 0 0 0 4px rgba(236, 112, 20, 0.1);
}

.wizard-input::placeholder {
  color: #9ca3af;
}

.wizard-select {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  background: white;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
}

.wizard-select:focus {
  outline: none;
  border-color: #EC7014;
  box-shadow: 0 0 0 4px rgba(236, 112, 20, 0.1);
}

.wizard-textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
  transition: all 0.2s;
}

.wizard-textarea:focus {
  outline: none;
  border-color: #EC7014;
  box-shadow: 0 0 0 4px rgba(236, 112, 20, 0.1);
}

.wizard-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 8px;
  padding: 10px 14px;
  background: #f0f9ff;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #0369a1;
}

.wizard-hint-icon {
  font-size: 1rem;
  flex-shrink: 0;
}

/* === SEGMENT SELECTOR === */
.segment-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: #f9fafb;
  border-radius: 16px;
  border: 2px solid #e5e7eb;
}

.segment-selector:empty,
.segment-selector:has(.wizard-loading) {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segment-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.segment-chip:hover {
  border-color: #fbbf24;
  background: #fffbeb;
}

.segment-chip.selected {
  border-color: #EC7014;
  background: #fff7ed;
}

.segment-chip-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
}

.segment-chip.selected .segment-chip-checkbox {
  background: linear-gradient(135deg, #EC7014, #f59e0b);
  border-color: transparent;
}

.segment-chip.selected .segment-chip-checkbox::after {
  content: '✓';
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
}

.segment-chip-info {
  flex: 1;
  min-width: 0;
}

.segment-chip-name {
  font-weight: 600;
  font-size: 0.85rem;
  color: #141414;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment-chip-count {
  font-size: 0.75rem;
  color: #6b7280;
}

/* === CONTENT EDITOR === */
.content-editor-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 20px;
}

.content-editor {
  background: #f9fafb;
  border-radius: 16px;
  padding: 20px;
}

.content-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.content-editor-title {
  font-weight: 700;
  color: #141414;
  display: flex;
  align-items: center;
  gap: 8px;
}

.content-editor-actions {
  display: flex;
  gap: 8px;
}

.editor-btn {
  padding: 6px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
}

.editor-btn:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

.editor-btn.active {
  background: #141414;
  color: white;
  border-color: #141414;
}

/* === VARIABLE CHIPS === */
.variable-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.variable-chip {
  padding: 6px 12px;
  background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
  border: none;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #1e40af;
  cursor: pointer;
  transition: all 0.2s;
}

.variable-chip:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* === PREVIEW PANEL === */
.preview-panel {
  background: #141414;
  border-radius: 16px;
  overflow: hidden;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #1f1f1f;
}

.preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.preview-dot.red { background: #ef4444; }
.preview-dot.yellow { background: #fbbf24; }
.preview-dot.green { background: #22c55e; }

.preview-title {
  flex: 1;
  text-align: center;
  color: #9ca3af;
  font-size: 0.75rem;
}

.preview-content {
  padding: 20px;
  min-height: 300px;
  color: white;
}

.preview-email {
  background: white;
  border-radius: 8px;
  overflow: hidden;
}

.preview-email-header {
  padding: 16px;
  border-bottom: 1px solid #e5e7eb;
}

.preview-email-subject {
  font-weight: 700;
  color: #141414;
  font-size: 1rem;
}

.preview-email-from {
  font-size: 0.8rem;
  color: #6b7280;
  margin-top: 4px;
}

.preview-email-body {
  padding: 20px;
  color: #374151;
  font-size: 0.9rem;
  line-height: 1.6;
}

.preview-whatsapp {
  background: #e5ddd5;
  border-radius: 12px;
  padding: 16px;
  min-height: 200px;
}

.whatsapp-bubble {
  max-width: 85%;
  background: white;
  padding: 12px 14px;
  border-radius: 0 12px 12px 12px;
  font-size: 0.9rem;
  color: #111;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.whatsapp-time {
  text-align: right;
  font-size: 0.65rem;
  color: #667781;
  margin-top: 4px;
}

/* === SCHEDULE CARDS === */
.schedule-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.schedule-card {
  padding: 24px;
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  cursor: pointer;
  transition: all 0.3s;
  text-align: center;
}

.schedule-card:hover {
  border-color: #fbbf24;
  transform: translateY(-4px);
}

.schedule-card.selected {
  border-color: #EC7014;
  background: #fff7ed;
}

.schedule-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
}

.schedule-title {
  font-weight: 700;
  color: #141414;
  margin-bottom: 4px;
}

.schedule-desc {
  font-size: 0.85rem;
  color: #6b7280;
}

/* === TRIGGER CONFIG === */
.trigger-section {
  margin-top: 24px;
  padding: 20px;
  background: linear-gradient(135deg, #fdf4ff 0%, #fae8ff 100%);
  border: 1px solid #e879f9;
  border-radius: 16px;
}

.trigger-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.trigger-section-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, #c026d3 0%, #a855f7 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}

.trigger-section-title {
  font-weight: 700;
  color: #86198f;
}

.trigger-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

/* === REVIEW SECTION === */
.review-section {
  margin-bottom: 24px;
}

.review-card {
  background: #f9fafb;
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 16px;
}

.review-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.review-card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #141414;
}

.review-card-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #EC7014, #f59e0b);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}

.review-card-edit {
  padding: 6px 12px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 0.75rem;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s;
}

.review-card-edit:hover {
  background: #f3f4f6;
  color: #141414;
}

.review-item {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #e5e7eb;
}

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

.review-item-label {
  color: #6b7280;
  font-size: 0.9rem;
}

.review-item-value {
  font-weight: 600;
  color: #141414;
}

/* === CONFETTI ANIMATION === */
.confetti-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2000;
}

.confetti {
  position: absolute;
  width: 10px;
  height: 10px;
  opacity: 0;
}

/* === WIZARD FOOTER === */
.wizard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  background: #fafafa;
  border-top: 1px solid #e5e7eb;
}

.wizard-footer-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.wizard-footer-tip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: #dbeafe;
  border-radius: 10px;
  font-size: 0.8rem;
  color: #1e40af;
}

.wizard-footer-right {
  display: flex;
  gap: 12px;
}

/* Wizard Buttons - Modern Mood Style */
.wizard-btn {
  padding: 12px 24px;
  border: 2px solid var(--mm-black);
  border-radius: var(--mm-radius);
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.wizard-btn-secondary {
  background: white;
  color: var(--mm-black);
  box-shadow: var(--mm-shadow-sm) var(--mm-black);
}

.wizard-btn-secondary:hover {
  background: var(--mm-creme);
  transform: translate(-2px, -2px);
  box-shadow: var(--mm-shadow-md) var(--mm-black);
}

.wizard-btn-primary {
  background: var(--mm-black);
  color: var(--mm-lima);
  box-shadow: var(--mm-shadow-sm) var(--mm-lima);
}

.wizard-btn-primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--mm-shadow-md) var(--mm-lima);
}

.wizard-btn-primary:active {
  transform: translate(0, 0);
  box-shadow: none;
}

.wizard-btn-success {
  background: var(--mm-lima);
  color: var(--mm-black);
  box-shadow: var(--mm-shadow-sm) var(--mm-black);
}

.wizard-btn-success:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--mm-shadow-md) var(--mm-black);
}

.wizard-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* === ACHIEVEMENTS POPUP - Modern Mood === */
.achievement-popup {
  position: fixed;
  bottom: 30px;
  right: 30px;
  padding: 16px 24px;
  background: var(--mm-black);
  color: var(--mm-creme);
  border: var(--mm-border);
  border-radius: var(--mm-radius);
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 6px 6px 0 0 var(--mm-lima);
  transform: translateX(150%);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  z-index: 2000;
}

.achievement-popup.show {
  transform: translateX(0);
}

.achievement-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.achievement-info h4 {
  font-weight: 700;
  margin-bottom: 2px;
}

.achievement-info p {
  font-size: 0.85rem;
  opacity: 0.7;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
  .campaign-wizard {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }

  .wizard-progress-bar {
    overflow-x: auto;
    padding: 20px 10px;
  }

  .wizard-step-label {
    display: none;
  }

  .option-grid {
    grid-template-columns: 1fr;
  }

  .content-editor-wrapper {
    grid-template-columns: 1fr;
  }

  .schedule-options {
    grid-template-columns: 1fr;
  }

  .goal-cards {
    grid-template-columns: 1fr;
  }
}

/* === LOADING STATE === */
.wizard-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.wizard-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid #e5e7eb;
  border-top-color: #EC7014;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.wizard-loading-text {
  margin-top: 16px;
  font-weight: 600;
  color: #6b7280;
}

/* === CUSTOM SCROLLBAR === */
.wizard-body::-webkit-scrollbar {
  width: 8px;
}

.wizard-body::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.wizard-body::-webkit-scrollbar-thumb {
  background: #c4c4c4;
  border-radius: 4px;
}

.wizard-body::-webkit-scrollbar-thumb:hover {
  background: #a3a3a3;
}

/* === DARK MODE SUPPORT === */
@media (prefers-color-scheme: dark) {
  .campaign-wizard {
    background: #1f1f1f;
  }

  .wizard-progress-container {
    background: #141414;
    border-color: #333;
  }

  .wizard-step-circle {
    background: #2d2d2d;
    border-color: #404040;
  }

  .wizard-step-label {
    color: #6b7280;
  }

  .wizard-xp-bar {
    background: linear-gradient(90deg, #422006 0%, #78350f 100%);
    border-color: #92400e;
  }

  .wizard-xp-text {
    color: #fbbf24;
  }

  .wizard-body {
    background: #1f1f1f;
  }

  .wizard-step-title {
    color: #f9fafb;
  }

  .option-card,
  .schedule-card,
  .review-card {
    background: #2d2d2d;
    border-color: #404040;
  }

  .option-title,
  .schedule-title,
  .review-item-value {
    color: #f9fafb;
  }

  .wizard-input,
  .wizard-select,
  .wizard-textarea {
    background: #2d2d2d;
    border-color: #404040;
    color: #f9fafb;
  }

  .content-editor {
    background: #2d2d2d;
  }

  .wizard-footer {
    background: #141414;
    border-color: #333;
  }

  .wizard-btn-secondary {
    background: #2d2d2d;
    border-color: #404040;
    color: #f9fafb;
  }
}

/* ============================================
   CREATE SEGMENT MODAL
   ============================================ */

.segment-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.segment-modal-overlay.active {
  opacity: 1;
}

.segment-modal {
  width: 95%;
  max-width: 700px;
  max-height: 85vh;
  background: #ffffff;
  border-radius: 20px;
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  transform: scale(0.9) translateY(30px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.segment-modal-overlay.active .segment-modal {
  transform: scale(1) translateY(0);
}

.segment-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  background: linear-gradient(135deg, #141414 0%, #1f1f1f 100%);
  color: white;
  border-radius: 20px 20px 0 0;
}

.segment-modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
}

.segment-modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 10px;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.segment-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

.segment-modal-body {
  padding: 24px;
  overflow-y: auto;
  flex: 1;
}

.segment-form-group {
  margin-bottom: 20px;
}

.segment-form-group label {
  display: block;
  font-weight: 600;
  color: #111827;
  margin-bottom: 8px;
  font-size: 0.9rem;
}

.segment-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  font-size: 0.95rem;
  transition: all 0.2s;
  box-sizing: border-box;
}

.segment-input:focus {
  outline: none;
  border-color: #EC7014;
  box-shadow: 0 0 0 4px rgba(236, 112, 20, 0.1);
}

.segment-icon-selector {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.segment-icon-option {
  width: 48px;
  height: 48px;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #f9fafb;
  font-size: 1.3rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.segment-icon-option:hover {
  border-color: #EC7014;
  background: #fff7ed;
  transform: scale(1.05);
}

.segment-icon-option.selected {
  border-color: #EC7014;
  background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  box-shadow: 0 4px 15px rgba(236, 112, 20, 0.2);
}

.segment-search-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
  align-items: center;
}

.segment-search-bar .segment-input {
  flex: 1;
}

.segment-search-actions {
  display: flex;
  gap: 8px;
}

.segment-btn-sm {
  padding: 8px 14px;
  border: 2px solid #e5e7eb;
  border-radius: 10px;
  background: white;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.segment-btn-sm:hover {
  border-color: #EC7014;
  background: #fff7ed;
}

.segment-customers-list {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  max-height: 280px;
  overflow-y: auto;
  background: #f9fafb;
}

.segment-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px;
  color: #6b7280;
}

.segment-customer-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  cursor: pointer;
  transition: all 0.15s;
  background: white;
}

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

.segment-customer-item:hover {
  background: #f3f4f6;
}

.segment-customer-item.selected {
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border-left: 4px solid #10b981;
}

.segment-customer-checkbox {
  width: 24px;
  height: 24px;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #10b981;
  flex-shrink: 0;
  background: white;
  transition: all 0.2s;
}

.segment-customer-item.selected .segment-customer-checkbox {
  background: #10b981;
  border-color: #10b981;
  color: white;
}

.segment-customer-info {
  flex: 1;
  min-width: 0;
}

.segment-customer-name {
  font-weight: 600;
  color: #111827;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment-customer-details {
  font-size: 0.85rem;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.segment-selected-count {
  margin-top: 12px;
  text-align: right;
  font-weight: 600;
  color: #10b981;
  font-size: 0.95rem;
}

.segment-selected-count span {
  background: #10b981;
  color: white;
  padding: 4px 12px;
  border-radius: 20px;
  margin-right: 6px;
}

.segment-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 24px;
  border-top: 1px solid #e5e7eb;
  background: #f9fafb;
  border-radius: 0 0 20px 20px;
}

/* Dark Mode for Segment Modal */
@media (prefers-color-scheme: dark) {
  .segment-modal {
    background: #1f1f1f;
  }
  
  .segment-modal-body {
    background: #1f1f1f;
  }
  
  .segment-form-group label {
    color: #f9fafb;
  }
  
  .segment-input {
    background: #2d2d2d;
    border-color: #404040;
    color: #f9fafb;
  }
  
  .segment-icon-option {
    background: #2d2d2d;
    border-color: #404040;
  }
  
  .segment-btn-sm {
    background: #2d2d2d;
    border-color: #404040;
    color: #f9fafb;
  }
  
  .segment-customers-list {
    background: #2d2d2d;
    border-color: #404040;
  }
  
  .segment-customer-item {
    background: #2d2d2d;
    border-color: #404040;
  }
  
  .segment-customer-item:hover {
    background: #333333;
  }
  
  .segment-customer-name {
    color: #f9fafb;
  }
  
  .segment-modal-footer {
    background: #141414;
    border-color: #333;
  }
}
