@import url("https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,800&family=Manrope:wght@400;500;600;700&display=swap");

:root {
  --sm-ink: #e8eef6;
  --sm-panel: rgba(16, 22, 32, 0.92);
  --sm-panel-solid: #141c28;
  --sm-line: rgba(255, 255, 255, 0.12);
  --sm-text: #e8eef6;
  --sm-muted: #9aa8b8;
  --sm-accent: #3dba9a;
  --sm-accent-ink: #06241c;
  --sm-danger: #ff7b72;
  --sm-font: "Manrope", system-ui, sans-serif;
  --sm-display: "Bricolage Grotesque", system-ui, sans-serif;
  color-scheme: dark;
}

.leaflet-top {
  top: 78px !important;
}

.leaflet-bottom.leaflet-right {
  bottom: 88px !important;
}

.sm-ui *,
.sm-ui *::before,
.sm-ui *::after {
  box-sizing: border-box;
}

.sm-ui {
  font-family: var(--sm-font);
  color: var(--sm-text);
  -webkit-font-smoothing: antialiased;
}

.sm-topbar {
  position: fixed;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.7rem;
  border-radius: 16px;
  border: 1px solid var(--sm-line);
  background: var(--sm-panel);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
  animation: sm-rise 0.4s ease both;
}

.sm-auth-bar {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 1300;
  display: flex;
  gap: 0.35rem;
  align-items: center;
  padding: 0.35rem 0.45rem;
  border-radius: 999px;
  border: 1px solid var(--sm-line);
  background: var(--sm-panel);
  backdrop-filter: blur(10px);
  font-family: var(--sm-font);
}

.sm-auth-inline {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  margin-right: 0.25rem;
}

.sm-auth-bar .nav-link,
.sm-auth-bar .nav-user,
.sm-auth-inline .nav-link,
.sm-auth-inline .nav-user {
  pointer-events: auto;
  border: 0;
  background: transparent;
  color: var(--sm-text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.3rem 0.45rem;
  text-decoration: none;
}

.sm-auth-bar .nav-user,
.sm-auth-inline .nav-user {
  color: var(--sm-muted);
  cursor: default;
  max-width: 7rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sm-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
}

.sm-brand-mark {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: var(--sm-accent);
  color: #fff;
  font-family: var(--sm-display);
  font-weight: 800;
  font-size: 0.9rem;
}

.sm-brand-copy {
  min-width: 0;
}

.sm-brand-title {
  font-family: var(--sm-display);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-brand-sub {
  color: var(--sm-muted);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sm-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex: 0 0 auto;
}

.sm-icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.1);
  color: var(--sm-text);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.sm-icon-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(61, 186, 154, 0.55);
}

.sm-icon-btn.is-active {
  background: rgba(61, 186, 154, 0.16);
  border-color: rgba(61, 186, 154, 0.5);
  color: var(--sm-accent);
}

.sm-fav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.7rem;
  border-radius: 12px;
  border: 1px solid var(--sm-line);
  background: rgba(255,255,255,0.05);
  margin-bottom: 0.5rem;
}

.sm-fav-row span {
  font-weight: 700;
  font-size: 0.92rem;
}

.sm-favs-list {
  max-height: 55vh;
  overflow: auto;
}

.sm-street-popup {
  font-family: var(--sm-font);
  min-width: 160px;
  display: grid;
  gap: 0.55rem;
}

.sm-street-popup strong {
  font-family: var(--sm-display);
  font-size: 1rem;
}

.sm-street-popup .sm-btn {
  width: 100%;
}

.sm-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#sm-favs svg {
  fill: currentColor;
  stroke: currentColor;
  stroke-width: 1.2;
}

.sm-fab {
  position: fixed;
  right: 16px;
  bottom: 24px;
  z-index: 1200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.75rem 1.05rem;
  border: none;
  border-radius: 14px;
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
  font-family: var(--sm-font);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 0 12px 28px rgba(15, 122, 98, 0.28);
  cursor: pointer;
  animation: sm-rise 0.5s 0.08s ease both;
  transition: transform 0.15s ease, background 0.15s ease;
}

.sm-fab:hover {
  transform: translateY(-2px);
  background: #2a9b7e;
}

.sm-fab-quick {
  right: 16px;
  bottom: 86px;
  min-height: 44px;
  padding: 0.55rem 0.9rem;
  background: #243447;
  color: var(--sm-text);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  font-size: 0.82rem;
}

.sm-fab-quick:hover {
  background: #2a3b50;
}

.sm-draft-badge {
  display: inline-block;
  margin-left: 0.25rem;
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
  background: rgba(255, 138, 91, 0.2);
  color: #ffb089;
}

.sm-fab svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sm-toast {
  position: fixed;
  left: 50%;
  bottom: 92px;
  transform: translateX(-50%) translateY(12px);
  z-index: 1300;
  max-width: min(90vw, 360px);
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--sm-line);
  background: var(--sm-panel);
  backdrop-filter: blur(12px);
  color: var(--sm-text);
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.sm-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.sm-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  align-items: end;
  justify-content: center;
  padding: 12px;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(5px);
}

