body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  background-color: #0e0e0e;
  color: #f1f1f1;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

header {
  background-color: #1e1e1e;
  padding: 16px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #333;
  margin-left: 60px;
  transition: margin-left 0.3s ease;
  z-index: 1003;
  position: relative;
}

.sidebar.open ~ header {
  margin-left: 250px;
}

header h2 {
  margin: 0;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  color: #f1f1f1;
}

header h2 i {
  margin-right: 10px;
}

.botoes-topo {
  display: flex;
  gap: 10px;
}

.btn-voltar,
.btn-logout {
  border: none;
  padding: 8px 14px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  transition: background-color 0.3s ease;
  color: #fff;
}

.btn-voltar {
  background-color: #555;
}

.btn-voltar:hover {
  background-color: #0288d1;
}

.btn-logout {
  background-color: #d33;
}

.btn-logout:hover {
  background-color: #a22;
}

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 60px;
  height: 100vh;
  background-color: #181818;
  color: white;
  transition: width 0.3s ease;
  z-index: 1004;
  display: flex;
  flex-direction: column;
  border-right: 1px solid #333;
}

.sidebar.open {
  width: 250px;
}

main {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 64px);
  margin-left: 60px;
  transition: margin-left 0.3s ease;
  padding: 20px;
  box-sizing: border-box;
  overflow: hidden;
}

.sidebar.open ~ main {
  margin-left: 250px;
}

.content-favoritos {
  display: flex;
  gap: 20px;
  flex-grow: 1;
  overflow: hidden;
}

.lista-favoritos {
  flex: 1 1 350px;
  overflow-y: auto;
  background-color: #181818;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.fav-item {
  background-color: #222;
  padding: 16px 20px;
  border-radius: 10px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: #f0f0f0;
  margin-bottom: 10px;
}

.fav-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(0,0,0,0.6);
}

.fav-item h3 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 600;
  color: #03a9f4;
}

.fav-item p {
  margin: 4px 0;
  color: #ccc;
}

.fav-buttons {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fav-buttons button,
.fav-buttons a {
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  color: white;
  cursor: pointer;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background-color 0.2s ease;
}

.fav-buttons .btn-rota,
.fav-buttons .btn-centro,
.fav-buttons .btn-detalhes {
  background-color: #3498db;
}

.fav-buttons .btn-rota:hover,
.fav-buttons .btn-centro:hover,
.fav-buttons .btn-detalhes:hover {
  background-color: #2980b9;
}

.fav-buttons .btn-remover {
  background-color: #e74c3c;
}

.fav-buttons .btn-remover:hover {
  background-color: #c0392b;
}

.mapa-favoritos {
  flex: 2 1 600px;
  height: 100%;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
  position: relative;
}

.botoes-mapa {
  position: fixed;
  bottom: 20px;
  left: 80px;
  display: flex;
  gap: 10px;
  z-index: 1005;
}

.botoes-mapa .btn-acao {
  background-color: #03a9f4;
  color: white;
  border-radius: 4px;
  padding: 8px 14px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  transition: background-color 0.3s ease;
}

.botoes-mapa .btn-acao:hover {
  background-color: #0288d1;
}

.leaflet-routing-container {
  background-color: #1a1a1a !important;
  color: #f0f0f0 !important;
  border-left: 1px solid #333;
  font-family: "Segoe UI", sans-serif;
  max-width: 320px !important;
  width: 90%;
  box-shadow: 0 0 15px rgba(0,0,0,0.7);
  border-radius: 10px;
  z-index: 1010;
}

.leaflet-routing-container h2 {
  color: #ffffff;
  font-size: 16px;
  border-bottom: 1px solid #333;
  padding-bottom: 6px;
  margin-bottom: 6px;
}

.leaflet-routing-alt {
  border-top: 1px solid #333;
  padding: 10px;
  background-color: #222;
  color: #f0f0f0;
}

.leaflet-routing-alt:hover {
  background-color: #333;
  color: #fff;
}

.leaflet-routing-alt .leaflet-routing-summary {
  color: #ccc;
}

.leaflet-routing-alt .leaflet-routing-instructions {
  list-style: none;
  padding-left: 0;
}

.leaflet-routing-alt .leaflet-routing-instruction {
  border-bottom: 1px solid #333;
  padding: 6px 8px;
  transition: background-color 0.2s ease;
}

.leaflet-routing-alt .leaflet-routing-instruction:hover {
  background-color: #eee;
  color: #111 !important;
  opacity: 1 !important;
}

.leaflet-routing-instruction:hover span,
.leaflet-routing-instruction:hover .leaflet-routing-icon {
  color: #000 !important;
  opacity: 1 !important;
}

.leaflet-routing-icon {
  filter: brightness(0.8) invert(0.8);
}

.leaflet-popup-content {
  font-family: "Segoe UI", sans-serif;
  background-color: transparent;
  color: #f0f0f0;
  padding: 0;
  margin: 0;
}

.leaflet-popup-content-wrapper {
  background-color: #1e1e1e;
  border-radius: 12px;
  color: #f0f0f0;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

.leaflet-popup-tip {
  background-color: #1e1e1e;
}
