:root{
  --bg: rgba(255,255,255,.92);
  --border: rgba(0,0,0,.10);
  --shadow: 0 10px 30px rgba(0,0,0,.12);
  --radius: 14px;
}

html, body { height:100%; margin:0; font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial; }

#map{
  height: calc(100vh - 180px);
}

#elevation-div{
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: 180px;
  background: #fff;
  border-top: 1px solid var(--border);
  z-index: 500;
}

/* Panels */
.panel{
  position: fixed;
  background: var(--bg);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  padding: 10px;
  z-index: 1200;
  max-width: calc(100vw - 24px);
}

.panel-top{
  top: 12px;
  right: 12px;
  width: 360px;
}

.panel-bottom{
  left: 12px;
  bottom: 190px;
  width: 320px;
}

.title{
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
}

.muted{
  color: #555;
  font-size: 12px;
  line-height: 1.35;
}

.small{ font-size: 11px; }

.tabs{
  display:flex;
  gap: 8px;
  margin-top: 10px;
}

.tab{
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 600;
}

.tab.active{
  background: #111;
  color: #fff;
  border-color: rgba(0,0,0,.18);
}

.tabBody{
  margin-top: 10px;
  border-top: 1px solid rgba(0,0,0,.08);
  padding-top: 10px;
}

/* inputs/buttons */
input, select, button, textarea{
  width: 100%;
  box-sizing: border-box;
  border-radius: 10px;
  border: 1px solid rgba(0,0,0,.15);
  padding: 9px 10px;
  font-size: 13px;
  outline: none;
  background: white;
}

button{
  border: 0;
  cursor: pointer;
  background: #111;
  color: #fff;
  font-weight: 650;
}

button.secondary{
  background: #f2f2f2;
  color: #111;
  border: 1px solid rgba(0,0,0,.12);
}

button:disabled{
  opacity: .55;
  cursor: not-allowed;
}

.row{
  display:flex;
  gap: 8px;
}

.row button{
  width: 100%;
}

.pill{
  display:inline-block;
  margin-top: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f0f0f0;
  font-size: 12px;
  max-width: 100%;
  overflow:hidden;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.error{
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #ffe9e9;
  border: 1px solid #ffbaba;
  color: #7a0000;
  font-size: 12px;
  white-space: pre-wrap;
}

/* Lists */
.list{
  max-height: 240px;
  overflow: auto;
  margin-top: 8px;
}

.item{
  padding: 8px 10px;
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 12px;
  background: #fff;
  margin-bottom: 8px;
}

.item b{ display:block; }
.item small{ color:#666; }

.item .actions{
  display:flex;
  gap: 8px;
  margin-top: 8px;
}

.item .actions button{
  padding: 8px 10px;
  border-radius: 10px;
  font-size: 12px;
}

/* Leaflet: move zoom to top-right */
.leaflet-top.leaflet-left{
  left: auto !important;
  right: 12px !important;
}

.leaflet-control-zoom{
  margin-top: 12px !important;
  margin-right: 12px !important;
}
