/* ════════════════════════════════════════════════════════════════════
   beheerkaart.css  —  Stijlen voor de beheerderskaart
   ════════════════════════════════════════════════════════════════════ */

/* ── Layout aanpassingen voor de extra kleur-balk ─────────────────── */
body {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
  margin: 0;
  background: #1a2418;
  color: #e8e0d0;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

header {
  flex-shrink: 0;
}

#kleur-balk {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  background: #1e2d1f;
  border-bottom: 1px solid #2e4530;
  overflow-x: auto;
  scrollbar-width: none;
}
#kleur-balk::-webkit-scrollbar { display: none; }

.km-label {
  font-size: 0.75rem;
  color: #7a9a7a;
  white-space: nowrap;
  margin-right: 2px;
  flex-shrink: 0;
}

.km-chip {
  flex-shrink: 0;
  padding: 5px 13px;
  border-radius: 20px;
  border: 1.5px solid #3a5a3a;
  background: #2c3e2d;
  color: #c8d8c8;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
}
.km-chip:hover  { background: #3a5030; border-color: #5a8060; color: #e8e0d0; }
.km-chip.actief { background: #4a7a50; border-color: #6aaa6a; color: #ffffff; }

#filter-balk {
  flex-shrink: 0;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: #192318;
  border-bottom: 1px solid #2a3a2a;
  overflow-x: auto;
  scrollbar-width: none;
}
#filter-balk.open { display: flex; }
#filter-balk::-webkit-scrollbar { display: none; }

#kaart-wrapper {
  flex: 1;
  position: relative;
  overflow: hidden;
}

/* ── Statistieken-paneel ───────────────────────────────────────────── */
#stats-paneel {
  position: absolute;
  top: 14px;
  left: 60px;
  z-index: 500;
  background: rgba(28, 40, 28, 0.96);
  border: 1px solid #3a5a3a;
  border-radius: 12px;
  padding: 14px 18px;
  min-width: 230px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  backdrop-filter: blur(6px);
}

