:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --muted: #94a3b8;
  --line: #e2e8f0;
  --bg: #f6f7f9;
  --card: #ffffff;
  --brand: #f97316;
  --brand-dark: #ea580c;
  --brand-soft: #fff7ed;
  --blue: #2563eb;
  --green: #16a34a;
  --red: #dc2626;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px rgba(15, 23, 42, .06);
  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

body.embedded { background: transparent; }

.wrap { max-width: 860px; margin: 0 auto; padding: 24px 16px 48px; }
body.embedded .wrap { padding: 8px 4px 24px; }

.brand { margin-bottom: 12px; }
.brand img { max-height: 56px; max-width: 240px; display: block; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 8px; }
h1 { font-size: 26px; }
h2 { font-size: 19px; }
p { margin: 0 0 12px; }
a { color: var(--blue); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* --- stappenbalk --- */
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.steps li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  padding: 6px 12px 6px 6px;
  border-radius: 999px;
  background: #eef1f5;
  cursor: default;
}
.steps li .n {
  width: 21px; height: 21px; border-radius: 50%;
  background: #cbd5e1; color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 700;
}
.steps li.active { background: var(--ink); color: #fff; }
.steps li.active .n { background: var(--brand); }
.steps li.done { background: var(--brand-soft); color: var(--brand-dark); cursor: pointer; }
.steps li.done .n { background: var(--brand); }

/* --- keuzelijsten --- */
.options { display: grid; gap: 10px; }
.options.two { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

.option {
  display: flex; align-items: flex-start; gap: 12px;
  width: 100%; text-align: left;
  background: #fff; border: 1.5px solid var(--line);
  border-radius: 12px; padding: 14px 16px;
  cursor: pointer; font: inherit; color: inherit;
  transition: border-color .12s, box-shadow .12s, transform .06s;
}
.option:hover { border-color: var(--brand); box-shadow: 0 4px 14px rgba(249, 115, 22, .12); }
.option:active { transform: translateY(1px); }
.option.selected { border-color: var(--brand); background: var(--brand-soft); }
.option .title { display: block; font-weight: 650; }
.option .sub { display: block; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.option .badge {
  margin-left: auto; flex: none;
  background: #eef2f7; color: var(--ink-soft);
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 650;
  white-space: nowrap;
}

/* --- vestigingskaarten (stap 1) --- */
.options.locations { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.option-loc {
  align-items: center; gap: 14px; padding: 18px; border-width: 2px;
}
.option-loc:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(249, 115, 22, .16); }
.option-loc:active { transform: translateY(0); }
.option-loc.selected { box-shadow: 0 6px 18px rgba(249, 115, 22, .18); }
.option-loc:focus-visible { outline: 3px solid rgba(249, 115, 22, .4); outline-offset: 2px; }

.loc-icon {
  flex: none; width: 46px; height: 46px; border-radius: 13px;
  background: var(--brand-soft); color: var(--brand-dark);
  display: grid; place-items: center;
  transition: background .12s, color .12s;
}
.loc-icon svg { width: 25px; height: 25px; }
.option-loc:hover .loc-icon,
.option-loc.selected .loc-icon { background: var(--brand); color: #fff; }

.loc-body { display: flex; flex-direction: column; min-width: 0; }
.option-loc .title { font-size: 16px; }

.loc-check {
  margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 15px; font-weight: 700;
  display: none; place-items: center;
}
.option-loc.selected .loc-check { display: grid; }

/* --- knoppen --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1.5px solid transparent; border-radius: 11px;
  padding: 12px 20px; font: inherit; font-weight: 650; font-size: 15px;
  cursor: pointer; text-decoration: none; -webkit-tap-highlight-color: transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.btn:focus-visible { outline: 3px solid rgba(249, 115, 22, .4); outline-offset: 2px; }
.btn:active:not([disabled]) { transform: translateY(1px); }

.btn-primary {
  background: var(--brand); color: #fff;
  box-shadow: 0 2px 5px rgba(234, 88, 12, .28), 0 1px 2px rgba(15, 23, 42, .08);
}
.btn-primary:hover:not([disabled]) {
  background: var(--brand-dark);
  box-shadow: 0 8px 18px rgba(234, 88, 12, .32); transform: translateY(-1px);
}
.btn-primary:active:not([disabled]) { box-shadow: 0 2px 5px rgba(234, 88, 12, .28); }

.btn-ghost {
  background: #fff; border-color: var(--line); color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.btn-ghost:hover:not([disabled]) { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }

.btn-danger { background: #fff; border-color: #fecaca; color: var(--red); }
.btn-danger:hover:not([disabled]) {
  background: var(--red); border-color: var(--red); color: #fff;
  box-shadow: 0 8px 18px rgba(220, 38, 38, .28); transform: translateY(-1px);
}

.btn[disabled] { opacity: .55; cursor: not-allowed; box-shadow: none; }
.actions { display: flex; gap: 10px; margin-top: 22px; flex-wrap: wrap; align-items: center; }
.actions .spacer { flex: 1; }

/* --- formulier --- */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; font-weight: 650; margin-bottom: 5px; }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.input, select, textarea {
  width: 100%; padding: 11px 13px;
  border: 1.5px solid var(--line); border-radius: 10px;
  font: inherit; color: inherit; background: #fff;
}
.input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); }
textarea { min-height: 88px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }

/* --- kalender --- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head .month { font-weight: 700; font-size: 16px; }
.cal-nav { display: flex; gap: 6px; }
.cal-nav button {
  width: 36px; height: 36px; border-radius: 9px;
  border: 1.5px solid var(--line); background: #fff; cursor: pointer; font-size: 16px; line-height: 1;
  transition: border-color .12s, background .12s, color .12s;
}
.cal-nav button:hover:not([disabled]) { border-color: var(--brand); color: var(--brand-dark); background: var(--brand-soft); }
.cal-nav button[disabled] { opacity: .35; cursor: not-allowed; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal .dow { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; padding: 4px 0; text-transform: uppercase; }
.cal button {
  aspect-ratio: 1 / 1; border-radius: 10px;
  border: 1.5px solid transparent; background: #f1f5f9;
  font: inherit; font-weight: 600; cursor: pointer; position: relative;
  transition: border-color .12s, background .12s, transform .1s, box-shadow .12s;
}
.cal button:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); transform: translateY(-1px); }
.cal button:active:not([disabled]) { transform: translateY(0); }
.cal button:focus-visible { outline: 3px solid rgba(249, 115, 22, .4); outline-offset: 2px; }
.cal button[disabled] { background: transparent; color: #cbd5e1; cursor: not-allowed; }
.cal button.free::after {
  content: ''; position: absolute; bottom: 6px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%; background: var(--green);
}
.cal button.selected { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(234, 88, 12, .32); }
.cal button.selected::after { background: #fff; }

/* --- tijden --- */
.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-top: 6px; }
.times button {
  padding: 11px 6px; border-radius: 10px; border: 1.5px solid var(--line);
  background: #fff; font: inherit; font-weight: 650; cursor: pointer;
  transition: border-color .12s, background .12s, transform .1s, box-shadow .12s, color .12s;
}
.times button:hover:not([disabled]) { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); transform: translateY(-1px); }
.times button:active:not([disabled]) { transform: translateY(0); }
.times button:focus-visible { outline: 3px solid rgba(249, 115, 22, .4); outline-offset: 2px; }
.times button.selected { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(234, 88, 12, .32); }
.times button.selected:hover:not([disabled]) { background: var(--brand-dark); color: #fff; }
.times button small { display: block; font-weight: 400; font-size: 11px; opacity: .75; }

/* --- overzicht / tijdlijn --- */
.summary { background: #f8fafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 16px; }
.summary dl { display: grid; grid-template-columns: 130px 1fr; gap: 5px 12px; margin: 0; font-size: 14px; }
.summary dt { color: var(--ink-soft); }
.summary dd { margin: 0; font-weight: 650; }

.timeline { margin: 12px 0 0; padding: 0; list-style: none; }
.timeline li { display: flex; gap: 12px; align-items: baseline; padding: 5px 0; font-size: 13px; border-top: 1px dashed var(--line); }
.timeline li:first-child { border-top: 0; }
.timeline .t { font-variant-numeric: tabular-nums; color: var(--ink-soft); width: 96px; flex: none; }
.timeline .machine { font-weight: 650; }
.timeline .rest { color: var(--ink-soft); }

/* --- foto's --- */
.dropzone {
  border: 2px dashed var(--line); border-radius: 12px; padding: 22px;
  text-align: center; color: var(--ink-soft); cursor: pointer; background: #fbfcfd;
}
.dropzone:hover, .dropzone.over { border-color: var(--brand); background: var(--brand-soft); }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.thumb { position: relative; width: 78px; height: 78px; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb button {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; border: 0; background: rgba(15, 23, 42, .75); color: #fff;
  cursor: pointer; font-size: 12px; line-height: 1; display: grid; place-items: center;
}

/* --- meldingen --- */
.alert { border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.alert-error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.alert-info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.alert-warn { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }
.alert-ok { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.spinner {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--brand);
  animation: spin .7s linear infinite; display: inline-block; vertical-align: -4px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.center { text-align: center; }
.tick {
  width: 56px; height: 56px; border-radius: 50%; background: var(--green); color: #fff;
  display: grid; place-items: center; font-size: 28px; margin: 4px auto 12px;
}
