/* Hallo Impact – huisstijl Impact, opgebouwd zoals www.impact.nl */
@font-face { font-family: "Mitr"; font-weight: 300; font-display: swap; src: url("lettertype/mitr-300.woff2") format("woff2"); }
@font-face { font-family: "Mitr"; font-weight: 400; font-display: swap; src: url("lettertype/mitr-400.woff2") format("woff2"); }
@font-face { font-family: "Mitr"; font-weight: 500; font-display: swap; src: url("lettertype/mitr-500.woff2") format("woff2"); }

:root {
  --donkerblauw: #023F71;
  --oranje: #D76A00;
  --lichtblauw: #2E9FDB;
  --groen: #6FAE5B;
  --grijs: #7D7A78;
  --rood: #B3261E;
  --inkt: #1d2b36;
  --zacht: #5b6670;
  --lijn: #dfe4e9;
  --vlak: #ffffff;
  --achtergrond: #ffffff;
  --achtergrond-2: #f4f6f9;
  --schaduw: 0 4px 14px rgba(2, 63, 113, 0.14);
  --rond: 4px;
  font-size: 16px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--achtergrond);
  color: var(--inkt);
  font-family: "Mitr", "Segoe UI", Arial, sans-serif;
  font-weight: 300;
  line-height: 1.5;
}
[hidden] { display: none !important; }
a { color: var(--donkerblauw); }
button, input, select { font: inherit; }
:focus-visible { outline: 3px solid var(--oranje); outline-offset: 2px; }

