

:root {
  --accent:       #FF4D00;
  --accent2:      #FF8C5A;
  --donker:       #0C0C0E;
  --nav-bg:       #fff;
  --nav-border:   #e8e8ec;
  --tekst:        #0C0C0E;
  --tekst-dim:    #6b6b7b;
  --hover:        #f5f5f8;
  --radius:       14px;
  --shadow:       0 4px 24px rgba(0,0,0,.10);
  --shadow-lg:    0 8px 40px rgba(0,0,0,.16);
  --topnav-h:     56px;
  --bottomnav-h:  64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Instrument Sans', sans-serif; overflow: hidden; background: #e8e4dc; }

/* ══════════════════════════════════════════
   SCHERMEN  —  kaart | feed | overige
   Elk scherm vult het volledige viewport
══════════════════════════════════════════ */
.scherm {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #f5f3ef;
  transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s;
  transform: translateX(100%);
  opacity: 0;
  pointer-events: none;
  z-index: 200;
}
.scherm.actief {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
}
/* kaart-scherm is de basis, altijd zichtbaar */
#scherm-kaart {
  transform: translateX(0);
  opacity: 1;
  pointer-events: all;
  z-index: 100;
}

/* Op mobiel: schermen starten onder topnav en eindigen boven bottomnav */
@media (min-width: 769px) {
  .nav-tabs { display:none; }
}

@media (max-width: 768px) {
  .scherm {
    top: var(--topnav-h);
    bottom: var(--bottomnav-h);
  }
  /* Scroll-container krijgt extra ruimte onderaan zodat de submit-knop
     nooit achter de bottomnav verdwijnt */
  .scherm-scroll {
    padding-bottom: 24px !important;
  }
  /* Feed scroll ook */
  .feed-scroll {
    padding-bottom: 24px !important;
  }
  /* Panel body op desktop al goed, maar op mobiel extra ruimte */
  .panel-body {
    padding-bottom: 32px;
  }
}

/* ══════════════════════════════
   TOP NAVIGATIE
══════════════════════════════ */
#topnav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--topnav-h);
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  display: flex; align-items: center;
  z-index: 1000; padding: 0 12px; gap: 8px;
}
.nav-logo { display: flex; align-items: center; gap: 8px; flex-shrink: 0; text-decoration: none; }
.nav-logo .logo-mark { width: 36px; height: 36px; background: var(--accent); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 18px; color: #fff; }
.nav-logo .logo-naam { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px; color: var(--tekst); letter-spacing: -.5px; }
.nav-search { flex: 1; max-width: 280px; margin: 0 8px; position: relative; }
.nav-search input { width: 100%; background: var(--hover); border: none; border-radius: 20px; padding: 8px 16px 8px 36px; font-size: 14px; font-family: inherit; color: var(--tekst); outline: none; }
.nav-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--tekst-dim); font-size: 13px; }
.nav-tabs { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; max-width: 380px; }
.nav-tab { display: flex; align-items: center; justify-content: center; width: 96px; height: 44px; border-radius: 10px; border: none; background: transparent; cursor: pointer; color: var(--tekst-dim); font-size: 20px; transition: background .15s, color .15s; position: relative; }
.nav-tab:hover { background: var(--hover); }
.nav-tab.actief { color: var(--accent); }
.nav-tab.actief::after { content: ''; position: absolute; bottom: -6px; left: 12px; right: 12px; height: 3px; background: var(--accent); border-radius: 3px 3px 0 0; }
.nav-rechts { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }
.nav-icon-btn { width: 36px; height: 36px; border-radius: 50%; background: var(--hover); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tekst); font-size: 15px; transition: background .15s; position: relative; }
.nav-icon-btn .badge { position: absolute; top: -2px; right: -2px; width: 16px; height: 16px; background: var(--accent); border-radius: 50%; font-size: 9px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #fff; }
#badge-meldingen-desktop, #badge-meldingen-mobiel {
  background: #e63946 !important;
  min-width: 18px;
  width: auto !important;
  padding: 0 4px;
}
.nav-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg,#FF4D00,#FF8C5A); cursor: pointer; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; border: 2px solid transparent; transition: border-color .15s; }
.nav-avatar:hover { border-color: var(--accent); }

.mobile-only { display: none !important; }
@media (max-width: 768px) {
  .mobile-only { display: flex !important; }
  .nav-tabs { display: none !important; }
  .nav-search { max-width: none; margin-right: 0; }
}

/* ══════════════════════════════
   KAART SCHERM
══════════════════════════════ */
#scherm-kaart {
  top: var(--topnav-h);
  bottom: 0;
}
#app { position: fixed; top: var(--topnav-h); left: 0; right: 0; bottom: 0; display: flex; }

