
:root{
  --glass-bg: rgba(255,255,255,.14);
  --glass-bg-strong: rgba(255,255,255,.18);
  --glass-border: rgba(255,255,255,.22);
  --text: #0b1220;
  --text-inv: #ffffff;
  --muted: rgba(11,18,32,.70);
  --shadow: 0 18px 60px rgba(0,0,0,.25);
  --radius: 22px;
  --radius2: 18px;
  --font: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
}

*{ box-sizing:border-box; }
html, body { height: 100%; margin:0; }
body{
  font-family: var(--font);
  background: #e9eef6;
}

#app{
  height: 100%;
  position: relative;
}

/* Glass header */
.topbar{
  position: absolute;
  left: 14px; right: 14px; top: 14px;
  z-index: 1000;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  pointer-events:none;
}
.glass{
  pointer-events:auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
}
.brand{
  display:flex; align-items:center; gap: 12px;
  padding: 10px 14px;
}
.dot{
  width: 12px; height: 12px; border-radius: 999px;
  background: #2bdc7b;
  box-shadow: 0 0 0 6px rgba(43,220,123,.20);
}
.title{ font-weight: 900; letter-spacing: .2px; color: var(--text); }
.subtitle{ font-size: 12px; color: var(--muted); margin-top: 2px; }

.actions{
  display:flex; gap: 10px; align-items:center;
  padding: 10px 12px;
}
.btn{
  border: 1px solid rgba(11,18,32,.14);
  background: rgba(255,255,255,.35);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 16px;
  font-weight: 800;
  cursor: pointer;
}
.btn:hover{ background: rgba(255,255,255,.50); }
.pill{
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(11,18,32,.12);
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

/* Map container */
#map{
  height: 100%;
  width: 100%;
}

/* Leaflet polish */
.leaflet-control-zoom{
  border: none !important;
  box-shadow: var(--shadow);
  border-radius: 16px !important;
  overflow: hidden;
}
.leaflet-control-zoom a{
  background: rgba(255,255,255,.85) !important;
  color: #0b1220 !important;
  border: none !important;
}
.leaflet-popup-content-wrapper{
  border-radius: 18px !important;
  background: rgba(255,255,255,.92) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(0,0,0,.08);
}
.leaflet-popup-tip{
  background: rgba(255,255,255,.92) !important;
}

/* Polygon glow via SVG filter */
.area-label{
  font-weight: 900;
  color: #0b1220;
  text-shadow: 0 2px 10px rgba(255,255,255,.85);
}

/* Bottom sheet modal */
.backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,.28);
  z-index: 2000;
  display:none;
}
.sheet{
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 14px;
  width: min(720px, calc(100vw - 28px));
  z-index: 2100;
  display:none;
  padding: 12px;
  border-radius: var(--radius);
}
.sheet .head{
  display:flex; align-items:flex-start; justify-content:space-between; gap: 12px;
  margin-bottom: 8px;
}
.sheet .head .h{
  font-weight: 950;
  color: var(--text);
  font-size: 16px;
}
.sheet .head .sub{
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}
.iconbtn{
  width: 40px; height: 40px;
  border-radius: 16px;
  border: 1px solid rgba(11,18,32,.14);
  background: rgba(255,255,255,.45);
  cursor: pointer;
  font-weight: 900;
}
.iconbtn:hover{ background: rgba(255,255,255,.60); }

.grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
@media (min-width: 720px){
  .grid{ grid-template-columns: 1fr 1fr; }
}
.field{
  display:grid;
  gap: 6px;
}
.field label{
  font-size: 12px; color: var(--muted); font-weight: 900;
}
.field select, .field input, .field textarea{
  width:100%;
  border-radius: 16px;
  border: 1px solid rgba(11,18,32,.14);
  background: rgba(255,255,255,.55);
  padding: 10px 12px;
  font-weight: 700;
  color: var(--text);
  outline: none;
}
.field textarea{ min-height: 70px; resize: vertical; }
.notice{
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(43,220,123,.18);
  border: 1px solid rgba(43,220,123,.30);
  color: rgba(11,18,32,.85);
  font-size: 12px;
  font-weight: 700;
}
.error{
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(255,90,106,.18);
  border: 1px solid rgba(255,90,106,.30);
  color: rgba(11,18,32,.90);
  font-size: 12px;
  font-weight: 800;
  display:none;
}
.footer{
  margin-top: 10px;
  display:flex;
  justify-content:flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.leaflet-tooltip.area-label{background: rgba(255,255,255,.85) !important; border:1px solid rgba(0,0,0,.08) !important; border-radius: 12px !important; padding: 6px 10px !important; }

/* District labels disabled */
.leaflet-tooltip.area-label{display:none !important;}

/* Minimal overlay: keep roads readable */
.leaflet-overlay-pane path{mix-blend-mode: normal;}

/* Mobile optimieren */
@media (max-width: 520px){
  .topbar{ left: 10px; right: 10px; top: 10px; gap: 10px; }
  .brand{ padding: 10px 12px; max-width: 48vw; }
  .title{ font-size: 16px; }
  .subtitle{ font-size: 12px; }
  .actions{ padding: 10px 10px; gap: 8px; }
  .btn{ padding: 10px 10px; border-radius: 14px; }
  .pill{ padding: 8px 10px; }
  .sheet{ bottom: 10px; width: calc(100vw - 20px); }
  .sheet .head .h{ font-size: 15px; }
}
@supports (padding: max(0px)){
  .topbar{ padding-top: max(0px, env(safe-area-inset-top)); }
  .sheet{ margin-bottom: max(0px, env(safe-area-inset-bottom)); }
}
