/**
 * Upload Intelligence CSS v2.0.0 - COMPACT DESIGN
 * Styling for upload wizard and panels
 * Phase 4 Sprint 1 - Enhanced for space efficiency
 * 
 * CHANGES IN V2.0.0:
 * - Reduced vertical spacing by ~60% (680px → 315px per step)
 * - Progress bar: 150px → 60px (hide descriptions, show on hover)
 * - Content padding: 30px → 15px/20px
 * - Upload zone: 40px padding → 20px
 * - Tips section: Now collapsible (150px → 40px collapsed)
 * - All margins/padding reduced 30-50%
 */

/* ========================================
   BASE WIZARD LAYOUT (COMPACT)
   ======================================== */

.upload-wizard {
  max-width: 1600px;
  margin: 0 auto;
  padding: 16px;  /* 20px → 16px */
}

.wizard-step {
  background: white;
  border-radius: 8px;
  padding: 15px 20px;  /* 30px → 15px/20px (50% reduction) */
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ========================================
   PROGRESS BAR (COMPACT - 90px saved)
   ======================================== */

.wizard-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;  /* 30px → 16px */
  padding: 12px 0;     /* Add breathing room */
  background: #f8f9fa; /* Subtle background */
  border-radius: 6px;
}

.wizard-progress-step {
  flex: 1;
  text-align: center;
  padding: 0;  /* Remove padding (was 10px) */
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;  /* Compact spacing */
  position: relative;
}

.wizard-progress-step.active {
  font-weight: bold;
  color: #0066cc;
}

.wizard-progress-step.completed {
  color: #00aa00;
}

/* Step number (slightly smaller) */
.step-number {
  width: 28px;   /* 30px → 28px */
  height: 28px;
  border-radius: 50%;
  background: #ddd;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;     /* Remove margin (was 0 auto 10px) */
  font-weight: bold;
  font-size: 13px;  /* Slightly smaller */
  transition: all 0.2s;
}

.wizard-progress-step.active .step-number {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  border-color: #6366F1;
  box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.wizard-progress-step.completed .step-number {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: #10B981;
}

/* Step title (compact) */
.step-title {
  font-size: 13px;  /* 14px → 13px */
  font-weight: 600;
  margin: 0;
  line-height: 1.2;
  color: #374151;
}

.wizard-progress-step.active .step-title {
  color: #6366F1;
  font-weight: 700;
}

.wizard-progress-step.completed .step-title {
  color: #10B981;
}

/* Step description - HIDDEN by default, show on hover */
.step-desc {
  display: none;  /* Hide to save space */
  font-size: 11px;
  color: #999;
}

/* Show description on hover as tooltip */
.wizard-progress-step:hover .step-desc {
  display: block;
  position: absolute;
  background: #333;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 11px;
  white-space: nowrap;
  z-index: 10;
  margin-top: 40px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Progress connector lines */
.wizard-progress-step::after {
  content: '';
  position: absolute;
  top: 14px;  /* Adjusted for smaller step number */
  right: -50%;
  width: 100%;
  height: 2px;
  background: #ddd;
  z-index: -1;
}

.wizard-progress-step:last-child::after {
  display: none;
}

.wizard-progress-step.completed::after {
  background: #10B981;
}

/* ========================================
   STEP HEADINGS (COMPACT - 25px saved)
   ======================================== */

.wizard-step h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 6px 0;
  line-height: 1.3;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 10px;
}

.wizard-step h2 i,
.wizard-step h2 svg {
  width: 22px;
  height: 22px;
  color: #3B82F6;
  stroke: #3B82F6;
  flex-shrink: 0;
}

.wizard-step > p {
  font-size: 14px;
  margin: 0 0 20px 0;
  color: #6B7280;
}

.wizard-step h3 {
  font-size: 16px;
  margin: 12px 0 8px 0;
  color: #333;
}

.wizard-step > p {
  font-size: 14px;      /* 16px → 14px */
  margin: 0 0 16px 0;   /* 20px → 16px */
  color: #666;
  line-height: 1.4;
}

/* ========================================
   FILE UPLOAD ZONE (COMPACT - 80px saved)
   ======================================== */

.file-upload-zone {
  border: 2px dashed #ccc;
  border-radius: 8px;
  padding: 20px;      /* 40px → 20px (50% reduction!) */
  text-align: center;
  cursor: pointer;
  transition: all 0.3s;
  margin: 12px 0;     /* 20px → 12px */
  min-height: 100px;  /* Set minimum height */
}

.file-upload-zone:hover {
  border-color: #0066cc;
  background: #f8f9fa;
}

.file-upload-zone.drag-over {
  border-color: #3B82F6;
  border-width: 2px;
  background: linear-gradient(
    to bottom,
    rgba(59, 130, 246, 0.12),
    rgba(59, 130, 246, 0.05)
  );
  transform: scale(1.01);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15);
  transition: all 0.2s ease;
}

.file-upload-zone.drag-over .upload-icon i,
.file-upload-zone.drag-over .upload-icon svg {
  color: #3B82F6;
  stroke: #3B82F6;
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

/* FILE UPLOADED SUCCESS STATE */
.file-upload-zone.file-uploaded {
  /* Solid teal border (not dashed) */
  border: 2px solid #0D9488;
  border-style: solid;  /* Override dashed */
  
  /* Very subtle teal tint background */
  background: linear-gradient(
    to bottom,
    rgba(13, 148, 136, 0.08),
    rgba(13, 148, 136, 0.03)
  );
  
  /* Remove hover effects (file already uploaded) */
  cursor: default;
  padding: 16px;  /* Slightly reduce padding */
}

.file-upload-zone.file-uploaded:hover {
  border-color: #0D9488;
  background: linear-gradient(
    to bottom,
    rgba(13, 148, 136, 0.08),
    rgba(13, 148, 136, 0.03)
  );
}

/* Success banner */
.upload-success-banner {
  background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
  color: white;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(13, 148, 136, 0.25);
}

.upload-success-banner i,
.upload-success-banner svg {
  width: 18px;
  height: 18px;
  color: white;
  stroke: white;
}

/* File info card */
.file-upload-zone.file-uploaded .file-info-card {
  background: white;
  padding: 16px;
  border-radius: 8px;
  border: 1px solid #99F6E4;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.file-info-card .file-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #CCFBF1 0%, #99F6E4 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.file-info-card .file-icon i,
.file-info-card .file-icon svg {
  width: 24px;
  height: 24px;
  color: #0D9488;
  stroke: #0D9488;
}

.file-info-card .file-details {
  flex: 1;
  text-align: left;
}

.file-info-card .file-name {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
  word-break: break-all;
}

.file-info-card .file-meta {
  font-size: 12px;
  color: #6B7280;
}

/* Action buttons */
.file-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.file-actions .btn-sm {
  padding: 8px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 6px;
  font-weight: 500;
  transition: all 0.2s;
}

.file-actions .btn-sm i,
.file-actions .btn-sm svg {
  width: 14px;
  height: 14px;
}

.file-actions .btn-danger-outline {
  color: #DC2626;
  border-color: #FECACA;
  background: #FEF2F2;
}

.file-actions .btn-danger-outline i,
.file-actions .btn-danger-outline svg {
  color: #DC2626;
  stroke: #DC2626;
}

.file-actions .btn-danger-outline:hover {
  background: #FEE2E2;
  border-color: #DC2626;
}

/* Upload icon (empty state) */
.upload-icon {
  margin-bottom: 12px;
}

.upload-icon i,
.upload-icon svg {
  width: 48px;
  height: 48px;
  color: #9CA3AF;
  stroke: #9CA3AF;
}

.file-upload-zone:hover .upload-icon i,
.file-upload-zone:hover .upload-icon svg {
  color: #6366F1;
  stroke: #6366F1;
}

/* Loading State */
.file-upload-zone.is-loading {
  pointer-events: none;
  cursor: default;
  border-color: #3B82F6;
  background: linear-gradient(
    to bottom,
    rgba(59, 130, 246, 0.08),
    rgba(59, 130, 246, 0.03)
  );
}

.upload-loading-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 16px;
}

.loading-spinner {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loading-spinner .spinner-icon {
  width: 32px;
  height: 32px;
  color: #3B82F6;
  animation: spin 1s linear infinite;
}

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

.loading-text {
  text-align: center;
}

.loading-text strong {
  display: block;
  font-size: 14px;
  color: #1F2937;
  margin-bottom: 4px;
}

.loading-text p {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
}

/* Loading message styles */
.loading-message {
  font-size: 16px;
  font-weight: 600;
  color: #1F2937;
  margin: 0;
}

.loading-sub {
  font-size: 13px;
  color: #6B7280;
  margin: 0;
}

/* Upload text */
.upload-text {
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
  margin-bottom: 8px;
}

.upload-formats {
  font-size: 12px;
  color: #9CA3AF;
}

.upload-text {
  font-size: 14px;    /* 16px → 14px */
  color: #666;
  line-height: 1.5;   /* 1.6 → 1.5 */
}

.file-info {
  margin-top: 10px;   /* 15px → 10px */
  font-size: 13px;    /* 14px → 13px */
  color: #999;
}

/* ========================================
   UPLOAD TIPS (COLLAPSIBLE - 110px saved)
   ======================================== */

.upload-tips {
  background: transparent;  /* Remove background when collapsed */
  padding: 0;              /* Remove padding */
  margin-top: 12px;        /* 20px → 12px */
  border-radius: 6px;
}

/* Toggle button (always visible) */
.upload-tips-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: #F5F3FF;
  border: 1px solid #DDD6FE;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
  user-select: none;
}

.upload-tips-toggle:hover {
  background: #EDE9FE;
  border-color: #6366F1;
}

.upload-tips-toggle-text {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
}

.upload-tips-info-icon {
  width: 16px;
  height: 16px;
  color: #6366F1;
}

.upload-tips-icon {
  width: 16px;
  height: 16px;
  transition: transform 0.2s;
  color: #666;
}

/* Rotate icon when expanded */
.upload-tips.expanded .upload-tips-icon {
  transform: rotate(180deg);
}

/* Content (hidden by default) */
.upload-tips-content {
  display: none;
  padding: 12px;
  background: #f8f9fa;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 6px 6px;
  margin-top: -6px;
}

/* Show content when expanded */
.upload-tips.expanded .upload-tips-content {
  display: block;
}

.upload-tips h3 {
  margin: 8px 0 6px 0;  /* Compact margins */
  font-size: 13px;
  color: #333;
}

.upload-tips h3:first-child {
  margin-top: 0;
}

.upload-tips ul {
  margin: 0 0 8px 0;
  padding-left: 18px;
}

.upload-tips li {
  margin: 3px 0;
  font-size: 13px;
  line-height: 1.4;
  color: #666;
}

/* ========================================
   WIZARD NAVIGATION (COMPACT - 30px saved)
   ======================================== */

.wizard-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;   /* 30px → 16px */
  padding-top: 12px;  /* 20px → 12px */
  border-top: 1px solid #e0e0e0;
}

