[hidden] { display: none !important; }

:root {
  --kleur-primair: #2563eb;
  --kleur-primair-hover: #1d4ed8;
  --kleur-gevaar: #dc2626;
  --kleur-gevaar-hover: #b91c1c;
  --kleur-achtergrond: #f1f5f9;
  --kleur-kaart: #ffffff;
  --kleur-rand: #e2e8f0;
  --kleur-tekst: #1e293b;
  --kleur-tekst-licht: #64748b;
  --kleur-badge: #eff6ff;
  --kleur-badge-tekst: #1d4ed8;
  --radius: 10px;
  --schaduw: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --schaduw-hover: 0 4px 12px rgba(0,0,0,.12);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── Login ── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-card {
  background: var(--kleur-kaart);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 380px;
}

.login-card h1 { font-size: 1.4rem; margin-bottom: .25rem; }
.login-subtitle { color: var(--kleur-tekst-licht); font-size: .9rem; margin-bottom: 1.5rem; }

/* ── Header ── */
header {
  background: var(--kleur-kaart);
  border-bottom: 1px solid var(--kleur-rand);
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 10;
}

header h1 { font-size: 1.1rem; font-weight: 700; }

/* ── Hoofd inhoud ── */
main { max-width: 1100px; margin: 0 auto; padding: 1.5rem; }

/* ── Filters ── */
.filters {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 1rem;
}

.filters .nieuw-btn { margin-left: auto; }

.filter-btn {
  background: var(--kleur-kaart);
  border: 1px solid var(--kleur-rand);
  border-radius: 999px;
  padding: .3rem .9rem;
  font-size: .85rem;
  cursor: pointer;
  color: var(--kleur-tekst-licht);
  transition: all .15s;
}

.filter-btn:hover, .filter-btn.actief {
  background: var(--kleur-primair);
  border-color: var(--kleur-primair);
  color: #fff;
}

/* ── Actiebalk ── */
.actiebalk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.aantal { color: var(--kleur-tekst-licht); font-size: .9rem; }

/* ── Kaartjes grid ── */
.kaarten-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.kaart {
  background: var(--kleur-kaart);
  border-radius: var(--radius);
  box-shadow: var(--schaduw);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s, transform .2s;
  min-height: 340px;
}

.kaart:hover {
  box-shadow: var(--schaduw-hover);
  transform: translateY(-2px);
}

.kaart-afbeelding {
  width: 100%;
  height: 50px;
  object-fit: cover;
  background: var(--kleur-achtergrond);
}

.kaart-afbeelding-placeholder {
  width: 100%;
  height: 50px;
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: var(--kleur-tekst-licht);
}

.kaart-body { padding: 1rem; flex: 1; display: flex; flex-direction: column; gap: .4rem; }

.kaart-naam { font-size: 1rem; font-weight: 600; }

.kaart-badge {
  display: inline-block;
  background: var(--kleur-badge);
  color: var(--kleur-badge-tekst);
  font-size: .75rem;
  font-weight: 600;
  padding: .15rem .6rem;
  border-radius: 999px;
  width: fit-content;
}

.kaart-beschrijving {
  color: var(--kleur-tekst-licht);
  font-size: .875rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 6;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.kaart-acties {
  display: flex;
  gap: .5rem;
  padding: .75rem 1rem;
  border-top: 1px solid var(--kleur-rand);
}

/* ── Lege staat ── */
.lege-staat {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--kleur-tekst-licht);
}
.lege-staat p { margin-bottom: 1rem; font-size: 1.1rem; }

/* ── Knoppen ── */
.btn-primair {
  background: var(--kleur-primair);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-primair:hover { background: var(--kleur-primair-hover); }
.btn-primair:disabled { opacity: .6; cursor: not-allowed; }

.btn-secundair {
  background: transparent;
  color: var(--kleur-tekst);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .55rem 1.1rem;
  font-size: .9rem;
  cursor: pointer;
  transition: background .15s;
}
.btn-secundair:hover { background: var(--kleur-achtergrond); }

.btn-gevaar {
  background: transparent;
  color: var(--kleur-gevaar);
  border: 1px solid var(--kleur-gevaar);
  border-radius: var(--radius);
  padding: .4rem .85rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
  flex: 1;
}
.btn-gevaar:hover { background: var(--kleur-gevaar); color: #fff; }

.btn-bewerken {
  background: var(--kleur-achtergrond);
  color: var(--kleur-tekst);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .4rem .85rem;
  font-size: .85rem;
  cursor: pointer;
  transition: background .15s;
  flex: 1;
}
.btn-bewerken:hover { background: var(--kleur-rand); }

.btn-volledig { width: 100%; }

.btn-uitloggen {
  background: transparent;
  color: var(--kleur-tekst-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .35rem .85rem;
  font-size: .85rem;
  cursor: pointer;
  transition: all .15s;
}
.btn-uitloggen:hover { color: var(--kleur-gevaar); border-color: var(--kleur-gevaar); }

/* ── Formulier ── */
.form-group { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1rem; }
.form-group label { font-size: .875rem; font-weight: 600; }

.form-group input,
.form-group textarea,
.form-group select {
  border: 1px solid var(--kleur-rand);
  border-radius: var(--radius);
  padding: .6rem .75rem;
  font-size: .9rem;
  font-family: inherit;
  color: var(--kleur-tekst);
  background: #fff;
  transition: border-color .15s;
  width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--kleur-primair);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}

.form-group textarea { resize: vertical; min-height: 120px; }

.form-acties {
  display: flex;
  gap: .75rem;
  justify-content: flex-end;
  margin-top: .5rem;
}

/* ── Afbeelding preview ── */
.afbeelding-preview {
  margin-top: .5rem;
  position: relative;
}

.afbeelding-preview img {
  width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--kleur-rand);
}

.verwijder-afbeelding-btn {
  margin-top: .4rem;
  background: transparent;
  color: var(--kleur-gevaar);
  border: none;
  font-size: .8rem;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

/* ── Foutmelding ── */
.error-msg {
  background: #fef2f2;
  color: var(--kleur-gevaar);
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  padding: .6rem .85rem;
  font-size: .875rem;
  margin-bottom: 1rem;
}

/* ── Modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2rem 1rem;
  z-index: 100;
  overflow-y: auto;
}

.modal {
  background: var(--kleur-kaart);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
  width: 100%;
  max-width: 520px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--kleur-rand);
}

.modal-header h2 { font-size: 1.1rem; }

.modal-sluiten {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: var(--kleur-tekst-licht);
  padding: .1rem .4rem;
  border-radius: 4px;
}
.modal-sluiten:hover { background: var(--kleur-achtergrond); }

.modal-body { padding: 1.5rem; }

/* ── Laadindicator ── */
.laden {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4rem;
  color: var(--kleur-tekst-licht);
}

@media (max-width: 480px) {
  main { padding: 1rem; }
  .actiebalk { flex-direction: column; align-items: flex-start; gap: .75rem; }
  .btn-primair.nieuw-btn { width: 100%; text-align: center; }
}
