/* Tattoo by Lou – boekingssysteem */
:root {
  --ink: #231a35;
  --ink-soft: #5d5470;
  --ink-faint: #8b839c;
  --stencil: #5b3fc4;
  --stencil-dark: #452e9e;
  --lavender: #cfc2f2;
  --lavender-wash: #f3effc;
  --paper: #fbfaff;
  --surface: #ffffff;
  --line: #e6def5;
  --ok: #2f7d5b;
  --ok-wash: #e8f5ee;
  --warn: #9a5b00;
  --warn-wash: #fff4e0;
  --bad: #b42318;
  --bad-wash: #fdecea;
  --pierce: #17716b;
  --pierce-wash: #e2f2f0;
  --consult: #a15c07;
  --consult-wash: #fbefdc;
  --side: #231a35;
  --side-ink: #cfc2f2;
  --radius-s: 8px;
  --radius-m: 12px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Avenir Next", "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.5 var(--font);
}
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 .4em; letter-spacing: -0.015em; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.25rem; font-weight: 650; }
h3 { font-size: 1.02rem; font-weight: 650; }
p { margin: 0 0 .8em; }
a { color: var(--stencil); }
.muted { color: var(--ink-soft); }
.small { font-size: .875rem; }
.num { font-variant-numeric: tabular-nums; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--stencil); outline-offset: 2px; border-radius: 4px; }

/* ---------- Knoppen en velden ---------- */
.btn {
  appearance: none; border: 1px solid transparent; border-radius: var(--radius-s);
  font: inherit; font-weight: 600; padding: .7em 1.1em; cursor: pointer;
  background: var(--lavender-wash); color: var(--ink); line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; text-decoration: none;
}
.btn:hover { background: #e9e2fa; }
.btn.primary { background: var(--stencil); color: #fff; }
.btn.primary:hover { background: var(--stencil-dark); }
.btn.ghost { background: transparent; border-color: var(--line); }
.btn.ghost:hover { background: var(--lavender-wash); }
.btn.danger { background: var(--bad-wash); color: var(--bad); }
.btn.small { padding: .45em .8em; font-size: .875rem; }
.btn.wide { width: 100%; margin-top: .5rem; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .3rem; }
.field { margin-bottom: 1rem; }
.field .hint { font-weight: 400; color: var(--ink-faint); font-size: .82rem; margin-top: .25rem; }
.field .error { color: var(--bad); font-size: .85rem; margin-top: .3rem; }
input[type=text], input[type=email], input[type=url], input[type=tel], input[type=date], input[type=time], input[type=number], input[type=password], input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-s); padding: .65em .75em;
}
input:focus, select:focus, textarea:focus { border-color: var(--stencil); outline: 2px solid var(--lavender); outline-offset: 0; }
textarea { min-height: 90px; resize: vertical; }
.check { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; margin: .6rem 0; cursor: pointer; }
.check input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--stencil); flex: none; }
.row { display: grid; gap: .8rem; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .row { grid-template-columns: 1fr; } }

.notice { border-radius: var(--radius-s); padding: .75rem .9rem; font-size: .92rem; margin: 0 0 1rem; background: var(--lavender-wash); }
.notice.bad { background: var(--bad-wash); color: var(--bad); }
.notice.ok { background: var(--ok-wash); color: var(--ok); }
.notice.warn { background: var(--warn-wash); color: var(--warn); }

/* ---------- Klantpagina ---------- */
.book { max-width: 600px; margin: 0 auto; padding: 28px 18px 80px; }
.brand { font-family: var(--font-display); font-weight: 700; font-size: 1.05rem; color: var(--stencil); margin-bottom: 22px; letter-spacing: -0.01em; }

/* Het opvallende element: afspraak als stencil */
.stencil {
  position: relative; padding: 22px 22px 20px; margin: 0 0 28px;
  border: 2px dashed var(--stencil); border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(91, 63, 196, .08), transparent 55%),
    var(--surface);
}
.stencil h1 { font-size: 2.2rem; margin-bottom: .15em; }
.stencil .facts { display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--ink-soft); margin-top: .6rem; }
.stencil .facts strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.stencil .note { margin-top: .8rem; padding-top: .8rem; border-top: 1px dashed var(--lavender); color: var(--ink-soft); font-size: .93rem; }

