:root {
  --inkt: #1b2a3a;
  --papier: #f4f1ea;
  --accent: #2f6b4f;
  --accent-licht: #e3ede7;
  --fout: #9b2c2c;
  --rand: #d8d2c4;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  background: var(--papier);
  color: var(--inkt);
  line-height: 1.55;
}
.balk {
  background: var(--inkt);
  color: var(--papier);
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  letter-spacing: .04em;
}
.balk a { color: var(--papier); text-decoration: none; font-size: .85rem; opacity: .8; }
.balk a:hover { opacity: 1; }
.merk { font-weight: 600; font-size: 1.05rem; }
main { max-width: 760px; margin: 48px auto; padding: 0 24px; }
h1 { font-weight: 600; letter-spacing: -.01em; }
.kaart {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 10px;
  padding: 32px;
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
label { display: block; font-size: .9rem; margin: 18px 0 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=file], input[type=datetime-local], select {
  width: 100%;
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--rand);
  border-radius: 7px;
  background: var(--papier);
}
input[type=text].code {
  letter-spacing: .35em;
  text-transform: uppercase;
  text-align: center;
  font-size: 1.4rem;
}
button {
  margin-top: 22px;
  background: var(--accent);
  color: #fff;
  border: 0;
  padding: 13px 26px;
  font-size: 1rem;
  font-family: inherit;
  border-radius: 7px;
  cursor: pointer;
}
button:hover { background: #255840; }
.melding { padding: 14px 18px; border-radius: 7px; margin-bottom: 20px; font-size: .95rem; }
.melding.fout { background: #f7e4e4; color: var(--fout); border: 1px solid #e3bcbc; }
.melding.ok, .melding.code { background: var(--accent-licht); color: var(--accent); border: 1px solid #bcd6c8; }
.melding.code { font-size: 1.05rem; }
.melding.code strong { font-size: 1.5rem; letter-spacing: .25em; display: block; margin-top: 6px; }
table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: .9rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rand); }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; }
.verlopen { opacity: .45; }
.mini { background: none; color: var(--fout); border: 1px solid var(--rand); padding: 5px 12px; font-size: .8rem; margin: 0; }
.mini:hover { background: #f7e4e4; }
.hint { font-size: .82rem; opacity: .65; margin-top: 6px; }
.secties { margin-top: 40px; }
.secties h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; opacity: .6; }