.step-indicator {
  font-weight: bold;
  color: #666;
  font-size: 13px;
}

.wizard-navigation .btn-primary,
.wizard-navigation .btn-secondary {
  padding: 8px 16px;  /* Slightly smaller buttons */
  font-size: 14px;
}

/* ========================================
   COLUMN MAPPING (COMPACT)
   ======================================== */

.column-mapping-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0;  /* 20px → 16px */
}

.column-mapping-table th,
.column-mapping-table td {
  padding: 8px;  /* 12px → 8px */
  border: 1px solid #ddd;
  text-align: left;
  font-size: 13px;
}

.confidence-meter {
  display: inline-block;
  width: 100px;
  height: 10px;
  background: #eee;
  border-radius: 5px;
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  transition: width 0.3s ease;
}

/* Confidence colors - consistent with theme */
.confidence-high { background: #10B981; }   /* Emerald - matches success */
.confidence-medium { background: #F59E0B; } /* Amber - matches warning */
.confidence-low { background: #EF4444; }    /* Red - matches error */

/* ========================================
   VALIDATION STYLES (COMPACT)
   ======================================== */

.issue-list {
  max-height: 400px;
  overflow-y: auto;
  margin: 16px 0;  /* 20px → 16px */
}

.issue-item {
  padding: 8px 12px;  /* 12px → 8px/12px */
  margin: 6px 0;      /* 8px → 6px */
  border-radius: 4px;
  border-left: 4px solid;
  font-size: 13px;
}

.severity-error {
  background: #fff0f0;
  border-left-color: #ff3300;
}

.severity-warning {
  background: #fff9f0;
  border-left-color: #ff9900;
}

.severity-info {
  background: #f0f9ff;
  border-left-color: #0066cc;
}

.issue-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;  /* 5px → 4px */
}

.issue-type {
  font-weight: bold;
  font-size: 13px;
}

.issue-location {
  font-size: 12px;
  color: #999;
}

.issue-message {
  margin: 4px 0;  /* 5px → 4px */
  font-size: 13px;
}

.issue-field,
.issue-value {
  font-size: 12px;
  color: #666;
  margin-top: 3px;
}

.no-issues {
  text-align: center;
  padding: 30px;  /* 40px → 30px */
  color: #00aa00;
  font-size: 16px;  /* 18px → 16px */
}

.error-notice,
.success-notice {
  padding: 12px;     /* 15px → 12px */
  border-radius: 4px;
  margin-top: 16px;  /* 20px → 16px */
  font-size: 14px;
}

.error-notice {
  background: #fff0f0;
  border-left: 4px solid #ff3300;
  color: #cc0000;
}

.success-notice {
  background: #f0fff0;
  border-left: 4px solid #00aa00;
  color: #008800;
}

/* ========================================
   VALIDATION SUMMARY (COMPACT)
   ======================================== */

.validation-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));  /* 200px → 180px */
  gap: 12px;  /* 15px → 12px */
  margin: 16px 0;  /* 20px → 16px */
}

.stat-card {
  background: white;
  padding: 12px;  /* 20px → 12px */
  border-radius: 8px;
  text-align: center;
  border: 2px solid;
}

.stat-card.error {
  border-color: #ff3300;
  background: #fff0f0;
}

.stat-card.warning {
  border-color: #ff9900;
  background: #fff9f0;
}

.stat-card.info {
  border-color: #0066cc;
  background: #f0f9ff;
}

.stat-card.success {
  border-color: #00aa00;
  background: #f0fff0;
}

.stat-number {
  font-size: 24px;  /* 32px → 24px */
  font-weight: bold;
  margin-bottom: 4px;  /* 5px → 4px */
}

.stat-label {
  font-size: 13px;  /* 14px → 13px */
  color: #666;
}

/* ========================================
   VALIDATION FILTERS (COMPACT)
   ======================================== */

.validation-filters {
  display: flex;
  gap: 8px;  /* 10px → 8px */
  margin: 16px 0;  /* 20px → 16px */
  flex-wrap: wrap;
}

.filter-btn {
  padding: 6px 14px;  /* 8px 16px → 6px 14px */
  border: 1px solid #ddd;
  background: white;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 13px;
}

.filter-btn:hover {
  background: #f8f9fa;
}

.filter-btn.active {
  background: #0066cc;
  color: white;
  border-color: #0066cc;
}

/* ========================================
   MAPPING ACTIONS (COMPACT)
   ======================================== */

.mapping-actions {
  display: flex;
  gap: 8px;  /* 10px → 8px */
  margin: 16px 0;  /* 20px → 16px */
  flex-wrap: wrap;
}

.mapping-summary {
  background: #f0f9ff;
  padding: 12px;  /* 15px → 12px */
  border-radius: 4px;
  margin-top: 16px;  /* 20px → 16px */
  font-size: 13px;  /* 14px → 13px */
}

/* ========================================
   RESOLUTION OPTIONS (COMPACT)
   ======================================== */

.resolution-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));  /* 250px → 220px */
  gap: 16px;  /* 20px → 16px */
  margin: 16px 0;  /* 20px → 16px */
}

.option-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 16px;  /* 20px → 16px */
  text-align: center;
}

.option-card h3 {
  margin: 0 0 8px 0;  /* 10px → 8px */
  font-size: 16px;  /* 18px → 16px */
}

.option-card p {
  font-size: 13px;  /* 14px → 13px */
  color: #666;
  margin-bottom: 12px;  /* 15px → 12px */
}

.fix-results,
.queue-count {
  margin-top: 8px;  /* 10px → 8px */
  font-size: 13px;  /* 14px → 13px */
  color: #00aa00;
  font-weight: bold;
}

.resolution-status {
  background: #f8f9fa;
  padding: 16px;  /* 20px → 16px */
  border-radius: 8px;
  margin-top: 16px;  /* 20px → 16px */
}

.resolution-status h3 {
  margin-top: 0;
  font-size: 15px;
}

.resolution-status ul {
  margin: 8px 0;  /* 10px → 8px */
  padding-left: 18px;  /* 20px → 18px */
}

.resolution-status li {
  margin: 6px 0;  /* 8px → 6px */
  font-size: 13px;
}

/* ========================================
   REVIEW SUMMARY (COMPACT)
   ======================================== */

.review-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));  /* 300px → 280px */
  gap: 16px;  /* 20px → 16px */
  margin: 16px 0;  /* 20px → 16px */
}

.summary-section {
  background: #f8f9fa;
  padding: 16px;  /* 20px → 16px */
  border-radius: 8px;
}

.summary-section h3 {
  margin: 0 0 12px 0;  /* 15px → 12px */
  font-size: 15px;  /* 16px → 15px */
  color: #333;
}

.summary-section ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-section li {
  padding: 6px 0;  /* 8px → 6px */
  border-bottom: 1px solid #ddd;
  font-size: 13px;  /* 14px → 13px */
}

.summary-section li:last-child {
  border-bottom: none;
}

.import-options {
  display: flex;
  flex-direction: column;
  gap: 8px;  /* 10px → 8px */
}

.import-options label {
  display: flex;
  align-items: center;
  gap: 8px;  /* 10px → 8px */
  cursor: pointer;
  font-size: 14px;
}

/* ========================================
   FINAL CONFIRMATION (COMPACT)
   ======================================== */

.final-confirmation {
  background: #f0f9ff;
  padding: 20px;  /* 30px → 20px */
  border-radius: 8px;
  margin-top: 16px;  /* 20px → 16px */
  text-align: center;
}

.confirmation-checkbox {
  margin-bottom: 16px;  /* 20px → 16px */
}

.confirmation-checkbox label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;  /* 10px → 8px */
  cursor: pointer;
  font-size: 14px;
}

.btn-large {
  padding: 12px 24px;  /* 15px 30px → 12px 24px */
  font-size: 16px;  /* 18px → 16px */
  min-width: 250px;  /* 300px → 250px */
}

/* ========================================
   BUTTON STYLES (COMPACT)
   ======================================== */

