:root {
  /* Officiële CX-huisstijl */
  --bg: #4F1D30;          /* Intelligentie */
  --card: #ffffff;        /* Wit */
  --ink: #4F1D30;         /* Intelligentie, voor tekst */
  --sub: #8a6470;         /* gedempt wijnrood */
  --line: #ead9da;        /* zachte lijn (Kalmte warm) */
  --accent: #F0745C;      /* Energie */
  --accent-dark: #db5a44;
  --accent-ink: #ffffff;
  --tint: #F8EBEB;        /* Kalmte */
  --warm: #D6C5C5;        /* Kalmte warm */
  --ok: #1aa260;
  --err: #d23b3b;
  --radius: 14px;
}

/* CX-merkfont voor de body. Upload het fontbestand naar /fonts/ (zie LEESMIJ).
   Ontbreekt het, dan valt hij vanzelf terug op Arial. */
@font-face {
  font-family: "Area Inktrap";
  src: url("fonts/area-inktrap.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

/* Titelfont, zelf gehost (geen externe Google-aanvraag meer nodig). */
@font-face {
  font-family: "Anek Malayalam";
  src: url("fonts/anek-malayalam.woff2") format("woff2");
  font-weight: 600 700;
  font-display: swap;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Area Inktrap", Arial, sans-serif;
}

/* Titels in Anek Malayalam (Google Font), met dezelfde fallback. */
h1, h2 { font-family: "Anek Malayalam", "Area Inktrap", Arial, sans-serif; }

.app {
  max-width: 520px;
  margin: 0 auto;
  padding: max(16px, env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
  min-height: 100vh;
}

.head { color: #fff; padding: 16px 4px 30px; }
.head h1 { margin: 0 0 10px; font-size: 38px; font-weight: 650; letter-spacing: -0.01em; line-height: 1.1; }
.head .auto { margin: 4px 0 0; font-size: 14px; color: var(--warm); }
.link {
  margin: 10px 0 0;
  padding: 0;
  background: none;
  color: var(--accent);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lbl.mt { margin-top: 16px; }

/* Soort-rit keuze: duidelijke verticale opties met vinkje */
.options { display: flex; flex-direction: column; gap: 10px; }
.options button {
  position: relative;
  width: 100%;
  text-align: left;
  padding: 16px 44px 16px 16px;
  font-size: 16px;
  font-weight: 600;
  color: var(--ink);
  background: #fff;
  border: 2px solid var(--line);
  border-radius: 12px;
}
.options button.active {
  border-color: var(--accent);
  background: var(--tint);
  color: var(--accent-dark);
}
.options button.active::after {
  content: "✓";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 18px;
  font-weight: 800;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
  animation: rise .25s ease;
}

@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hidden { display: none; }

.lbl {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--sub);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}

select, input, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 17px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  appearance: none;
}
textarea { resize: vertical; line-height: 1.4; }
select:focus, input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240,116,92,.22); }

/* Onderhoud: keuzelijst met checkboxen */
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: none; }
.checks label { display: flex; align-items: center; gap: 12px; padding: 12px 2px; font-size: 16px; cursor: pointer; }
.checks input {
  appearance: auto; -webkit-appearance: auto;   /* native vinkje terug */
  width: 20px; height: 20px; padding: 0;
  border: 0; border-radius: 0; flex: none;
  accent-color: var(--accent);
}

/* Terug-knop op het onderhoudsformulier: gecentreerd, met wat lucht erboven */
#onderhoudBack { display: block; margin: 16px auto 0; }

/* Wat meer ruimte boven de Doorgaan-knop in het toegangsscherm */
#gateBtn { margin-top: 20px; }

/* Naam-suggesties */
.suggest { list-style: none; margin: 8px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.suggest li { padding: 13px 14px; font-size: 17px; cursor: pointer; border-bottom: 1px solid var(--line); }
.suggest li:last-child { border-bottom: none; }
.suggest li:hover, .suggest li.active { background: var(--tint); color: var(--accent-dark); font-weight: 600; }

.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.status { font-size: 16px; }
.status.ok { color: var(--ok); font-weight: 600; }
.status.err { color: var(--err); }
.sub { margin: 8px 0 0; font-size: 14px; color: var(--sub); line-height: 1.4; }
.hint-warn { color: var(--err); font-weight: 600; }
.err { margin: 10px 0 0; font-size: 14px; color: var(--err); min-height: 1px; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 16px;
}
.primary {
  width: 100%;
  padding: 15px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 650;
  margin-top: 6px;
}
.primary:active { background: var(--accent-dark); }
.primary:disabled { background: #c7ccd3; cursor: default; }
.ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 600;
  padding: 8px 10px;
}

.summary .sumrow {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.summary .sumrow:nth-of-type(2) { border-bottom: none; margin-bottom: 6px; }
.summary strong { font-size: 20px; font-weight: 700; }

.done { text-align: center; }
.done .check {
  width: 56px; height: 56px; line-height: 56px;
  margin: 4px auto 10px;
  background: var(--ok); color: #fff;
  border-radius: 50%; font-size: 30px;
}
.done h2 { margin: 0 0 16px; font-size: 20px; }
.done .primary { margin-top: 20px; }
.done .ghost { display: block; margin: 8px auto 0; }

/* Geen QR gescand: blokkade */
.noqr { text-align: center; }
.noqr .warn {
  width: 56px; height: 56px; line-height: 56px;
  margin: 4px auto 12px;
  background: var(--accent); color: #fff;
  border-radius: 50%; font-size: 32px; font-weight: 800;
}
.noqr h2 { margin: 0 0 6px; font-size: 20px; }

/* Even controleren */
.checking { text-align: center; color: var(--sub); }
.checking .sub { margin: 8px 0 0; }
.spinner {
  width: 26px; height: 26px;
  margin: 2px auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Google autocomplete dropdown boven de kaart houden */
.pac-container { z-index: 9999; border-radius: 10px; margin-top: 4px; box-shadow: 0 6px 20px rgba(0,0,0,.2); }
