/* ==========================================================================
   ENTERPRISE EXCEL IMPORT WIZARD OVERLAY - COMPACT DESIGN SYSTEM
   ========================================================================== */

.ew-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: ewFadeIn 0.2s ease-out;
}

@keyframes ewFadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.ew-card {
  width: 95%;
  max-width: 1040px;
  max-height: 90vh;
  background: var(--bg-card, #FFFFFF);
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 14px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-main, #0F172A);
}

/* HEADER & STEP BREADCRUMBS */
.ew-header {
  padding: 14px 20px;
  background: linear-gradient(135deg, #0B1727 0%, #0F2744 100%);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.ew-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
}

.ew-icon-badge {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, #3B82F6, #1D4ED8);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #FFF;
}

.ew-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px; font-weight: 800;
  margin: 0; line-height: 1.2;
}

.ew-subtitle {
  font-size: 11px; color: #94A3B8; margin: 2px 0 0 0;
}

.ew-close-btn {
  background: transparent; border: none;
  color: #94A3B8; font-size: 20px; cursor: pointer;
  padding: 4px; border-radius: 6px;
  transition: all 0.15s;
}
.ew-close-btn:hover { color: #FFF; background: rgba(255, 255, 255, 0.1); }

/* STEP INDICATOR BAR */
.ew-steps-bar {
  display: flex;
  background: var(--bg-body, #F8FAFC);
  border-bottom: 1px solid var(--border-color, #E2E8F0);
  padding: 8px 16px;
  gap: 8px;
  overflow-x: auto;
}

.ew-step-item {
  flex: 1;
  min-width: 130px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  font-size: 11px;
  font-weight: 700;
  color: #64748B;
  transition: all 0.2s;
}

.ew-step-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #E2E8F0; color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
}

.ew-step-item.active {
  background: #EEF2FF;
  border-color: #6366F1;
  color: #4F46E5;
}
.ew-step-item.active .ew-step-num {
  background: #6366F1; color: #FFF;
}

.ew-step-item.completed {
  background: #F0FDF4;
  border-color: #86EFAC;
  color: #166534;
}
.ew-step-item.completed .ew-step-num {
  background: #22C55E; color: #FFF;
}

/* WIZARD BODY CONTENT */
.ew-body {
  padding: 20px;
  flex: 1;
  overflow-y: auto;
  min-height: 380px;
}

/* STEP 1: IMPORT MODES */
.ew-mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.ew-mode-card {
  border: 2px solid var(--border-color, #E2E8F0);
  border-radius: 10px;
  padding: 12px;
  cursor: pointer;
  background: var(--bg-card, #FFF);
  transition: all 0.2s;
}
.ew-mode-card:hover { border-color: #3B82F6; transform: translateY(-1px); }
.ew-mode-card.selected { border-color: #6366F1; background: rgba(99, 102, 241, 0.05); }

/* STEP 2: DROP ZONE */
.ew-dropzone {
  border: 2px dashed #3B82F6;
  border-radius: 12px;
  padding: 30px;
  text-align: center;
  background: rgba(59, 130, 246, 0.03);
  cursor: pointer;
  transition: all 0.2s;
}
.ew-dropzone:hover { background: rgba(59, 130, 246, 0.08); border-color: #1D4ED8; }

/* STEP 3 & 4: EXCEL-LIKE PREVIEW GRID */
.ew-grid-wrapper {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--border-color, #E2E8F0);
  border-radius: 8px;
}

.ew-grid-table {
  width: 100%; border-collapse: collapse; font-size: 11px;
}
.ew-grid-table th {
  position: sticky; top: 0; z-index: 2;
  background: #0F172A; color: #FFF;
  padding: 8px 10px; text-align: left; font-weight: 700;
  border-bottom: 1px solid #334155;
}
.ew-grid-table td {
  padding: 6px 10px; border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}

/* COLOR-CODED VALIDATION TAGS */
.ew-row-valid { background: #F0FDF4 !important; }
.ew-row-warning { background: #FEFCE8 !important; }
.ew-row-error { background: #FEF2F2 !important; }

/* CONFIDENCE BADGES */
.ew-badge-high { background: #DCFCE7; color: #166534; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 10px; }
.ew-badge-medium { background: #FEF9C3; color: #854D0E; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 10px; }
.ew-badge-unmapped { background: #FEE2E2; color: #991B1B; padding: 2px 6px; border-radius: 4px; font-weight: 800; font-size: 10px; }

/* FOOTER BUTTON BAR */
.ew-footer {
  padding: 12px 20px;
  background: var(--bg-body, #F8FAFC);
  border-top: 1px solid var(--border-color, #E2E8F0);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