.btn-primary {
  background: #0066cc;
  color: white;
  border: none;
  padding: 8px 18px;  /* 10px 20px → 8px 18px */
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-primary:hover:not(:disabled) {
  background: #0052a3;
}

.btn-primary:disabled {
  background: #ccc;
  cursor: not-allowed;
}

.btn-secondary {
  background: white;
  color: #333;
  border: 1px solid #ddd;
  padding: 8px 18px;  /* 10px 20px → 8px 18px */
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-secondary:hover:not(:disabled) {
  background: #f8f9fa;
}

.btn-secondary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ========================================
   ANALYSIS PANEL (COMPACT)
   ======================================== */

.analysis-panel {
  position: fixed;
  right: 20px;
  top: 100px;
  width: 280px;  /* 300px → 280px */
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.panel-tabs {
  display: flex;
  border-bottom: 1px solid #ddd;
}

.panel-tab {
  flex: 1;
  padding: 10px;  /* 12px → 10px */
  text-align: center;
  cursor: pointer;
  border: none;
  background: none;
  transition: all 0.2s;
  font-size: 13px;
}

.panel-tab.active {
  border-bottom: 3px solid #0066cc;
  font-weight: bold;
}

.tab-content {
  padding: 16px;  /* 20px → 16px */
  max-height: 450px;  /* 500px → 450px */
  overflow-y: auto;
}

.tips-section,
.stats-section,
.issues-section {
  padding: 8px 0;  /* 10px → 8px */
}

.tips-list {
  display: flex;
  flex-direction: column;
  gap: 12px;  /* 15px → 12px */
}

.tip-item {
  display: flex;
  gap: 10px;  /* 12px → 10px */
  padding: 10px;  /* 12px → 10px */
  border-radius: 4px;
  background: #f8f9fa;
  border-left: 4px solid;
}

.tip-item.success {
  border-left-color: #00aa00;
  background: #f0fff0;
}

.tip-item.warning {
  border-left-color: #ff9900;
  background: #fff9f0;
}

.tip-item.error {
  border-left-color: #ff3300;
  background: #fff0f0;
}

.tip-item.info {
  border-left-color: #0066cc;
  background: #f0f9ff;
}

.tip-item.tip {
  border-left-color: #9933ff;
  background: #f9f0ff;
}

.tip-icon {
  font-size: 18px;  /* 20px → 18px */
  flex-shrink: 0;
}

.tip-content strong {
  display: block;
  margin-bottom: 4px;  /* 5px → 4px */
  font-size: 13px;  /* 14px → 13px */
}

.tip-content p {
  margin: 0;
  font-size: 12px;  /* 13px → 12px */
  color: #666;
  line-height: 1.4;
}

/* Stats Panel Styling */
.stat-group {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;  /* 10px → 8px */
  border-bottom: 1px solid #eee;
}

.stat-label {
  font-size: 12px;  /* 13px → 12px */
  color: #666;
}

.stat-value {
  font-size: 13px;  /* 14px → 13px */
  font-weight: bold;
  color: #333;
}

.stat-value.stat-success {
  color: #00aa00;
}

.stat-value.stat-error {
  color: #ff3300;
}

.stat-value.stat-warning {
  color: #ff9900;
}

.stat-divider {
  height: 1px;
  background: #ddd;
  margin: 8px 0;  /* 10px → 8px */
}

/* Issues Panel */
.issue-summary {
  display: flex;
  justify-content: space-around;
  margin: 12px 0;  /* 15px → 12px */
  padding: 12px;  /* 15px → 12px */
  background: #f8f9fa;
  border-radius: 4px;
}

.issue-count {
  font-size: 16px;  /* 18px → 16px */
  font-weight: bold;
}

.issue-count.error {
  color: #ff3300;
}

.issue-count.warning {
  color: #ff9900;
}

.issue-count.info {
  color: #0066cc;
}

.panel-issues-list {
  margin: 12px 0;  /* 15px → 12px */
}

.panel-issue-item {
  display: flex;
  align-items: center;
  gap: 8px;  /* 10px → 8px */
  padding: 8px;  /* 10px → 8px */
  margin: 6px 0;  /* 8px → 6px */
  border-radius: 4px;
  border-left: 3px solid;
  font-size: 12px;  /* 13px → 12px */
}

.panel-issue-item.severity-error {
  background: #fff0f0;
  border-left-color: #ff3300;
}

.panel-issue-item.severity-warning {
  background: #fff9f0;
  border-left-color: #ff9900;
}

.panel-issue-item.severity-info {
  background: #f0f9ff;
  border-left-color: #0066cc;
}

.panel-issue-icon {
  font-size: 14px;  /* 16px → 14px */
  flex-shrink: 0;
}

.panel-issue-text {
  flex: 1;
}

.panel-issue-text strong {
  display: block;
  margin-bottom: 2px;
  font-size: 12px;
}

.panel-issue-text small {
  color: #999;
  font-size: 11px;
}

.more-issues {
  text-align: center;
  padding: 8px;  /* 10px → 8px */
  font-size: 12px;  /* 13px → 12px */
  color: #666;
}

.more-issues a {
  color: #0066cc;
  text-decoration: none;
}

.more-issues a:hover {
  text-decoration: underline;
}

.no-issues-panel {
  text-align: center;
  padding: 30px 16px;  /* 40px 20px → 30px 16px */
}

.success-icon {
  font-size: 40px;  /* 48px → 40px */
  color: #00aa00;
  margin-bottom: 8px;  /* 10px → 8px */
}

.no-issues-panel p {
  margin: 4px 0;  /* 5px → 4px */
  color: #666;
  font-size: 13px;
}

/* ========================================
   QUEUED ISSUES PANEL (COMPACT)
   ======================================== */

.queued-issues-panel {
  background: #fff9e6;
  border: 2px solid #ffcc00;
  border-radius: 8px;
  padding: 16px;  /* 20px → 16px */
  margin-top: 16px;  /* 20px → 16px */
}

.queued-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  user-select: none;
}

.queued-header:hover {
  opacity: 0.8;
}

.queued-header h3 {
  margin: 0;
  font-size: 15px;  /* 16px → 15px */
  color: #cc6600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.queue-count {
  font-weight: normal;
  font-size: 13px;  /* 14px → 13px */
  color: #666;
}

.toggle-btn {
  background: transparent;
  border: 1px solid #cc6600;
  color: #cc6600;
  padding: 4px 12px;  /* 5px 15px → 4px 12px */
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;  /* 14px → 13px */
  transition: all 0.2s;
}

.toggle-btn:hover {
  background: #cc6600;
  color: white;
}

.queued-content {
  margin-top: 12px;  /* 15px → 12px */
}

.queue-info {
  background: #ffe6b3;
  border-left: 4px solid #ff9900;
  padding: 10px;  /* 12px → 10px */
  margin-bottom: 12px;  /* 15px → 12px */
  border-radius: 4px;
  font-size: 13px;  /* 14px → 13px */
  color: #663300;
}

.queued-issues-list {
  max-height: 350px;  /* 400px → 350px */
  overflow-y: auto;
  margin-bottom: 12px;  /* 15px → 12px */
}

.queued-issue-item {
  background: white;
  border: 1px solid #ffcc00;
  border-radius: 6px;
  padding: 10px;  /* 12px → 10px */
  margin-bottom: 8px;  /* 10px → 8px */
  transition: all 0.2s;
}

.queued-issue-item:hover {
  box-shadow: 0 2px 8px rgba(255, 153, 0, 0.2);
  border-color: #ff9900;
}

.queued-issue-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;  /* 8px → 6px */
}

.issue-icon {
  font-size: 14px;  /* 16px → 14px */
}

.issue-location {
  color: #333;
  font-size: 13px;  /* 14px → 13px */
}

.issue-field {
  color: #666;
  font-size: 12px;  /* 13px → 12px */
  font-style: italic;
}

.btn-remove-queue {
  margin-left: auto;
  background: #ff4444;
  color: white;
  border: none;
  border-radius: 4px;
  width: 22px;  /* 24px → 22px */
  height: 22px;
  cursor: pointer;
  font-size: 14px;  /* 16px → 14px */
  line-height: 1;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-remove-queue:hover {
  background: #cc0000;
  transform: scale(1.1);
}

.queued-issue-message {
  font-size: 13px;  /* 14px → 13px */
  color: #333;
  margin-bottom: 4px;  /* 5px → 4px */
  padding-left: 22px;  /* 26px → 22px */
}

.queued-issue-value {
  font-size: 12px;  /* 13px → 12px */
  color: #666;
  font-family: 'Courier New', monospace;
  background: #f5f5f5;
  padding: 3px 6px;  /* 4px 8px → 3px 6px */
  border-radius: 3px;
  margin-left: 22px;  /* 26px → 22px */
  display: inline-block;
}

.queue-actions {
  display: flex;
  gap: 8px;  /* 10px → 8px */
  padding-top: 12px;  /* 15px → 12px */
  border-top: 1px solid #ffcc00;
}

.queue-actions button {
  flex: 1;
  font-size: 13px;
}

/* Scrollbar styling for queue list */
.queued-issues-list::-webkit-scrollbar {
  width: 6px;  /* 8px → 6px */
}

.queued-issues-list::-webkit-scrollbar-track {
  background: #f5f5f5;
  border-radius: 3px;
}

.queued-issues-list::-webkit-scrollbar-thumb {
  background: #cc6600;
  border-radius: 3px;
}

.queued-issues-list::-webkit-scrollbar-thumb:hover {
  background: #ff9900;
}

/* Empty state */
.queue-empty {
  text-align: center;
  padding: 16px;  /* 20px → 16px */
  color: #999;
  font-style: italic;
  font-size: 13px;
}

/* ========================================
   RESPONSIVE ADJUSTMENTS (MOBILE COMPACT)
   ======================================== */

@media (max-width: 768px) {
  /* Further reduce spacing on mobile */
  .upload-wizard {
    padding: 12px;  /* 16px → 12px */
  }
  
  .wizard-step {
    padding: 12px 15px;  /* Further reduce */
  }
  
  .wizard-progress {
    padding: 10px 0;
    flex-direction: row;  /* Keep horizontal */
    overflow-x: auto;
  }
  
  .step-title {
    font-size: 11px;  /* Even smaller on mobile */
  }
  
  .file-upload-zone {
    padding: 15px;  /* Minimal padding */
  }
  
  .upload-icon {
    font-size: 28px;  /* Smaller icon */
  }
  
  .resolution-options,
  .review-summary,
  .validation-summary {
    grid-template-columns: 1fr;
  }
  
  .wizard-progress-step::after {
    display: none;
  }
  
  .btn-large {
    min-width: auto;
    width: 100%;
    padding: 10px 20px;
  }
  
  .analysis-panel {
    position: static;
    width: 100%;
    margin-top: 16px;
  }
  
  .queued-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  
  .toggle-btn {
    width: 100%;
  }
  
  .queue-actions {
    flex-direction: column;
  }
  
  .queued-issue-header {
    flex-wrap: wrap;
  }
  
  .btn-remove-queue {
    margin-left: 0;
  }
}

/* ========================================
   UPLOAD INTELLIGENCE MODAL (COMPACT)
   ======================================== */

.upload-modal {
  display: none;
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 999999 !important;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  overflow: hidden !important;
}

.upload-modal.active {
  display: flex !important;
  pointer-events: auto;
}

.upload-modal-backdrop {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  z-index: 1 !important;
}

.upload-modal-content {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 90% !important;
  max-width: 1200px !important;
  height: 90vh !important;
  max-height: 900px !important;
  background: white !important;
  border-radius: 16px !important;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.5) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 1000 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.upload-modal-header {
  padding: 20px 24px;  /* 24px 28px → 20px 24px */
  border-bottom: 2px solid #E5E7EB;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, #667EEA 0%, #764BA2 100%);
  color: white;
}

.upload-modal-header h2 {
  font-size: 18px;  /* 20px → 18px */
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.upload-modal-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 32px;  /* 36px → 32px */
  height: 32px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  color: white;
}

.upload-modal-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.upload-modal-close i {
  width: 18px;  /* 20px → 18px */
  height: 18px;
}

.upload-modal-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  background: #FAFBFC;
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100%;
}

/* Smooth animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Ensure wizard content is visible inside modal */
.upload-modal-body #upload-wizard-container {
  min-height: 500px;
  padding: 16px;  /* 20px → 16px */
  background: white;
  position: relative;
  z-index: 20;
  display: block !important;
  visibility: visible !important;
}

