:root {
  --groen: #1b5e20;
  --groen-donker: #0d3d12;
  --groen-licht: #4c8c4a;
  --water: #0d47a1;
  --achtergrond: #f2f5f2;
  --kaart: #ffffff;
  --tekst: #222;
  --grijs: #666;
  --rand: #ddd;
  --fout: #b71c1c;
  --ok: #2e7d32;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--achtergrond);
  color: var(--tekst);
  line-height: 1.4;
}

header {
  background: linear-gradient(135deg, var(--groen-donker), var(--groen));
  color: #fff;
  padding: 16px 16px 20px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

header h1 { font-size: 1.5rem; margin: 0; }
.kop-logo {
  height: 3rem;
  width: auto;
  border-radius: 8px;
  background: #fff;
  padding: 3px;
}
.hook { margin-right: 4px; }
.sub { font-size: 0.9rem; opacity: 0.9; margin-top: 4px; }

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 12px 12px 40px;
}

.card {
  background: var(--kaart);
  border-radius: 14px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
  padding: 16px;
  margin-bottom: 16px;
}

.card h2 {
  font-size: 1.05rem;
  color: var(--groen);
  margin-bottom: 12px;
  border-bottom: 2px solid var(--groen-licht);
  padding-bottom: 6px;
}

label {
  display: block;
  margin: 12px 0 4px;
  font-weight: 600;
  font-size: 0.95rem;
}

label small { font-weight: 400; color: var(--grijs); }

input[type="date"],
input[type="number"],
input[type="text"],
input[type="url"],
select {
  width: 100%;
  padding: 10px 12px;
  font-size: 1rem;
  border: 1px solid var(--rand);
  border-radius: 8px;
  background: #fff;
}

input:focus, select:focus { outline: 2px solid var(--groen-licht); }

#kaartContainer {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  border: 2px solid var(--groen-licht);
  background: #e9f0e9;
}

#kaartImg {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.hidden { display: none !important; }

.gps-status {
  margin-top: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--rand);
  background: var(--achtergrond);
  color: var(--grijs);
}
.gps-status.ok {
  border-color: var(--ok);
  background: rgba(46, 125, 50, 0.12);
  color: var(--ok);
}
.gps-status.waarschuwing {
  border-color: var(--fout);
  background: rgba(183, 28, 28, 0.10);
  color: var(--fout);
}

.gps-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  background: var(--water);
  border-radius: 999px;
  padding: 3px 10px;
  vertical-align: middle;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
}

.locatie-uitleg {
  margin: 10px 0 0;
  font-size: 0.9rem;
}

.verplicht-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--fout);
  border: 1px solid var(--fout);
  border-radius: 999px;
  padding: 2px 8px;
  vertical-align: middle;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.locatie-melding {
  margin-top: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--fout);
}

#plaatsHandmatig.verplicht {
  border-color: var(--fout);
  box-shadow: 0 0 0 1px var(--fout) inset;
}

.locatie-info {
  font-size: 0.85rem;
  color: var(--grijs);
  margin-top: 6px;
  min-height: 1.1em;
  word-break: break-word;
}

.btn-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

button {
  flex: 1;
  min-width: 140px;
  padding: 11px 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  background: var(--groen-licht);
  color: #fff;
  cursor: pointer;
}
button:active { transform: scale(0.98); }

button.primary {
  width: 100%;
  margin-top: 16px;
  background: linear-gradient(135deg, var(--groen), var(--groen-licht));
  font-size: 1.05rem;
  padding: 13px;
}

button.btn-secondary {
  background: #e0e0e0;
  color: #333;
  flex: 0 1 auto;
}

#soortRegels { margin-bottom: 8px; }

.soort-regel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  background: #f3f8f3;
  border: 1px solid var(--rand);
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
}
.soort-regel .regel-soort { flex: 1 1 200px; }
.soort-regel .regel-soort-overig { flex: 1 1 200px; }
.soort-regel .regel-aantal { flex: 0 0 90px; }
.soort-regel .regel-verwijder {
  flex: 0 0 auto;
  width: 36px;
  min-width: 36px;
  padding: 8px 0;
}
#voegSoortBtn { margin-bottom: 4px; }

#verstuurBtn:disabled { opacity: 0.55; cursor: not-allowed; }

#uploadStatus { margin-top: 10px; font-size: 0.9rem; }
#uploadStatus.ok { color: var(--ok); }
#uploadStatus.fout { color: var(--fout); }

#registratieLijst { list-style: none; }
#registratieLijst li {
  padding: 10px 4px;
  border-bottom: 1px solid var(--rand);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
#registratieLijst li .info { font-size: 0.9rem; }
#registratieLijst li .info b { font-size: 0.95rem; }
#registratieLijst li .klein { font-size: 0.78rem; color: var(--grijs); }
#registratieLijst li .verwijder {
  background: none;
  color: var(--fout);
  font-size: 1.3rem;
  min-width: 34px;
  flex: 0 0 auto;
  padding: 2px 6px;
}
#registratieLijst li .status-sync {
  font-size: 0.7rem;
  color: var(--grijs);
  margin-top: 2px;
}
#registratieLijst li .status-sync.synced { color: var(--ok); }

.sync-status { font-size: 0.85rem; color: var(--grijs); margin-top: 8px; }

.hulp { font-size: 0.8rem; color: var(--grijs); margin-top: 6px; }

.install-summary {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--groen);
  cursor: pointer;
  list-style: none;
}
.install-summary::-webkit-details-marker { display: none; }
.install-inhoud { margin-top: 10px; }
.install-inhoud p { margin-bottom: 8px; font-size: 0.9rem; }
.install-inhoud p:last-child { margin-bottom: 0; }

footer {
  text-align: center;
  padding: 14px;
  font-size: 0.78rem;
  color: var(--grijs);
}