/* Reset e configurações básicas */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  background: white;
  min-height: 100vh;
}

/* Header */
.header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 1rem;
  text-align: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.header i {
  margin-right: 0.5rem;
}

/* Painel de Controles */
.controls-panel {
  padding: 1rem;
  background: white;
  border-bottom: 1px solid #e1e5e9;
}

.address-inputs {
  margin-bottom: 1rem;
}

.input-group {
  margin-bottom: 1rem;
}

.input-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: #2d3748;
}

.input-wrapper {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.input-wrapper input {
  flex: 1;
  padding: 0.75rem;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

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

.btn-geolocate {
  background: #48bb78;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-geolocate:hover {
  background: #38a169;
}

.destinations h3 {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  color: #2d3748;
}

.destino-item {
  margin-bottom: 0.75rem;
}

.btn-remove {
  background: #f56565;
  color: white;
  border: none;
  padding: 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.btn-remove:hover {
  background: #e53e3e;
}

.btn-add {
  background: #4299e1;
  color: white;
  border: none;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: background-color 0.3s ease;
  width: 100%;
}

.btn-add:hover {
  background: #3182ce;
}

.action-buttons {
  display: flex;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-primary, .btn-secondary {
  flex: 1;
  padding: 0.875rem;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

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

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

.btn-secondary {
  background: #e2e8f0;
  color: #4a5568;
}

.btn-secondary:hover {
  background: #cbd5e0;
}

/* Mapa */
.map-container {
  position: relative;
  height: 300px;
  margin: 1rem;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#map {
  height: 100%;
  width: 100%;
}

.map-overlay {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

.route-info {
  background: rgba(255, 255, 255, 0.95);
  padding: 0.75rem;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(10px);
}

.info-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
}

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

.info-item i {
  color: #667eea;
}

/* Lista de Entregas */
.deliveries-panel {
  padding: 1rem;
  background: white;
}

.deliveries-panel h3 {
  font-size: 1.2rem;
  margin-bottom: 1rem;
  color: #2d3748;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.deliveries-list {
  max-height: 300px;
  overflow-y: auto;
}

.empty-state {
  text-align: center;
  padding: 2rem;
  color: #a0aec0;
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 1rem;
  display: block;
}

.delivery-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 0.5rem;
  background: #f7fafc;
  transition: all 0.3s ease;
}

.delivery-item:hover {
  background: #edf2f7;
  border-color: #cbd5e0;
}

.delivery-item.completed {
  background: #f0fff4;
  border-color: #9ae6b4;
  opacity: 0.7;
}

.delivery-item.completed .delivery-text {
  text-decoration: line-through;
  color: #38a169;
}

.delivery-number {
  background: #667eea;
  color: white;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.delivery-text {
  flex: 1;
  font-size: 0.9rem;
}

.delivery-checkbox {
  width: 18px;
  height: 18px;
  accent-color: #48bb78;
}

/* Loading Overlay */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loading-content {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.loading-content i {
  font-size: 2rem;
  color: #667eea;
  margin-bottom: 1rem;
}

.loading-content p {
  color: #4a5568;
  font-weight: 500;
}

/* Responsividade */
@media (max-width: 768px) {
  .header h1 {
    font-size: 1.3rem;
  }
  
  .controls-panel {
    padding: 0.75rem;
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .map-container {
    margin: 0.75rem;
    height: 250px;
  }
  
  .deliveries-panel {
    padding: 0.75rem;
  }
  
  .deliveries-list {
    max-height: 250px;
  }
}

@media (max-width: 480px) {
  .input-wrapper {
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .btn-geolocate, .btn-remove {
    width: 100%;
  }
  
  .map-container {
    height: 200px;
  }
  
  .route-info {
    position: static;
    margin: 0.5rem;
  }
}

/* Animações */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.delivery-item {
  animation: fadeIn 0.3s ease;
}

/* Scrollbar personalizada */
.deliveries-list::-webkit-scrollbar {
  width: 6px;
}

.deliveries-list::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

.deliveries-list::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

.deliveries-list::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}
  