/* Upload wizard base styles */
.upload-wizard {
  width: 100%;
  min-height: 500px;
  display: flex;
  flex-direction: column;
  gap: 20px;  /* 24px → 20px */
}

/* Make sure wizard content is visible */
.upload-wizard > * {
  opacity: 1 !important;
  visibility: visible !important;
}

/* Step content */
.wizard-step {
  flex: 1;
  padding: 20px;  /* 24px → 20px */
  background: #FAFBFC;
  border-radius: 12px;
  min-height: 400px;
}

/* Progress bar visibility */
.wizard-progress {
  display: flex !important;
  gap: 10px;  /* 12px → 10px */
  padding: 16px;  /* 20px → 16px */
  background: white;
  border-radius: 8px;
  border: 1px solid #E5E7EB;
}

/* Navigation buttons visibility */
.wizard-navigation {
  display: flex !important;
  justify-content: space-between;
  padding: 16px;  /* 20px → 16px */
  background: white;
  border-top: 2px solid #E5E7EB;
}

/* Debug: Make everything visible */
.upload-wizard * {
  box-sizing: border-box;
}

/* CRITICAL: Hide main content when modal is active */
body.modal-open {
  overflow: hidden !important;
}

body.modal-open > *:not(#upload-intelligence-modal):not(script):not(style) {
  filter: blur(5px);
  pointer-events: none !important;
}

body.modal-open #upload-intelligence-modal {
  filter: none !important;
  pointer-events: auto !important;
}

/* CRITICAL: Force wizard to stay inside modal */
#upload-wizard-container .upload-wizard {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  left: 0 !important;
  right: 0 !important;
  top: 0 !important;
  bottom: 0 !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}

/* Wizard progress sidebar must stay inside */
#upload-wizard-container .wizard-progress {
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 16px !important;  /* 20px → 16px */
  left: 0 !important;
  top: 0 !important;
  transform: none !important;
}

/* All wizard children stay inside */
#upload-wizard-container .upload-wizard > * {
  position: relative !important;
  max-width: 100% !important;
  overflow-x: hidden !important;
}

/* Container must be relative and contained */
.upload-modal-content #upload-wizard-container,
#upload-intelligence-modal #upload-wizard-container {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: auto !important;
  contain: layout style !important;
}

/* Wizard must stay inside */
.upload-modal-content .upload-wizard,
#upload-intelligence-modal .upload-wizard {
  position: static !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  margin: 0 !important;
  padding: 16px !important;  /* 20px → 16px */
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  display: block !important;
}

/* Progress bar must stay inside */
.upload-modal-content .wizard-progress,
#upload-intelligence-modal .wizard-progress,
.upload-modal-content .wizard-progress-step,
#upload-intelligence-modal .wizard-progress-step {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  transform: none !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* ALL children stay inside */
.upload-modal-content .upload-wizard *,
#upload-intelligence-modal .upload-wizard * {
  position: relative !important;
  max-width: 100% !important;
}

/* Override ANY fixed/absolute positioning */
.upload-modal-content .upload-wizard [style*="position: fixed"],
.upload-modal-content .upload-wizard [style*="position: absolute"],
#upload-intelligence-modal .upload-wizard [style*="position: fixed"],
#upload-intelligence-modal .upload-wizard [style*="position: absolute"] {
  position: relative !important;
}

/* Responsive modal adjustments */
@media (max-width: 768px) {
  .upload-modal-content {
    width: 98%;
    max-height: 98vh;
    border-radius: 12px;
  }
  
  .upload-modal-header {
    padding: 16px;  /* 20px → 16px */
  }
  
  .upload-modal-header h2 {
    font-size: 16px;  /* 18px → 16px */
  }
}

/* ========================================
   UPLOAD INTELLIGENCE VIEW (FULL SCREEN)
   ======================================== */

.upload-intelligence-view {
  width: 100%;
  min-height: 100vh;
  background: #F9FAFB;
  display: flex;
  flex-direction: column;
}

/* Header with Back Button (COMPACT) */
.upload-intelligence-header {
  background: white;
  border-bottom: 2px solid #E5E7EB;
  padding: 16px 28px;  /* 20px 32px → 16px 28px */
  display: flex;
  align-items: center;
  gap: 20px;  /* 24px → 20px */
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.upload-intelligence-header .back-button {
  display: flex;
  align-items: center;
  gap: 6px;  /* 8px → 6px */
  padding: 8px 14px;  /* 10px 16px → 8px 14px */
  background: white;
  border: 1.5px solid #E5E7EB;
  border-radius: 8px;
  font-size: 13px;  /* 14px → 13px */
  font-weight: 500;
  color: #374151;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-intelligence-header .back-button:hover {
  background: #F9FAFB;
  border-color: #6366F1;
  color: #6366F1;
}

.upload-intelligence-header .back-button i {
  width: 16px;  /* 18px → 16px */
  height: 16px;
}

.upload-intelligence-header .header-title h1 {
  font-size: 24px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.upload-intelligence-header .header-title h1 i,
.upload-intelligence-header .header-title h1 svg {
  width: 28px;
  height: 28px;
  color: #3B82F6;
}

.upload-intelligence-header .header-title p {
  font-size: 14px;
  color: #6B7280;
  margin: 0;
}

/* Content Area */
.upload-intelligence-content {
  flex: 1;
  padding: 24px;  /* 32px → 24px */
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
}

/* Error State */
.upload-intelligence-content .error-state {
  text-align: center;
  padding: 60px 20px;  /* 80px → 60px */
}

.upload-intelligence-content .error-state h2 {
  font-size: 22px;  /* 24px → 22px */
  font-weight: 700;
  color: #111827;
  margin: 20px 0 10px 0;  /* 24px/12px → 20px/10px */
}

.upload-intelligence-content .error-state p {
  font-size: 15px;  /* 16px → 15px */
  color: #6B7280;
  margin: 0 0 24px 0;  /* 32px → 24px */
}

.upload-intelligence-content .error-state button {
  padding: 10px 20px;  /* 12px 24px → 10px 20px */
  font-size: 15px;  /* 16px → 15px */
}

/* Wizard in full-screen view (COMPACT) */
.upload-intelligence-content #upload-wizard-container {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.upload-intelligence-content .upload-wizard {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 600px;
  background: white;
}

/* Progress bar at top (horizontal) */
.upload-intelligence-content .wizard-progress {
  display: flex;
  justify-content: space-between;
  padding: 24px 40px;  /* 32px 48px → 24px 40px */
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
  border-bottom: 2px solid #E5E7EB;
  overflow-x: auto;
}

.upload-intelligence-content .wizard-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;  /* 8px → 6px */
  min-width: 90px;  /* 100px → 90px */
  flex: 1;
  position: relative;
}

.upload-intelligence-content .wizard-progress-step .step-number {
  width: 36px;  /* 40px → 36px */
  height: 36px;
  border-radius: 50%;
  background: white;
  border: 2px solid #D1D5DB;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 15px;  /* 16px → 15px */
  color: #9CA3AF;
  transition: all 0.3s;
  z-index: 2;
}

.upload-intelligence-content .wizard-progress-step.active .step-number {
  background: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
  border-color: #6366F1;
  color: white;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.upload-intelligence-content .wizard-progress-step.completed .step-number {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  border-color: #10B981;
  color: white;
}

.upload-intelligence-content .wizard-progress-step.completed .step-number i,
.upload-intelligence-content .wizard-progress-step.completed .step-number svg {
  width: 18px;
  height: 18px;
  color: white;
  stroke: white;
  stroke-width: 3;
}

.upload-intelligence-content .wizard-progress-step .step-title {
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  text-align: center;
}

.upload-intelligence-content .wizard-progress-step.active .step-title {
  color: #6366F1;
}

.upload-intelligence-content .wizard-progress-step.completed .step-title {
  color: #10B981;
}

/* Connecting lines between steps */
.upload-intelligence-content .wizard-progress-step::after {
  content: '';
  position: absolute;
  top: 18px;
  left: 50%;
  width: 100%;
  height: 2px;
  background: #E5E7EB;
  z-index: 1;
}

.upload-intelligence-content .wizard-progress-step:last-child::after {
  display: none;
}

.upload-intelligence-content .wizard-progress-step.completed::after {
  background: #10B981;
}

/* Step content area */
.upload-intelligence-content .wizard-step-content {
  flex: 1;
  padding: 40px;  /* 48px → 40px */
  overflow-y: auto;
}

/* Navigation buttons */
.upload-intelligence-content .wizard-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 40px;
  background: white;
  border-top: 2px solid #E5E7EB;
}

.upload-intelligence-content .wizard-nav-left,
.upload-intelligence-content .wizard-nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.upload-intelligence-content .wizard-nav-center {
  flex: 1;
  text-align: center;
}

.upload-intelligence-content .wizard-navigation .step-indicator {
  font-size: 13px;
  font-weight: 500;
  color: #6B7280;
}

.upload-intelligence-content .wizard-navigation button {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.upload-intelligence-content .wizard-navigation button i,
.upload-intelligence-content .wizard-navigation button svg {
  width: 16px;
  height: 16px;
}

.upload-intelligence-content .wizard-navigation .btn-primary {
  background: linear-gradient(135deg, #6366F1 0%, #4F46E5 100%);
  color: white;
  border: none;
  box-shadow: 0 2px 4px rgba(99, 102, 241, 0.2);
}

.upload-intelligence-content .wizard-navigation .btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4F46E5 0%, #4338CA 100%);
  box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3);
  transform: translateY(-1px);
}

.upload-intelligence-content .wizard-navigation .btn-primary:disabled {
  background: #D1D5DB;
  box-shadow: none;
  cursor: not-allowed;
}

.upload-intelligence-content .wizard-navigation .btn-secondary {
  background: white;
  color: #374151;
  border: 1.5px solid #E5E7EB;
}