.sm-overlay.is-open {
  display: flex;
  animation: sm-fade 0.2s ease both;
}

.sm-sheet {
  width: min(520px, 100%);
  max-height: min(88vh, 720px);
  overflow: auto;
  border-radius: 20px;
  border: 1px solid var(--sm-line);
  background: var(--sm-panel-solid);
  box-shadow: 0 22px 50px rgba(21, 32, 40, 0.22);
  padding: 1.15rem 1.15rem 1.25rem;
  animation: sm-sheet-up 0.28s ease both;
}

.sm-sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.sm-sheet-head h2 {
  margin: 0;
  font-family: var(--sm-display);
  font-size: 1.3rem;
  letter-spacing: -0.03em;
}

.sm-sheet-head p {
  margin: 0.3rem 0 0;
  color: var(--sm-muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.sm-close {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--sm-line);
  background: transparent;
  color: var(--sm-text);
  cursor: pointer;
  font-size: 1.2rem;
  line-height: 1;
}

.sm-field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 0.9rem;
}

.sm-field label {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sm-muted);
}

.sm-field input,
.sm-field textarea,
.sm-field select {
  width: 100%;
  border-radius: 12px;
  border: 1px solid var(--sm-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--sm-text);
  font: inherit;
  padding: 0.8rem 0.9rem;
  outline: none;
  color-scheme: dark;
}

.sm-field input::placeholder,
.sm-field textarea::placeholder {
  color: #7f8d9c;
}

.sm-field select option {
  background: #141c28;
  color: var(--sm-text);
}

.sm-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.sm-check input {
  width: 18px;
  height: 18px;
  accent-color: var(--sm-accent);
}

.sm-field textarea {
  min-height: 92px;
  resize: vertical;
}

.sm-field input:focus,
.sm-field textarea:focus,
.sm-field select:focus {
  border-color: rgba(61, 186, 154, 0.55);
  box-shadow: 0 0 0 3px rgba(61, 186, 154, 0.15);
}

.sm-loc-card {
  margin-bottom: 1rem;
  padding: 0.9rem;
  border-radius: 14px;
  border: 1px solid var(--sm-line);
  background: rgba(255, 255, 255, 0.04);
}

.sm-loc-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.sm-loc-card-head strong {
  font-family: var(--sm-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.sm-loc-status {
  margin: 0 0 0.75rem;
  color: var(--sm-muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.sm-loc-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.8fr;
  gap: 0.65rem;
}

.sm-loc-grid .sm-field {
  margin-bottom: 0.35rem;
}

.sm-btn-tiny {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
}

.sm-overview-link {
  display: inline-flex;
  margin-top: 1rem;
  color: var(--sm-accent);
  font-weight: 700;
  font-size: 0.9rem;
  text-decoration: none;
}

.sm-overview-link:hover {
  text-decoration: underline;
}

@media (max-width: 520px) {
  .sm-loc-grid {
    grid-template-columns: 1fr;
  }
}

.sm-photo-box {
  position: relative;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.04);
  min-height: 180px;
  display: grid;
  place-items: center;
  overflow: hidden;
  cursor: pointer;
}

.sm-photo-box img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.sm-photo-placeholder {
  text-align: center;
  color: var(--sm-muted);
  padding: 1.5rem;
}

.sm-photo-placeholder strong {
  display: block;
  color: var(--sm-text);
  margin-bottom: 0.25rem;
}

.sm-photo-input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.sm-hint {
  margin: -0.35rem 0 0.9rem;
  color: var(--sm-muted);
  font-size: 0.8rem;
}

.sm-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.sm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 44px;
  padding: 0.65rem 1rem;
  border-radius: 12px;
  border: 1px solid transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

.sm-btn:hover {
  transform: translateY(-1px);
}

.sm-btn-primary {
  background: var(--sm-accent);
  color: var(--sm-accent-ink);
}

.sm-btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--sm-line);
  color: var(--sm-text);
}

.sm-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sm-btn-danger {
  background: rgba(255, 123, 114, 0.12);
  border-color: rgba(255, 123, 114, 0.35);
  color: var(--sm-danger);
}

.sm-finds-list {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.4rem;
}

.sm-find-item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.55rem;
  border-radius: 12px;
  border: 1px solid var(--sm-line);
  background: rgba(255,255,255,0.05);
}

.sm-find-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}

.sm-find-actions .sm-btn {
  min-height: 36px;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
}

.sm-find-item img {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: #243041;
}

.sm-find-item h3 {
  margin: 0;
  font-size: 0.95rem;
  font-family: var(--sm-display);
}

.sm-find-item p {
  margin: 0.2rem 0 0;
  color: var(--sm-muted);
  font-size: 0.8rem;
}

.sm-empty {
  color: var(--sm-muted);
  font-size: 0.88rem;
  padding: 0.5rem 0 0.2rem;
}