/* ---------- Kop ---------- */
.kop { background: #fff; border-bottom: 1px solid var(--lijn); position: relative; z-index: 2; }
.kop-binnen {
  max-width: 1240px; margin: 0 auto; padding: 10px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.merk img { display: block; width: 170px; height: auto; }
.menu { display: flex; align-items: center; gap: 4px 26px; flex-wrap: wrap; }
.menu a, .menu-uit {
  color: var(--donkerblauw); text-decoration: none; font-size: 1.2rem; font-weight: 300;
  background: none; border: 0; padding: 6px 0; cursor: pointer; border-bottom: 3px solid transparent;
}
.menu a:hover, .menu-uit:hover { color: var(--oranje); }
.menu a.actief { border-bottom-color: var(--oranje); }

/* ---------- Welkomstband ---------- */
.welkom {
  position: relative;
  /* Foto toevoegen: zet welkom.jpg in deze map en voeg hier toe: url("welkom.jpg") center 30% / cover no-repeat */
  background: var(--donkerblauw);
  min-height: 300px;
  display: flex; align-items: flex-end;
}
.welkom::after { /* rustig patroon zolang er geen foto is */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, rgba(2, 63, 113, 0.0) 40%, rgba(46, 159, 219, 0.35) 75%, rgba(111, 174, 91, 0.35) 100%);
}
.welkom-binnen { position: relative; z-index: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 16px 40px; }
.welkom-vlak {
  max-width: 620px; padding: 22px 28px; color: #fff;
  background: rgba(215, 106, 0, 0.82);
}
.welkom h1 { margin: 0 0 6px; font-weight: 500; font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; }
.welkom p { margin: 0; font-weight: 400; font-size: 1.1rem; }
body.klein-welkom .welkom { min-height: 160px; }
body.klein-welkom .welkom-binnen { padding-bottom: 24px; }

/* ---------- Inhoud ---------- */
.inhoud { flex: 1; width: 100%; max-width: 1240px; margin: 0 auto; padding: 48px 16px 64px; }
.inhoud:focus { outline: none; }
.laden, .leeg { color: var(--zacht); text-align: center; }
.verborgen-kop { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
h2 { color: var(--donkerblauw); font-weight: 400; font-size: 1.6rem; margin: 0 0 18px; }
h3 { color: var(--donkerblauw); font-weight: 400; font-size: 1.2rem; margin: 0 0 12px; }

/* ---------- Tegels (zoals de kaarten op impact.nl) ---------- */
.tegels {
  display: grid; gap: 36px 32px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  padding-top: 14px;
}
.tegel {
  --kleur: var(--oranje);
  position: relative; display: flex; flex-direction: column;
  background: #fff; box-shadow: var(--schaduw); text-decoration: none; color: var(--kleur);
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 330px;
}
.tegel:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(2, 63, 113, 0.2); }
.tegel-stip {
  position: absolute; top: -14px; left: 40px; width: 30px; height: 30px; border-radius: 50%;
  background: var(--kleur);
}
.tegel-beeld {
  height: 140px; display: grid; place-items: center; background: var(--kleur);
  background-image: linear-gradient(160deg, rgba(255,255,255,.18), rgba(0,0,0,.12));
}
.tegel-beeld img { width: 64px; height: 64px; filter: brightness(0) invert(1); }
.tegel-naam {
  flex: 1; display: grid; place-items: center; text-align: center;
  padding: 18px 8px; font-size: 1.12rem; font-weight: 400; line-height: 1.3; color: var(--kleur);
  hyphens: auto; overflow-wrap: break-word;
}
.tegel-adres {
  background: var(--kleur); color: #fff; text-align: center; padding: 18px 10px; font-weight: 400; font-size: 1.05rem; line-height: 1.25;
  overflow-wrap: anywhere;
}
.kleur-oranje { --kleur: var(--oranje); }
.kleur-lichtblauw { --kleur: var(--lichtblauw); }
.kleur-grijs { --kleur: var(--grijs); }
.kleur-donkerblauw { --kleur: var(--donkerblauw); }
.kleur-groen { --kleur: var(--groen); }
.tegel.uit { opacity: .45; }

/* ---------- Kaarten en formulieren ---------- */
.kaart {
  background: #fff; box-shadow: var(--schaduw); border-top: 6px solid var(--oranje);
  padding: 28px; max-width: 440px; margin: 0 auto;
}
.veld { display: block; margin-bottom: 16px; }
.veld > span { display: block; color: var(--donkerblauw); font-weight: 400; margin-bottom: 4px; }
.veld input[type=text], .veld input[type=email], .veld input[type=password], .veld input[type=url], .veld input[type=number], .veld select {
  width: 100%; padding: 10px 12px; border: 1px solid #b9c3cc; border-radius: var(--rond); background: #fff; color: var(--inkt);
}
.veld input:focus, .veld select:focus { border-color: var(--donkerblauw); }
.hulp { display: block; color: var(--zacht); font-size: .9rem; margin-top: 4px; }
.vink { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; }
.vink input { width: 18px; height: 18px; accent-color: var(--donkerblauw); }
.vinken { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 16px; }
.knoppen { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.knop {
  display: inline-block; padding: 10px 20px; border-radius: var(--rond); border: 2px solid var(--oranje);
  background: var(--oranje); color: #fff; font-weight: 400; cursor: pointer; text-decoration: none;
}
.knop:hover { background: #bd5d00; border-color: #bd5d00; }
.knop.tweede { background: #fff; color: var(--donkerblauw); border-color: var(--donkerblauw); }
.knop.tweede:hover { background: var(--achtergrond-2); }
.knop.gevaar { background: #fff; color: var(--rood); border-color: var(--rood); }
.knop.klein { padding: 4px 12px; font-size: .95rem; }
.knop:disabled { opacity: .6; cursor: wait; }
.fout { color: var(--rood); margin: 0 0 12px; font-weight: 400; }
.uitleg { color: var(--zacht); margin-top: 0; }

/* ---------- Beheer ---------- */
.tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--lijn); margin-bottom: 24px; flex-wrap: wrap; }
.tab {
  background: none; border: 0; padding: 10px 16px; color: var(--donkerblauw); font-size: 1.1rem; cursor: pointer;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab[aria-selected=true] { border-bottom-color: var(--oranje); font-weight: 400; }
.balk { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.balk.tussen { margin-top: 40px; }
.tabel-wrap { overflow-x: auto; background: #fff; box-shadow: var(--schaduw); }
table { border-collapse: collapse; width: 100%; min-width: 560px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--lijn); vertical-align: middle; }
th { color: var(--donkerblauw); font-weight: 400; background: var(--achtergrond-2); }
tr.uit td { color: #9aa3ab; }
.label { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .85rem; background: var(--achtergrond-2); color: var(--donkerblauw); margin: 1px 2px 1px 0; }
.label.bouwer { background: var(--donkerblauw); color: #fff; }
.label.let-op { background: #fdecd9; color: #8a4500; }
.mini-icoon { width: 22px; height: 22px; vertical-align: middle; }
.stip { display: inline-block; width: 14px; height: 14px; border-radius: 50%; background: var(--kleur); vertical-align: middle; margin-right: 6px; }

/* Venster (dialog) */
dialog {
  border: 0; padding: 0; width: min(720px, calc(100vw - 32px)); max-height: calc(100vh - 32px);
  box-shadow: 0 20px 60px rgba(0,0,0,.3); border-top: 6px solid var(--oranje);
}
dialog::backdrop { background: rgba(2, 63, 113, .45); }
.venster { padding: 24px 28px; }
.venster-twee { display: grid; grid-template-columns: 1fr 220px; gap: 24px; align-items: start; }
.voorbeeld { position: sticky; top: 0; }
.voorbeeld .tegel { min-height: 300px; pointer-events: none; margin-top: 22px; }
.kleurkeuze { display: flex; gap: 10px; flex-wrap: wrap; }
.kleurkeuze label { cursor: pointer; }
.kleurkeuze input { position: absolute; opacity: 0; }
.kleurkeuze span { display: block; width: 34px; height: 34px; border-radius: 50%; background: var(--kleur); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--lijn); }
.kleurkeuze input:checked + span { box-shadow: 0 0 0 3px var(--donkerblauw); }
.kleurkeuze input:focus-visible + span { outline: 3px solid var(--oranje); outline-offset: 2px; }
.iconenkeuze { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; max-height: 190px; overflow-y: auto; padding: 4px; border: 1px solid var(--lijn); }
.iconenkeuze label { display: grid; place-items: center; height: 42px; border-radius: var(--rond); cursor: pointer; }
.iconenkeuze input { position: absolute; opacity: 0; }
.iconenkeuze img { width: 24px; height: 24px; }
.iconenkeuze label:has(input:checked) { background: var(--donkerblauw); }
.iconenkeuze label:has(input:checked) img { filter: brightness(0) invert(1); }
.iconenkeuze label:has(input:focus-visible) { outline: 3px solid var(--oranje); }
.wachtwoord-toon { overflow-wrap: anywhere; font-family: Consolas, monospace; font-size: 1.5rem; letter-spacing: 1px; background: var(--achtergrond-2); padding: 12px 16px; text-align: center; color: var(--donkerblauw); user-select: all; }

/* ---------- Voet en melding ---------- */
.voet { background: var(--donkerblauw); color: #fff; border-top: 4px solid var(--oranje); }
.voet-binnen { max-width: 1240px; margin: 0 auto; padding: 16px; display: flex; align-items: center; gap: 10px; }
.voet img { background: #fff; border-radius: 50%; padding: 2px; }
.melding {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 20;
  background: var(--donkerblauw); color: #fff; padding: 12px 20px; box-shadow: var(--schaduw); max-width: calc(100vw - 32px);
}

@media (max-width: 720px) {
  .merk img { width: 140px; }
  .menu { gap: 2px 18px; }
  .menu a, .menu-uit { font-size: 1.05rem; }
  .welkom { min-height: 220px; }
  .inhoud { padding-top: 32px; }
  .tegels { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 30px 16px; }
  .tegel { min-height: 260px; }
  .tegel-beeld { height: 100px; }
  .tegel-beeld img { width: 48px; height: 48px; }
  .tegel-naam { font-size: 1rem; }
  .tegel-naam.lang { font-size: .85rem; } /* heel lang woord op de telefoon: kleiner, zodat het woord heel blijft */
  .tegel-adres { font-size: .9rem; }
  .venster { padding: 18px; }
  .venster-twee { grid-template-columns: 1fr; }
  .voorbeeld { display: none; }
}
@media (prefers-reduced-motion: reduce) { .tegel { transition: none; } .tegel:hover { transform: none; } }

/* Versienummer in de voet */
.voet .versie { margin-left: auto; font-size: 13px; opacity: .75; }