.upload-intelligence-content .wizard-navigation .btn-secondary:hover:not(:disabled) {
  background: #F9FAFB;
  border-color: #6366F1;
  color: #6366F1;
}

.upload-intelligence-content .wizard-navigation .btn-secondary:disabled {
  background: #F9FAFB;
  color: #9CA3AF;
  border-color: #E5E7EB;
  cursor: not-allowed;
}

/* Import button (Step 5) */
.upload-intelligence-content .wizard-navigation .btn-import {
  background: linear-gradient(135deg, #10B981 0%, #059669 100%);
  padding: 10px 24px;
}

.upload-intelligence-content .wizard-navigation .btn-import:hover:not(:disabled) {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.upload-intelligence-content .wizard-navigation .btn-import:disabled {
  background: #D1D5DB;
}

/* Hide any absolute/fixed positioned elements */
.upload-intelligence-content .upload-wizard * {
  position: relative !important;
}

/* Force horizontal progress bar */
.upload-intelligence-view .wizard-progress,
#upload-wizard-container .wizard-progress {
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: stretch !important;
  padding: 24px 40px !important;  /* 32px 48px → 24px 40px */
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%) !important;
  border-bottom: 2px solid #E5E7EB !important;
  width: 100% !important;
  position: relative !important;
  left: 0 !important;
  top: 0 !important;
  margin: 0 !important;
  overflow-x: auto !important;
}

/* Force horizontal step items */
.upload-intelligence-view .wizard-progress-step,
#upload-wizard-container .wizard-progress-step {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 6px !important;  /* 8px → 6px */
  min-width: 90px !important;  /* 100px → 90px */
  flex: 1 !important;
  position: relative !important;
  left: auto !important;
  top: auto !important;
  margin: 0 !important;
  padding: 8px !important;  /* 10px → 8px */
}

/* Remove any absolute/fixed positioning */
.upload-intelligence-view .wizard-progress *,
#upload-wizard-container .wizard-progress * {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
}

/* Responsive full-screen view */
@media (max-width: 768px) {
  .upload-intelligence-header {
    padding: 12px 20px;  /* 16px 28px → 12px 20px */
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;  /* 20px → 12px */
  }
  
  .upload-intelligence-header .header-title h1 {
    font-size: 18px;  /* 22px → 18px */
  }
  
  .upload-intelligence-content {
    padding: 16px;  /* 24px → 16px */
  }
  
  .upload-intelligence-content .wizard-step-content {
    padding: 20px;  /* 40px → 20px */
  }
}

/* ==================================
   SECTION 1: ENHANCED 3-COLUMN LAYOUT
   ================================== */