/* Desktop linker sidebar */
#sidebar-links { width: 72px; background: var(--nav-bg); border-right: 1px solid var(--nav-border); display: flex; flex-direction: column; align-items: center; padding: 12px 0; gap: 4px; z-index: 100; flex-shrink: 0; }
.sb-btn { width: 48px; height: 48px; border-radius: 12px; border: none; background: transparent; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tekst-dim); font-size: 19px; transition: background .15s, color .15s, transform .15s; position: relative; }
.sb-btn:hover { background: var(--hover); color: var(--tekst); transform: scale(1.05); }
.sb-btn.actief { background: rgba(255,77,0,.1); color: var(--accent); }
.sb-btn .sb-tooltip { position: absolute; left: 58px; background: var(--donker); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 200; }
.sb-btn:hover .sb-tooltip { opacity: 1; }
.sb-divider { width: 32px; height: 1px; background: var(--nav-border); margin: 6px 0; }
.sb-pin-btn {
  width: 48px; height: 48px; border-radius: 14px;
  background: var(--accent); border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px;
  position: relative; /* nodig voor tooltip positionering */
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 4px 16px rgba(255,77,0,.35); margin: 4px 0;
}
.sb-pin-btn:hover { background: #e64400; transform: scale(1.08); }
.sb-pin-btn .sb-tooltip { position: absolute; left: 58px; background: var(--donker); color: #fff; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 7px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 200; }
.sb-pin-btn:hover .sb-tooltip { opacity: 1; }

/* Knipperend wanneer klik-modus actief */
.sb-pin-btn.klik-actief {
  background: var(--donker);
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
  animation: pin-pulse 1s ease-in-out infinite;
}
@keyframes pin-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,77,0,.5); }
  50%       { box-shadow: 0 0 0 8px rgba(255,77,0,0); }
}

/* Instructiebanner bovenop kaart */
#klik-banner {
  position: absolute;
  top: 14px; left: 50%;
  transform: translateX(-50%) translateY(-16px);
  background: var(--donker); color: #fff;
  padding: 10px 18px; border-radius: 30px;
  font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.35);
  white-space: nowrap; z-index: 500;
  opacity: 0; pointer-events: none;
  transition: opacity .28s, transform .28s;
}
#klik-banner.actief {
  opacity: 1; pointer-events: all;
  transform: translateX(-50%) translateY(0);
}
#klik-banner .kb-annuleer {
  background: rgba(255,255,255,.15); border: none; color: #fff;
  border-radius: 20px; padding: 4px 12px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  transition: background .15s;
}
#klik-banner .kb-annuleer:hover { background: rgba(255,255,255,.28); }

/* Crosshair cursor op kaart tijdens klik-modus */
#kaart.klik-modus,
#kaart.klik-modus .leaflet-interactive,
#kaart.klik-modus .leaflet-container { cursor: crosshair !important; }

/* Tijdelijke pin drop-animatie */
@keyframes pin-drop {
  0%   { transform: translateY(-18px) scale(.7); opacity: 0; }
  65%  { transform: translateY(3px) scale(1.1); opacity: 1; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}
.temp-pin { animation: pin-drop .3s cubic-bezier(.4,0,.2,1) forwards; }

#kaart-wrap { flex: 1; position: relative; overflow: hidden; }
#kaart { width: 100%; height: 100%; }
.leaflet-container { font-family: 'Instrument Sans', sans-serif !important; }
.marker-status {
  background: rgba(0,0,0,.72); color: #fff;
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
  white-space: nowrap; max-width: 120px;
  overflow: hidden; text-overflow: ellipsis;
  margin-top: 3px; text-align: center;
  backdrop-filter: blur(4px);
}
.avatar-marker-wrap { display: flex; flex-direction: column; align-items: center; }

/* Desktop rechter panel — breedte collapst zodat kaart vol wordt */
#rechterpanel {
  width: 340px;
  min-width: 0;
  background: var(--nav-bg);
  border-left: 1px solid var(--nav-border);
  display: flex; flex-direction: column;
  z-index: 100; flex-shrink: 0;
  overflow: hidden;
  transition: width .32s cubic-bezier(.4,0,.2,1),
              opacity .25s cubic-bezier(.4,0,.2,1);
  opacity: 1;
}
#rechterpanel.verborgen {
  width: 0;
  opacity: 0;
  border-left: none;
  pointer-events: none;
}
.panel-header { padding: 16px 20px 12px; border-bottom: 1px solid var(--nav-border); display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.panel-titel { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 17px; color: var(--tekst); }
.panel-sluiten { width: 28px; height: 28px; border-radius: 50%; background: var(--hover); border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tekst-dim); font-size: 13px; }
.panel-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.panel-body::-webkit-scrollbar { width: 4px; }
.panel-body::-webkit-scrollbar-thumb { background: var(--nav-border); border-radius: 4px; }