.step { margin: 0 0 30px; }
.step-head { display: flex; align-items: baseline; gap: .65rem; margin-bottom: .8rem; }
.step-no {
  flex: none; width: 1.7rem; height: 1.7rem; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: .85rem; font-weight: 700; border: 2px solid var(--stencil); color: var(--stencil);
}
.step.done .step-no { background: var(--stencil); color: #fff; }
.step.locked { opacity: .45; pointer-events: none; }
.step-head h2 { margin: 0; }
.step-summary { margin-left: auto; color: var(--stencil); font-weight: 600; font-size: .92rem; }

/* Kalender */
.cal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 14px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong::first-letter { text-transform: uppercase; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: .75rem; color: var(--ink-faint); padding-bottom: 4px; }
.cal-day {
  aspect-ratio: 1; width: 100%; min-width: 0; padding: 0; border: 0; border-radius: 10px; background: transparent; font: inherit;
  font-variant-numeric: tabular-nums; color: var(--ink-faint); cursor: default;
}
.cal-day.available { background: var(--lavender-wash); color: var(--ink); font-weight: 600; cursor: pointer; }
.cal-day.available:hover { background: var(--lavender); }
.cal-day.selected { background: var(--stencil); color: #fff; }
.cal-day.empty { visibility: hidden; }

.times { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.time {
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius-s); padding: .7em 0;
  font: inherit; font-weight: 600; font-variant-numeric: tabular-nums; cursor: pointer; color: var(--ink);
}
.time:hover { border-color: var(--stencil); }
.time.selected { background: var(--stencil); border-color: var(--stencil); color: #fff; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 18px; }
.consent-q { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: .7rem 0; border-bottom: 1px solid var(--line); }
.consent-q:last-of-type { border-bottom: 0; }
.consent-q span { flex: 1; }
.yesno { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; flex: none; }
.yesno button { border: 0; background: var(--surface); font: inherit; padding: .4em .85em; cursor: pointer; color: var(--ink-soft); }
.yesno button + button { border-left: 1px solid var(--line); }
.yesno button.on { background: var(--stencil); color: #fff; }
.policy { font-size: .9rem; color: var(--ink-soft); background: var(--lavender-wash); border-radius: var(--radius-s); padding: .8rem .9rem; }

.summary-list { display: grid; grid-template-columns: auto 1fr; gap: .35rem 1rem; margin: 0 0 1rem; }
.summary-list dt { color: var(--ink-soft); }
.summary-list dd { margin: 0; font-weight: 600; }

.result { text-align: left; }
.result .big-check { font-size: 2.4rem; color: var(--ok); line-height: 1; margin-bottom: .4rem; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--lavender); border-top-color: var(--stencil); animation: spin 0.9s linear infinite; margin-bottom: 1rem; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 3s; } }

.center-page { min-height: 100vh; display: grid; place-items: center; padding: 18px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 24px; }
.card.narrow { width: 100%; max-width: 420px; }
.eyebrow { color: var(--stencil); font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.big { font-size: 2rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- Beheer ---------- */
.shell { min-height: 100vh; }
.side {
  position: fixed; inset: 0 auto 0 0; width: 228px; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 22px 14px; z-index: 20;
}
.side .brand { color: #fff; margin: 4px 10px 26px; font-size: 1.15rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-btn {
  display: flex; align-items: center; gap: 12px; border: 0; background: transparent; color: var(--side-ink);
  font: inherit; font-weight: 600; padding: .7em .8em; border-radius: 10px; cursor: pointer; text-align: left;
}
.nav-btn svg { width: 20px; height: 20px; flex: none; }
.nav-btn:hover { background: rgba(207, 194, 242, .1); color: #fff; }
.nav-btn[aria-current=page] { background: var(--stencil); color: #fff; }
.side-foot { margin-top: auto; padding: 0 6px; }
.side-foot .btn { width: 100%; background: rgba(207, 194, 242, .12); color: var(--side-ink); }
.side-foot .btn:hover { background: rgba(207, 194, 242, .2); }
.content { margin-left: 228px; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 26px 28px 80px; }
.admin-banner { max-width: 1180px; margin: 0 auto; padding: 18px 28px 0; }
.admin-banner .notice { margin: 0; }
.mobile-top { display: none; }
.bottom-nav { display: none; }

@media (max-width: 860px) {
  .side { display: none; }
  .content { margin-left: 0; }
  .admin-main { padding: 16px 16px 110px; }
  .admin-banner { padding: 12px 16px 0; }
  .mobile-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 4px; }
  .mobile-top .brand { margin: 0; }
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: rgba(255, 255, 255, .96); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .bottom-nav .nav-btn { flex-direction: column; gap: 3px; font-size: .7rem; color: var(--ink-faint); padding: .45em .2em; justify-content: center; align-items: center; text-align: center; }
  .bottom-nav .nav-btn[aria-current=page] { background: transparent; color: var(--stencil); }
}

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 20px; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 2rem; }
.page-head h1::first-letter { text-transform: uppercase; }
.page-head .sub { color: var(--ink-soft); margin: .3rem 0 0; }
.page-head .head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
.toolbar h2 { margin: 0; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.dash-top { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 26px; }
@media (max-width: 1000px) { .dash-top, .grid-2 { grid-template-columns: minmax(0, 1fr); } }

.card-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 12px; }
.card-h h2 { margin: 0; }
.card-h .count { color: var(--ink-faint); font-variant-numeric: tabular-nums; }
.card-h .spacer { flex: 1; }

/* Vandaag */
.today-item {
  display: grid; grid-template-columns: 64px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  font: inherit; color: inherit; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  padding: 12px 14px; margin-bottom: 8px; cursor: pointer;
}
.today-item:hover { border-color: var(--lavender); }
.today-item .t { font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1; }
.today-item .t span { display: block; font-family: var(--font); font-size: .8rem; font-weight: 400; color: var(--ink-faint); margin-top: 4px; }
.today-item .who strong { display: block; }
.today-item .who span { color: var(--ink-soft); font-size: .88rem; }
.today-item.past { opacity: .6; }
.today-item.now { border-color: var(--stencil); box-shadow: 0 0 0 1px var(--stencil); }
.kind { display: inline-block; font-size: .75rem; font-weight: 700; padding: .15em .55em; border-radius: 6px; margin-right: 6px; vertical-align: 1px; }
.kind.tattoo { background: var(--lavender-wash); color: var(--stencil-dark); }
.kind.piercing { background: var(--pierce-wash); color: var(--pierce); }
.form-ok { color: var(--ok); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.form-miss { color: var(--warn); font-size: .82rem; font-weight: 600; white-space: nowrap; }
.empty-today { background: var(--surface); border: 1px dashed var(--lavender); border-radius: var(--radius-m); padding: 22px 18px; color: var(--ink-soft); }
.empty-today strong { color: var(--ink); }

/* Openstaande links */
.open-link { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.open-link:last-child { border-bottom: 0; }
.open-link .main { flex: 1; min-width: 0; }
.open-link .main strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.open-link .main span { font-size: .85rem; color: var(--ink-soft); }
.open-link .left.soon { color: var(--warn); font-weight: 600; }

/* Weekkalender */
.week { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.week-scroll { overflow-x: auto; }
.week-grid { display: grid; min-width: 100%; }
.wk-corner, .wk-day-h { position: sticky; top: 0; background: var(--surface); border-bottom: 1px solid var(--line); z-index: 2; }
.wk-corner { left: 0; z-index: 5; }
.wk-day-h { padding: 10px 8px; text-align: center; border-left: 1px solid var(--line); }
.wk-day-h .dn { font-size: .78rem; color: var(--ink-faint); display: block; }
.wk-day-h .dd { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.wk-day-h.today .dd { color: #fff; background: var(--stencil); border-radius: 999px; padding: 0 .45em; display: inline-block; }
.wk-day-h.closed { color: var(--ink-faint); }
.wk-times { position: sticky; left: 0; z-index: 4; background: var(--surface); }
.wk-times span { position: absolute; right: 8px; font-size: .75rem; color: var(--ink-faint); font-variant-numeric: tabular-nums; transform: translateY(-50%); }
.wk-col {
  position: relative; border-left: 1px solid var(--line);
  background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, #f3f0f8 1px, transparent 1px);
  background-size: 100% var(--hour), 100% calc(var(--hour) / 2);
}
.wk-col.today { background-color: #fcfbff; }
.wk-closed { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(-45deg, #f6f4fa, #f6f4fa 5px, #fff 5px, #fff 10px); }
.wk-block { position: absolute; left: 3px; right: 3px; border-radius: 8px; background: repeating-linear-gradient(-45deg, var(--lavender-wash), var(--lavender-wash) 6px, #fff 6px, #fff 12px); border: 1px solid var(--line); font-size: .78rem; color: var(--ink-soft); padding: 4px 6px; overflow: hidden; }
.ev {
  position: absolute; left: 3px; right: 3px; border: 0; border-radius: 8px; padding: 4px 7px; text-align: left; font: inherit;
  font-size: .8rem; line-height: 1.25; overflow: hidden; cursor: pointer; color: var(--stencil-dark);
  background: var(--lavender-wash); border-left: 3px solid var(--stencil);
  display: flex; flex-direction: column; justify-content: flex-start; align-items: stretch;
}
.ev:hover { filter: brightness(.97); }
.ev strong { display: block; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .tm { font-variant-numeric: tabular-nums; }
.ev.piercing { background: var(--pierce-wash); border-left-color: var(--pierce); color: var(--pierce); }
.ev.short { flex-direction: row; gap: 6px; align-items: center; white-space: nowrap; }
.ev.short strong { display: inline; }
.ev.pending { background: #fff; border: 1px dashed var(--lavender); border-left: 3px solid var(--lavender); }
.ev.no_show { background: var(--bad-wash); border-left-color: var(--bad); color: var(--bad); }
.ev.completed { opacity: .65; }
.ev.attention { background: var(--warn-wash); border-left-color: var(--warn); }
.ev .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-left: 4px; vertical-align: 1px; }
.now-line { position: absolute; left: -1px; right: 0; height: 2px; background: var(--bad); z-index: 3; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--ink-soft); margin-top: 10px; }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.legend .l-t { background: var(--lavender-wash); border-left: 3px solid var(--stencil); }
.legend .l-p { background: var(--pierce-wash); border-left: 3px solid var(--pierce); }
.legend .l-f { background: var(--warn); border-radius: 50%; width: 8px; height: 8px; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius-s); overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; font: inherit; font-weight: 600; padding: .55em 1em; cursor: pointer; color: var(--ink-soft); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--stencil); color: #fff; }
.seg button.on.piercing { background: var(--pierce); }

/* Agenda per dag */
.day { margin-bottom: 18px; }
.day-head { display: flex; align-items: baseline; gap: .6rem; padding: 0 0 6px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.day-head strong { display: inline-block; }
.day-head strong::first-letter { text-transform: uppercase; }
.day-head .hours { color: var(--ink-faint); font-size: .85rem; margin-left: auto; font-variant-numeric: tabular-nums; }
.day.today .day-head strong { color: var(--stencil); }
.day-empty { color: var(--ink-faint); font-size: .9rem; padding: 4px 0 6px; }
.appt {
  display: grid; grid-template-columns: 92px 1fr auto; gap: 12px; align-items: center;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--stencil);
  border-radius: var(--radius-s); padding: 10px 12px; margin-bottom: 6px; cursor: pointer; text-align: left; width: 100%; font: inherit; color: inherit;
}
.appt:hover { border-color: var(--lavender); border-left-color: var(--stencil); }
.appt .when { font-weight: 700; font-variant-numeric: tabular-nums; }
.appt .when span { display: block; font-weight: 400; color: var(--ink-faint); font-size: .85rem; }
.appt .who { min-width: 0; }
.appt .who strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.appt .who span { color: var(--ink-soft); font-size: .88rem; }
.appt.pending { border-left-color: var(--lavender); border-style: dashed; border-left-style: solid; }
.appt.no_show { border-left-color: var(--bad); }
.appt.completed { border-left-color: var(--ok); }
.appt.attention { border-left-color: var(--warn); background: var(--warn-wash); }
.block-item { background: repeating-linear-gradient(-45deg, var(--lavender-wash), var(--lavender-wash) 6px, var(--surface) 6px, var(--surface) 12px); border: 1px solid var(--line); border-radius: var(--radius-s); padding: 8px 12px; margin-bottom: 6px; font-size: .9rem; color: var(--ink-soft); }

.badge { display: inline-block; font-size: .78rem; font-weight: 600; padding: .2em .6em; border-radius: 999px; background: var(--lavender-wash); color: var(--stencil-dark); white-space: nowrap; }
.badge.ok { background: var(--ok-wash); color: var(--ok); }
.badge.bad { background: var(--bad-wash); color: var(--bad); }
.badge.warn { background: var(--warn-wash); color: var(--warn); }
.badge.dim { background: #f0eef3; color: var(--ink-faint); }

/* Lijsten */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); overflow: hidden; }
.list-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.list-item .main { flex: 1; min-width: 0; }
.list-item .main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .main span { color: var(--ink-soft); font-size: .88rem; }
.list-item.clickable { cursor: pointer; width: 100%; background: none; border-left: 0; border-right: 0; border-top: 0; font: inherit; color: inherit; text-align: left; }
.list-item.clickable:hover { background: var(--lavender-wash); }
.empty { padding: 26px 16px; color: var(--ink-soft); text-align: center; }

.link-result { border: 2px dashed var(--stencil); border-radius: var(--radius-m); padding: 16px; background: var(--surface); margin-top: 16px; }
.link-url { font-family: ui-monospace, Consolas, monospace; font-size: .88rem; word-break: break-all; background: var(--lavender-wash); padding: .6rem .7rem; border-radius: var(--radius-s); margin: .4rem 0 .8rem; }
.copy-msg { white-space: pre-wrap; font-size: .92rem; background: var(--paper); border: 1px solid var(--line); padding: .7rem; border-radius: var(--radius-s); margin-bottom: .6rem; }

.preset-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: .6rem; }
.preset { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .4em .9em; font: inherit; font-size: .9rem; cursor: pointer; color: var(--ink); }
.preset.on { background: var(--stencil); border-color: var(--stencil); color: #fff; }

.hours-grid { display: grid; grid-template-columns: 110px auto 1fr 1fr; gap: 8px 10px; align-items: center; }
.hours-grid .day-name { font-weight: 600; }
@media (max-width: 520px) { .hours-grid { grid-template-columns: 90px auto 1fr 1fr; font-size: .9rem; } }

/* Dialoog */
dialog { border: 0; border-radius: 16px; padding: 0; width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); color: var(--ink); box-shadow: 0 20px 60px rgba(35, 26, 53, .25); }
dialog::backdrop { background: rgba(35, 26, 53, .45); }
.dlg-body { padding: 22px; overflow: auto; max-height: calc(100vh - 40px); }
.dlg-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.dlg-head h2 { flex: 1; margin: 0; }
.close-x { border: 0; background: var(--lavender-wash); width: 34px; height: 34px; border-radius: 50%; font-size: 1.2rem; cursor: pointer; color: var(--ink); flex: none; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.section-gap { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.answers { list-style: none; padding: 0; margin: 0; font-size: .92rem; }
.answers li { display: flex; justify-content: space-between; gap: 10px; padding: .35rem 0; border-bottom: 1px solid var(--line); }
.answers li.yes strong { color: var(--warn); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: .7rem 1.1rem; border-radius: 10px; font-weight: 600; z-index: 100; max-width: calc(100vw - 32px); }
.toast.bad { background: var(--bad); }

.login-wrap { max-width: 380px; margin: 12vh auto 0; padding: 0 18px; }
.form-status { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.stencil h1.long { font-size: clamp(1.35rem, 6.2vw, 2.2rem); hyphens: auto; overflow-wrap: anywhere; }
.q-wrap { border-bottom: 1px solid var(--line); }
.q-wrap .consent-q { border-bottom: 0; }
.q-wrap:last-child { border-bottom: 0; }
.q-note { padding: 0 0 .8rem; }
.q-note textarea { min-height: 64px; }
.q-field { padding-top: .7rem; }
.optional { font-weight: 400; color: var(--ink-faint); font-size: .85em; }
.info-block { background: var(--lavender-wash); border-radius: var(--radius-s); padding: .8rem .9rem; margin: .7rem 0; font-size: .93rem; white-space: pre-wrap; }

/* ================= Donker thema (beheer) ================= */
body.dark {
  --ink: #eeeaf8;
  --ink-soft: #b9b0d0;
  --ink-faint: #877f9f;
  --paper: #0d0918;
  --surface: rgba(30, 23, 50, .66);
  --surface-solid: #1a1430;
  --line: rgba(255, 255, 255, .08);
  --line-soft: rgba(255, 255, 255, .035);
  --stencil: #8b6cff;
  --stencil-dark: #cbbcff;
  --lavender: rgba(139, 108, 255, .45);
  --lavender-wash: rgba(139, 108, 255, .16);
  --ok: #4fd1a1; --ok-wash: rgba(79, 209, 161, .14);
  --warn: #f3b562; --warn-wash: rgba(243, 181, 98, .14);
  --bad: #ff8080; --bad-wash: rgba(255, 128, 128, .14);
  --pierce: #4fd1c5; --pierce-wash: rgba(79, 209, 197, .15);
  --consult: #f3b562; --consult-wash: rgba(243, 181, 98, .15);
  --side: rgba(14, 10, 26, .72);
  --side-ink: #b9b0d0;
  --radius-m: 18px;
  color-scheme: dark;
  background: #0d0918;
}
/* Gloed in een vaste laag: werkt ook op iPhone (die geen vaste achtergronden kent). */
body.dark::before {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(1200px 600px at 85% 110%, rgba(124, 77, 255, .32), transparent 60%),
    radial-gradient(900px 500px at 10% 100%, rgba(76, 52, 160, .35), transparent 60%),
    radial-gradient(700px 400px at 70% -10%, rgba(139, 108, 255, .14), transparent 60%),
    linear-gradient(180deg, #0d0918 0%, #120c24 55%, #1a1036 100%);
}
html:has(body.dark) { background: #0d0918; }
body.dark .panel, body.dark .list, body.dark .week, body.dark .today-item, body.dark .empty-today, body.dark .glass, body.dark .cal {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .04);
}
body.dark input[type=text], body.dark input[type=email], body.dark input[type=url], body.dark input[type=tel], body.dark input[type=date], body.dark input[type=time],
body.dark input[type=number], body.dark input[type=password], body.dark input[type=search], body.dark select, body.dark textarea {
  background: rgba(255, 255, 255, .045); border-color: var(--line); color: var(--ink);
}
body.dark select option { background: var(--surface-solid); }
body.dark input:focus, body.dark select:focus, body.dark textarea:focus { outline-color: rgba(139, 108, 255, .35); }
body.dark .btn { background: rgba(255, 255, 255, .07); color: var(--ink); }
body.dark .btn:hover { background: rgba(255, 255, 255, .12); }
body.dark .btn.primary { background: linear-gradient(135deg, #8b6cff, #6a4de8); color: #fff; box-shadow: 0 6px 20px rgba(124, 92, 255, .35); }
body.dark .btn.primary:hover { filter: brightness(1.08); }
body.dark .btn.ghost { background: transparent; border-color: var(--line); }
body.dark .btn.ghost:hover { background: rgba(255, 255, 255, .06); }
body.dark .btn.danger { background: var(--bad-wash); color: var(--bad); }
body.dark .badge.dim { background: rgba(255, 255, 255, .07); color: var(--ink-faint); }
body.dark dialog { background: var(--surface-solid); color: var(--ink); border: 1px solid var(--line); }
body.dark .close-x { background: rgba(255, 255, 255, .08); color: var(--ink); }
body.dark .toast { background: #2a2147; color: var(--ink); border: 1px solid var(--line); }
body.dark .toast.bad { background: #5a1f2a; }
body.dark .bottom-nav { background: rgba(14, 10, 26, .9); border-top-color: var(--line); }
body.dark .wk-corner, body.dark .wk-day-h, body.dark .wk-times { background: var(--surface-solid); }
body.dark .wk-col { background-image: linear-gradient(to bottom, var(--line) 1px, transparent 1px), linear-gradient(to bottom, var(--line-soft) 1px, transparent 1px); }
body.dark .wk-col.today { background-color: rgba(139, 108, 255, .06); }
body.dark .wk-closed { background: repeating-linear-gradient(-45deg, rgba(255,255,255,.03), rgba(255,255,255,.03) 5px, transparent 5px, transparent 10px); }
body.dark .wk-block, body.dark .block-item { background: repeating-linear-gradient(-45deg, rgba(139,108,255,.12), rgba(139,108,255,.12) 6px, transparent 6px, transparent 12px); color: var(--ink-soft); }
body.dark .ev { background: rgba(139, 108, 255, .2); color: var(--stencil-dark); }
body.dark .ev.piercing { background: var(--pierce-wash); color: var(--pierce); }
body.dark .ev.pending { background: transparent; }
body.dark .now-line, body.dark .now-line::before { background: #ff6b8b; }
body.dark .copy-msg { background: rgba(255, 255, 255, .04); }
body.dark .open-link, body.dark .list-item { border-bottom-color: var(--line); }
body.dark .list-item.clickable:hover, body.dark .today-item:hover { background: rgba(255, 255, 255, .05); }
body.dark .preset, body.dark .seg { background: rgba(255, 255, 255, .05); }
body.dark .yesno button { background: transparent; }
body.dark .link-result { background: var(--surface); }
body.dark .brand { color: var(--stencil-dark); }

/* Dashboard */
.hello { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 28px; margin: 6px 0 26px; }
.hello h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.hello h1 .name { background: linear-gradient(90deg, #b9a3ff, #8b6cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hello .sub { color: var(--ink-soft); margin: .45rem 0 0; }
.clock { margin-left: auto; text-align: right; }
.clock .t { font-family: var(--font-display); font-size: clamp(2.6rem, 6vw, 4.2rem); font-weight: 300; letter-spacing: -0.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.clock .d { color: var(--ink-soft); margin-top: 6px; }
.clock .d::first-letter { text-transform: uppercase; }
.hello-actions { display: flex; gap: 8px; flex-wrap: wrap; width: 100%; }
.dash-row { display: grid; gap: 18px; margin-bottom: 18px; align-items: start; }
.dash-row.r1 { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr) minmax(0, 1fr); }
.dash-row.r2 { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
@media (max-width: 1100px) { .dash-row.r1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .dash-row.r1 > :last-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .dash-row.r1, .dash-row.r2 { grid-template-columns: minmax(0, 1fr); } .clock { margin-left: 0; text-align: left; } }
.widget { padding: 16px 16px 14px; }
.widget .card-h { margin-bottom: 10px; }
.widget .card-h h2 { font-size: 1.05rem; }
.widget .list, .widget .today-item { box-shadow: none; backdrop-filter: none; }
.widget .list { background: transparent; border: 0; }
.widget .empty-today { box-shadow: none; backdrop-filter: none; background: rgba(255,255,255,.03); }
.widget .today-item { background: rgba(255, 255, 255, .035); border-radius: 12px; border-left: 3px solid var(--stencil); }
.widget .today-item.piercing { border-left-color: var(--pierce); }
.widget .open-link { padding: 10px 2px; }
.link-btn { border: 0; background: transparent; color: var(--stencil-dark); font: inherit; font-size: .85rem; font-weight: 600; cursor: pointer; padding: 0; }

.mini-cal .cal-grid { gap: 2px; }
.mini-cal .cal-day { aspect-ratio: auto; height: 34px; color: var(--ink-soft); cursor: pointer; position: relative; border-radius: 999px; }
.mini-cal .cal-day:hover { background: rgba(255, 255, 255, .06); }
.mini-cal .cal-day.has::after { content: ""; position: absolute; left: 50%; bottom: 3px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: var(--stencil); }
.mini-cal .cal-day.today { background: linear-gradient(135deg, #8b6cff, #6a4de8); color: #fff; font-weight: 700; }
.mini-cal .cal-day.inweek:not(.today) { background: rgba(139, 108, 255, .14); color: var(--ink); }
.mini-cal .cal-day.other { opacity: .35; }

/* Taken */
.tabs-pill { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tabs-pill button { border: 0; background: transparent; color: var(--ink-soft); font: inherit; font-size: .85rem; font-weight: 600; padding: .35em .8em; border-radius: 999px; cursor: pointer; }
.tabs-pill button.on { background: var(--stencil); color: #fff; }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.task:last-child { border-bottom: 0; }
.task .tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--ink-faint); background: transparent; cursor: pointer; display: grid; place-items: center; color: #fff; font-size: .75rem; padding: 0; }
.task .tick.done { background: var(--stencil); border-color: var(--stencil); }
.task .tt { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font: inherit; text-align: left; cursor: pointer; padding: 0; }
.task .tt > span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task .tt small { color: var(--ink-faint); font-size: .78rem; }
.task.is-done .tt span { text-decoration: line-through; color: var(--ink-faint); }
.task .due { font-size: .8rem; color: var(--ink-faint); white-space: nowrap; font-variant-numeric: tabular-nums; }
.task .due.late { color: var(--bad); font-weight: 600; }
.task .due.today { color: var(--warn); font-weight: 600; }
.task .star { border: 0; background: transparent; color: var(--ink-faint); font-size: 1.05rem; cursor: pointer; padding: 0 2px; line-height: 1; }
.task .star.on { color: #b9a3ff; }
.cat { display: inline-block; font-size: .7rem; font-weight: 700; padding: .1em .5em; border-radius: 5px; margin-right: 6px; vertical-align: 1px; }
.cat.design { background: rgba(139, 108, 255, .2); color: #cbbcff; }
.cat.administratie { background: rgba(96, 165, 250, .18); color: #9cc8ff; }
.cat.bestelling { background: rgba(243, 181, 98, .18); color: #f3c98a; }
.cat.overig { background: rgba(255, 255, 255, .08); color: var(--ink-soft); }
.quick-add { display: grid; grid-template-columns: minmax(0, 1fr) 150px 150px auto; gap: 8px; margin-bottom: 14px; }
@media (max-width: 760px) { .quick-add { grid-template-columns: 1fr 1fr; } .quick-add input[type=text] { grid-column: 1 / -1; } }

/* Deadlines */
.deadline { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.deadline:last-child { border-bottom: 0; }
.deadline .ic { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; }
.deadline .ic svg { width: 18px; height: 18px; }
.deadline .ic.design { background: linear-gradient(135deg, #8b6cff, #6a4de8); color: #fff; }
.deadline .ic.administratie { background: linear-gradient(135deg, #5b9dff, #3b6fe0); color: #fff; }
.deadline .ic.bestelling { background: linear-gradient(135deg, #f3a64a, #e07a2e); color: #fff; }
.deadline .ic.overig { background: rgba(255, 255, 255, .1); color: var(--ink); }
.deadline .main { flex: 1; min-width: 0; }
.deadline .main strong { display: block; font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deadline .main span { font-size: .8rem; color: var(--ink-faint); }
.chip { font-size: .75rem; font-weight: 600; padding: .2em .65em; border-radius: 7px; border: 1px solid currentColor; white-space: nowrap; }
.chip.late { color: var(--bad); }
.chip.today { color: var(--warn); }
.chip.soon { color: #b9a3ff; }

/* Formulierbouwer */
.fb-field { padding: 14px; margin-bottom: 10px; }
.fb-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.fb-head .no { font-weight: 700; color: var(--ink-faint); font-variant-numeric: tabular-nums; min-width: 1.6em; }
.fb-head select { width: auto; flex: 1 1 180px; }
.fb-head .check { margin: 0; font-size: .9rem; }
.fb-head .icon-btn { border: 1px solid var(--line); background: transparent; color: var(--ink-soft); width: 34px; height: 34px; border-radius: 8px; cursor: pointer; font-size: 1rem; }
.fb-head .icon-btn:hover { color: var(--ink); background: rgba(255, 255, 255, .06); }
.fb-head .icon-btn:disabled { opacity: .3; cursor: default; }
.fb-field textarea { min-height: 54px; }
.fb-field.info { border-style: dashed; }
.fb-add { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 22px; }
.unsaved { color: var(--warn); font-size: .88rem; font-weight: 600; }
.more-menu .btn { width: 100%; justify-content: flex-start; margin-bottom: 8px; }

/* Afdrukpagina formulier */
.print-page { background: #fff; color: #111; }
.print-wrap { max-width: 760px; margin: 0 auto; padding: 28px 20px 60px; font-size: 14px; }
.print-wrap h1 { font-size: 1.5rem; }
.print-wrap h3 { margin-top: 1.4rem; }
.print-actions { margin-bottom: 18px; }
.pr-table { width: 100%; border-collapse: collapse; }
.pr-table td { padding: 6px 8px 6px 0; border-bottom: 1px solid #e5e5e5; vertical-align: top; }
.pr-table td:last-child { width: 32%; }
.pr-table .pr-sec { font-weight: 700; font-size: 1.05rem; padding-top: 16px; border-bottom: 2px solid #111; }
.pr-table .pr-info { color: #555; }
.pr-sign { max-width: 320px; border: 1px solid #ddd; border-radius: 6px; }
@media print { .print-actions { display: none; } .print-wrap { padding: 0; } }
.form-section { font-size: 1.15rem; margin: 1.4rem 0 .4rem; padding-bottom: .4rem; border-bottom: 2px solid var(--ink); }
.form-section:first-child { margin-top: .2rem; }
.q-check { padding: .25rem 0; }
.q-check .check { margin: .35rem 0; }
.req { color: var(--bad); }
.q-radio { border: 0; padding: .7rem 0 .3rem; margin: 0; }
.q-radio legend { font-weight: 600; font-size: .9rem; padding: 0; margin-bottom: .2rem; }
.q-radio input { accent-color: var(--stencil); }
.sig-wrap { position: relative; }
.sig-canvas { display: block; width: 100%; height: 180px; background: #fff; border: 2px dashed var(--lavender); border-radius: var(--radius-s); touch-action: none; cursor: crosshair; }
.sig-actions { margin-top: .4rem; }
.sig-img { display: block; max-width: 320px; width: 100%; background: #fff; border-radius: 8px; margin-top: .4rem; }
.answers li.ans-sec { border-bottom: 2px solid var(--line); padding-top: .9rem; }
.fb-field.sec { border-left: 3px solid var(--stencil); }
.fb-field.sec textarea { font-weight: 700; min-height: 40px; }
body.dark .form-section { border-bottom-color: var(--line); }
.fb-cond { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.fb-cond select { width: auto; flex: 1 1 200px; font-size: .88rem; }
.fb-field.cond { border-left: 3px dashed var(--warn); }
.pr-sign.small { max-width: 200px; }
.poster h1 { font-size: 1.6rem; line-height: 1.25; }
.poster p, .poster li { font-size: 1.05rem; line-height: 1.5; }
.poster-foot { margin-top: 2rem; color: #555; }
.privacy h2 { font-size: 1.1rem; margin-top: 1.4rem; }
.answers li img.sig-img { max-width: 180px; }

/* ---------- Bespreking, volledige dag, foto's, nazorg ---------- */
.kind.consult { background: var(--consult-wash); color: var(--consult); }
.ev.consult, body.dark .ev.consult { background: var(--consult-wash); border-left-color: var(--consult); color: var(--consult); }
.legend .l-c { background: var(--consult-wash); border-left: 3px solid var(--consult); }
.seg button.on.consult { background: var(--consult); }
.widget .today-item.consult { border-left-color: var(--consult); }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.label { display: block; font-weight: 600; font-size: .9rem; margin: 0 0 .4rem; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; margin-bottom: 8px; }
.photo-grid:empty { display: none; }
.photo-thumb { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); }
.photo-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-del { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .6); color: #fff; font-size: 16px; line-height: 1; cursor: pointer; }
.photo-add { display: inline-flex; cursor: pointer; margin: 0 0 .3rem; }
.photo-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; margin-top: 8px; }
.photo-links a { display: block; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--line); }
.photo-links img { width: 100%; height: 100%; object-fit: cover; display: block; }
.idea-text { white-space: pre-wrap; margin: .3rem 0 0; }
.aftercare-text { min-height: 260px; font-size: .9rem; }
.check-row { display: flex; align-items: center; gap: 8px; margin: .2rem 0 .8rem; font-weight: 500; }
.check-row input { width: auto; }

.steps-list { margin: .4rem 0 0; padding-left: 1.2rem; }
.steps-list li { margin: .25rem 0; }