.sp-titel {
  font-size: 0.85rem;
  font-weight: 700;
  color: #a8c8a8;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}

.sp-rij {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3px 0;
  font-size: 0.8rem;
}

.sp-lbl { color: #c0cfc0; }

.sp-val {
  font-weight: 700;
  font-size: 0.85rem;
  min-width: 28px;
  text-align: right;
}
.sp-val.rood   { color: #fc8181; }
.sp-val.oranje { color: #f6ad55; }
.sp-val.groen  { color: #68d391; }
.sp-val.grijs  { color: #a0a0a0; }

.sp-sep {
  height: 1px;
  background: #2e4530;
  margin: 7px 0;
}

/* ── Legenda ───────────────────────────────────────────────────────── */
#bk-legende {
  position: absolute;
  bottom: 30px;
  left: 14px;
  z-index: 500;
  background: rgba(28, 40, 28, 0.96);
  border: 1px solid #3a5a3a;
  border-radius: 10px;
  padding: 10px 14px;
  min-width: 180px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
  backdrop-filter: blur(6px);
}

.bkl-titel {
  font-size: 0.75rem;
  font-weight: 700;
  color: #a8c8a8;
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.bkl-rij {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: #c8d8c8;
  padding: 2px 0;
}

.bkl-kleur {
  display: inline-block;
  width: 14px;
  height: 14px;
  border-radius: 3px;
  flex-shrink: 0;
  border: 1px solid rgba(255,255,255,0.15);
}

/* ── Login-overlay ─────────────────────────────────────────────────── */
#bk-login-overlay {
  position: absolute;
  inset: 0;
  z-index: 2000;
  background: rgba(10, 18, 10, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.bkl-kaart {
  background: #1e2d1f;
  border: 1px solid #3a5a3a;
  border-radius: 16px;
  padding: 36px 40px;
  width: 340px;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.bkl-logo { font-size: 2.8rem; }

.bkl-titel-h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #d8e8d8;
  margin: 0;
  text-align: center;
}

.bkl-sub {
  font-size: 0.82rem;
  color: #7a9a7a;
  margin: 0;
  text-align: center;
}

.bkl-label {
  align-self: flex-start;
  font-size: 0.8rem;
  color: #a8c8a8;
  font-weight: 600;
  margin-bottom: -4px;
}

.bkl-kaart input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  background: #2a3e2b;
  border: 1.5px solid #3a5a3a;
  border-radius: 8px;
  color: #e8e0d0;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.15s;
}
.bkl-kaart input[type="password"]:focus { border-color: #6aaa6a; }

.bkl-fout {
  color: #fc8181;
  font-size: 0.8rem;
  min-height: 18px;
  text-align: center;
  width: 100%;
}

.bkl-kaart button#bkl-btn {
  width: 100%;
  padding: 11px;
  background: #3a6e40;
  border: none;
  border-radius: 8px;
  color: #e8f5e8;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.bkl-kaart button#bkl-btn:hover:not(:disabled) { background: #4a8e50; }
.bkl-kaart button#bkl-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.bkl-annuleer {
  font-size: 0.8rem;
  color: #7a9a7a;
  text-decoration: none;
  margin-top: 4px;
  transition: color 0.15s;
}
.bkl-annuleer:hover { color: #a8c8a8; }

/* ── Zijpaneel donker thema (overschrijft kaart.css) ───────────────── */
#zijpaneel { background: #19251a; }
#zijpaneel .paneel-inhoud {
  background: #19251a;
  padding: 0 16px 32px;
}
#zijpaneel .paneel-inhoud::-webkit-scrollbar-thumb { background: #3a5a3a; }

.bk-paneel-titel {
  font-size: 1.05rem;
  font-weight: 700;
  color: #e8f5e8;
  margin: 8px 0 10px;
  letter-spacing: 0.04em;
  position: relative; z-index: 1;
}

/* ── Zijpaneel admin-uitbreidingen ─────────────────────────────────── */
.bk-sectie {
  border-bottom: 1px solid #2e3e2e;
  padding: 12px 0;
}
.bk-sectie:last-child { border-bottom: none; }

.bk-sectie-titel {
  font-size: 0.75rem;
  font-weight: 700;
  color: #7a9a7a;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.bk-info-rij {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 3px 0;
  font-size: 0.82rem;
}

.bk-lbl {
  color: #8a9e8a;
  flex-shrink: 0;
}

.bk-val {
  color: #e8e0d0;
  text-align: right;
  word-break: break-word;
}
.bk-val.grijs { color: #7a8a7a; font-style: italic; }

.bk-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 0.76rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.bk-tel, .bk-mail {
  color: #6aaa6a;
  text-decoration: none;
  font-size: 0.82rem;
}
.bk-tel:hover, .bk-mail:hover { color: #8aca8a; text-decoration: underline; }

.bk-geen-contact {
  font-size: 0.82rem;
  color: #fc8181;
  padding: 4px 0;
}

.bk-opmerking {
  font-size: 0.82rem;
  color: #c8d0c8;
  background: #1a281a;
  border-radius: 6px;
  padding: 8px 10px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ── Bewerkbare formuliervelden in zijpaneel ───────────────────────── */
.bk-form-rij {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}

.bk-form-rij--col {
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
}

.bk-form-lbl {
  font-size: 0.78rem;
  color: #8a9e8a;
  flex-shrink: 0;
  min-width: 90px;
}

.bk-form-rij--col .bk-form-lbl {
  min-width: unset;
}

.bk-form-input {
  flex: 1;
  background: #1e2e1e;
  border: 1.5px solid #3a5a3a;
  border-radius: 6px;
  color: #e8e0d0;
  font-size: 0.82rem;
  padding: 5px 9px;
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  min-width: 0;
}

.bk-form-input:focus {
  border-color: #6aaa6a;
  background: #243424;
}

.bk-form-input[type="date"] {
  color-scheme: dark;
}

select.bk-form-input {
  cursor: pointer;
}

.bk-form-textarea {
  resize: vertical;
  min-height: 58px;
  line-height: 1.4;
  font-family: inherit;
}

.bk-acties {
  padding-top: 10px;
  border-top: 1px solid #2e4530;
}

.bk-opslaan-knop {
  width: 100%;
  padding: 10px;
  background: #2a5a30;
  border: none;
  border-radius: 8px;
  color: #e8f5e8;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 4px;
}
.bk-opslaan-knop:hover:not(:disabled) { background: #3a7a40; }
.bk-opslaan-knop:disabled             { opacity: 0.6; cursor: not-allowed; }
.bk-opslaan-knop.bk-opslaan-ok       { background: #276a2a; }

.bk-fout-tekst {
  font-size: 0.8rem;
  color: #fc8181;
  background: rgba(229, 62, 62, 0.12);
  border-radius: 6px;
  padding: 6px 10px;
  margin-bottom: 6px;
}

/* ── Oud: bewerk-knop (niet meer nodig maar voor backwards compat) ──── */
.bk-bewerk-knop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 9px;
  background: #2a3e2b;
  border: 1.5px solid #3a5a3a;
  border-radius: 8px;
  color: #a8c8a8;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  margin-top: 4px;
  transition: background 0.15s, border-color 0.15s;
}
.bk-bewerk-knop:hover { background: #3a5030; border-color: #5a8060; color: #d8f0d8; }

/* ── Responsive ────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  #stats-paneel { left: 8px; right: 8px; min-width: unset; top: 10px; }
  #bk-legende   { left: 8px; bottom: 20px; }
  .bkl-kaart    { width: calc(100vw - 40px); padding: 28px 24px; }
}

/* ── Personen (mede-rijen, formulieren) ────────────────────────────── */
.mede-laden, .mede-leeg {
  font-size: 0.82rem; color: #999; padding: 6px 0; font-style: italic;
}
.mede-rij {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 7px 10px;
  background: #fff; border: 1px solid #e8eee8; border-radius: 8px;
  margin-bottom: 5px;
}
.mede-rij-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.mede-naam  { font-size: 0.88rem; font-weight: 600; color: #2d3748; }
.mede-jaren { font-size: 0.76rem; color: #718096; }
.mede-rij-acties { display: flex; gap: 4px; flex-shrink: 0; }
.btn-mede-bewerk, .btn-mede-verwijder {
  background: none; border: 1px solid #e2e8e2; border-radius: 6px;
  padding: 3px 7px; font-size: 0.8rem; cursor: pointer;
  transition: background 0.15s;
}
.btn-mede-bewerk:hover   { background: #eef2ee; }
.btn-mede-verwijder:hover { background: #fff0f0; }
.btn-mede-toevoegen {
  margin-top: 6px; padding: 6px 12px;
  background: #f0f7f0; border: 1.5px solid #b8d4b8;
  border-radius: 7px; font-size: 0.82rem; color: #2d6a2d;
  cursor: pointer; transition: background 0.15s;
}
.btn-mede-toevoegen:hover { background: #ddf0dd; }
.mede-formulier {
  background: #f8fdf8; border: 1.5px solid #c8e0c8;
  border-radius: 10px; padding: 10px 12px 8px;
  margin-bottom: 6px; display: flex; flex-direction: column; gap: 7px;
}
.mede-formulier-titel { font-size: 0.8rem; font-weight: 700; color: #2d5a2d; }
.mede-form-rij { display: flex; flex-direction: column; gap: 2px; }
.mede-form-rij label { font-size: 0.76rem; color: #555; font-weight: 600; }
.mede-form-rij input {
  padding: 5px 8px; border: 1.5px solid #ccc; border-radius: 6px;
  font-size: 0.85rem; outline: none;
}
.mede-form-rij input:focus { border-color: #3a6340; }
.mede-form-acties { display: flex; gap: 6px; margin-top: 2px; }
.btn-mede-sla-op {
  background: #3a6340; color: #fff; border: none;
  padding: 5px 12px; border-radius: 6px; font-size: 0.82rem; cursor: pointer;
}
.btn-mede-sla-op:hover { background: #2c4a2c; }
.btn-mede-annuleer {
  background: none; border: 1.5px solid #ccc;
  padding: 5px 10px; border-radius: 6px; font-size: 0.82rem; color: #666; cursor: pointer;
}
.mede-fout { color: #c53030; font-size: 0.78rem; }

/* ══════════════════════════════════════════════════════════════════════
   NIEUW-GRAF PANEEL
   ══════════════════════════════════════════════════════════════════════ */
#ng-paneel {
  display: none;
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1200;
  width: 300px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  overflow: hidden;
  border: 1.5px solid #c6d9c6;
}
#ng-paneel.open { display: block; }

.ng-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 10px;
  background: linear-gradient(135deg, #1e3a1e, #2d5a2d);
  color: #fff;
}
.ng-titel { font-size: 0.95rem; font-weight: 600; letter-spacing: 0.3px; }
.ng-sluit {
  background: rgba(255,255,255,0.15);
  border: none;
  color: #fff;
  border-radius: 6px;
  width: 26px; height: 26px;
  cursor: pointer;
  font-size: 0.85rem;
  display: flex; align-items: center; justify-content: center;
}
.ng-sluit:hover { background: rgba(255,255,255,0.28); }

.ng-body { padding: 14px 16px 16px; }
.ng-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #4a6741;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  margin: 0 0 4px;
}
.ng-label + .ng-label, .ng-input + .ng-label { margin-top: 10px; }
.ng-input {
  width: 100%;
  box-sizing: border-box;
  padding: 7px 10px;
  border: 1.5px solid #d0ddd0;
  border-radius: 7px;
  font-size: 0.88rem;
  color: #2d3a2d;
  background: #f8fbf8;
  outline: none;
  transition: border-color 0.15s;
}
.ng-input:focus { border-color: #4a8a4a; background: #fff; }
.ng-fout {
  min-height: 16px;
  margin-top: 8px;
  font-size: 0.8rem;
  color: #c53030;
  line-height: 1.35;
}
.ng-acties {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}
.ng-annuleer {
  flex: 1;
  padding: 8px;
  border: 1.5px solid #ccc;
  border-radius: 8px;
  background: none;
  font-size: 0.85rem;
  color: #666;
  cursor: pointer;
}
.ng-annuleer:hover { background: #f5f5f5; }
.ng-opslaan {
  flex: 2;
  padding: 8px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d6a2d, #3a8a3a);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s;
}
.ng-opslaan:hover { opacity: 0.88; }
.ng-opslaan:disabled { opacity: 0.55; cursor: not-allowed; }

/* Teken-modus: knop oplichten */
#btn-nieuw-graf.actief {
  background: #e53e3e;
  color: #fff;
  border-color: #c53030;
}

/* ── Teken-balk (zweeft boven kaart tijdens tekenen) ── */
#ng-teken-balk {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: none;
  align-items: center;
  gap: 10px;
  background: #1e3a1e;
  color: #fff;
  padding: 9px 16px;
  border-radius: 24px;
  box-shadow: 0 4px 18px rgba(0,0,0,0.28);
  font-size: 0.85rem;
  white-space: nowrap;
}
#ng-punten-teller { opacity: 0.85; }
#ng-teken-balk button {
  padding: 5px 13px;
  border-radius: 14px;
  border: none;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}
#ng-klaar-btn {
  background: #4a9a4a;
  color: #fff;
}
#ng-klaar-btn:disabled {
  background: #3a5a3a;
  color: #888;
  cursor: not-allowed;
}
#ng-teken-balk button:last-child {
  background: rgba(255,255,255,0.15);
  color: #fff;
}
#ng-teken-balk button:last-child:hover {
  background: rgba(255,255,255,0.28);
}