/* ══════════════════════════════
   FEED SCHERM (mobiel volledig)
══════════════════════════════ */
#scherm-feed {
  top: var(--topnav-h);
  bottom: var(--bottomnav-h);
  background: #f5f3ef;
  z-index: 200;
}
.feed-scherm-header {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: 14px 20px 12px;
  flex-shrink: 0;
}
.feed-scherm-header h2 {
  font-family: 'Syne', sans-serif;
  font-weight: 800; font-size: 22px; color: var(--tekst);
}
.feed-scherm-header p { font-size: 13px; color: var(--tekst-dim); margin-top: 2px; }

.feed-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px 16px 16px;
}
.feed-scroll::-webkit-scrollbar { width: 0; }

/* Feed kaartje — volledig scherm variant */
.feed-kaart {
  background: var(--nav-bg);
  border-radius: 18px;
  overflow: hidden;
  margin-bottom: 14px;
  box-shadow: 0 2px 16px rgba(0,0,0,.07);
  border: 1px solid var(--nav-border);
  cursor: pointer;
  transition: transform .18s, box-shadow .18s;
  transform: scale(.98);
}
.feed-kaart:active { transform: scale(.98); box-shadow: 0 1px 8px rgba(0,0,0,.06); }

.feed-kaart-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px 10px; }
.fk-avatar { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; flex-shrink: 0; }
.fk-meta { flex: 1; }
.fk-naam { font-weight: 700; font-size: 15px; color: var(--tekst); }
.fk-sub { font-size: 12px; color: var(--tekst-dim); display: flex; align-items: center; gap: 5px; margin-top: 1px; }
.fk-sub i { color: var(--accent); font-size: 10px; }
.fk-opties { width: 32px; height: 32px; border-radius: 50%; background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tekst-dim); font-size: 16px; }

/* Grote media zone */
.fk-media {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  font-size: 88px;
  background: linear-gradient(135deg, #f5f0e8, #ede6d8);
  position: relative;
}
.fk-locatie-badge {
  position: absolute;
  bottom: 10px; left: 10px;
  background: rgba(0,0,0,.55);
  color: #fff;
  backdrop-filter: blur(6px);
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  display: flex; align-items: center; gap: 5px;
}
.fk-ga-naar {
  position: absolute;
  bottom: 10px; right: 10px;
  z-index: 2;
  background: var(--accent);
  color: #fff;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  display: flex; align-items: center; gap: 5px;
  box-shadow: 0 3px 10px rgba(255,77,0,.4);
}

.fk-bericht { padding: 10px 14px 6px; font-size: 14px; color: var(--tekst); line-height: 1.55; }

.fk-acties {
  display: flex;
  padding: 6px 8px 10px;
  gap: 2px;
  border-top: 1px solid var(--nav-border);
  margin-top: 6px;
}
.fk-actie {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px; border-radius: 10px; border: none;
  background: transparent; font-size: 13px; font-weight: 600;
  color: var(--tekst-dim); cursor: pointer; font-family: inherit;
  transition: background .15s, color .15s;
}
.fk-actie:hover, .fk-actie:active { background: var(--hover); }
.fk-actie.geliked { color: var(--accent); }

/* "Ga naar locatie" volledig scherm overlay dat verschijnt bij tap */
#locatie-overlay {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--donker);
  color: #fff;
  padding: 14px 20px;
  border-radius: 14px;
  display: flex; align-items: center; gap: 10px;
  z-index: 9999;
  opacity: 0;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
#locatie-overlay.zichtbaar {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
#locatie-overlay .lo-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #fff;
}
#locatie-overlay .lo-tekst { font-size: 13px; }
#locatie-overlay .lo-tekst strong { font-size: 14px; display: block; }

/* ══════════════════════════════
   ANDERE SCHERMEN (sheet stijl)
══════════════════════════════ */
.scherm-inner-header {
  background: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: 14px 20px 12px;
  flex-shrink: 0;
  display: flex; align-items: center; gap: 12px;
}
.scherm-inner-header h2 { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 20px; flex: 1; }
/* Scherm-scroll: altijd voldoende ruimte onderaan voor de submit-knop */
.scherm-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 16px 16px 32px; /* 32px extra onderaan */
  -webkit-overflow-scrolling: touch; /* soepel scrollen op iOS */
}
.scherm-scroll::-webkit-scrollbar { width: 0; }

