.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 20px;
}

.client-search-wrapper {
  width: 100%;
  max-width: 500px;
}

.client-search-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  padding: 40px;
}

.title {
  font-size: 28px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 8px 0;
  text-align: center;
}

.subtitle {
  font-size: 14px;
  color: #718096;
  margin: 0 0 32px 0;
  text-align: center;
}

.form-group {
  margin-bottom: 24px;
}

.form-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 8px;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  font-size: 16px;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  text-transform: uppercase;
}

.form-input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-hint {
  display: block;
  font-size: 12px;
  color: #a0aec0;
  margin-top: 6px;
}

.form-actions {
  margin-top: 32px;
}

.btn {
  display: block;
  width: 100%;
  padding: 14px 24px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #667eea;
  color: white;
}

.btn-secondary:hover {
  background: #5568d3;
  transform: translateY(-2px);
}

.btn-success {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-success:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(16, 185, 129, 0.3);
}

.btn-outline {
  background: white;
  color: #667eea;
  border: 2px solid #667eea;
  margin-top: 10px;
}

.btn-outline:hover {
  background: #f7fafc;
  transform: translateY(-2px);
}

.quick-links {
  margin-bottom: 24px;
  text-align: center;
}

.audit-link {
  display: inline-block;
  padding: 8px 16px;
  background: #f7fafc;
  color: #667eea;
  text-decoration: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.audit-link:hover {
  background: #edf2f7;
  transform: translateY(-1px);
}

/* Estilos del Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fadeIn 0.3s ease;
  overflow: hidden;
}

.modal-overlay * {
  box-sizing: border-box;
}

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

.modal-container {
  background: white;
  border-radius: 16px;
  max-width: 900px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.3s ease;
}

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

.modal-header {
  padding: 32px 32px 24px;
  text-align: center;
  border-bottom: 2px solid #e2e8f0;
  width: 100%;
  box-sizing: border-box;
}

.modal-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-icon svg {
  width: 32px;
  height: 32px;
}

.modal-icon-success {
  background: #d1fae5;
  color: #059669;
}

.modal-icon-error {
  background: #fee2e2;
  color: #dc2626;
}

.modal-icon-warning {
  background: #fef3c7;
  color: #d97706;
}

.modal-icon-info {
  background: #dbeafe;
  color: #3b82f6;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin: 0;
  word-break: break-word;
  line-height: 1.3;
}

.modal-body {
  padding: 24px 32px;
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}

.error-message {
  background: #fee2e2;
  border-left: 4px solid #dc2626;
  padding: 16px;
  border-radius: 8px;
  color: #991b1b;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: break-word;
}

.info-message {
  background: #dbeafe;
  border-left: 4px solid #3b82f6;
  padding: 16px;
  border-radius: 8px;
  color: #1e40af;
  font-weight: 500;
  word-break: break-word;
  overflow-wrap: break-word;
  margin-bottom: 24px;
  text-align: center;
}

.info-message p {
  margin: 0;
  font-size: 15px;
}

.sync-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
  width: 100%;
}

.summary-item {
  background: #f7fafc;
  padding: 16px;
  border-radius: 12px;
  text-align: center;
  border: 2px solid #e2e8f0;
}

.summary-item-success {
  background: #d1fae5;
  border-color: #6ee7b7;
}

.summary-item-info {
  background: #dbeafe;
  border-color: #93c5fd;
}

.summary-item-error {
  background: #fee2e2;
  border-color: #fca5a5;
}

.summary-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.summary-value {
  font-size: 32px;
  font-weight: 700;
  color: #1e293b;
}

.vehicles-details {
  margin-top: 24px;
  width: 100%;
  overflow-x: hidden;
}

.details-title {
  font-size: 18px;
  font-weight: 700;
  color: #2d3748;
  margin: 0 0 16px 0;
}

.vehicle-card {
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 16px;
  transition: all 0.3s ease;
  overflow: hidden;
  word-wrap: break-word;
}

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

.vehicle-card-updated {
  border-left: 4px solid #10b981;
}

.vehicle-card-no_changes {
  border-left: 4px solid #3b82f6;
}

.vehicle-card-error {
  border-left: 4px solid #ef4444;
}

.vehicle-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
}

.vehicle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
  max-width: 100%;
}

.vehicle-plate {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  word-break: break-word;
}

.vehicle-code {
  font-size: 12px;
  color: #64748b;
  word-break: break-word;
}

.status-badge {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.vehicle-status {
  flex-shrink: 0;
}

.status-updated {
  background: #d1fae5;
  color: #059669;
}

.status-no-changes {
  background: #dbeafe;
  color: #2563eb;
}

.status-error {
  background: #fee2e2;
  color: #dc2626;
}

.vehicle-changes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
  overflow-x: hidden;
}

.changes-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
  word-break: break-word;
}

.change-item {
  margin-bottom: 8px;
  width: 100%;
  overflow-x: hidden;
}

.change-field {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 4px;
  word-break: break-word;
}

.change-values {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  flex-wrap: wrap;
  word-break: break-word;
}

.old-value {
  color: #dc2626;
  text-decoration: line-through;
  background: #fee2e2;
  padding: 2px 8px;
  border-radius: 4px;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.arrow {
  color: #64748b;
  font-weight: bold;
  flex-shrink: 0;
}

.new-value {
  color: #059669;
  background: #d1fae5;
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
  max-width: 100%;
  word-break: break-word;
  overflow-wrap: break-word;
}

.vehicle-error {
  margin-top: 12px;
  padding: 12px;
  background: #fee2e2;
  border-radius: 8px;
  color: #991b1b;
  font-size: 13px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.modal-footer {
  padding: 24px 32px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
}

/* Scrollbar personalizada para el modal */
.modal-container::-webkit-scrollbar {
  width: 8px;
}

.modal-container::-webkit-scrollbar-track {
  background: #f1f5f9;
}

.modal-container::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.modal-container::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Responsive */
@media (max-width: 768px) {
  .modal-container {
    width: 98%;
    margin: 10px;
  }

  .modal-header {
    padding: 24px 16px 16px;
  }

  .modal-body {
    padding: 16px;
  }

  .modal-footer {
    padding: 16px;
  }

  .sync-summary {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .vehicle-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .change-values {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .old-value,
  .new-value {
    max-width: 100%;
    display: block;
  }

  .arrow {
    display: none;
  }

  .vehicle-card {
    padding: 12px;
  }

  .vehicle-plate {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .modal-container {
    width: 100%;
    border-radius: 0;
    max-height: 100vh;
  }

  .sync-summary {
    grid-template-columns: 1fr;
  }

  .modal-body {
    padding: 12px;
  }
}

/* Estilos para los detalles de actualización */
.update-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
  width: 100%;
}

.details-label {
  font-size: 12px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.detail-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.detail-success {
  background: #d1fae5;
  color: #047857;
}

.detail-error {
  background: #fee2e2;
  color: #991b1b;
}

.detail-skipped {
  background: #f1f5f9;
  color: #64748b;
}

.detail-icon {
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.detail-name {
  font-weight: 600;
  flex-shrink: 0;
}

.detail-error-msg,
.detail-skipped-msg {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.9;
  word-break: break-word;
  overflow-wrap: break-word;
}

@media (max-width: 768px) {
  .detail-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }
  
  .detail-error-msg,
  .detail-skipped-msg {
    padding-left: 0;
  }
}

/* Estilos para botones de acción en resultados */
.results-actions {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 2px solid #e2e8f0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.results-actions .btn {
  width: auto;
  min-width: 250px;
  padding: 12px 32px;
  display: inline-block;
}

@media (max-width: 480px) {
  .results-actions .btn {
    width: 100%;
    min-width: auto;
  }
}