/* Printknop in de code-melding */
.printknop {
  margin: 14px 0 0;
  background: var(--inkt);
  color: var(--papier);
  padding: 9px 18px;
  font-size: .9rem;
  border-radius: 6px;
}
.printknop:hover { background: #2c4055; }

/* Het printstrookje: op het scherm verborgen, alleen bij printen zichtbaar. */
.printstrook { display: none; }

@media print {
  /* Verberg alles... */
  body * { visibility: hidden; }
  /* ...behalve het strookje en de inhoud daarvan. */
  .printstrook, .printstrook * { visibility: visible; }
  .printstrook {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    text-align: center;
    font-family: "Iowan Old Style", Palatino, Georgia, serif;
    color: #000;
  }
  .ps-titel {
    font-size: .8rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    opacity: .6;
  }
  .ps-naam {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 6px 0 28px;
  }
  .ps-label {
    font-size: .8rem;
    letter-spacing: .25em;
    text-transform: uppercase;
    opacity: .6;
  }
  .ps-code {
    font-family: "SF Mono", Menlo, Consolas, monospace;
    font-size: 3.4rem;
    letter-spacing: .35em;
    font-weight: 700;
    margin: 8px 0 4px;
    /* compenseer de letter-spacing zodat het optisch gecentreerd blijft */
    padding-left: .35em;
  }
  .ps-geldig { font-size: .95rem; margin-top: 18px; }
  .ps-uitleg { font-size: .9rem; margin-top: 28px; opacity: .7; }
  /* Geen URL/datum-koptekst van de browser is niet via CSS te regelen;
     dat staat in de printinstructies in de README. */
}

/* Vinkje (checkbox met label) in formulieren */
.vinkje {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: .95rem;
  margin-top: 20px;
  cursor: pointer;
}
.vinkje input { width: auto; margin: 0; }

/* Badge voor spellingscontrole-status in tabellen */
.badge {
  display: inline-block;
  font-size: .75rem;
  padding: 2px 9px;
  border-radius: 20px;
  border: 1px solid var(--rand);
}
.badge.aan { background: var(--accent-licht); color: var(--accent); border-color: #bcd6c8; }
.badge.uit { background: #f1efe8; color: #5f5e5a; }

/* Knop die eigenlijk een link is (zelfde uiterlijk als button) */
.knoplink {
  display: inline-block;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  padding: 13px 26px;
  font-size: 1rem;
  border-radius: 7px;
}
.knoplink:hover { background: #255840; }

/* Inlogscherm: rustige, gecentreerde kaart */
.login-wrap {
  min-height: calc(100vh - 56px);   /* paginahoogte min de balk */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-kaart {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: 0 4px 24px rgba(27, 42, 58, .08);
}
.login-kaart .login-titel {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.login-kaart .login-sub {
  margin: 0 0 24px;
  font-size: .92rem;
  opacity: .65;
}
.login-kaart label { margin-top: 16px; }
.login-kaart label:first-of-type { margin-top: 0; }
.login-kaart button { width: 100%; margin-top: 24px; }
.login-merk {
  text-align: center;
  font-size: .8rem;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .5;
  margin-bottom: 18px;
}

/* Voorkom dat de browser ingevulde velden lichtblauw kleurt (autofill). */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--inkt);
  -webkit-box-shadow: 0 0 0 1000px var(--papier) inset;
  box-shadow: 0 0 0 1000px var(--papier) inset;
  caret-color: var(--inkt);
}

/* ---- Dashboard met zijbalk ---- */
.app { display: flex; min-height: 100vh; }
.zijbalk {
  width: 230px;
  flex-shrink: 0;
  background: var(--inkt);
  color: var(--papier);
  display: flex;
  flex-direction: column;
  padding: 22px 0;
}
.zijbalk-merk {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: .04em;
  padding: 0 24px 22px;
}
.menu { display: flex; flex-direction: column; flex: 1; }
.menu-item {
  color: var(--papier);
  text-decoration: none;
  padding: 12px 24px;
  font-size: .95rem;
  opacity: .75;
  border-left: 3px solid transparent;
}
.menu-item:hover { opacity: 1; background: rgba(255,255,255,.05); }
.menu-item.actief {
  opacity: 1;
  background: rgba(255,255,255,.08);
  border-left-color: var(--accent);
  font-weight: 600;
}
.zijbalk-voet { padding: 18px 24px 0; border-top: 1px solid rgba(255,255,255,.12); margin-top: 12px; }
.zijbalk-gebruiker { font-size: .8rem; opacity: .7; margin-bottom: 8px; word-break: break-all; }
.zijbalk-uitloggen { color: var(--papier); font-size: .85rem; opacity: .8; text-decoration: none; }
.zijbalk-uitloggen:hover { opacity: 1; text-decoration: underline; }

.inhoud { flex: 1; padding: 40px 48px; max-width: 920px; }
.inhoud h1 { margin-top: 0; }

/* Secties: alleen de actieve is zichtbaar */
.sectie { display: none; }
.sectie.actief { display: block; }

/* Bewerk-venster (overlay) */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(27,42,58,.45);
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}
.overlay.open { display: flex; }
.overlay-kaart {
  background: #fff;
  border-radius: 12px;
  padding: 32px;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 8px 40px rgba(0,0,0,.2);
}
.knop-secundair {
  background: none;
  color: var(--inkt);
  border: 1px solid var(--rand);
}
.knop-secundair:hover { background: var(--papier); }

/* Responsief: zijbalk bovenaan op smalle schermen */
@media (max-width: 720px) {
  .app { flex-direction: column; }
  .zijbalk { width: auto; flex-direction: column; }
  .menu { flex-direction: row; flex-wrap: wrap; }
  .menu-item { border-left: 0; border-bottom: 3px solid transparent; padding: 10px 16px; }
  .menu-item.actief { border-left: 0; border-bottom-color: var(--accent); }
  .inhoud { padding: 24px; }
}

/* Scheiding tussen wachtwoord-login en Entra-knop */
.login-of {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0 18px;
  color: var(--inkt);
  opacity: .45;
  font-size: .8rem;
}
.login-of::before, .login-of::after {
  content: "";
  flex: 1;
  border-bottom: 1px solid var(--rand);
}
.login-of span { padding: 0 12px; }

/* Microsoft-inlogknop */
.entra-knop {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--rand);
  border-radius: 7px;
  background: #fff;
  color: var(--inkt);
  text-decoration: none;
  font-size: 1rem;
  font-family: inherit;
}
.entra-knop:hover { background: var(--papier); }
.entra-logo {
  display: grid;
  grid-template-columns: 9px 9px;
  grid-template-rows: 9px 9px;
  gap: 2px;
}
.entra-logo span { display: block; width: 9px; height: 9px; }
.entra-logo span:nth-child(1) { background: #f25022; }
.entra-logo span:nth-child(2) { background: #7fba00; }
.entra-logo span:nth-child(3) { background: #00a4ef; }
.entra-logo span:nth-child(4) { background: #ffb900; }