.sm-user-pulse {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2563eb;
  border: 3px solid #fff;
  box-shadow: 0 0 0 8px rgba(37, 99, 235, 0.2);
}

.sm-find-marker {
  width: 34px;
  height: 34px;
  border-radius: 50% 50% 50% 6px;
  transform: rotate(-45deg);
  background: var(--sm-accent);
  border: 2px solid #fff;
  box-shadow: 0 6px 14px rgba(21, 32, 40, 0.25);
  display: grid;
  place-items: center;
}

.sm-find-marker--unsicher {
  background: #d4a017;
}

.sm-find-marker--weg {
  background: #c2453a;
}

.sm-find-photos {
  display: grid;
  gap: 0.35rem;
}

.sm-find-photos img,
.sm-find-ph {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 10px;
  background: rgba(61, 186, 154, 0.12);
}

.sm-find-ph {
  display: grid;
  place-items: center;
  color: #8fe0c8;
  font-weight: 800;
  font-size: 0.75rem;
}

.sm-status-badge {
  display: inline-block;
  font-size: 0.75rem !important;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 0.15rem 0 0.35rem !important;
}

.sm-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0.45rem 0 0.2rem;
}

.sm-status-row .sm-btn {
  min-height: 32px;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
}

.sm-compare-label {
  cursor: pointer;
}

.sm-popup-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 0.55rem;
}

.sm-popup-compare img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin: 0;
}

.status-noch { color: #3dba9a; }
.status-unsicher { color: #b7791f; }
.status-weg { color: #a33a32; }

.sm-find-marker span {
  transform: rotate(45deg);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #fff;
  background: transparent;
}

.sm-popup {
  font-family: var(--sm-font);
  min-width: 180px;
  max-width: 240px;
}

.sm-popup img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 0.55rem;
}

.sm-popup strong {
  display: block;
  font-family: var(--sm-display);
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.sm-popup p {
  margin: 0;
  color: var(--sm-muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

/* Folium-/Leaflet-Chrome Dark – Karten-Tiles unverändert */
html {
  color-scheme: dark;
}

body {
  background: #0e141b !important;
  color: var(--sm-text);
  font-family: var(--sm-font);
}

body > b {
  display: block;
  padding: 0.85rem 1rem 0.15rem;
  font-family: var(--sm-display);
  font-size: 1.15rem;
  color: var(--sm-text);
}

.leaflet-container {
  background: #1a2433;
  font-family: var(--sm-font);
}

.leaflet-control-zoom a,
.leaflet-bar a {
  background: #141c28 !important;
  color: var(--sm-text) !important;
  border-bottom-color: var(--sm-line) !important;
}

.leaflet-control-zoom a:hover,
.leaflet-bar a:hover {
  background: #1e2b3c !important;
  color: var(--sm-accent) !important;
}

.leaflet-bar {
  border: 1px solid var(--sm-line) !important;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35) !important;
}

.leaflet-control-attribution {
  background: rgba(14, 20, 27, 0.85) !important;
  color: var(--sm-muted) !important;
}

.leaflet-control-attribution a {
  color: var(--sm-accent) !important;
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #141c28 !important;
  color: var(--sm-text) !important;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45) !important;
}

.leaflet-popup-content {
  color: var(--sm-text);
  margin: 0.75rem !important;
}

.leaflet-popup-close-button {
  color: var(--sm-muted) !important;
}

.leaflet-popup-close-button:hover {
  color: var(--sm-text) !important;
}

.leaflet-tooltip {
  background: #141c28 !important;
  color: var(--sm-text) !important;
  border: 1px solid var(--sm-line) !important;
}

/* Folium TimeSlider */
.sm-folium-chrome {
  background: #141c28;
  color: var(--sm-text);
  border-bottom: 1px solid var(--sm-line);
  padding: 0.75rem 1rem 0.85rem;
  font-family: var(--sm-font);
  line-height: 1.45;
}

.sm-folium-chrome b {
  display: block;
  font-family: var(--sm-display);
  font-size: 1.15rem;
  color: var(--sm-text);
  margin-bottom: 0.25rem;
}

.sm-folium-chrome output {
  display: block;
  color: var(--sm-accent);
  font-weight: 700;
  margin: 0.35rem 0;
}

.slider,
body > div:has(> input[type="range"]),
.sm-folium-chrome > div:has(> input[type="range"]) {
  background: transparent !important;
  color: var(--sm-text) !important;
  padding: 0.35rem 0 0.15rem !important;
  border: none;
}

@keyframes sm-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes sm-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes sm-sheet-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .sm-fab span {
    display: none;
  }

  .sm-fab {
    width: 56px;
    height: 56px;
    padding: 0;
    justify-content: center;
  }

  .sm-fab-quick {
    width: 48px;
    height: 48px;
    bottom: 92px;
    min-height: 48px;
    padding: 0;
    justify-content: center;
  }

  .sm-brand-sub {
    display: none;
  }
}