/* ══════════════════════════════
   GEDEELDE CONTENT STIJLEN
══════════════════════════════ */
.sectie-titel { font-family: 'Syne', sans-serif; font-size: 12px; font-weight: 700; color: var(--tekst-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; margin-top: 4px; }
.mijn-pin-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--nav-border); border-radius: 10px; cursor: pointer; transition: background .15s; background: var(--nav-bg); margin-bottom: 8px; }
.mijn-pin-item:hover, .mijn-pin-item:active { background: var(--hover); }
.mijn-pin-thumb { width: 44px; height: 44px; border-radius: 8px; background: linear-gradient(135deg,#f0ede8,#e4dfd6); display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.mijn-pin-info { flex: 1; }
.mijn-pin-loc { font-weight: 600; font-size: 13px; }
.mijn-pin-tijd { font-size: 11px; color: var(--tekst-dim); }
.mijn-pin-verwijder { width: 28px; height: 28px; border-radius: 50%; background: transparent; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--tekst-dim); font-size: 13px; transition: background .15s, color .15s; }
.mijn-pin-verwijder:hover { background: #ffe4e4; color: #e63946; }

/* Pin formulier */
.pin-form { display: flex; flex-direction: column; gap: 14px; }
.form-groep label { display: block; font-size: 12px; font-weight: 600; color: var(--tekst-dim); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.form-groep input, .form-groep textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--nav-border); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--tekst); background: #fff; outline: none; transition: border-color .15s; }
.form-groep input:focus, .form-groep textarea:focus { border-color: var(--accent); }
.form-groep textarea { resize: none; height: 80px; }
.upload-zone { border: 2px dashed var(--nav-border); border-radius: 10px; padding: 24px; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.upload-zone:hover { border-color: var(--accent); background: rgba(255,77,0,.04); }
.upload-zone i { font-size: 28px; color: var(--tekst-dim); margin-bottom: 8px; display: block; }
.upload-zone p { font-size: 13px; color: var(--tekst-dim); }
.upload-zone span { font-size: 12px; color: var(--accent); font-weight: 600; }
.duur-knoppen { display: flex; gap: 8px; }
.duur-knop { flex: 1; padding: 9px 4px; border-radius: 8px; border: 1.5px solid var(--nav-border); background: #fff; font-size: 12px; font-weight: 600; color: var(--tekst-dim); cursor: pointer; font-family: inherit; transition: all .15s; text-align: center; }
.duur-knop.actief { border-color: var(--accent); background: rgba(255,77,0,.08); color: var(--accent); }
.btn-pin-submit { width: 100%; padding: 13px; margin-top: 10px; background: var(--accent); color: #fff; border: none; border-radius: 10px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; box-shadow: 0 4px 16px rgba(255,77,0,.3); }
.btn-pin-submit:active { transform: scale(.98); }

/* Profiel */
.profiel-header { text-align: center; padding: 20px 0 16px; }
.profiel-avatar-groot { width: 72px; height: 72px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent2)); margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: #fff; position: relative; }
.profiel-edit-avatar { position: absolute; bottom: 0; right: 0; width: 22px; height: 22px; background: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10px; color: var(--tekst); box-shadow: var(--shadow); cursor: pointer; border: 1.5px solid var(--nav-border); }
.profiel-naam-groot { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 18px; }
.profiel-handle { font-size: 13px; color: var(--tekst-dim); }
.profiel-stats { display: flex; border: 1px solid var(--nav-border); border-radius: var(--radius); overflow: hidden; margin: 14px 0; background: #fff; }
.profiel-stat { flex: 1; text-align: center; padding: 12px 8px; border-right: 1px solid var(--nav-border); }
.profiel-stat:last-child { border-right: none; }
.profiel-stat .getal { font-family: 'Syne', sans-serif; font-weight: 700; font-size: 20px; }
.profiel-stat .label { font-size: 11px; color: var(--tekst-dim); margin-top: 2px; }

/* Vrienden */
.vrienden-verzoek { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--nav-border); border-radius: 10px; margin-bottom: 8px; background: #fff; }
.vv-avatar { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px; color: #fff; flex-shrink: 0; }
.vv-info { flex: 1; }
.vv-naam { font-weight: 600; font-size: 13px; }
.vv-sub { font-size: 11px; color: var(--tekst-dim); }
.vv-acties { display: flex; gap: 6px; }
.vv-ja { padding: 5px 12px; background: var(--accent); color: #fff; border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }
.vv-nee { padding: 5px 12px; background: var(--hover); color: var(--tekst); border: none; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* Popup */
.leaflet-popup-content-wrapper { border-radius: var(--radius) !important; box-shadow: var(--shadow-lg) !important; padding: 0 !important; overflow: hidden; border: 1px solid var(--nav-border); }
.leaflet-popup-content { margin: 0 !important; width: 280px !important; }
.leaflet-popup-tip-container { display: none; }
.popup-media { width: 100%; aspect-ratio: 4/3; display: flex; align-items: center; justify-content: center; font-size: 56px; background: linear-gradient(135deg,#f5f0e8,#ede6d8); }
.popup-body { padding: 14px 16px; }
.popup-user { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.popup-user-avatar { width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; color: #fff; }
.popup-user-naam { font-weight: 600; font-size: 13px; }
.popup-user-tijd { font-size: 11px; color: var(--tekst-dim); }
.popup-bericht { font-size: 14px; color: var(--tekst); line-height: 1.5; margin-bottom: 10px; }
.popup-acties { display: flex; gap: 6px; border-top: 1px solid var(--nav-border); padding-top: 10px; }
.popup-actie { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 7px; border-radius: 8px; border: none; background: transparent; font-size: 13px; font-weight: 600; color: var(--tekst-dim); cursor: pointer; font-family: inherit; transition: background .15s; }
.popup-actie:hover { background: var(--hover); }
.avatar-marker { width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 3px 12px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; color: #fff; cursor: pointer; transition: transform .2s; }
.avatar-marker:hover { transform: scale(1.1); }
.avatar-marker.heeft-foto { background: transparent !important; overflow: hidden; }
.avatar-marker.heeft-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display:block; }
.popup-user-avatar.heeft-foto { background: transparent !important; overflow: hidden; }
.popup-user-avatar.heeft-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display:block; }
.fk-avatar.heeft-foto { background: transparent !important; overflow: hidden; }
.fk-avatar.heeft-foto img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display:block; }

#streetview-modal { display:none; position:fixed; inset:0; background:rgba(12,12,14,.82); z-index:10050; align-items:center; justify-content:center; padding:18px; }
#streetview-modal.open { display:flex; }
.streetview-card { width:min(1100px,100%); height:min(78vh,760px); background:#111; border-radius:18px; overflow:hidden; box-shadow:0 20px 60px rgba(0,0,0,.35); display:flex; flex-direction:column; }
.streetview-header { height:56px; padding:0 16px; background:#fff; border-bottom:1px solid var(--nav-border); display:flex; align-items:center; justify-content:space-between; }
.streetview-header strong { font-family:'Syne',sans-serif; font-size:16px; }
.streetview-frame-wrap { flex:1; position:relative; background:#111; display:flex; flex-direction:column; }
#streetview-exact-map { height:220px; width:100%; border-bottom:1px solid rgba(255,255,255,.08); }
.streetview-frame-wrap iframe { width:100%; height:100%; border:0; flex:1; min-height:280px; }
.streetview-fallback { position:absolute; inset:0; display:none; align-items:center; justify-content:center; flex-direction:column; gap:12px; color:#fff; padding:24px; text-align:center; }
.streetview-fallback a { color:#fff; background:var(--accent); padding:10px 14px; border-radius:10px; text-decoration:none; font-weight:700; }
@media (max-width:768px){ #streetview-modal{padding:0}.streetview-card{width:100%;height:100dvh;max-height:100dvh;border-radius:0} #streetview-exact-map{height:170px} }

/* Event marker — blauw met kalender-icoon */
.event-marker {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg,#4361ee,#2d46c4);
  border: 3px solid #fff;
  box-shadow: 0 3px 14px rgba(67,97,238,.4);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: #fff; cursor: pointer;
  transition: transform .2s;
}
.event-marker:hover { transform: scale(1.1); }
/* Openbaar event — groen randje */
.event-marker.openbaar { box-shadow: 0 3px 14px rgba(67,97,238,.4), 0 0 0 2px #2dc653; }

/* ══════════════════════════════
   BOTTOM NAVIGATIE (mobiel)
══════════════════════════════ */
#bottomnav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: var(--bottomnav-h);
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  z-index: 1000;
  align-items: center;
  justify-content: space-around;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
}
.bn-btn {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 3px; flex: 1; height: 100%;
  border: none; background: transparent;
  cursor: pointer; color: var(--tekst-dim); font-size: 22px;
  transition: color .15s, transform .15s;
  position: relative; padding: 0;
  -webkit-tap-highlight-color: transparent;
}
.bn-btn span { font-size: 10px; font-weight: 600; font-family: inherit; letter-spacing: .2px; }
.bn-btn.actief { color: var(--accent); }
.bn-btn:active { transform: scale(.9); }
.bn-btn.pin-center {
  color: #fff; flex-shrink: 0;
  width: 54px; height: 54px;
  background: var(--accent);
  border-radius: 16px;
  box-shadow: 0 4px 18px rgba(255,77,0,.4);
  font-size: 22px; margin-top: -16px;
  flex: none;
}
.bn-btn.pin-center span { display: none; }
.bn-btn.pin-center.klik-actief { background: var(--donker); animation: pin-pulse 1s ease-in-out infinite; }
.bn-badge { position: absolute; top: 6px; right: calc(50% - 20px); width: 16px; height: 16px; background: var(--accent); border-radius: 50%; font-size: 9px; color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; border: 2px solid #fff; }

/* Toast */
#toast {
  position: fixed;
  bottom: calc(var(--bottomnav-h) + 16px);
  left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--donker); color: #fff;
  padding: 12px 20px; border-radius: 30px;
  font-size: 14px; font-weight: 600;
  z-index: 9999; opacity: 0;
  transition: opacity .25s, transform .25s;
  white-space: nowrap;
}
#toast.zichtbaar { opacity: 1; transform: translateX(-50%) translateY(0); }

/* Fullscreen media viewer */
#media-lightbox { display:none; position:fixed; inset:0; background:rgba(12,12,14,.96); z-index:10060; align-items:center; justify-content:center; padding:18px; }
#media-lightbox.open { display:flex; }
.media-lightbox-card { position:relative; width:min(1200px,100%); height:min(92vh,100%); display:flex; align-items:center; justify-content:center; }
.media-lightbox-card img,
.media-lightbox-card video { max-width:100%; max-height:100%; width:auto; height:auto; border-radius:16px; box-shadow:0 20px 60px rgba(0,0,0,.4); background:#000; }
.media-lightbox-close { position:absolute; top:10px; right:10px; width:42px; height:42px; border:none; border-radius:50%; background:rgba(255,255,255,.12); color:#fff; cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:18px; backdrop-filter:blur(8px); }
.klikbare-media { position:relative; cursor:zoom-in; }
.media-zoom-badge { position:absolute; right:10px; top:10px; background:rgba(0,0,0,.56); color:#fff; border-radius:20px; padding:6px 10px; font-size:12px; font-weight:700; display:flex; align-items:center; gap:6px; backdrop-filter:blur(6px); pointer-events:none; }
@media (max-width:768px){
  #media-lightbox { padding:10px; }
  .media-lightbox-card { height:100%; }
  .media-lightbox-close { top:6px; right:6px; }
}

/* ══════════════════════════════
   RESPONSIVE
══════════════════════════════ */
@media (max-width: 768px) {
  #app { bottom: var(--bottomnav-h); }
  #sidebar-links { display: none; }
  #rechterpanel { display: none; }
  .nav-tabs { display: none; }
  .nav-icon-btn { display: none; }
  .nav-avatar { display: none; }
  #bottomnav { display: flex; }
  /* Feed scherm werkt als eigen pagina */
  #scherm-feed { display: flex; }
}
@media (min-width: 769px) {
  /* Op desktop zijn de extra schermen verborgen */
  #scherm-feed, #scherm-pinnen, #scherm-profiel, #scherm-vrienden, #scherm-meldingen {
    display: none !important;
  }
  #toast { bottom: 24px; }
  .mobiel-kaart-knoppen { display: none !important; }
}

/* ══ EMOJI PICKER ══ */
.emoji-picker-btn {
  background: var(--hover); border: 1.5px solid var(--nav-border);
  border-radius: 8px; padding: 6px 12px; cursor: pointer;
  font-size: 14px; font-family: inherit; font-weight: 600;
  color: var(--tekst-dim); display: flex; align-items: center; gap: 6px;
  transition: background .15s, border-color .15s; margin-top: 6px;
}
.emoji-picker-btn:hover { background: rgba(255,77,0,.06); border-color: var(--accent); }
.emoji-popup {
  display: none; position: absolute;
  bottom: calc(100% + 8px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--nav-border);
  border-radius: 14px; box-shadow: 0 8px 32px rgba(0,0,0,.16);
  padding: 10px; z-index: 3000;
}
.emoji-popup.open { display: block; }
.emoji-popup-grid {
  display: grid; grid-template-columns: repeat(8,1fr);
  gap: 4px; max-height: 200px; overflow-y: auto;
}
.emoji-popup-grid button {
  font-size: 22px; padding: 6px; border: none;
  background: transparent; cursor: pointer; border-radius: 8px;
  transition: background .1s; line-height: 1;
}
.emoji-popup-grid button:hover { background: var(--hover); }

/* ══ MOBIELE KAARTCONTROLES ══ */
.mobiel-kaart-knoppen {
  position: absolute; bottom: 90px; right: 12px;
  display: flex; flex-direction: column; gap: 8px; z-index: 500;
}
.mk-knop {
  width: 42px; height: 42px; background: #fff;
  border: 1px solid rgba(0,0,0,.12); border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  color: var(--tekst); font-size: 17px; cursor: pointer;
  box-shadow: 0 2px 10px rgba(0,0,0,.14); transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.mk-knop:active { background: var(--hover); }
.mk-knop.actief { background: rgba(255,77,0,.1); color: var(--accent); border-color: rgba(255,77,0,.3); }

/* ══ REACTIE MODAL ══ */
#reactie-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 8000; display: none; align-items: flex-end;
}
#reactie-modal.open { display: flex; }
.reactie-sheet {
  background: #fff; border-radius: 20px 20px 0 0;
  width: 100%; max-height: 75vh; display: flex; flex-direction: column;
  animation: sheetUp .25s cubic-bezier(.4,0,.2,1);
}
@keyframes sheetUp {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}
.reactie-sheet-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 12px; border-bottom: 1px solid var(--nav-border); flex-shrink: 0;
}
.reactie-lijst { flex: 1; overflow-y: auto; padding: 16px 20px; }
.reactie-input-bar {
  display: flex; gap: 8px; padding: 12px 16px;
  border-top: 1px solid var(--nav-border); flex-shrink: 0;
  background: #fff;
}
.reactie-input-bar input {
  flex: 1; padding: 10px 14px; border: 1.5px solid var(--nav-border);
  border-radius: 24px; font-size: 14px; font-family: inherit; outline: none;
  transition: border-color .15s;
}
.reactie-input-bar input:focus { border-color: var(--accent); }
.reactie-input-bar button {
  width: 40px; height: 40px; background: var(--accent); color: #fff;
  border: none; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  font-size: 15px; display: flex; align-items: center; justify-content: center;
}

/* ══ GEBRUIKER ACTIE MODAL ══ */
#gebruiker-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 8000; display: none; align-items: flex-end;
}
#gebruiker-modal.open { display: flex; }
.gebruiker-sheet {
  background: #fff; border-radius: 20px 20px 0 0;
  width: 100%; padding: 0; animation: sheetUp .25s cubic-bezier(.4,0,.2,1);
}
.gebruiker-sheet-header {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--nav-border);
  display: flex; align-items: center; gap: 14px;
}
.gebruiker-sheet-actie {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px; border-bottom: 1px solid var(--nav-border);
  cursor: pointer; font-size: 15px; font-weight: 600;
  transition: background .15s; color: var(--tekst);
}
.gebruiker-sheet-actie:last-child { border-bottom: none; }
.gebruiker-sheet-actie:active { background: var(--hover); }
.gebruiker-sheet-actie i { width: 20px; color: var(--tekst-dim); font-size: 16px; }


:root {
  --accent:    #E8673A;
  --accent2:   #4A9FD4;
  --donker:    #0C0C0E;
  --tekst:     #0C0C0E;
  --tekst-dim: #6b6b7b;
  --border:    #e8e8ec;
  --hover:     #f5f5f8;
  --shadow:    0 8px 40px rgba(0,0,0,.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { height: 100%; }
body {
  min-height: 100%;
  font-family: 'Instrument Sans', sans-serif;
  display: flex; align-items: center; justify-content: center;
  padding: 24px 16px;
  position: relative;
  overflow-x: hidden;
}

/* ══ ACHTERGROND FOTO ══
   Zet een foto genaamd 'bg.jpg' (of 'bg.png') in dezelfde map.
   Mooie gratis foto's van Nederland: unsplash.com/s/photos/netherlands
   De gradient hieronder is de fallback als de foto niet laadt.
══════════════════════════════════════════════════════════════ */
.bg-foto {
  position: fixed;
  inset: 0;
  z-index: 0;

  /* ① Jouw eigen foto — zet bg.jpg in dezelfde map als index.html */
  background-image: url('bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;

  /* ② Fallback gradient als foto niet beschikbaar is */
  background-color: #0d1f3c;
}

/* Donkere overlay zodat de tekst leesbaar blijft */
.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    150deg,
    rgba(8, 14, 28, 0.68) 0%,
    rgba(12, 22, 42, 0.52) 50%,
    rgba(8, 14, 28, 0.72) 100%
  );
}

/* ══ WRAP ══ */
.wrap {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 10;
}

/* ══ LOGO ══ */
.logo {
  text-align: center;
  margin-bottom: 28px;
}
.logo img {
  width: min(240px, 70vw);
  height: auto;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 24px rgba(232,103,58,.35));
}

/* ══ PWA INSTALL BANNER ══ */
#pwa-banner {
  display: none;
  background: linear-gradient(135deg, var(--accent), #c4552e);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  color: #fff;
  cursor: pointer;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(232,103,58,.4);
  transition: transform .15s, box-shadow .15s;
  animation: slideIn .4s cubic-bezier(.4,0,.2,1);
}
#pwa-banner:hover { transform: translateY(-1px); box-shadow: 0 6px 24px rgba(232,103,58,.5); }
#pwa-banner.zichtbaar { display: flex; }
@keyframes slideIn {
  from { transform: translateY(-12px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.pwa-banner-icon { font-size: 24px; flex-shrink: 0; }
.pwa-banner-tekst { flex: 1; }
.pwa-banner-tekst strong { display: block; font-size: 14px; font-weight: 700; }
.pwa-banner-tekst span   { font-size: 12px; opacity: .85; }
.pwa-banner-knop {
  background: rgba(255,255,255,.2); border: none; color: #fff;
  border-radius: 8px; padding: 6px 12px; font-size: 12px;
  font-weight: 700; cursor: pointer; font-family: inherit;
  white-space: nowrap; flex-shrink: 0;
  transition: background .15s;
}
.pwa-banner-knop:hover { background: rgba(255,255,255,.32); }
.pwa-banner-sluiten {
  background: none; border: none; color: rgba(255,255,255,.7);
  cursor: pointer; font-size: 16px; padding: 4px; flex-shrink: 0;
}

/* iOS install tip */
#ios-tip {
  display: none;
  background: rgba(255,255,255,.95);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 16px;
  align-items: center;
  gap: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.2);
  font-size: 13px;
  color: var(--tekst);
  animation: slideIn .4s cubic-bezier(.4,0,.2,1);
}
#ios-tip.zichtbaar { display: flex; }
#ios-tip i { color: var(--accent); font-size: 18px; flex-shrink: 0; }
#ios-tip .ios-sluiten { margin-left: auto; background: none; border: none; cursor: pointer; color: var(--tekst-dim); font-size: 16px; }

/* ══ CARD ══ */
.card {
  background: rgba(255,255,255,.97);
  border-radius: 22px;
  padding: 32px 32px 28px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(20px);
}

/* Tabs */
.tabs { display: flex; background: var(--hover); border-radius: 10px; padding: 4px; margin-bottom: 24px; gap: 4px; }
.tab { flex: 1; padding: 9px; border: none; background: transparent; border-radius: 8px; font-size: 14px; font-weight: 600; font-family: inherit; color: var(--tekst-dim); cursor: pointer; transition: background .2s, color .2s; }
.tab.actief { background: #fff; color: var(--tekst); box-shadow: 0 1px 6px rgba(0,0,0,.08); }

/* Formulier */
.form { display: flex; flex-direction: column; gap: 14px; }
.form-groep { display: flex; flex-direction: column; gap: 5px; }
.form-groep label { font-size: 12px; font-weight: 600; color: var(--tekst-dim); text-transform: uppercase; letter-spacing: .5px; }
.input-wrap { position: relative; }
.input-wrap i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--tekst-dim); font-size: 14px; pointer-events: none; }
.input-wrap input { width: 100%; padding: 12px 14px 12px 40px; border: 1.5px solid var(--border); border-radius: 10px; font-size: 15px; font-family: inherit; color: var(--tekst); background: #fff; outline: none; transition: border-color .2s, box-shadow .2s; }
.input-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(232,103,58,.12); }
.oog-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--tekst-dim); font-size: 14px; padding: 4px; }
.fout { background: #fff2f0; border: 1.5px solid #ffccc7; border-radius: 8px; padding: 10px 14px; font-size: 13px; color: #d4380d; display: none; align-items: center; gap: 8px; margin-bottom: 4px; }
.fout.zichtbaar { display: flex; }
.btn-submit { width: 100%; padding: 14px; background: var(--accent); color: #fff; border: none; border-radius: 11px; font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .15s, transform .1s, box-shadow .15s; box-shadow: 0 4px 16px rgba(232,103,58,.35); margin-top: 4px; }
.btn-submit:hover { background: #d45a2e; box-shadow: 0 6px 20px rgba(232,103,58,.45); }
.btn-submit:active { transform: scale(.98); }
.btn-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.vergeten { text-align: right; margin-top: -6px; }
.vergeten a { font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 600; }
.vergeten a:hover { text-decoration: underline; }
.voorwaarden { font-size: 11px; color: var(--tekst-dim); text-align: center; margin-top: 8px; line-height: 1.6; }
.voorwaarden a { color: var(--accent); text-decoration: none; }

/* Succes */
#succes-scherm { display: none; text-align: center; }
#succes-scherm.zichtbaar { display: block; }
.succes-icon { width: 64px; height: 64px; background: linear-gradient(135deg, var(--accent), var(--accent2)); border-radius: 50%; margin: 0 auto 16px; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; box-shadow: 0 4px 20px rgba(232,103,58,.35); animation: pop .4s cubic-bezier(.4,0,.2,1) forwards; }
.succes-titel { font-family: 'Syne', sans-serif; font-weight: 800; font-size: 22px; color: var(--tekst); margin-bottom: 8px; }
.succes-sub { font-size: 14px; color: var(--tekst-dim); line-height: 1.6; }

/* Footer */
.login-footer { text-align: center; margin-top: 20px; font-size: 12px; color: rgba(255,255,255,.3); }

@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes pop { 0% { transform: scale(0); opacity: 0; } 70% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }

