body {
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  background: #F8F9FB;
  padding: 10px;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* ================= Logo ================= */
.logo-empresa {
  position: absolute;
  top: 15px;
  left: 50px;
  height: 30px;
  width: auto;
}

/* ================= Controles ================= */
.controles {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
  padding: 0 5px;
  flex-wrap: wrap;
  gap: 10px;
}

.filtros-container {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filtros {
  display: flex;
  gap: 15px;
  align-items: center;
}

/* Remove os estilos dos botões de filtro que foram removidos */
.botao-filtro {
  display: none;
}

/* ================= Filtro Retorno Hoje ================= */
.filtro-retorno-hoje {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  transition: all 0.2s;
}

.filtro-retorno-hoje:hover {
  background: #F1F3F5;
  border-color: #1E355F;
}

.filtro-retorno-hoje input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1E355F;
}

.filtro-retorno-hoje label {
  font-size: 13px;
  color: #555;
  cursor: pointer;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
  white-space: nowrap;
}

/* ================= Controles de Visualização ================= */
.controles-visualizacao {
  display: flex;
  gap: 5px;
}

.botao-visualizacao {
  padding: 8px 15px;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.botao-visualizacao:hover {
  background: #1E355F;
  color: #FFFFFF;
  border-color: #1E355F;
}

.botao-visualizacao:active {
  transform: scale(0.98);
}

.botao-visualizacao.ativo {
  background: #1E355F;
  color: #FFFFFF;
  border-color: #1E355F;
}

.titulo-pagina {
  font-size: 22px;
  font-weight: bold;
  color: #1E355F;
  margin: 15px 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid #E0E0E0;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  text-align: center;
  width: 100%;
}

/* ================= Viagens ================= */
.container-carrossel {
  position: relative;
  overflow: hidden;
}

.container-viagens {
  display: grid;
  gap: 15px;
  transition: all 0.5s ease;
  /* Layout padrão inicial: 3 colunas */
  grid-template-columns: repeat(3, 1fr);
}

.container-viagens.tres-colunas {
  grid-template-columns: repeat(3, 1fr);
}

.container-viagens.quatro-colunas {
  grid-template-columns: repeat(4, 1fr);
}

.viagem {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 8px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
  position: relative;
  cursor: pointer;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  transition: all 0.3s ease;
}

.viagem:hover {
  /* CORREÇÃO: Removido transform para evitar comportamento estranho com scroll */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  background: #f8f9fa;
}

.destino {
  font-weight: bold;
  color: #2EA7AD;
  border: 1.5px solid #2EA7AD;
  display: inline-block;
  padding: 2px 8px;
  border-radius: 15px;
  font-size: 13px;
  margin-bottom: 5px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.viagem.ida .destino {
  color: #1E355F;
  border-color: #1E355F;
}

/* ================= Topo ================= */
.info-topo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.codigo {
  font-weight: bold;
  font-size: 13px;
  color: #1E355F;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.placa {
  padding: 2px 8px;
  border-radius: 4px;
  margin-left: 6px;
  font-size: 12px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
  border: 1px solid rgba(30, 53, 95, 0.2);
}

/* Placa para viagens de IDA - Fundo verde, texto branco */
.viagem.ida .placa {
  background: #2EA7AD;
  color: #ffffff;
}

/* Placa para viagens de RETORNO - Fundo azul, texto branco */
.viagem.retorno .placa {
  background: #1E355F;
  color: #ffffff;
}

.datas {
  color: #555;
  font-size: 11px;
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.status {
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: bold;
  text-transform: uppercase;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

/* TODAS as viagens de retorno devem mostrar EM RETORNO */
.viagem.retorno .status {
  background: #E9ECF5;
  color: #1E355F;
}

.viagem.ida .status.em-transito {
  background: #E6F4F4;
  color: #2EA7AD;
}

/* ================= Linha de Progresso ================= */
.linha-progresso {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
  margin-bottom: 20px;
}

.ponto {
  text-align: center;
  width: 65px;
}

.ponto .nome {
  font-weight: bold;
  font-size: 12px;
  color: #1E355F;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.ponto .hora {
  font-size: 10px;
  color: #666;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.barra {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  position: relative;
  background: #E0E0E0 !important; /* Fundo cinza para todas as barras */
}

/* CORES DA LINHA DE PROGRESSO */
.barra.ida.progresso-vermelho {
  background: linear-gradient(
    to right,
    #FF5252 0%,
    #FF5252 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.barra.ida.progresso-laranja {
  background: linear-gradient(
    to right,
    #FF9800 0%,
    #FF9800 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.barra.ida.progresso-verde {
  background: linear-gradient(
    to right,
    #4CAF50 0%,
    #4CAF50 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.barra.retorno.progresso-vermelho {
  background: linear-gradient(
    to right,
    #FF5252 0%,
    #FF5252 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.barra.retorno.progresso-laranja {
  background: linear-gradient(
    to right,
    #FF9800 0%,
    #FF9800 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.barra.retorno.progresso-verde {
  background: linear-gradient(
    to right,
    #4CAF50 0%,
    #4CAF50 calc(var(--progresso) - 6px),
    #E0E0E0 calc(var(--progresso) - 6px),
    #E0E0E0 100%
  ) !important;
}

.bolinha-atual {
  position: absolute;
  top: -6px;
  left: var(--progresso);
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid;
  z-index: 2;
}

/* CORES DA BOLINHA BASEADO NO PROGRESSO */
.barra.progresso-vermelho .bolinha-atual {
  border-color: #FF5252 !important;
}

.barra.progresso-laranja .bolinha-atual {
  border-color: #FF9800 !important;
}

.barra.progresso-verde .bolinha-atual {
  border-color: #4CAF50 !important;
}

/* Mantendo as cores específicas por tipo quando não tem classe de progresso */
.barra.ida .bolinha-atual {
  border-color: #1E355F;
}

.barra.retorno .bolinha-atual {
  border-color: #2EA7AD;
}

.ultima-atualizacao {
  position: absolute;
  top: 35px;
  left: var(--progresso);
  transform: translateX(-50%);
  font-size: 11px;
  color: #555;
  white-space: nowrap;
  text-align: center;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

/* Classes para as flechas - ATUALIZADAS PARA NOVAS CORES */
.flechas-1 .bolinha-atual::after {
  content: "→";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: inherit;
}

.flechas-2 .bolinha-atual::after {
  content: "→→";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: inherit;
}

.flechas-3 .bolinha-atual::after {
  content: "→→→";
  position: absolute;
  top: -2px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 8px;
  color: inherit;
}

/* Ajuste para garantir que o popup fique visível */
.viagem {
  position: relative;
  overflow: visible;
}

/* ================= GRÁFICO DE PROGRESSO NO MODAL ================= */
/* CORREÇÃO: Adicionar estilos para cores do gráfico no modal */
.progresso-fill.vermelho {
  background: linear-gradient(90deg, #FF5252 0%, #FF8A80 100%) !important;
}

.progresso-fill.laranja {
  background: linear-gradient(90deg, #FF9800 0%, #FFB74D 100%) !important;
}

.progresso-fill.verde {
  background: linear-gradient(90deg, #4CAF50 0%, #81C784 100%) !important;
}

/* Estilos padrão quando não tem cor definida */
.progresso-fill {
  height: 100%;
  background: linear-gradient(90deg, #1E355F 0%, #2EA7AD 100%);
  border-radius: 10px;
  transition: width 0.5s ease;
  position: relative;
}

/* ================= Pesquisa ================= */
.barra-pesquisa {
  position: relative;
  display: flex;
  align-items: center;
}

.barra-pesquisa input {
  padding: 8px 15px 8px 35px;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  font-size: 13px;
  width: 220px;
  transition: all 0.3s;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  background: #FFFFFF;
  color: #333;
}

.barra-pesquisa input:focus {
  outline: none;
  border-color: #1E355F;
  box-shadow: 0 0 0 2px rgba(30, 53, 95, 0.2);
  width: 250px;
}

.barra-pesquisa input::placeholder {
  color: #888;
}

.barra-pesquisa::before {
  content: "🔍";
  position: absolute;
  left: 12px;
  font-size: 14px;
  color: #777;
  z-index: 1;
}

/* ================= Filtro ================= */
.filtro-retorno-hoje {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: 10px;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  transition: all 0.2s;
}

.filtro-retorno-hoje:hover {
  background: #F1F3F5;
}

.filtro-retorno-hoje input[type="checkbox"] {
  margin: 0;
  width: 16px;
  height: 16px;
  cursor: pointer;
  accent-color: #1E355F;
}

.filtro-retorno-hoje label {
  font-size: 13px;
  color: #555;
  cursor: pointer;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
}

/* ================= Carrossel ================= */
.controles-carrossel {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.botao-carrossel {
  padding: 5px 10px;
  border-radius: 20px;
  border: 1px solid #E0E0E0;
  background: #FFFFFF;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.botao-carrossel:hover {
  background: #1E355F;
  color: #FFFFFF;
  border-color: #1E355F;
}

.botao-carrossel.ativo {
  background: #1E355F;
  color: #FFFFFF;
  border-color: #1E355F;
}

.contador-carrossel {
  font-size: 12px;
  color: #666;
  margin-top: 10px;
  text-align: center;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

/* ================= Modal ================= */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  overflow: auto;
}

.modal-conteudo {
  background-color: #FFFFFF;
  margin: 1% auto; /* REDUZIDO para ganhar espaço vertical */
  padding: 0;
  border-radius: 8px;
  width: 95%; /* AUMENTADO para usar mais espaço */
  max-width: 1200px; /* AUMENTADO o máximo */
  max-height: 98vh; /* AUMENTADO para usar quase toda a tela */
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: modalAparecer 0.3s;
}

@keyframes modalAparecer {
  from {opacity: 0; transform: translateY(-50px);}
  to {opacity: 1; transform: translateY(0);}
}

.modal-cabecalho {
  padding: 15px 20px;
  background: #1E355F;
  color: #FFFFFF;
  border-radius: 8px 8px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}

.modal-cabecalho h2 {
  margin: 0;
  font-size: 18px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.modal-fechar {
  color: #FFFFFF;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

.modal-fechar:hover {
  color: #E0E0E0;
}

.modal-corpo {
  padding: 20px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  flex-grow: 1;
  gap: 20px;
}

/* ================= NOVO LAYOUT 4x4 ================= */
.info-viagem-modal-grid {
  padding: 15px;
  background: #F9F9F9;
  border-radius: 6px;
  border-left: 4px solid #2EA7AD;
}

.info-grid-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.info-grid-item {
  display: flex;
  flex-direction: column;
  padding: 10px;
  background: #FFFFFF;
  border-radius: 4px;
  border: 1px solid #E0E0E0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-label-grid {
  font-weight: bold;
  font-size: 12px;
  color: #1E355F;
  margin-bottom: 5px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.info-value-grid {
  font-size: 13px;
  color: #555;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-weight: 500;
}

/* ================= Mapa ================= */
.mapa-container {
  height: 500px; /* AUMENTADO de 400px para 500px */
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid #E0E0E0;
  margin-bottom: 20px;
}

.mapa-rastro {
  width: 100%;
  height: 100%;
}

/* ================= Timeline ================= */
.timeline-viagem {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 15px;
  background: #F9F9F9;
}

.timeline-viagem h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #1E355F;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.timeline-lista {
  max-height: 200px;
  overflow-y: auto;
}

.timeline-item {
  padding: 8px 10px;
  border-left: 3px solid #2EA7AD;
  margin-bottom: 8px;
  background: #FFFFFF;
  font-size: 13px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  border-radius: 0 4px 4px 0;
  transition: all 0.2s;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-item:hover {
  background: #f0f7ff;
  /* CORREÇÃO: Removido transform para evitar comportamento estranho com scroll */
}

.timeline-item.ida {
  border-left-color: #1E355F;
}

.timeline-item.retorno {
  border-left-color: #2EA7AD;
}

.timeline-header {
  display: flex;
  align-items: center;
  margin-bottom: 5px;
  flex-wrap: wrap;
  gap: 5px;
}

.timeline-hora {
  font-weight: bold;
  color: #1E355F;
  margin-right: 8px;
  font-size: 12px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
}

.timeline-local {
  font-weight: 500;
  color: #555;
}

.timeline-velocidade {
  font-size: 11px;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  color: #555;
}

.timeline-descricao {
  color: #666;
  font-size: 12px;
  line-height: 1.3;
}

.timeline-coordenadas {
  font-size: 10px;
  color: #777;
  margin-top: 3px;
  font-family: monospace;
}

/* ================= Popup Compacto do Mapa ================= */
.popup-compacto {
    min-width: 180px !important;
    max-width: 220px !important;
}

.popup-header-compacto {
    background: linear-gradient(135deg, #1E355F 0%, #2EA7AD 100%);
    color: white;
    padding: 8px 10px;
    margin: -8px -8px 8px -8px;
    border-radius: 6px 6px 0 0;
    text-align: center;
}

.popup-header-compacto h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.popup-content-compacto {
    padding: 0 3px;
}

.popup-item-compacto {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 11px;
}

.popup-item-compacto:last-child {
    border-bottom: none;
}

.popup-label-compacto {
    font-weight: 600;
    color: #1E355F;
    font-size: 10px;
    min-width: 50px;
}

.popup-value-compacto {
    color: #555;
    font-size: 10px;
    text-align: right;
    flex: 1;
    margin-left: 5px;
}

.popup-local-compacto {
    font-weight: 500;
    color: #1E355F;
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 3px;
    margin: 3px 0;
    border-left: 2px solid #2EA7AD;
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}

.popup-velocidade-compacto {
    background: #2EA7AD;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 10px;
}

.popup-ignicao-compacto {
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 10px;
}

.ignicao-ligada {
    background: #28a745;
    color: white;
}

.ignicao-desligada {
    background: #dc3545;
    color: white;
}

/* Ajustes específicos para popups no mapa */
.leaflet-popup-content-wrapper {
    background: #FFFFFF;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #E0E0E0;
    padding: 0;
}

.leaflet-popup-content {
    margin: 8px !important;
    font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
    line-height: 1.3;
    min-width: 180px !important;
    max-width: 220px !important;
}

.leaflet-popup-tip {
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
}

/* Popup específico para posição mais recente */
.popup-recente .popup-header-compacto {
    background: linear-gradient(135deg, #2EA7AD 0%, #1E355F 100%);
}

/* Popup específico para posição mais antiga */
.popup-antiga .popup-header-compacto {
    background: linear-gradient(135deg, #666 0%, #888 100%);
}

/* ⚡ CORREÇÃO: REMOVER COMPLETAMENTE o X de fechar do popup */
.leaflet-popup-close-button {
    display: none !important;
}

/* ================= CORREÇÃO: Prevenir movimento do mapa ao clicar em marcadores ================= */
.leaflet-container {
    /* Garantir que o mapa não se mova acidentalmente */
    touch-action: pan-x pan-y;
}

.leaflet-marker-icon {
    /* Desabilitar arrastar marcadores */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
}

/* ================= Estilos para Mapas em Dispositivos Móveis ================= */
@media (max-width: 768px) {
    .mapa-container {
        height: 400px; /* AUMENTADO em mobile também */
        position: relative;
    }
    
    .mapa-rastro {
        touch-action: pan-x pan-y;
    }
    
    /* Melhorar a experiência de toque nos popups */
    .leaflet-popup-content-wrapper {
        min-width: 160px !important;
        max-width: 200px !important;
    }
    
    .leaflet-popup-tip {
        width: 12px;
        height: 12px;
    }
    
    /* Indicador visual para popups clicáveis em mobile */
    .leaflet-marker-icon {
        cursor: pointer !important;
    }
    
    /* Feedback visual ao tocar nos marcadores */
    .leaflet-marker-icon:active {
        transform: scale(1.1);
        transition: transform 0.1s;
    }
}

/* ================= Estilos para Popup em Mobile ================= */
.leaflet-popup-content {
    pointer-events: auto !important;
}

/* Garantir que popups sejam legíveis em mobile */
@media (max-width: 480px) {
    .popup-compacto {
        min-width: 140px !important;
        max-width: 180px !important;
    }
    
    .popup-header-compacto h4 {
        font-size: 10px;
        padding: 6px 8px;
    }
    
    .popup-item-compacto {
        font-size: 9px;
        padding: 3px 0;
    }
    
    .popup-label-compacto,
    .popup-value-compacto {
        font-size: 8px;
    }
    
    .popup-local-compacto {
        font-size: 9px;
        padding: 2px 4px;
    }
}

/* ================= Melhorias de Acessibilidade para Mapas ================= */
.leaflet-container {
    font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.leaflet-popup-close-button {
    display: none !important;
}

/* Feedback visual melhorado para interações */
.leaflet-marker-icon {
    transition: transform 0.2s ease;
}

.leaflet-marker-icon:hover {
    transform: scale(1.1);
}

/* Prevenir zoom acidental em mobile */
.leaflet-container .leaflet-control-zoom {
    border: 2px solid rgba(0,0,0,0.2);
}

.leaflet-control-zoom a {
    font-size: 18px;
    line-height: 26px;
}

/* ================= Estilos para Popup do Mapa (antigos - mantidos para compatibilidade) */
.leaflet-popup-content-wrapper {
  background: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid #E0E0E0;
}

.leaflet-popup-content {
  margin: 12px 15px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  line-height: 1.4;
  min-width: 220px;
}

.popup-header {
  background: linear-gradient(135deg, #1E355F 0%, #2EA7AD 100%);
  color: white;
  padding: 12px 15px;
  margin: -12px -15px 12px -15px;
  border-radius: 8px 8px 0 0;
  text-align: center;
}

.popup-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.popup-content {
  padding: 0 5px;
}

.popup-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid #f0f0f0;
}

.popup-item:last-child {
  border-bottom: none;
}

.popup-label {
  font-weight: 600;
  color: #1E355F;
  font-size: 12px;
  min-width: 80px;
}

.popup-value {
  color: #555;
  font-size: 12px;
  text-align: right;
  flex: 1;
  margin-left: 10px;
}

.popup-velocidade {
  background: #2EA7AD;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

.popup-local {
  font-weight: 500;
  color: #1E355F;
  background: #f8f9fa;
  padding: 4px 8px;
  border-radius: 4px;
  margin: 5px 0;
  border-left: 3px solid #2EA7AD;
}

.popup-data {
  background: #1E355F;
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-weight: 500;
  font-size: 11px;
  text-align: center;
  margin-top: 8px;
}

/* ================= Responsividade ================= */
@media (max-width: 1200px) {
  .container-viagens.quatro-colunas {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Ajuste do layout 4x4 para telas menores */
  .info-grid-container {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .container-viagens.tres-colunas,
  .container-viagens.quatro-colunas {
    grid-template-columns: repeat(2, 1fr);
  }
  .modal-conteudo {
    width: 98%; /* AUMENTADO em tablets */
    margin: 2% auto;
  }
}

@media (max-width: 768px) {
  .container-viagens,
  .container-viagens.tres-colunas,
  .container-viagens.quatro-colunas {
    grid-template-columns: 1fr;
  }
  .controles {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  .filtros-container {
    width: 100%;
  }
  .filtros {
    width: 100%;
    flex-wrap: wrap;
  }
  .filtro-retorno-hoje {
    margin-left: 0;
    margin-top: 5px;
  }
  .barra-pesquisa {
    width: 100%;
  }
  .barra-pesquisa input {
    width: 100%;
  }
  .barra-pesquisa input:focus {
    width: 100%;
  }
  .logo-empresa {
    position: static;
    display: block;
    margin: 10px auto;
    height: 40px;
  }
  .controles-visualizacao {
    width: 100%;
  }
  .botao-visualizacao {
    width: 100%;
    justify-content: center;
  }
  .leaflet-popup-content {
    min-width: 180px;
  }
  /* Ajustes para popup compacto em mobile */
  .popup-compacto {
    min-width: 160px !important;
    max-width: 180px !important;
  }
  .popup-header-compacto h4 {
    font-size: 11px;
  }
  .popup-item-compacto {
    font-size: 10px;
  }
  .popup-label-compacto,
  .popup-value-compacto {
    font-size: 9px;
  }
  /* Ajustes do modal em mobile */
  .modal-conteudo {
    width: 98%;
    margin: 1% auto;
    max-height: 96vh;
  }
  .mapa-container {
    height: 350px; /* Ajuste para mobile */
  }
  /* Ajuste do layout 4x4 para mobile */
  .info-grid-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .container-viagens,
  .container-viagens.tres-colunas,
  .container-viagens.quatro-colunas {
    grid-template-columns: 1fr;
  }
  .modal-corpo {
    padding: 15px;
  }
  .mapa-container {
    height: 300px;
  }
  .timeline-lista {
    max-height: 150px;
  }
}

/* ================= Tela de Login ================= */
.tela-login {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1E355F 0%, #2EA7AD 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.login-container {
  background: #FFFFFF;
  padding: 40px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-logo {
  margin-bottom: 20px;
}

.login-logo img {
  height: 60px;
  width: auto;
}

.login-container h2 {
  color: #1E355F;
  margin-bottom: 30px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-weight: 600;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  text-align: left;
}

.input-group label {
  font-weight: 500;
  color: #1E355F;
  margin-bottom: 8px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  font-size: 14px;
}

.input-group input {
  padding: 12px 15px;
  border: 2px solid #E0E0E0;
  border-radius: 8px;
  font-size: 14px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  transition: all 0.3s;
}

.input-group input:focus {
  outline: none;
  border-color: #1E355F;
  box-shadow: 0 0 0 3px rgba(30, 53, 95, 0.1);
}

/* Container para senha com olhinho - ESTILO SIMPLES */
.password-container {
  position: relative;
  display: flex;
  align-items: center;
}

.password-container input {
  width: 100%;
  padding-right: 45px;
}

.toggle-password {
  position: absolute;
  right: 15px;
  cursor: pointer;
  user-select: none;
  font-size: 16px;
  opacity: 0.6;
  transition: opacity 0.3s;
  background: none;
  border: none;
  padding: 0;
}

.toggle-password:hover {
  opacity: 1;
}

.botao-login {
  background: #1E355F;
  color: #FFFFFF;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  margin-top: 10px;
}

.botao-login:hover {
  background: #2EA7AD;
  transform: translateY(-2px);
}

.botao-login:active {
  transform: translateY(0);
}

/* Informação do sistema - SEM LINHA */
.sistema-info {
  margin-top: 20px;
  color: #1E355F;
  font-size: 14px;
  font-weight: 500;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.login-mensagem {
  margin-top: 15px;
  padding: 10px;
  border-radius: 6px;
  font-size: 14px;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.login-mensagem.erro {
  background: #FFE6E6;
  color: #D32F2F;
  border: 1px solid #FFCDD2;
}

.login-mensagem.sucesso {
  background: #E8F5E8;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}

/* ================= Estilos para Loading e Erro no Modal ================= */
.loading-modal {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  text-align: center;
}

.spinner {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #1E355F;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin-bottom: 15px;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.erro-carregamento {
  text-align: center;
  padding: 40px;
  color: #d32f2f;
}

.erro-carregamento p {
  margin: 10px 0;
}

.sem-dados {
  text-align: center;
  padding: 20px;
  color: #666;
  font-style: italic;
}

/* ================= Classes removidas (timeline-ordem) ================= */
.timeline-ordem {
  display: none;
}

.timeline-ordem.saida,
.timeline-ordem.ultima,
.timeline-ordem.normal {
  display: none;
}

.timeline-info-horario {
  display: none;
}

/* ================= Estilos para Ignição ================= */
.popup-ignicao {
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

.ignicao-ligada {
  background: #28a745; /* Verde */
  color: white;
}

.ignicao-desligada {
  background: #dc3545; /* Vermelho */
  color: white;
}

.timeline-ignicao {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 3px;
  color: white;
  font-weight: 600;
}

/* ================= Estilos para Viagens Odômetro ================= */
.viagens-odometro-container {
  border: 1px solid #E0E0E0;
  border-radius: 6px;
  padding: 15px;
  background: #F9F9F9;
  margin-bottom: 20px;
}

.viagens-odometro-container h3 {
  margin: 0 0 15px 0;
  font-size: 14px;
  color: #1E355F;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  border-bottom: 2px solid #2EA7AD;
  padding-bottom: 8px;
}

.viagem-odometro {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 4px solid #2EA7AD;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.viagem-odometro:last-child {
  margin-bottom: 0;
}

.viagem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid #f0f0f0;
}

.viagem-numero {
  font-weight: bold;
  color: #1E355F;
  font-size: 13px;
  background: #f0f7ff;
  padding: 4px 8px;
  border-radius: 4px;
}

.viagem-km {
  font-weight: bold;
  color: #2EA7AD;
  font-size: 14px;
  background: #E6F4F4;
  padding: 4px 8px;
  border-radius: 4px;
}

.viagem-detalhes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.viagem-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
}

.viagem-label {
  font-weight: 500;
  color: #555;
  font-size: 12px;
}

.viagem-value {
  font-weight: 600;
  color: #1E355F;
  font-size: 12px;
  text-align: right;
}

/* ================= Estatísticas Viagens ================= */
.estatisticas-viagens {
  background: #FFFFFF;
  border-radius: 6px;
  padding: 15px;
  margin-bottom: 15px;
  border: 1px solid #E0E0E0;
}

.estatisticas-viagens h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: #1E355F;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  text-align: center;
}

.estatisticas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.estatistica-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: center;
}

.estatistica-label {
  font-weight: 500;
  color: #555;
  font-size: 11px;
  margin-bottom: 4px;
  text-align: center;
}

.estatistica-value {
  font-weight: bold;
  color: #2EA7AD;
  font-size: 13px;
}

/* ================= Timeline Odômetro ================= */
.timeline-odometro {
  font-size: 10px;
  color: #777;
  margin-top: 3px;
  font-family: monospace;
  background: #f0f0f0;
  padding: 2px 6px;
  border-radius: 3px;
  display: inline-block;
}

/* ================= Popup Odômetro ================= */
.popup-odometro {
  background: #1E355F;
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 11px;
}

/* ================= Responsividade ================= */
@media (max-width: 768px) {
  .viagem-detalhes {
    grid-template-columns: 1fr;
  }
  
  .estatisticas-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .viagem-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  
  .viagem-km {
    align-self: flex-end;
  }
}

@media (max-width: 480px) {
  .estatisticas-grid {
    grid-template-columns: 1fr;
  }
  
  .viagens-odometro-container {
    padding: 10px;
  }
  
  .viagem-odometro {
    padding: 10px;
  }
}

/* ================= Estilos para Tooltip da Bolinha ================= */
.bolinha-atual.com-tooltip {
    cursor: help;
    position: relative;
}

.bolinha-atual.com-tooltip:hover {
    transform: translateX(-50%) scale(1.3);
    z-index: 5;
}

/* Melhorar o tooltip nativo */
.bolinha-atual[title] {
    position: relative;
}

.bolinha-atual[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
    text-align: center;
    margin-bottom: 5px;
    font-weight: 500;
}

/* Ajuste para viagens de ida */
.viagem.ida .bolinha-atual[title]:hover::after {
    background: rgba(30, 53, 95, 0.95);
}

/* Ajuste para viagens de retorno */
.viagem.retorno .bolinha-atual[title]:hover::after {
    background: rgba(46, 167, 173, 0.95);
}

/* Tooltip responsivo */
@media (max-width: 768px) {
    .bolinha-atual[title]:hover::after {
        font-size: 10px;
        padding: 4px 8px;
    }
}

/* ================= CORREÇÃO: Bolinha sem piscar ================= */
.bolinha-atual {
    position: absolute;
    top: -6px;
    left: var(--progresso);
    transform: translateX(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #FFFFFF;
    border: 3px solid;
    z-index: 2;
    /* REMOVIDA a animação de piscar */
}

.barra.ida .bolinha-atual {
    border-color: #1E355F;
}

.barra.retorno .bolinha-atual {
    border-color: #2EA7AD;
}

/* REMOVIDO o keyframes de piscar */

/* ================= Popup Simplificado da Bolinha ================= */
.popup-bolinha-container {
  position: absolute;
  top: -20px; /* Posiciona acima da bolinha */
  left: calc(var(--progresso) + 8px); /* Posiciona ao lado direito da bolinha */
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 120px;
  pointer-events: auto;
}

.popup-bolinha-simples {
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #E0E0E0;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  overflow: hidden;
  animation: popupAparecer 0.2s ease-out;
}

@keyframes popupAparecer {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.popup-bolinha-simples.ida {
  border-left: 3px solid #1E355F;
}

.popup-bolinha-simples.retorno {
  border-left: 3px solid #2EA7AD;
}

.popup-bolinha-content {
  padding: 8px 10px;
}

.popup-bolinha-local {
  font-weight: 600;
  color: #1E355F;
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}

/* REMOVIDA a seta do popup */

/* ================= Popup Simplificado da Bolinha ================= */
.popup-bolinha-container {
  position: absolute;
  top: -20px; /* Posiciona acima da bolinha */
  left: calc(var(--progresso) + 8px); /* Posiciona ao lado direito da bolinha */
  transform: translateX(-50%);
  z-index: 1000;
  min-width: 120px;
  pointer-events: auto;
}

.popup-bolinha-simples {
  background: #FFFFFF;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  border: 1px solid #E0E0E0;
  font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
  overflow: hidden;
  animation: popupAparecer 0.2s ease-out;
}

@keyframes popupAparecer {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.popup-bolinha-simples.ida {
  border-left: 3px solid #1E355F;
}

.popup-bolinha-simples.retorno {
  border-left: 3px solid #2EA7AD;
}

.popup-bolinha-content {
  padding: 8px 10px;
}

.popup-bolinha-local {
  font-weight: 600;
  color: #1E355F;
  font-size: 11px;
  text-align: center;
  line-height: 1.2;
}

/* REMOVIDA a seta do popup */

/* Ajuste da bolinha para melhor interação */
.bolinha-atual {
  cursor: pointer;
  position: relative;
  z-index: 10;
}

/* Garantir que o popup não quebre o layout */
.linha-progresso {
  position: relative;
}

.barra {
  position: relative;
}

/* Ajuste para garantir que o popup fique visível */
.viagem {
  position: relative;
  overflow: visible;
}

.container-viagens {
  position: relative;
}

/* Responsividade para popups */
@media (max-width: 768px) {
  .popup-bolinha-container {
    min-width: 100px;
    left: calc(var(--progresso) + 6px);
  }
  
  .popup-bolinha-local {
    font-size: 10px;
  }
  
  .popup-bolinha-content {
    padding: 6px 8px;
  }
}

@media (max-width: 480px) {
  .popup-bolinha-container {
    min-width: 90px;
    left: calc(var(--progresso) + 4px);
  }
  
  .popup-bolinha-content {
    padding: 5px 7px;
  }
  
  .popup-bolinha-local {
    font-size: 9px;
  }
}

/* ================= Estilos para Google Maps ================= */
.popup-google-maps {
    font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
    padding: 10px;
    max-width: 300px;
}

.popup-google-maps h4 {
    margin: 0 0 8px 0;
    color: #1E355F;
    font-size: 14px;
    border-bottom: 2px solid #2EA7AD;
    padding-bottom: 5px;
}

.popup-google-maps p {
    margin: 4px 0;
    font-size: 12px;
    line-height: 1.4;
}

.popup-google-maps strong {
    color: #1E355F;
}

.popup-google-maps small {
    color: #666;
}

.popup-google-maps hr {
    border: none;
    border-top: 1px solid #E0E0E0;
    margin: 8px 0;
}

.controles-mapa {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.controles-mapa button {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
}

.controles-mapa button span {
    font-size: 14px;
}

/* Ajuste para popups do Google Maps */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    border-radius: 8px !important;
}

.gm-style .gm-style-iw-t::after {
    background: #1E355F !important;
}

/* Ajuste responsivo para o mapa */
@media (max-width: 768px) {
    .mapa-container-grande {
        height: 400px !important;
    }
    
    .controles-mapa {
        flex-direction: column;
    }
    
    .controles-mapa button {
        width: 100%;
        justify-content: center;
    }
}

/* ================= Estilos Google Maps ================= */
.google-maps-container {
    height: 500px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #E0E0E0;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* InfoWindow personalizado */
.popup-google {
    min-width: 180px;
    max-width: 250px;
    font-family: 'Maven Pro', 'Segoe UI', Arial, sans-serif;
}

.popup-header-google {
    background: linear-gradient(135deg, #1E355F 0%, #2EA7AD 100%);
    color: white;
    padding: 8px 12px;
    margin: -8px -8px 8px -8px;
    border-radius: 6px 6px 0 0;
    text-align: center;
}

.popup-header-google h4 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.popup-content-google {
    padding: 5px;
}

.popup-local-google {
    font-weight: 500;
    color: #1E355F;
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    margin: 5px 0;
    border-left: 3px solid #2EA7AD;
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
}

.popup-item-google {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 11px;
}

.popup-item-google:last-child {
    border-bottom: none;
}

.popup-label-google {
    font-weight: 600;
    color: #1E355F;
    font-size: 10px;
    min-width: 60px;
}

.popup-value-google {
    color: #555;
    font-size: 10px;
    text-align: right;
    flex: 1;
    margin-left: 5px;
}

.popup-velocidade-google {
    background: #2EA7AD;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 10px;
}

.popup-ignicao-google {
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 10px;
}

/* Popup para posição atual */
.popup-google.atual .popup-header-google {
    background: linear-gradient(135deg, #2EA7AD 0%, #1E355F 100%);
}

/* Popup para posição antiga */
.popup-google.antiga .popup-header-google {
    background: linear-gradient(135deg, #666 0%, #888 100%);
}

/* ================= Informações de Tempo e Distância ================= */
.info-tempo-distancia {
    background: #FFFFFF;
    border-radius: 6px;
    padding: 15px;
    border: 1px solid #E0E0E0;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-tempo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
}

.tempo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 3px solid #2EA7AD;
    transition: all 0.3s ease;
}

.tempo-item:hover {
    background: #f0f7ff;
    transform: translateY(-2px);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.tempo-label {
    font-weight: 600;
    color: #1E355F;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tempo-value {
    font-weight: 500;
    color: #555;
    font-size: 12px;
    text-align: right;
}

.tempo-value.ignicao-ligada {
    color: #28a745;
    font-weight: 600;
}

.tempo-value.ignicao-desligada {
    color: #dc3545;
    font-weight: 600;
}

.tempo-value.status-proximo {
    color: #28a745;
    font-weight: 600;
    background: #d4edda;
    padding: 2px 8px;
    border-radius: 12px;
}

.tempo-value.status-parado {
    color: #dc3545;
    font-weight: 600;
    background: #f8d7da;
    padding: 2px 8px;
    border-radius: 12px;
}

.tempo-value.status-movimento {
    color: #007bff;
    font-weight: 600;
    background: #d1ecf1;
    padding: 2px 8px;
    border-radius: 12px;
}

/* ================= Estilos para Erros ================= */
.erro-mapa {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 40px;
    text-align: center;
    background: #f8f9fa;
    border-radius: 6px;
}

.erro-mapa p {
    margin-bottom: 15px;
    color: #dc3545;
    font-weight: 500;
}

/* ================= Responsividade ================= */
@media (max-width: 768px) {
    .google-maps-container {
        height: 400px;
    }
    
    .info-tempo-grid {
        grid-template-columns: 1fr;
    }
    
    .tempo-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .tempo-value {
        align-self: flex-end;
    }
    
    .popup-google {
        min-width: 150px;
        max-width: 200px;
    }
}

@media (max-width: 480px) {
    .google-maps-container {
        height: 350px;
    }
    
    .popup-header-google h4 {
        font-size: 10px;
    }
    
    .popup-item-google {
        font-size: 10px;
    }
    
    .popup-label-google,
    .popup-value-google {
        font-size: 9px;
    }
}

/* Adicionar no styles.css - Melhorias para as informações */
.info-tempo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.tempo-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 6px;
    border-left: 4px solid #2EA7AD;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.tempo-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.tempo-label {
    font-weight: 600;
    color: #1E355F;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tempo-value {
    font-weight: 600;
    color: #2EA7AD;
    font-size: 13px;
    text-align: right;
    background: #f0f7ff;
    padding: 4px 10px;
    border-radius: 15px;
    min-width: 100px;
}

/* Estilos específicos para status */
.tempo-value.status-proximo {
    background: #d4edda;
    color: #155724;
}

.tempo-value.status-parado {
    background: #f8d7da;
    color: #721c24;
}

.tempo-value.status-movimento {
    background: #d1ecf1;
    color: #0c5460;
}

.tempo-value.ignicao-ligada {
    background: #d4edda;
    color: #155724;
}

.tempo-value.ignicao-desligada {
    background: #f8d7da;
    color: #721c24;
}

/* Destaque para previsão de chegada */
#previsaoChegada {
    font-weight: 700;
    background: linear-gradient(135deg, #2EA7AD 0%, #1E355F 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
}

/* Melhorar exibição da distância */
#distanciaRestante {
    font-weight: 700;
    background: #1E355F;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
}

/* ================= LAYOUT ULTRA SIMPLIFICADO ================= */
.linha-unica {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}

/* Primeira linha: 6 itens */
.info-viagem-superior.linha-unica {
    background: linear-gradient(135deg, #1E355F 0%, #2EA7AD 100%);
    border-radius: 8px;
    padding: 15px;
    color: white;
}

.info-viagem-superior.linha-unica .info-item-principal {
    flex: 1;
    min-width: 120px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    text-align: center;
}

.info-viagem-superior.linha-unica .info-label-principal {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 4px;
    display: block;
}

.info-viagem-superior.linha-unica .info-value-principal {
    font-size: 12px;
    font-weight: 500;
    color: white;
    display: block;
}

/* Segunda linha: 5 itens em uma linha */
.info-tempo-distancia.linha-unica {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #E0E0E0;
}

.info-tempo-grid-5 {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    margin-bottom: 10px;
}

.info-tempo-grid-5 .tempo-item {
    flex: 1;
    min-width: 120px;
    display: flex;
    flex-direction: column;
    padding: 8px 10px;
    background: white;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.info-tempo-grid-5 .tempo-label {
    font-size: 11px;
    font-weight: 600;
    color: #1E355F;
    margin-bottom: 4px;
}

.info-tempo-grid-5 .tempo-value {
    font-size: 12px;
    font-weight: 500;
    color: #555;
    text-align: center;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Linha inferior: Status, Progresso e Previsão */
.info-status-linha {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    background: white;
    padding: 10px;
    border-radius: 6px;
    border: 1px solid #E0E0E0;
}

.status-item {
    flex: 1;
    min-width: 150px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.status-label {
    font-size: 12px;
    font-weight: 600;
    color: #1E355F;
}

.status-value {
    font-size: 13px;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 15px;
    text-align: center;
    min-width: 80px;
}

/* ================= ESTILOS ESPECÍFICOS ================= */
/* Para os 5 itens da segunda linha */
.tempo-value.destaque-local {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.tempo-value.destaque-distancia {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.tempo-value.destaque-tempo {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ffe0b2;
}

.tempo-value.status-movimento {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

/* Para os 3 itens da linha inferior */
.status-value.status-movimento {
    background: #e3f2fd;
    color: #1976d2;
    border: 1px solid #bbdefb;
}

.status-value.status-proximo {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    font-weight: 600;
}

.status-value.status-parado {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

.status-value.status-lento {
    background: #fff3e0;
    color: #ef6c00;
    border: 1px solid #ffe0b2;
}

.status-value.destaque-progresso {
    background: linear-gradient(90deg, #2EA7AD 0%, #1E355F 100%);
    color: white;
    font-weight: 700;
    min-width: 60px;
}

.status-value.destaque-chegada {
    background: linear-gradient(90deg, #4CAF50 0%, #2E7D32 100%);
    color: white;
    font-weight: 600;
    min-width: 100px;
}

/* Para ignição */
.tempo-value.ignicao-ligada {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

.tempo-value.ignicao-desligada {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ffcdd2;
}

/* ================= RESPONSIVIDADE ================= */
@media (max-width: 1200px) {
    .info-tempo-grid-5 .tempo-item {
        min-width: 110px;
    }
    
    .status-item {
        min-width: 140px;
    }
}

@media (max-width: 992px) {
    .info-viagem-superior.linha-unica .info-item-principal {
        min-width: 100px;
    }
    
    .info-tempo-grid-5 .tempo-item {
        min-width: 100px;
    }
    
    .status-item {
        min-width: 130px;
    }
}

@media (max-width: 768px) {
    .linha-unica {
        flex-direction: column;
    }
    
    .info-viagem-superior.linha-unica .info-item-principal {
        width: 100%;
        min-width: auto;
    }
    
    .info-tempo-grid-5 {
        flex-direction: column;
    }
    
    .info-tempo-grid-5 .tempo-item {
        width: 100%;
        min-width: auto;
    }
    
    .info-status-linha {
        flex-direction: column;
    }
    
    .status-item {
        width: 100%;
        min-width: auto;
    }
}

/* ================= ESTILOS GERAIS MANTIDOS ================= */
.placa-destaque {
    background: #FFD700;
    color: #1E355F !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.destino-destaque {
    background: #2EA7AD;
    color: white !important;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.tempo-restante {
    background: linear-gradient(135deg, #2EA7AD 0%, #1E355F 100%);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    display: inline-block;
    margin-left: 8px;
}

.info-adicional {
    margin-top: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
}

/* ================= PREVISÃO NA TELA INICIAL ================= */
.previsao-viagem {
    margin-top: 8px;
    padding: 8px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #2EA7AD;
    font-size: 12px;
    width: 100%;
}

.previsao-carregando {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 4px;
}

.previsao-conteudo {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.previsao-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.previsao-label {
    font-size: 14px;
    color: #1E355F;
    min-width: 20px;
}

.previsao-value {
    color: #555;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Ajuste para viagens de retorno */
.viagem.retorno .previsao-viagem {
    border-left-color: #1E355F;
}

.viagem.retorno .previsao-label {
    color: #2EA7AD;
}

/* Tooltip para previsão */
.previsao-viagem:hover {
    position: relative;
    z-index: 100;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: help;
}

/* ================= RESPONSIVIDADE PARA PREVISÃO ================= */
@media (max-width: 1200px) {
    .previsao-conteudo {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 900px) {
    .previsao-conteudo {
        grid-template-columns: 1fr;
    }
    
    .previsao-item {
        justify-content: flex-start;
    }
}

@media (max-width: 768px) {
    .previsao-viagem {
        font-size: 11px;
        padding: 6px 8px;
    }
    
    .previsao-label {
        font-size: 12px;
    }
}

/* ================= Progresso Real ================= */
.destaque-progresso {
    background: linear-gradient(135deg, #4CAF50 0%, #2E7D32 100%) !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 6px 12px !important;
    border-radius: 20px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2) !important;
}

/* ================= Barra de Progresso Aprimorada ================= */
.barra {
    position: relative;
    overflow: visible;
}



/* ================= Estilos para Previsão Real ================= */
.previsao-real {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-left: 4px solid #2EA7AD !important;
    border: 1px solid #dee2e6 !important;
}

.previsao-item.distancia-total {
    background: #1E355F;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}

.previsao-item.distancia-percorrida {
    background: #28a745;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 11px;
}


 
