html, body { height: 100%; margin: 0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; }
#app { height: 100%; display: grid; grid-template-columns: 400px 1fr; }
#map { height: 100%; width: 100%; }

.panel { padding: 14px; border-right: 1px solid #e7e7e7; overflow: auto; background: #fff; }
h1 { margin: 0 0 6px; font-size: 18px; }
h2 { margin: 0 0 8px; font-size: 14px; }
.sub { margin: 0 0 12px; color: #555; font-size: 13px; line-height: 1.35; }

.controls { display: grid; gap: 10px; margin: 10px 0 12px; padding-bottom: 12px; border-bottom: 1px dashed #ddd; }
.controls label { font-size: 13px; color: #222; display: grid; gap: 6px; }
.controls input, .controls select {
  padding: 10px 12px; border: 1px solid #e6e6e6; border-radius: 12px; font-size: 14px; background: #fff;
}
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
button { border: 1px solid #e6e6e6; background: #fff; padding: 10px 12px; border-radius: 12px; cursor: pointer; font-weight: 700; }
button:hover { background: #f6f6f6; }

.status { font-size: 12px; color: #555; padding: 8px 10px; border: 1px solid #eee; border-radius: 12px; background: #fafafa; }

.list { margin-top: 10px; }
.cityList { display: grid; gap: 8px; }
.item { border: 1px solid #eee; border-radius: 12px; padding: 9px 10px; display: grid; grid-template-columns: 1fr auto; gap: 10px; cursor: pointer; background: #fff; }
.item:hover { background: #f7f7f7; }
.item .name { font-weight: 800; font-size: 13px; }
.item .meta { color: #666; font-size: 12px; margin-top: 2px; line-height: 1.25; }
.badge { font-size: 12px; padding: 4px 8px; border-radius: 999px; border: 1px solid #e5e5e5; background: #fafafa; white-space: nowrap; align-self: center; }

.foot { margin-top: 12px; color: #666; font-size: 11px; line-height: 1.35; }

.legend { position: absolute; z-index: 700; bottom: 14px; left: 14px; background: rgba(255,255,255,0.95);
  border: 1px solid #eee; border-radius: 14px; padding: 10px 12px; font-size: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.10); }
.legend .dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; margin-right: 8px; vertical-align: middle; }
.legend .hub { background: #d32f2f; }
.legend .stop { background: #1565c0; }
.legend .tr  { background: #ef6c00; }
.legend .line { width: 16px; height: 0; border-top: 3px solid #1565c0; border-radius: 2px; opacity: 0.7; display: inline-block; margin-right: 8px; vertical-align: middle; }

.leaflet-tooltip.custom-tip {
  background: rgba(20,20,20,0.92);
  color: #fff;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.25);
}
