* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body, html {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

#app {
  display: flex;
  height: 100vh;
  flex-direction: column;
}

@media (min-width: 768px) {
  #app {
    flex-direction: row;
  }
}

#sidebar {
  width: 100%;
  height: 40vh;
  background: #f8f9fa;
  border-bottom: 1px solid #ccc;
  display: flex;
  flex-direction: column;
  padding: 12px;
  z-index: 1000;
}

@media (min-width: 768px) {
  #sidebar {
    width: 360px;
    height: 100vh;
    border-bottom: none;
    border-right: 1px solid #ccc;
  }
}

#search {
  width: 100%;
  padding: 10px 12px;
  font-size: 15px;
  border: 1px solid #ced4da;
  border-radius: 6px;
  margin-bottom: 10px;
  outline: none;
}

#routes-list {
  flex: 1;
  overflow-y: auto;
  list-style: none;
}

.route-item {
  padding: 10px;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.15s;
}

.route-item:hover {
  background: #e9ecef;
}

.route-item.active {
  background: #0d6efd;
  color: white;
}

.route-number {
  font-weight: bold;
  margin-right: 6px;
}

#map {
  flex: 1;
  height: 100%;
}