/* Auto-Detection Banner */
.auto-detection-banner {
  background: linear-gradient(135deg, #dbeafe 0%, #e0f2fe 100%);
  border: 1px solid #0ea5e9;
  border-radius: 8px;
  padding: 14px 18px;
  margin: 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

/* All fields mapped - success state */
.auto-detection-banner.all-mapped {
  background: linear-gradient(135deg, #CCFBF1 0%, #D1FAE5 100%);
  border-color: #10B981;
}

.auto-detection-banner.all-mapped .banner-icon {
  color: #10B981;
}

.auto-detection-banner.all-mapped .banner-content {
  color: #065F46;
}

.auto-detection-banner .all-mapped-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: #10B981;
  color: white;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
}

.auto-detection-banner .banner-icon {
  color: #0ea5e9;
  font-size: 20px;
  display: flex;
  align-items: center;
}

.auto-detection-banner .banner-content {
  flex: 1;
  font-size: 14px;
  color: #0c4a6e;
}

.auto-detection-banner .banner-content strong {
  font-weight: 600;
}

/* Required Mapping Container */
.required-mapping-container {
  margin-top: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

/* Grid Header */
.mapping-grid-header {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  background: #f9fafb;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

.header-col {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Required Field Row */
.required-field-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr 1fr;
  gap: 16px;
  padding: 16px 16px;  /* Reduced from 20px to 16px */
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s ease;
}

.required-field-row:last-child {
  border-bottom: none;
}

.required-field-row:hover {
  background: #fafbfc;
}

.required-field-row.mapped {
  background: rgba(16, 185, 129, 0.02);
}

/* Column 1: Field Info */
.field-info-col {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 15px;
  color: #111827;
}

.field-header i {
  color: #0ea5e9;
  font-size: 18px;
}

.field-name {
  flex: 1;
}

.required-indicator {
  color: #ef4444;
  font-size: 16px;
  font-weight: 700;
}

.field-description {
  font-size: 12px;  /* Reduced from 13px to 12px */
  color: #6b7280;
  padding-left: 26px;
  line-height: 1.4;  /* Tighter line height */
}

/* Column 2: Mapping & Confidence */
.mapping-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mapping-selector {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.select-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.column-selector {
  width: 100%;
  max-width: 280px;
  padding: 10px 12px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  /* Handle long column names */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Show full column name on hover via tooltip */
.column-selector option {
  white-space: normal;
  word-wrap: break-word;
}

.column-selector:hover {
  border-color: #0ea5e9;
}

.column-selector:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Confidence Display */
.confidence-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

/* Compact Confidence Display (Horizontal Layout) */
.confidence-display.compact {
  gap: 0;
}

.confidence-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.confidence-label-inline {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.confidence-bar-inline {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.confidence-bar-inline .confidence-bar {
  flex: 1;
  min-width: 60px;
}

.confidence-bar-inline .confidence-percentage {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  min-width: 35px;
}

.confidence-status-inline {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.confidence-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.confidence-bar {
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  position: relative;
}

.confidence-fill {
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 3px;
}

.confidence-fill.confidence-high {
  background: linear-gradient(90deg, #10b981, #059669);
}

.confidence-fill.confidence-medium {
  background: linear-gradient(90deg, #f59e0b, #d97706);
}

.confidence-fill.confidence-low {
  background: linear-gradient(90deg, #ef4444, #dc2626);
}

.confidence-percentage {
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
}

.confidence-text {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 4px;
}

.mapping-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  font-size: 13px;
  color: #6b7280;
}

.mapping-hint i {
  color: #9ca3af;
}

/* Column 3: Data Preview */
.preview-col {
  display: flex;
  flex-direction: column;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 8px;  /* Reduced from 10px to 8px */
}

.preview-label {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.preview-samples {
  display: flex;
  flex-direction: column;
  gap: 3px;  /* Reduced from 4px to 3px */
}

.sample-value {
  background: #f3f4f6;
  padding: 5px 10px;  /* Reduced from 6px to 5px */
  border-radius: 4px;
  font-size: 11px;  /* Reduced from 12px to 11px */
  font-family: 'Monaco', 'Courier New', monospace;
  color: #374151;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-stats {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 8px;
  border-top: 1px solid #e5e7eb;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.stat-item i {
  font-size: 14px;
}

.stat-item.stat-success {
  color: #10b981;
}

.stat-item.stat-warning {
  color: #f59e0b;
}

/* Compact inline stats row */
.preview-stats-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #e5e7eb;
  font-size: 12px;
  color: #6b7280;
}

.preview-stats-inline .stat-count {
  color: #374151;
  font-weight: 500;
}

.preview-stats-inline .stat-separator {
  color: #d1d5db;
}

.preview-stats-inline .stat-valid {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #10b981;
}

.preview-stats-inline .stat-valid i {
  width: 12px;
  height: 12px;
}

.preview-stats-inline .stat-warning {
  display: flex;
  align-items: center;
  gap: 3px;
  color: #f59e0b;
}

.preview-stats-inline .stat-warning i {
  width: 12px;
  height: 12px;
}

.preview-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 20px;
  background: #f9fafb;
  border: 1px dashed #d1d5db;
  border-radius: 6px;
  color: #9ca3af;
  font-size: 13px;
  text-align: center;
}

.preview-empty i {
  font-size: 24px;
  color: #d1d5db;
}

/* Mapping Status Footer */
.mapping-status-footer {
  padding: 14px 16px;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.status-message {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
}

.status-message i {
  font-size: 18px;
}

.status-message.status-success {
  color: #10b981;
}

.status-message.status-warning {
  color: #f59e0b;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .mapping-grid-header,
  .required-field-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .header-col {
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
  }
  
  .header-col:last-child {
    border-bottom: none;
  }
}

/* ================================
   Section 2: User Info Enhanced Layout
   ================================ */

/* User Info Container */
.user-info-mapping-container {
  margin-top: 20px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

/* Grid Header */
.user-info-grid-header {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 16px;
  background: #f9fafb;
  padding: 12px 16px;
  border-bottom: 2px solid #e5e7eb;
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6b7280;
}

/* User Info Field Row */
.user-info-field-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr 1fr;
  gap: 16px;
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.2s ease;
}

.user-info-field-row:last-child {
  border-bottom: none;
}

.user-info-field-row:hover {
  background: #fafbfc;
}

/* Column 2: Source & Coverage */
.source-coverage-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.source-selector-group,
.column-selector-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Help icon for tooltips */
.source-help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #9CA3AF;
  cursor: help;
  transition: color 0.2s ease;
}

.source-help-icon:hover {
  color: #3B82F6;
}

.source-help-icon i {
  width: 16px;
  height: 16px;
}

.select-label-inline {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
  min-width: 45px;
  white-space: nowrap;
}

.source-selector-compact,
.column-selector-compact {
  flex: 1;
  max-width: 220px;
  padding: 8px 10px;
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  color: #374151;
  background: #ffffff;
  cursor: pointer;
  transition: all 0.2s ease;
  /* Handle long column names */
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}

/* Show full column name on hover via tooltip */
.column-selector-compact option {
  white-space: normal;
  word-wrap: break-word;
}

.source-selector-compact:hover,
.column-selector-compact:hover {
  border-color: #0ea5e9;
}

.source-selector-compact:focus,
.column-selector-compact:focus {
  outline: none;
  border-color: #0ea5e9;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

/* Optional Badge */
.optional-badge {
  display: inline-block;
  padding: 2px 8px;
  background: #0ea5e9;
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-radius: 10px;
  margin-left: 8px;
}

/* Dual Coverage Display */
.dual-coverage-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coverage-bars-container {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coverage-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.coverage-label {
  font-size: 10px;
  font-weight: 500;
  color: #6b7280;
  min-width: 55px;
}

.coverage-bar-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.coverage-bar {
  flex: 1;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
  min-width: 60px;
}

.coverage-fill {
  height: 100%;
  transition: width 0.3s ease;
}

.coverage-fill.coverage-good {
  background: linear-gradient(90deg, #10b981 0%, #059669 100%);
}

.coverage-fill.coverage-warning {
  background: linear-gradient(90deg, #f59e0b 0%, #d97706 100%);
}

.coverage-fill.coverage-low {
  background: linear-gradient(90deg, #ef4444 0%, #dc2626 100%);
}

.coverage-percentage {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  min-width: 35px;
}

.coverage-count {
  font-size: 10px;
  color: #9ca3af;
  min-width: 40px;
}

.coverage-combined {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 4px;
  border-top: 1px solid #f3f4f6;
  margin-top: 2px;
}

.combined-label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
}

.combined-value {
  font-size: 11px;
  font-weight: 600;
}

.combined-value.coverage-good {
  color: #059669;
}

.combined-value.coverage-warning {
  color: #d97706;
}

.combined-value.coverage-low {
  color: #dc2626;
}

/* Dual Preview Content */
.dual-preview-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.preview-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.preview-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 4px;
  border-bottom: 1px solid #f3f4f6;
}

.preview-label i {
  width: 12px;
  height: 12px;
}

.preview-strategy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px;
  background: #eff6ff;
  border: 1px solid #dbeafe;
  border-radius: 6px;
  margin-top: 4px;
}

.strategy-icon {
  font-size: 14px;
  line-height: 1;
}

.strategy-text {
  flex: 1;
  font-size: 11px;
  line-height: 1.5;
  color: #1e40af;
}

/* Responsive Design for Section 2 */
@media (max-width: 1200px) {
  .user-info-grid-header,
  .user-info-field-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .source-coverage-col {
    padding-left: 0;
  }
  
  .coverage-bars-container {
    padding-left: 0;
  }
}

/* Auto-Detect Match Indicator */
.auto-detect-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  background: #d1fae5;
  border: 1px solid #6ee7b7;
  border-radius: 6px;
  font-size: 11px;
  color: #065f46;
}

.auto-detect-indicator i {
  width: 14px;
  height: 14px;
  color: #059669;
}

.auto-detect-indicator strong {
  font-weight: 600;
  color: #047857;
}

/* ============================================================================
   USER-SPECIFIC COMPARISON PREVIEW (New Design)
   ============================================================================ */

.preview-comparison {
  margin-top: 8px;
}

.comparison-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  border-radius: 6px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.comparison-row.match {
  background: #f0fdf4;
  border-color: #86efac;
}

.comparison-row.different {
  background: #fef3c7;
  border-color: #fcd34d;
}

.comparison-row.upload-only {
  background: #eff6ff;
  border-color: #93c5fd;
}

.comparison-row.database-only {
  background: #f5f3ff;
  border-color: #c4b5fd;
}

.comparison-row.no-data {
  background: #f9fafb;
  border-color: #d1d5db;
}

.comparison-icon {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
}

.comparison-icon i {
  width: 18px;
  height: 18px;
}

.comparison-icon .icon-success {
  color: #16a34a;
}

.comparison-icon .icon-warning {
  color: #ca8a04;
}

.comparison-icon .icon-info {
  color: #2563eb;
}

.comparison-icon .icon-muted {
  color: #9ca3af;
}

.comparison-content {
  flex: 1;
}

.comparison-label {
  font-size: 11px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

.comparison-value {
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  padding: 6px 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.comparison-value.match-value {
  border-color: #86efac;
  background: #f0fdf4;
}

.comparison-values {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.value-source {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-badge {
  flex-shrink: 0;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.source-badge.upload {
  background: #dbeafe;
  color: #1e40af;
}

.source-badge.database {
  background: #e0e7ff;
  color: #4338ca;
}

.value-text {
  flex: 1;
  font-size: 13px;
  color: #111827;
  font-weight: 500;
  padding: 4px 8px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 4px;
}

.comparison-note {
  margin-top: 6px;
  font-size: 11px;
  color: #6b7280;
  font-style: italic;
}


/* ============================================
   STEP 3: COMPACT VALIDATION UI (HYBRID)
   ============================================ */

/* Compact Summary (Always Visible) */
.validation-summary-compact {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.3s ease;
}

.validation-summary-compact.success {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.validation-summary-compact.has-errors {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.summary-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: white;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.status-icon svg {
  width: 28px;
  height: 28px;
}

.success .status-icon svg {
  color: #10b981;
}

.has-errors .status-icon svg {
  color: #f59e0b;
}

.status-content h3 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.status-content p {
  margin: 0;
  font-size: 14px;
  color: #6b7280;
}

.summary-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Expandable Details Container */
.validation-details {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 20px;
}

/* Tabbed Interface */
.validation-tabs {
  display: flex;
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

.validation-tabs .tab-btn {
  flex: 1;
  padding: 14px 20px;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-bottom: 3px solid transparent;
}

.validation-tabs .tab-btn:hover {
  background: #f3f4f6;
  color: #111827;
}

.validation-tabs .tab-btn.active {
  color: #3b82f6;
  background: white;
  border-bottom-color: #3b82f6;
}

.validation-tabs .tab-btn svg {
  width: 18px;
  height: 18px;
}

/* Tab Content */
.tab-content {
  padding: 24px;
}

/* Statistics Grid */
.validation-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);  /* Always 4 columns on desktop */
  gap: 16px;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 1024px) {
  .validation-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: 1 column on mobile */
@media (max-width: 640px) {
  .validation-stats-grid {
    grid-template-columns: 1fr;
  }
}

.validation-stats-grid .stat-card {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
}

.validation-stats-grid .stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.validation-stats-grid .stat-card:active {
  transform: translateY(-2px);
}

.validation-stats-grid .stat-card.error {
  border-color: #ef4444;
  background: linear-gradient(135deg, #fef2f2 0%, #ffffff 100%);
}

.validation-stats-grid .stat-card.warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.validation-stats-grid .stat-card.info {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.validation-stats-grid .stat-card.success {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.validation-stats-grid .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.validation-stats-grid .stat-card.error .stat-icon {
  background: #fee2e2;
  color: #dc2626;
}

.validation-stats-grid .stat-card.warning .stat-icon {
  background: #fef3c7;
  color: #d97706;
}

.validation-stats-grid .stat-card.info .stat-icon {
  background: #dbeafe;
  color: #2563eb;
}

.validation-stats-grid .stat-card.success .stat-icon {
  background: #d1fae5;
  color: #059669;
}

.validation-stats-grid .stat-icon svg {
  width: 24px;
  height: 24px;
}

.validation-stats-grid .stat-number {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 4px;
}

.validation-stats-grid .stat-card.error .stat-number {
  color: #dc2626;
}

.validation-stats-grid .stat-card.warning .stat-number {
  color: #d97706;
}

.validation-stats-grid .stat-card.info .stat-number {
  color: #2563eb;
}

.validation-stats-grid .stat-card.success .stat-number {
  color: #059669;
}

.validation-stats-grid .stat-label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.validation-stats-grid .stat-action {
  margin-top: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #3b82f6;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.validation-stats-grid .stat-card:hover .stat-action {
  opacity: 1;
}

/* Issue List (Paginated) */
.issue-list-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.issue-item {
  background: white;
  border: 1px solid #e5e7eb;
  border-left: 4px solid #e5e7eb;
  border-radius: 8px;
  padding: 14px;
  transition: all 0.2s ease;
}

.issue-item:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.issue-item.error {
  border-left-color: #ef4444;
  background: #fef2f2;
}

.issue-item.warning {
  border-left-color: #f59e0b;
  background: #fffbeb;
}

.issue-item.info {
  border-left-color: #3b82f6;
  background: #eff6ff;
}

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

.issue-severity {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.issue-item.error .issue-severity {
  background: #dc2626;
  color: white;
}

.issue-item.warning .issue-severity {
  background: #d97706;
  color: white;
}

.issue-item.info .issue-severity {
  background: #2563eb;
  color: white;
}

.issue-row {
  font-size: 12px;
  color: #6b7280;
  font-weight: 500;
}

.issue-message {
  font-size: 14px;
  color: #111827;
  margin-bottom: 4px;
  line-height: 1.5;
}

.issue-field {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.no-issues {
  text-align: center;
  padding: 40px;
  font-size: 16px;
  color: #10b981;
  font-weight: 500;
}

/* Empty state for no issues */
.no-issues-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
  background: #f0fdf4;
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}

.no-issues-state i {
  width: 48px;
  height: 48px;
  color: #10b981;
  margin-bottom: 12px;
}

.no-issues-state h4 {
  margin: 0 0 4px 0;
  font-size: 18px;
  font-weight: 600;
  color: #166534;
}

.no-issues-state p {
  margin: 0;
  font-size: 14px;
  color: #15803d;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e5e7eb;
}

.pagination .btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d1d5db;
  background: white;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination .btn-icon:hover:not(:disabled) {
  background: #f3f4f6;
  border-color: #9ca3af;
}

.pagination .btn-icon:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination .page-info {
  font-size: 14px;
  color: #6b7280;
  font-weight: 500;
}

/* Quick Fix Options (Grid Layout) */
.quick-fix-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.fix-option-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  transition: all 0.3s ease;
}

.fix-option-card:hover {
  border-color: #3b82f6;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.fix-option-card .option-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
}

.fix-option-card .option-icon i,
.fix-option-card .option-icon svg {
  width: 32px;
  height: 32px;
  color: #6366F1;
  stroke: #6366F1;
}

.fix-option-card h4 {
  margin: 0 0 8px 0;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
}

.fix-option-card p {
  margin: 0 0 20px 0;
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

.fix-option-card button {
  width: 100%;
}

/* Error Notice Compact */
.error-notice-compact {
  background: #fef3c7;
  border: 1px solid #fbbf24;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 14px;
  color: #92400e;
  text-align: center;
  margin-top: 16px;
}

.error-notice-compact a {
  color: #d97706;
  text-decoration: underline;
  font-weight: 600;
  margin-left: 4px;
}

.error-notice-compact a:hover {
  color: #b45309;
}


/* ============================================
   VALID RECORDS PREVIEW MODAL
   ============================================ */

.valid-records-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.valid-records-modal {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.3s ease;
}

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

.valid-records-modal .modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 28px;
  border-bottom: 2px solid #e5e7eb;
}

.valid-records-modal .modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.valid-records-modal .modal-title svg {
  width: 28px;
  height: 28px;
  color: #10b981;
}

.valid-records-modal .modal-title h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #111827;
}

.valid-records-modal .modal-close {
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.valid-records-modal .modal-close:hover {
  background: #e5e7eb;
  transform: scale(1.05);
}

.valid-records-modal .modal-close svg {
  width: 20px;
  height: 20px;
  color: #6b7280;
}

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

.validation-status-summary {
  display: flex;
  gap: 16px;
  margin-bottom: 24px;
  padding: 16px;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
}

.validation-status-summary .status-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.validation-status-summary .status-item.success svg {
  width: 20px;
  height: 20px;
  color: #10b981;
  flex-shrink: 0;
}

.validation-status-summary .status-item span {
  font-size: 14px;
  color: #065f46;
}

.records-table-container {
  overflow-x: auto;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
}

.records-preview-table {
  width: 100%;
  border-collapse: collapse;
}

.records-preview-table thead {
  background: #f9fafb;
  position: sticky;
  top: 0;
  z-index: 10;
}

.records-preview-table thead th {
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 2px solid #e5e7eb;
}

.records-preview-table tbody tr {
  border-bottom: 1px solid #f3f4f6;
  transition: background 0.15s ease;
}

.records-preview-table tbody tr:hover {
  background: #f9fafb;
}

.records-preview-table tbody td {
  padding: 12px 16px;
  font-size: 13px;
  color: #111827;
}

.records-preview-table tbody td.row-number {
  font-weight: 600;
  color: #6b7280;
  width: 60px;
}

.records-preview-table tbody td.status-cell {
  text-align: center;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.valid {
  background: #d1fae5;
  color: #065f46;
}

.more-records-row {
  background: #f9fafb !important;
}

.more-records-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.more-records-notice svg {
  width: 16px;
  height: 16px;
  color: #3b82f6;
}

.valid-records-modal .modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 20px 28px;
  border-top: 2px solid #e5e7eb;
  background: #f9fafb;
}

.valid-records-modal .modal-footer button {
  display: flex;
  align-items: center;
  gap: 8px;
}

.valid-records-modal .modal-footer button svg {
  width: 18px;
  height: 18px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .validation-status-summary {
    flex-direction: column;
  }
  
  .valid-records-modal {
    max-width: 100%;
    max-height: 100vh;
    border-radius: 0;
  }
  
  .records-preview-table {
    font-size: 12px;
  }
  
  .records-preview-table thead th,
  .records-preview-table tbody td {
    padding: 8px 12px;
  }
}


/* ============================================
   STEP 4: RESOLUTION OPTIONS (4-COLUMN GRID)
   ============================================ */

.resolution-options-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

/* Responsive: 2 columns on tablet */
@media (max-width: 1024px) {
  .resolution-options-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Responsive: 1 column on mobile */
@media (max-width: 640px) {
  .resolution-options-grid {
    grid-template-columns: 1fr;
  }
}

.resolution-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 180px;
}

.resolution-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.resolution-card.auto-fix {
  border-color: #3b82f6;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
}

.resolution-card.manual-fix {
  border-color: #10b981;
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
}

.resolution-card.fix-later {
  border-color: #f59e0b;
  background: linear-gradient(135deg, #fffbeb 0%, #ffffff 100%);
}

.resolution-card.skip {
  border-color: #6b7280;
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
}

.resolution-card .card-icon {
  width: 56px;
  height: 56px;
  background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.resolution-card .card-icon i,
.resolution-card .card-icon svg {
  width: 28px;
  height: 28px;
  color: #6366F1;
  stroke: #6366F1;
}

.resolution-card.auto-fix .card-icon { background: linear-gradient(135deg, #EEF2FF 0%, #E0E7FF 100%); }
.resolution-card.manual-fix .card-icon { background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%); }
.resolution-card.manual-fix .card-icon i,
.resolution-card.manual-fix .card-icon svg { color: #D97706; stroke: #D97706; }
.resolution-card.fix-later .card-icon { background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%); }
.resolution-card.fix-later .card-icon i,
.resolution-card.fix-later .card-icon svg { color: #6B7280; stroke: #6B7280; }
.resolution-card.skip .card-icon { background: linear-gradient(135deg, #FEE2E2 0%, #FECACA 100%); }
.resolution-card.skip .card-icon i,
.resolution-card.skip .card-icon svg { color: #DC2626; stroke: #DC2626; }

.resolution-card h3 {
  margin: 0 0 6px 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.resolution-card p {
  margin: 0 0 12px 0;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
  flex: 1;
}

.resolution-card button {
  width: 100%;
  margin-top: auto;
  padding: 8px 16px;
  font-size: 13px;
}

.resolution-card .fix-results {
  margin-top: 10px;
  padding: 6px 10px;
  background: #d1fae5;
  border-radius: 6px;
  font-size: 11px;
  color: #065f46;
  font-weight: 600;
}

.resolution-card .queue-badge {
  margin-top: 10px;
  padding: 5px 10px;
  background: #fef3c7;
  border-radius: 6px;
  font-size: 11px;
  color: #92400e;
  font-weight: 600;
}

/* Disabled card state */
.resolution-card.disabled {
  opacity: 0.6;
  pointer-events: none;
}

.resolution-card.disabled:hover {
  transform: none;
  box-shadow: none;
}

/* Coming Soon badge */
.coming-soon-badge {
  display: inline-block;
  padding: 2px 6px;
  background: #e5e7eb;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-left: 6px;
  vertical-align: middle;
}

/* All Clear state for Step 4 */
.all-clear-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
  border: 2px solid #86efac;
  border-radius: 16px;
  text-align: center;
  margin-bottom: 24px;
}

.all-clear-state .all-clear-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
}

.all-clear-state .all-clear-icon i {
  width: 40px;
  height: 40px;
  color: white;
}

.all-clear-state h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #166534;
}

.all-clear-state p {
  margin: 0 0 24px 0;
  font-size: 15px;
  color: #15803d;
}

.all-clear-state button {
  padding: 12px 28px;
  font-size: 15px;
}

/* Resolution summary */
.resolution-summary {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding: 16px;
  background: #f9fafb;
  border-radius: 8px;
}

.resolution-summary .summary-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #374151;
}

.resolution-summary .summary-item.success {
  color: #059669;
}

.resolution-summary .summary-item i {
  width: 16px;
  height: 16px;
}

/* Compact Resolution Status */
.resolution-status-compact {
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 20px;
}

.resolution-status-compact .status-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.resolution-status-compact .status-label {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 4px;
}

.resolution-status-compact .status-value {
  font-size: 20px;
  font-weight: 700;
  color: #111827;
}

/* Responsive status bar */
@media (max-width: 640px) {
  .resolution-status-compact {
    flex-direction: column;
    gap: 16px;
  }
}


/* ============================================
   STEP 5: FINAL REVIEW (2x2 GRID)
   ============================================ */

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

/* Responsive: 1 column on tablet/mobile */
@media (max-width: 900px) {
  .review-summary-grid {
    grid-template-columns: 1fr;
  }
}

.summary-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.summary-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.summary-card .card-header {
  background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
  border-bottom: 1px solid #e5e7eb;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.summary-card .card-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.summary-card .card-icon i,
.summary-card .card-icon svg {
  width: 20px;
  height: 20px;
  color: #6366F1;
  stroke: #6366F1;
}

.summary-card .card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: #111827;
}

.summary-card .card-content {
  padding: 16px;
  max-height: 200px;
}

.summary-card .card-content.scrollable {
  max-height: 150px;
  overflow-y: auto;
}

/* Info rows (File Info, Validation Results) */
.info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}

.info-row:last-child {
  border-bottom: none;
}

.info-row.highlight {
  background: #f0fdf4;
  padding: 8px 12px;
  margin: 8px -12px -12px -12px;
  border-bottom: none;
}

.info-row .label {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.info-row .value {
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}

.info-row.highlight .value {
  color: #059669;
  font-size: 16px;
}

/* Mapping rows (Column Mapping) */
.mapping-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.mapping-row:last-child {
  border-bottom: none;
}

.mapping-row .source {
  flex: 1;
  color: #111827;
  font-weight: 500;
}

.mapping-row .arrow {
  color: #9ca3af;
  font-size: 14px;
}

.mapping-row .target {
  flex: 1;
  color: #6b7280;
  text-align: right;
}

/* Option labels (Import Options) */
.option-label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  cursor: pointer;
  transition: background 0.2s ease;
  border-radius: 6px;
  padding: 10px 12px;
  margin: 0 -12px;
}

.option-label:hover {
  background: #f9fafb;
}

.option-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

.option-label span {
  font-size: 13px;
  color: #111827;
}

/* Final Confirmation */
.final-confirmation {
  background: linear-gradient(135deg, #f0fdf4 0%, #ffffff 100%);
  border: 2px solid #10b981;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.confirmation-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.confirmation-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.confirmation-label span {
  font-size: 14px;
  color: #111827;
  font-weight: 600;
}

.btn-large {
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 600;
  min-width: 200px;
}

.btn-large:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Scrollbar styling for column mapping */
.card-content.scrollable::-webkit-scrollbar {
  width: 6px;
}

.card-content.scrollable::-webkit-scrollbar-track {
  background: #f3f4f6;
  border-radius: 3px;
}

.card-content.scrollable::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}

.card-content.scrollable::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}


/* ============================================
   SYSTEM CONTEXT BANNER - Step 2 Top Banner
   ============================================ */

/* System Context Banner - At Top of Step 2 */
.uwi-system-context-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
  border: 1px solid #93C5FD;
  border-radius: 8px;
  margin-bottom: 24px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.1);
}

.uwi-context-icon {
  color: #3B82F6;
  font-size: 28px;
  flex-shrink: 0;
}

.uwi-context-icon i {
  width: 28px;
  height: 28px;
}

.uwi-context-info {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.uwi-context-label {
  color: #1E40AF;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.uwi-system-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: #3B82F6;
  color: white;
  border-radius: 6px;
  font-weight: 600;
  font-size: 15px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
  width: fit-content;
}

.uwi-system-name {
  letter-spacing: 0.3px;
}

.uwi-lock-icon {
  width: 16px;
  height: 16px;
  opacity: 0.9;
}

.uwi-context-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748B;
  font-size: 12px;
  font-style: italic;
  margin-left: auto;
  padding-left: 16px;
  border-left: 1px solid #CBD5E1;
}

.uwi-context-hint i {
  width: 14px;
  height: 14px;
}

/* Context Actions (Change System button) */
.uwi-context-actions {
  margin-left: auto;
  padding-left: 16px;
  border-left: 1px solid #CBD5E1;
}

.uwi-context-actions .btn-text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  background: transparent;
  border: 1px solid #93C5FD;
  border-radius: 6px;
  color: #2563EB;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.uwi-context-actions .btn-text-link:hover {
  background: #DBEAFE;
  border-color: #3B82F6;
  color: #1D4ED8;
}

.uwi-context-actions .btn-text-link i {
  width: 14px;
  height: 14px;
}

/* Responsive */
@media (max-width: 768px) {
  .uwi-system-context-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  
  .uwi-context-hint {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    border-top: 1px solid #CBD5E1;
    padding-top: 12px;
    width: 100%;
  }
  
  .uwi-context-actions {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    padding-top: 12px;
    width: 100%;
  }
  
  .uwi-context-actions .btn-text-link {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================
   Import Success/Error States (5.6)
   ============================================ */

.import-success-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.import-success-state .success-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.3);
  animation: successPulse 0.5s ease-out;
}

@keyframes successPulse {
  0% { transform: scale(0.8); opacity: 0; }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

.import-success-state .success-icon i {
  width: 40px;
  height: 40px;
  color: white;
}

.import-success-state h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #166534;
}

.import-success-state p {
  margin: 0 0 20px 0;
  font-size: 16px;
  color: #15803d;
}

.import-success-state .success-details {
  display: flex;
  gap: 24px;
  color: #6b7280;
  font-size: 14px;
}

.import-success-state .success-details span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.import-success-state .success-details i {
  width: 16px;
  height: 16px;
}

/* Import Error State */
.import-error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.import-error-state .error-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  box-shadow: 0 8px 24px rgba(239, 68, 68, 0.3);
}

.import-error-state .error-icon i {
  width: 40px;
  height: 40px;
  color: white;
}

.import-error-state h3 {
  margin: 0 0 8px 0;
  font-size: 24px;
  font-weight: 700;
  color: #991b1b;
}

.import-error-state p {
  margin: 0 0 24px 0;
  font-size: 16px;
  color: #dc2626;
}

.import-error-state button {
  padding: 12px 24px;
}


/* Pending Fix Tasks Note */
.pending-tasks-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding: 12px 20px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  color: #92400e;
  font-size: 14px;
}

.pending-tasks-note i {
  width: 18px;
  height: 18px;
  color: #f59e0b;
}


/* ========================================
   SYSTEM CONTEXT BADGE (v2.1.0)
   Shows which system the upload is for
   ======================================== */

.upload-system-context {
  margin-bottom: 16px;
}

.system-context-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #93c5fd;
  border-radius: 8px;
  font-size: 14px;
  color: #1e40af;
}

.system-context-badge i {
  width: 18px;
  height: 18px;
  color: #3b82f6;
  flex-shrink: 0;
}

.system-context-label {
  color: #64748b;
  font-weight: 400;
}

.system-context-name {
  font-weight: 600;
  color: #1e40af;
}

.system-context-source {
  color: #64748b;
  font-weight: 400;
  margin-left: 4px;
}


/* ========================================
   AUTO-VALIDATED STEPS (v3.10.0)
   Steps that passed validation automatically
   ======================================== */

/* Clickable completed steps */
.wizard-progress-step.clickable {
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wizard-progress-step.clickable:hover {
  transform: translateY(-2px);
}

.wizard-progress-step.clickable:hover .step-number {
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* Auto-validated step styling */
.wizard-progress-step.auto-validated {
  position: relative;
}

/* Auto-validated badge - hidden by default, shown on hover */
.auto-validated-badge {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 4px;
  padding: 4px 10px;
  background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  border: 1px solid #6ee7b7;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 500;
  color: #047857;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

.wizard-progress-step.auto-validated:hover .auto-validated-badge {
  opacity: 1;
  visibility: visible;
}

/* Subtle indicator on auto-validated steps (always visible) */
.wizard-progress-step.auto-validated .step-number::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  background: #10b981;
  border: 2px solid white;
  border-radius: 50%;
}

.wizard-progress-step.auto-validated .step-number {
  position: relative;
}


/* ========================================
   QUICK UPLOAD MODE (v3.11.0)
   Express mode for power users
   ======================================== */

.quick-upload-option {
  margin: 16px 0;
  padding: 14px 18px;
  background: linear-gradient(135deg, #fefce8 0%, #fef9c3 100%);
  border: 1px solid #fcd34d;
  border-radius: 10px;
  transition: all 0.2s ease;
}

.quick-upload-option:hover {
  border-color: #f59e0b;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.15);
}

.quick-upload-option.no-saved-mapping {
  background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
  border-color: #cbd5e1;
}

.quick-upload-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.quick-upload-checkbox input[type="checkbox"] {
  display: none;
}

.quick-upload-checkbox .checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid #f59e0b;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
  background: white;
  flex-shrink: 0;
}

.quick-upload-option.no-saved-mapping .checkbox-custom {
  border-color: #94a3b8;
  background: #e2e8f0;
}

.quick-upload-checkbox input:checked + .checkbox-custom {
  background: #f59e0b;
  border-color: #f59e0b;
}

.quick-upload-checkbox input:checked + .checkbox-custom::after {
  content: '✓';
  color: white;
  font-size: 14px;
  font-weight: bold;
}

.quick-upload-checkbox input:disabled + .checkbox-custom {
  opacity: 0.5;
  cursor: not-allowed;
}

.quick-upload-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  color: #92400e;
}

.quick-upload-option.no-saved-mapping .quick-upload-label {
  color: #64748b;
}

.quick-upload-label i {
  width: 18px;
  height: 18px;
  color: #f59e0b;
}

.quick-upload-option.no-saved-mapping .quick-upload-label i {
  color: #94a3b8;
}

.quick-upload-description {
  margin-top: 8px;
  padding-left: 30px;
  font-size: 12px;
  color: #78716c;
}

.quick-upload-description .saved-mapping-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #047857;
}

.quick-upload-description .saved-mapping-info i {
  width: 14px;
  height: 14px;
}

.quick-upload-description .no-mapping-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #64748b;
}

.quick-upload-description .no-mapping-info i {
  width: 14px;
  height: 14px;
}

/* Quick Upload Processing State */
.quick-upload-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.quick-upload-processing .processing-animation {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 24px;
}

.quick-upload-processing .zap-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 36px;
  height: 36px;
  color: #f59e0b;
  z-index: 2;
}

.quick-upload-processing .processing-spinner {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid #fef3c7;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.quick-upload-processing h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #1e293b;
}

.quick-upload-processing > p {
  margin: 0 0 24px 0;
  color: #64748b;
  font-size: 14px;
}

.quick-upload-processing .processing-steps {
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
}

.quick-upload-processing .processing-step {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 14px;
  color: #64748b;
}

.quick-upload-processing .processing-step.active {
  background: #ecfdf5;
  color: #047857;
}

.quick-upload-processing .processing-step i {
  width: 18px;
  height: 18px;
}

.quick-upload-processing .processing-step.active i {
  color: #10b981;
}

.quick-upload-processing .spinner-icon {
  animation: spin 1s linear infinite;
  color: #f59e0b;
}

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

/* ================================================
   QUICK IMPORT ANIMATION STYLES
   Express mode: Auto-import for clean data
   ================================================ */

/* Quick Import Animation Container */
.quick-import-animation {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  text-align: center;
}

.quick-import-animation .import-icon-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
}

.quick-import-animation .zap-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  color: #f59e0b;
  animation: zapPulse 0.6s ease-in-out infinite alternate;
}

@keyframes zapPulse {
  0% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.2); opacity: 0.8; }
}

.quick-import-animation .import-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(245, 158, 11, 0.3);
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.quick-import-animation h2 {
  font-size: 24px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 8px 0;
}

.quick-import-animation .import-details {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.quick-import-animation .import-progress-bar {
  width: 300px;
  height: 6px;
  background: rgba(245, 158, 11, 0.2);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 16px;
}

.quick-import-animation .import-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #f59e0b, #fbbf24);
  border-radius: 3px;
  animation: progressFill 0.8s ease-out forwards;
}

@keyframes progressFill {
  0% { width: 0%; }
  100% { width: 100%; }
}

.quick-import-animation .import-status {
  font-size: 13px;
  color: #9ca3af;
  margin: 0;
}

/* Quick Import Success Screen */
.quick-import-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 40px;
  text-align: center;
}

.quick-import-success .success-icon-container {
  position: relative;
  width: 100px;
  height: 100px;
  margin-bottom: 24px;
}

.quick-import-success .success-check {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  color: #10b981;
  animation: successPop 0.4s ease-out;
}

@keyframes successPop {
  0% { transform: translate(-50%, -50%) scale(0); }
  50% { transform: translate(-50%, -50%) scale(1.2); }
  100% { transform: translate(-50%, -50%) scale(1); }
}

.quick-import-success .success-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 3px solid #10b981;
  border-radius: 50%;
  animation: ringExpand 0.5s ease-out;
}

@keyframes ringExpand {
  0% { transform: scale(0.5); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.quick-import-success h2 {
  font-size: 26px;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 6px 0;
}

.quick-import-success .success-system {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
}

.quick-import-success .success-stats {
  display: flex;
  gap: 32px;
  margin-bottom: 32px;
}

.quick-import-success .stat {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.quick-import-success .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.2;
}

.quick-import-success .stat-label {
  font-size: 12px;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.quick-import-success .success-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
}

.quick-import-success .success-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-import-success .success-actions .btn-primary {
  background: #10b981;
  color: white;
  border: none;
}

.quick-import-success .success-actions .btn-primary:hover {
  background: #059669;
}

.quick-import-success .success-actions .btn-secondary {
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
}

.quick-import-success .success-actions .btn-secondary:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.quick-import-success .success-actions .btn i {
  width: 16px;
  height: 16px;
}

.quick-import-success .success-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #9ca3af;
  margin: 0;
}

.quick-import-success .success-note i {
  width: 14px;
  height: 14px;
}
