@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url(/fonts/poppins-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url(/fonts/poppins-500-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url(/fonts/poppins-600-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-weight: 700; font-display: swap; src: url(/fonts/poppins-700-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(/fonts/bebas-neue-400-latin.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(/fonts/bebas-neue-400-latin-ext.woff2) format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --bg: #f8f4ee;
  --card: #ffffff;
  --ink: #29303d;
  --muted: #646b78;
  --line: #ebe3d8;
  --soft: #f3ede5;
  --orange: #e97e49;
  --orange-ink: #b9541f;
  --pink: #c0597b;
  --purple: #8260a9;
  --grad: linear-gradient(100deg, #e97e49 0%, #c0597b 55%, #8260a9 100%);
  --driver: #8260a9;
  --rider: #e97e49;
  --ok: #2f8a5b;
  --warn-bg: #fff1e3;
  --warn: #8a4a12;
  --danger: #c23b3b;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(41, 48, 61, .05), 0 6px 24px rgba(41, 48, 61, .06);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "Poppins", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
body.locked { overflow: hidden; }
button { font: inherit; color: inherit; }
a { color: var(--orange-ink); }

/* ---------- Grundgerüst ---------- */
.app { min-height: 100vh; }
.top { padding: 16px 16px 14px; }
.brandrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { height: 18px; width: auto; display: block; }
.brand span {
  font-weight: 500; font-size: 16px; line-height: 1; color: var(--purple);
  padding-left: 10px; border-left: 1.5px solid var(--line); letter-spacing: .2px;
}
.brand.big img { height: 34px; }
.brand.big span { font-size: 28px; padding-left: 14px; border-left-width: 2px; }
.top h1 {
  font: 400 34px/0.95 "Bebas Neue", "Poppins", sans-serif; letter-spacing: .5px; margin: 0;
}
.top .sub { color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.orgpill {
  flex: none; font-size: 11px; font-weight: 600; letter-spacing: .3px; text-transform: uppercase;
  background: var(--ink); color: #fff; padding: 5px 9px; border-radius: 999px;
}

.mapwrap { position: relative; margin: 0 16px; }
#map {
  height: 46vh; min-height: 300px; max-height: 520px;
  border-radius: var(--radius); overflow: hidden; background: #e9e4dc;
  box-shadow: var(--shadow); z-index: 0;
}
.maplegend {
  position: absolute; left: 10px; bottom: 10px; z-index: 500;
  display: flex; gap: 6px; flex-wrap: wrap; pointer-events: none;
}
.maplegend span {
  background: rgba(255,255,255,.92); backdrop-filter: blur(6px);
  font-size: 12px; font-weight: 500; padding: 4px 9px 4px 7px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.08);
}
.mapreset {
  position: absolute; right: 10px; top: 10px; z-index: 500;
  border: 0; background: #fff; border-radius: 999px; padding: 7px 12px; font-size: 13px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); cursor: pointer;
}
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }

.panel { padding: 16px 16px 60px; display: grid; gap: 14px; }

.card { background: var(--card); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card h2, .sectionhead h2 { font-size: 17px; font-weight: 600; margin: 0; }
.sectionhead { display: flex; align-items: center; gap: 10px; margin: 10px 2px -2px; }
.sectionhead h2 { flex: 1; }
.sectionhead .tag { font-size: 12px; font-weight: 600; color: var(--muted); }
.hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.error { color: var(--danger); font-size: 14px; margin: 10px 0 0; }
.error:empty { display: none; }

/* CTA */
.cta { display: grid; gap: 12px; }
.cta p { margin: 0; color: var(--muted); }
.cta .me { display: flex; align-items: center; gap: 12px; }
.cta .me .grow { flex: 1; min-width: 0; }
.cta .me strong { display: block; }
.cta .me small { color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat { background: var(--card); border-radius: 14px; padding: 12px 8px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font: 400 30px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; }
.stat span { font-size: 12px; color: var(--muted); }
.stat.alert b { color: var(--orange-ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: #fff; border-radius: 12px;
  padding: 11px 16px; font-weight: 600; font-size: 15px; cursor: pointer; text-decoration: none; color: var(--ink);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #fff; border: 0; box-shadow: 0 6px 18px rgba(192, 89, 123, .25); }
.btn.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.btn.wa { background: #1fa855; color: #fff; border-color: #1fa855; }
.btn.danger { color: var(--danger); border-color: #f0cfcf; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--orange-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.row > .btn { flex: 1; }

/* Gruppen */
.groups { display: grid; gap: 10px; }
.gcard {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 14px 16px 14px 20px; position: relative; cursor: pointer; overflow: hidden;
  border: 2px solid transparent; transition: border-color .15s ease;
}
.gcard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: var(--gc); }
.gcard.sel { border-color: var(--gc); }
.ghead { display: flex; align-items: center; gap: 10px; }
.ghead .gname { font-weight: 600; flex: 1; min-width: 0; }
.ghead .eta { font-size: 13px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px;
  background: var(--soft); border-radius: 999px; padding: 4px 10px 4px 4px;
}
.chip .av {
  width: 22px; height: 22px; border-radius: 50%; color: #fff; font-size: 10px; font-weight: 700;
  display: grid; place-items: center; background: var(--gc, var(--rider));
}
.chip.driver { background: #efe9f6; font-weight: 600; }
.caps { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.caps span { display: inline-flex; align-items: center; gap: 4px; }
.caps span.over { color: var(--danger); font-weight: 600; }
.caps svg { width: 15px; height: 15px; }
.warnbox { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 7px 11px; font-size: 13px; margin-top: 8px; }
.gdetail { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; cursor: default; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { display: grid; grid-template-columns: 58px 18px 1fr; gap: 8px; padding-bottom: 12px; position: relative; }
.timeline li::after { content: ""; position: absolute; left: 66px; top: 16px; bottom: -2px; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { font-weight: 600; font-variant-numeric: tabular-nums; font-size: 14px; }
.timeline .pin { width: 12px; height: 12px; border-radius: 50%; margin: 5px 0 0 1px; background: #fff; border: 3px solid var(--gc); z-index: 1; }
.timeline li.end .pin { background: var(--gc); }
.timeline .what div:first-child { font-weight: 500; }
.timeline .what .sub { color: var(--muted); font-size: 13px; }
.costs { display: flex; gap: 10px; margin: 2px 0 12px; }
.costs > div { flex: 1; background: var(--soft); border-radius: 12px; padding: 9px 11px; }
.costs b { display: block; font-size: 16px; }
.costs span { font-size: 12px; color: var(--muted); }

/* Teilnehmer */
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -2px; padding: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filters button {
  flex: none; border: 1px solid var(--line); background: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 500; cursor: pointer;
}
.filters button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.plist { list-style: none; margin: 0; padding: 0; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.plist li { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.plist li:last-child { border-bottom: 0; }
.plist .av {
  width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13px;
}
.plist .av.car { border-radius: 11px; }
.plist .grow { flex: 1; min-width: 0; }
.plist .grow strong { display: block; font-weight: 600; }
.plist .meta { color: var(--muted); font-size: 13px; }
.plist .mine { font-size: 11px; font-weight: 700; color: var(--orange-ink); text-transform: uppercase; letter-spacing: .4px; margin-left: 6px; }
.empty { text-align: center; color: var(--muted); padding: 22px 16px; }

/* Karte: Marker */
.mk {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  color: #fff; font: 700 11px/1 "Poppins", sans-serif; border: 2.5px solid #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
.mk.car { border-radius: 10px; width: 34px; height: 34px; }
.mk.car svg { width: 18px; height: 18px; }
.mk.dim { opacity: .35; }
.mk-num {
  width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid; display: grid; place-items: center;
  font: 700 11px/1 "Poppins", sans-serif; color: var(--ink);
}
.mk-dest {
  position: absolute; left: 0; bottom: 12px; transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: var(--ink); color: #fff; font: 600 12px/1 "Poppins", sans-serif; padding: 7px 10px 7px 8px; border-radius: 999px;
  box-shadow: 0 3px 10px rgba(0,0,0,.3);
}
.mk-dest::after {
  content: ""; position: absolute; left: 50%; bottom: -5px; margin-left: -5px;
  border: 5px solid transparent; border-bottom: 0; border-top-color: var(--ink);
}
.mk-dest-dot {
  position: absolute; left: -5px; top: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--ink); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.3);
}
.mk-dest svg { width: 14px; height: 14px; }
.leaflet-popup-content-wrapper { border-radius: 14px; }
.leaflet-popup-content { margin: 12px 14px; font: 14px/1.45 "Poppins", sans-serif; }
.pop strong { display: block; font-size: 15px; }
.pop .meta { color: var(--muted); font-size: 13px; }
.pop a { display: inline-block; margin-top: 6px; font-weight: 600; }

/* ---------- Dialog / Wizard ---------- */
.modal {
  position: fixed; inset: 0; z-index: 2000; background: rgba(28, 31, 38, .45);
  display: flex; align-items: flex-end; justify-content: center;
  animation: fade .18s ease;
}
.sheet {
  background: var(--bg); width: 100%; max-width: 560px; max-height: 94vh; overflow-y: auto;
  border-radius: 22px 22px 0 0; padding: 18px 18px calc(22px + env(safe-area-inset-bottom));
  animation: up .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes up { from { transform: translateY(30px); opacity: .6; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .modal, .sheet { animation: none; } }
.shead { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.shead h2 { flex: 1; margin: 0; font-size: 19px; font-weight: 600; }
.close { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--soft); cursor: pointer; display: grid; place-items: center; }
.close svg { width: 18px; height: 18px; }
.steps { display: flex; gap: 5px; margin-bottom: 16px; }
.steps span { flex: 1; height: 4px; border-radius: 2px; background: var(--line); }
.steps span.on { background: var(--grad); }
.q { display: block; font-weight: 600; margin: 0 0 8px; }
.field + .field { margin-top: 18px; }
input[type=text], input[type=tel], input[type=search], input[type=time], input[type=date], input[type=number], input[type=password], textarea, select {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; background: #fff;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(233, 126, 73, .18); }
.choices { display: grid; gap: 10px; }
.choice {
  text-align: left; cursor: pointer; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: #fff;
  display: flex; gap: 14px; align-items: center;
}
.choice .ic { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--soft); }
.choice .ic svg { width: 22px; height: 22px; }
.choice strong { display: block; font-size: 15.5px; }
.choice small { color: var(--muted); font-size: 13px; }
.choice.selected { border-color: var(--orange); background: #fff7f1; }
.stepper { display: flex; align-items: center; gap: 12px; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 8px 10px 8px 14px; }
.stepper .lbl { flex: 1; min-width: 0; }
.stepper .lbl strong { display: block; font-weight: 600; font-size: 15px; }
.stepper .lbl small { color: var(--muted); font-size: 12.5px; }
.stepper button { width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--soft); font-size: 20px; font-weight: 600; cursor: pointer; line-height: 1; }
.stepper button:disabled { opacity: .35; }
.stepper output { width: 26px; text-align: center; font: 400 26px/1 "Bebas Neue", sans-serif; }
.stepper + .stepper { margin-top: 10px; }
.actions { display: flex; gap: 10px; margin-top: 22px; }
.actions .btn.primary { flex: 1; }

.search { position: relative; }
.results {
  list-style: none; margin: 6px 0 0; padding: 0; position: absolute; left: 0; right: 0; z-index: 1000;
  background: #fff; border-radius: 12px; max-height: 260px; overflow-y: auto; box-shadow: 0 10px 30px rgba(0,0,0,.15);
}
.results:empty { display: none; }
.results li { padding: 11px 14px; cursor: pointer; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.results li:hover, .results li.focus { background: #fff7f1; }
.results li small { display: block; color: var(--muted); font-size: 12.5px; }
.results li.info { color: var(--muted); cursor: default; }
#pickMap { height: 250px; border-radius: 14px; margin-top: 10px; z-index: 0; }
.picked { margin-top: 10px; font-weight: 600; display: flex; align-items: center; gap: 8px; min-height: 22px; }
.picked svg { width: 18px; height: 18px; color: var(--orange); }

/* Rechner */
.pick-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.pick-list li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 12px; padding: 8px 10px; border: 1.5px solid var(--line); }
.pick-list li .n { width: 24px; height: 24px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; flex: none; }
.pick-list li .grow { flex: 1; min-width: 0; font-size: 14px; }
.pick-list li .grow small { display: block; color: var(--muted); font-size: 12px; }
.pick-list li button { border: 0; background: var(--soft); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-weight: 700; }
.add-list { display: flex; flex-wrap: wrap; gap: 6px; }
.add-list button { border: 1.5px dashed var(--line); background: #fff; border-radius: 999px; padding: 6px 12px; font-size: 13px; cursor: pointer; }
.add-list button small { color: var(--muted); }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1.5px var(--line); cursor: pointer; }
.swatch.selected { box-shadow: 0 0 0 2.5px var(--ink); }
.result-box { background: #fff; border-radius: 14px; padding: 14px; margin-top: 14px; --gc: var(--purple); }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 3000;
  background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-size: 14px; font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); animation: fade .2s ease;
}

.landing { max-width: 480px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.landing .brand { justify-content: center; }
.landing h1 { font: 400 44px/1 "Bebas Neue", sans-serif; margin: 26px 0 10px; }
.landing p { color: var(--muted); }

/* ---------- Desktop ---------- */
@media (min-width: 960px) {
  .app { display: grid; grid-template-columns: 460px 1fr; grid-template-rows: auto 1fr; height: 100vh; }
  .top { grid-column: 1; padding: 22px 22px 8px; }
  .mapwrap { grid-column: 2; grid-row: 1 / span 2; margin: 16px 16px 16px 0; }
  #map { height: 100%; max-height: none; }
  .panel { grid-column: 1; overflow-y: auto; padding: 12px 22px 40px; }
  .modal { align-items: center; }
  .sheet { border-radius: 22px; max-height: 88vh; }
}
