body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar-brand {
  font-weight: bold;
  font-size: 1.5rem;
}

.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.card.shadow {
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn {
  border-radius: 10px;
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn:hover {
  transform: translateY(-1px);
}

.form-control {
  border-radius: 10px;
  border: 2px solid #e9ecef;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.alert {
  border-radius: 10px;
  border: none;
}

.navbar {
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.text-truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-img-top {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.upload-preview {
  max-height: 400px;
  overflow-y: auto;
}

.file-input {
  position: relative;
  overflow: hidden;
  display: inline-block;
}

.file-input input[type=file] {
  position: absolute;
  left: -9999px;
}

.bg-gradient-primary {
  background: linear-gradient(45deg, #007bff, #0056b3);
}

.bg-gradient-success {
  background: linear-gradient(45deg, #28a745, #1e7e34);
}

.bg-gradient-info {
  background: linear-gradient(45deg, #17a2b8, #117a8b);
}

.batch-container {
  background: rgba(0, 123, 255, 0.05);
  border-color: rgba(0, 123, 255, 0.2) !important;
}

.batch-container h6 {
  color: #0056b3;
}

.copy-link-btn {
  transition: all 0.3s ease;
}

.copy-link-btn:hover {
  transform: translateY(-1px);
}

.btn-group .btn {
  flex: 1;
}

@media (max-width: 768px) {
  .batch-container {
    margin-bottom: 1rem !important;
    padding: 1rem !important;
  }
  
  .btn-group {
    flex-direction: column;
  }
  
  .btn-group .btn {
    margin-bottom: 0.25rem;
  }
}

/* Sync Page Styles */
.sync-container {
  max-width: 1000px;
  margin: 0 auto;
}

.sync-form-card {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border-radius: 15px;
  margin-bottom: 2rem;
}

.date-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 1rem;
  align-items: end;
}

.jobs-grid {
  display: grid;
  gap: 1rem;
}

.job-card {
  background: white;
  border: none;
  border-radius: 15px;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.job-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.job-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.job-status-badge i {
  margin-right: 0.5rem;
}

.status-pending {
  background: linear-gradient(135deg, #e2e3e5, #d1d3d4);
  color: #6c757d;
  border: 1px solid #d1d3d4;
}

.status-running {
  background: linear-gradient(135deg, #cce5ff, #b3d9ff);
  color: #004085;
  border: 1px solid #b3d9ff;
  animation: pulse 2s infinite;
}

.status-completed {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-completed_with_errors {
  background: linear-gradient(135deg, #fff3cd, #ffeaa7);
  color: #856404;
  border: 1px solid #ffeaa7;
}

.status-failed {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.job-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
}

.stat-card {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 10px;
  border: 1px solid #dee2e6;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #007bff, #28a745, #ffc107, #dc3545);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.stat-card:hover::before {
  opacity: 1;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  color: #212529;
  line-height: 1;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 500;
}

.progress-container {
  position: relative;
  background: #e9ecef;
  border-radius: 10px;
  height: 20px;
  overflow: hidden;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 1rem;
}

.progress-fill {
  position: relative;
  height: 100%;
  background: linear-gradient(90deg, #007bff, #0056b3);
  border-radius: 10px;
  transition: width 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
}

.sync-logs {
  background: white;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.logs-header {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  padding: 1rem;
  font-weight: bold;
}

.log-entry {
  display: flex;
  align-items: flex-start;
  padding: 1rem;
  border-bottom: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.log-entry:hover {
  background-color: #f8f9fa;
  transform: translateX(5px);
}

.log-entry:last-child {
  border-bottom: none;
}

.log-success {
  border-left: 4px solid #28a745;
  background: linear-gradient(90deg, rgba(40, 167, 69, 0.05), transparent);
}

.log-failed {
  border-left: 4px solid #dc3545;
  background: linear-gradient(90deg, rgba(220, 53, 69, 0.05), transparent);
}

.log-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.log-status-success {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #c3e6cb;
}

.log-status-failed {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f5c6cb;
}

.config-form-card {
  max-width: 600px;
  margin: 0 auto;
}

.region-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.region-option {
  padding: 0.75rem;
  border: 2px solid #e9ecef;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  background: white;
}

.region-option:hover {
  background-color: #f8f9fa;
  border-color: #86b7fe;
}

.region-option.selected {
  background: linear-gradient(45deg, #007bff, #0056b3);
  color: white;
  border-color: #007bff;
}

.empty-state {
  text-align: center;
  padding: 3rem;
  color: #6c757d;
}

.empty-state i {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Enhanced Job Info Components */
.job-info-row, .job-info-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
}

.job-info-item {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 250px;
  padding: 0.5rem;
  background: rgba(0, 123, 255, 0.05);
  border-radius: 6px;
  border-left: 3px solid #007bff;
}

.job-info-item .info-label {
  font-weight: 600;
  margin-right: 0.5rem;
  color: #495057;
}

.job-info-item .info-value {
  color: #212529;
  font-weight: 500;
}

/* Progress Section Enhancement */
.progress-section {
  background: rgba(0, 123, 255, 0.03);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid rgba(0, 123, 255, 0.1);
}

.progress-text {
  color: white;
  font-weight: bold;
  font-size: 0.75rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Job Duration Styling */
.job-duration {
  display: flex;
  align-items: center;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  background: rgba(108, 117, 125, 0.1);
  border-radius: 20px;
}

/* Stat Card Icon Enhancement */
.stat-icon {
  margin-right: 0.75rem;
  font-size: 1.5rem;
  opacity: 0.8;
}

/* Animation for running status */
@keyframes pulse {
  0% { opacity: 1; }
  50% { opacity: 0.7; }
  100% { opacity: 1; }
}

/* Job Details Page Styling */
.job-header-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.job-info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(0, 123, 255, 0.05);
  border-radius: 10px;
  border-left: 4px solid #007bff;
  transition: all 0.3s ease;
}

.info-item:hover {
  background: rgba(0, 123, 255, 0.08);
  transform: translateY(-2px);
}

.info-icon {
  font-size: 1.5rem;
  color: #007bff;
  margin-right: 1rem;
  min-width: 40px;
  text-align: center;
}

.info-details {
  flex: 1;
}

.info-label {
  font-size: 0.875rem;
  color: #6c757d;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.25rem;
}

.info-value {
  font-size: 1rem;
  color: #212529;
  font-weight: 500;
}

.progress-card {
  background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.logs-card {
  background: white;
  border: none;
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 123, 255, 0.1);
}

.logs-container {
  max-height: 600px;
  overflow-y: auto;
}

.log-icon {
  font-size: 1.25rem;
  margin-right: 1rem;
  margin-top: 0.25rem;
  min-width: 20px;
}

.log-content {
  flex: 1;
}

.log-filename {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.log-details {
  font-size: 0.875rem;
}

.log-detail-item {
  margin-bottom: 0.25rem;
}

.log-detail-label {
  color: #6c757d;
  font-weight: 500;
}

.log-detail-value {
  color: #495057;
  margin-left: 0.5rem;
}

.log-detail-link {
  color: #007bff;
  text-decoration: none;
  margin-left: 0.5rem;
}

.log-detail-link:hover {
  text-decoration: underline;
}

.log-detail-error {
  color: #dc3545;
  margin-left: 0.5rem;
  font-weight: 500;
}

.log-timestamp {
  color: #6c757d;
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

.log-status {
  margin-left: 1rem;
}
