:root {
  --kleur-tekst: #1b2733;
  --kleur-rand: #d7dde3;
  --kleur-accent: #0a5c36;
  --kleur-achtergrond-licht: #f6f8f9;
}

* { box-sizing: border-box; }

body {
  font-family: -apple-system, "Segoe UI", Arial, sans-serif;
  color: var(--kleur-tekst);
  margin: 0;
  background: #fff;
}

.koptekst {
  background: var(--kleur-accent);
  color: #fff;
  padding: 1rem 1.5rem;
}
.koptekst-rij {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.koptekst .logo {
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  text-decoration: none;
}
.hoofdnavigatie a {
  color: #fff;
  text-decoration: none;
  margin-left: 1.2rem;
  font-size: 0.92rem;
  opacity: 0.9;
}
.hoofdnavigatie a:hover { opacity: 1; text-decoration: underline; }
.hoofdnavigatie { display: flex; align-items: center; }
.nav-formulier { display: inline; margin-left: 1.2rem; }
.nav-knop {
  background: none;
  border: none;
  color: #fff;
  opacity: 0.9;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.nav-knop:hover { opacity: 1; text-decoration: underline; }
.koptekst .ondertitel {
  margin: 0.2rem 0 0;
  opacity: 0.85;
  font-size: 0.9rem;
}

main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem;
}

.voettekst {
  text-align: center;
  color: #6b7785;
  font-size: 0.85rem;
  padding: 1.5rem;
}
.voettekst a { color: inherit; }

/* Filterformulier */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem;
  background: var(--kleur-achtergrond-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: 8px;
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.filterveld { display: flex; flex-direction: column; gap: 0.3rem; }
.filterveld label { font-size: 0.85rem; font-weight: 600; }
.filterveld select, .filterveld input[type="text"] {
  padding: 0.45rem 0.5rem;
  border: 1px solid var(--kleur-rand);
  border-radius: 6px;
  font-size: 0.95rem;
}
.filterveld-checkbox { flex-direction: row; align-items: center; justify-content: flex-start; }
.filterveld-checkbox label { font-weight: 400; display: flex; align-items: center; gap: 0.4rem; }
.filterveld-knoppen { flex-direction: row; align-items: center; gap: 0.6rem; }

button, .knop-secundair, .knop-primair {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
}
button, .knop-primair {
  background: var(--kleur-accent);
  color: #fff;
  border: none;
}
.knop-secundair {
  background: #fff;
  color: var(--kleur-tekst);
  border: 1px solid var(--kleur-rand);
}

/* Resultaten */
.resultaten-balk {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

table.resultaten {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
table.resultaten th, table.resultaten td {
  border-bottom: 1px solid var(--kleur-rand);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}
table.resultaten th a { color: var(--kleur-tekst); text-decoration: none; }
table.resultaten tbody tr:hover { background: var(--kleur-achtergrond-licht); }

.status {
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  font-size: 0.8rem;
}
.status-open { background: #e3f3e8; color: #0a5c36; }
.status-gesloten { background: #f1f1f1; color: #6b7785; }

.paginering {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  margin: 1.2rem 0;
}

/* Detailpagina */
.detail h1 { margin-bottom: 0.6rem; }
.detail-tabel { border-collapse: collapse; margin: 1rem 0; width: 100%; }
.detail-tabel th, .detail-tabel td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--kleur-rand);
  vertical-align: top;
}
.detail-tabel th { width: 220px; color: #4b5563; font-weight: 600; }
.omschrijving { white-space: pre-wrap; line-height: 1.5; }
.cpv-lijst { margin: 0; padding-left: 1.2rem; }

/* Bedrijfsprofielen */
.profiel-formulier {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 520px;
}
.profiel-formulier .filterveld label { font-weight: 600; font-size: 0.9rem; }
.profiel-formulier .filterveld input[type="text"],
.profiel-formulier .filterveld input[type="email"] {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--kleur-rand);
  border-radius: 6px;
  font-size: 0.95rem;
}
.profiel-formulier fieldset {
  border: 1px solid var(--kleur-rand);
  border-radius: 8px;
  padding: 0.8rem 1rem;
}
.profiel-formulier legend { font-weight: 600; font-size: 0.9rem; padding: 0 0.3rem; }
.profiel-formulier .hint { font-weight: 400; color: #6b7785; font-size: 0.82rem; }
.checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin: 0.2rem 0.9rem 0.2rem 0;
  font-weight: 400;
  font-size: 0.9rem;
}
.profiel-formulier button {
  align-self: flex-start;
}
.melding-opgeslagen {
  background: #e3f3e8;
  color: #0a5c36;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}
.melding-fout {
  background: #fde8e8;
  color: #9b1c1c;
  padding: 0.5rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
}
.login-formulier {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  max-width: 360px;
  background: var(--kleur-achtergrond-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: 8px;
  padding: 1.5rem;
}
.login-formulier label { font-weight: 600; font-size: 0.9rem; }
.login-formulier input {
  padding: 0.5rem 0.6rem;
  border: 1px solid var(--kleur-rand);
  border-radius: 6px;
  font-size: 0.95rem;
}

/* AI-samenvatting (fase 4) */
.ai-samenvatting {
  background: var(--kleur-achtergrond-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-bottom: 1rem;
}
.ai-testmodus-melding {
  background: #fff4e0;
  color: #8a5a00;
  padding: 0.4rem 0.7rem;
  border-radius: 6px;
  font-size: 0.85rem;
  margin-top: 0;
}
.ai-details { margin: 0.8rem 0; }
.ai-details dt { font-weight: 600; margin-top: 0.7rem; }
.ai-details dd { margin: 0.2rem 0 0; }
.ai-details ul { margin: 0.2rem 0; padding-left: 1.2rem; }
.advies {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.85rem;
}
.advies-inschrijven { background: #e3f3e8; color: #0a5c36; }
.advies-twijfel { background: #fff4e0; color: #8a5a00; }
.advies-niet { background: #fde8e8; color: #9b1c1c; }
.ai-disclaimer {
  font-size: 0.8rem;
  color: #6b7785;
  margin-top: 0.8rem;
  margin-bottom: 0;
}

/* Beveiliging van profielen */
p.hint { color: #6b7785; font-size: 0.88rem; }
.profielen-acties { display: flex; gap: 0.5rem; }
.melding-nieuw-profiel {
  background: #fff4e0;
  color: #8a5a00;
  padding: 0.8rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.92rem;
}
.geen-toegang {
  max-width: 480px;
  background: var(--kleur-achtergrond-licht);
  border: 1px solid var(--kleur-rand);
  border-radius: 8px;
  padding: 1.5rem;
}
.verwijder-formulier { margin-top: 1.5rem; max-width: 520px; }

/* Overzichtspagina */
.overzicht-kolommen {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}
