/* Data Migrations Styles */

.data-migration-page {
  background-color: #f8f9fa;
  min-height: 100vh;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2rem;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-bottom: 1px solid #dee2e6;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.page-header h1 {
  margin: 0;
  font-size: 2rem;
  font-weight: 600;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.content-container {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  margin: 2rem;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
}

.content-main {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.content-card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.07);
  padding: 2rem;
  border: 1px solid #e9ecef;
  transition: box-shadow 0.3s ease;
}

.content-card:hover {
  box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.card-title {
  margin: 0 0 1.5rem 0;
  font-size: 1.25rem;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.card-title::before {
  content: '';
  width: 4px;
  height: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
}

.info-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
  border-bottom: 1px solid #f1f3f4;
}

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

.info-label {
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
}

.info-value {
  color: #6c757d;
  font-weight: 500;
}

.status-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.status-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: currentColor;
}

.status-badge.pending {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-badge.processing {
  background-color: #cce5ff;
  color: #004085;
  border: 1px solid #74b9ff;
  animation: pulse 2s infinite;
}

.status-badge.completed {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #00b894;
}

.status-badge.failed {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #e17055;
}

@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

.progress-section {
  margin-top: 1.5rem;
}

.progress-label {
  font-weight: 600;
  color: #495057;
  margin-bottom: 0.5rem;
  display: block;
}

.progress-bar-container {
  width: 100%;
  height: 16px;
  background-color: #e9ecef;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 0.5rem;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
  height: 100%;
  transition: width 0.6s ease;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  background-image: linear-gradient(
    -45deg,
    rgba(255, 255, 255, .2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, .2) 50%,
    rgba(255, 255, 255, .2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 50px 50px;
  animation: move 2s linear infinite;
}

@keyframes move {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

.progress-fill.success {
  background: linear-gradient(90deg, #00b894, #00cec9);
}

.progress-fill.warning {
  background: linear-gradient(90deg, #fdcb6e, #e17055);
}

.progress-text {
  font-size: 0.9rem;
  color: #6c757d;
  text-align: center;
  font-weight: 500;
}

.error-section {
  background: linear-gradient(135deg, #ff7675, #fd79a8);
  color: white;
  padding: 1.5rem;
  border-radius: 8px;
  margin: 1rem 0;
}

.error-section h5 {
  color: white;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.error-list li {
  margin-bottom: 0.75rem;
  padding: 0.5rem;
  background: rgba(255,255,255,0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.error-list li:last-child {
  margin-bottom: 0;
}

.affected-items-table {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.table-responsive {
  overflow-x: auto;
}

.table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.table th,
.table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #f1f3f4;
}

.table th {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  font-weight: 600;
  color: #495057;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.table tbody tr {
  transition: background-color 0.2s ease;
}

.table tbody tr:hover {
  background-color: #f8f9fa;
}

.table tbody tr:nth-child(even) {
  background-color: #fdfdfe;
}

.sidebar-card {
  background: white;
  border: 1px solid #e9ecef;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

.sidebar-card h6 {
  margin: 0 0 1rem 0;
  font-weight: 600;
  color: #2c3e50;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sidebar-card h6::before {
  content: '';
  width: 3px;
  height: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 2px;
}

.file-info {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.file-info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f1f3f4;
}

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

.file-info-label {
  font-weight: 600;
  color: #495057;
}

.file-info-value {
  color: #6c757d;
  font-weight: 500;
}

.btn {
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: all 0.3s ease;
  gap: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-success {
  background: linear-gradient(135deg, #00b894, #00cec9);
  color: white;
  border-color: #00b894;
}

.btn-success:hover {
  background: linear-gradient(135deg, #00a085, #00b7b8);
  color: white;
}

.btn-outline-primary {
  color: #667eea;
  border-color: #667eea;
  background-color: transparent;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: white;
  border-color: #667eea;
}

.btn-outline-secondary {
  color: #6c757d;
  border-color: #6c757d;
  background-color: transparent;
}

.btn-outline-secondary:hover {
  background-color: #6c757d;
  color: white;
}

.btn-outline-danger {
  color: #e17055;
  border-color: #e17055;
  background-color: transparent;
}

.btn-outline-danger:hover {
  background: linear-gradient(135deg, #e17055, #ff7675);
  color: white;
  border-color: #e17055;
}

.btn-outline-info {
  color: #74b9ff;
  border-color: #74b9ff;
  background-color: transparent;
}

.btn-outline-info:hover {
  background: linear-gradient(135deg, #74b9ff, #0984e3);
  color: white;
  border-color: #74b9ff;
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
}

.actions-grid {
  display: grid;
  gap: 0.75rem;
}

.text-muted {
  color: #6c757d !important;
}

.text-success {
  color: #00b894 !important;
  font-weight: 600;
}

.text-danger {
  color: #e17055 !important;
  font-weight: 600;
}

.badge {
  padding: 0.35rem 0.65rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.bg-success {
  background: linear-gradient(135deg, #00b894, #00cec9) !important;
  color: white;
}

.bg-warning {
  background: linear-gradient(135deg, #fdcb6e, #e17055) !important;
  color: white;
}

.bg-danger {
  background: linear-gradient(135deg, #e17055, #ff7675) !important;
  color: white;
}

.bg-secondary {
  background: linear-gradient(135deg, #636e72, #2d3436) !important;
  color: white;
}

.bg-info {
  background: linear-gradient(135deg, #74b9ff, #0984e3) !important;
  color: white;
}

.bg-primary {
  background: linear-gradient(135deg, #667eea, #764ba2) !important;
  color: white;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .content-container {
    margin: 1rem;
  }
}

@media (max-width: 768px) {
  .content-container {
    grid-template-columns: 1fr;
    margin: 1rem;
    gap: 1rem;
  }

  .info-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .header-actions {
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 1rem;
    text-align: center;
  }

  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .page-header {
    padding: 1rem;
  }

  .content-card {
    padding: 1rem;
  }

  .sidebar-card {
    padding: 1rem;
  }

  .table th,
  .table td {
    padding: 0.5rem;
    font-size: 0.8rem;
  }
}

/* Loading Animation */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255,255,255,.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s ease-in-out infinite;
}

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

/* Success Animation */
.success-checkmark {
  display: inline-block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #00b894;
  position: relative;
}

.success-checkmark::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* Changes Summary Styles */
.changes-summary {
  font-size: 0.8rem;
}

.change-item {
  margin-bottom: 0.25rem;
  padding: 0.25rem 0.5rem;
  background: rgba(0,0,0,0.02);
  border-radius: 4px;
  border-left: 3px solid #74b9ff;
}

.change-item:last-child {
  margin-bottom: 0;
}

.change-from {
  color: #e17055;
  font-weight: 500;
  text-decoration: line-through;
}

.change-to {
  color: #00b894;
  font-weight: 600;
}

.change-item .fas.fa-arrow-right {
  color: #6c757d;
  margin: 0 0.25rem;
  font-size: 0.7rem;
}

/* Content Sidebar Responsive */
.content-sidebar {
  position: sticky;
  top: 2rem;
  height: fit-content;
}

/* Enhanced Table Styles */
.affected-items-table .table tbody tr:hover {
  background: linear-gradient(90deg, rgba(102, 126, 234, 0.05), rgba(118, 75, 162, 0.05));
  transform: translateX(2px);
  transition: all 0.2s ease;
}

/* Icon Enhancements */
.fas {
  margin-right: 0.25rem;
}

.header-actions .fas {
  margin-right: 0.5rem;
}

/* Loading State Enhancements */
.status-badge.processing {
  position: relative;
  overflow: hidden;
}

.status-badge.processing::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% { left: -100%; }
  100% { left: 100%; }
}

/* Enhanced Button Hover Effects */
.btn:hover .fas {
  transform: scale(1.1);
  transition: transform 0.2s ease;
}

.btn-success:hover .fas {
  animation: bounce 0.6s ease;
}

@keyframes bounce {
  0%, 20%, 60%, 100% { transform: translateY(0) scale(1.1); }
  40% { transform: translateY(-3px) scale(1.1); }
  80% { transform: translateY(-1px) scale(1.1); }
}

/* Error Section Enhancements */
.error-section {
  position: relative;
  overflow: hidden;
}

.error-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff7675, #fd79a8, #e84393);
  animation: errorPulse 3s ease-in-out infinite;
}

@keyframes errorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

/* Accessibility Improvements */
.btn:focus,
.status-badge:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  .header-actions,
  .sidebar-card,
  .btn {
    display: none !important;
  }

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

  .page-header {
    background: white !important;
    color: black !important;
    box-shadow: none !important;
  }

  .content-card {
    box-shadow: none !important;
    border: 1px solid #ddd !important;
  }
}