/* Mobiel eerst: één kolom, grote tikvlakken. Breder scherm = meer lucht. */
:root {
  --bg: #f5f4f1; --card: #fff; --ink: #111418; --muted: #6b6f75; --line: #e6e3dd; --brand: #d0643f;
  --accent: #14171a; --accent-ink: #fff; --ok: #1f7a4d; --warn: #b26a00; --err: #b3261e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
a { color: inherit; }
h1 { font-size: 1.5rem; line-height: 1.2; margin: 0 0 .4rem; letter-spacing: -.01em; }
h2 { font-size: 1.05rem; margin: 1.6rem 0 .6rem; }
.card > h2:first-child { margin-top: 0; }
.muted { color: var(--muted); margin: 0 0 1rem; }
.small, small { font-size: .82rem; }

.top { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: rgba(245, 244, 241, .9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; font-weight: 650; letter-spacing: -.01em; text-decoration: none; }
.logo { display: block; flex: none; width: 28px; height: 28px; }
/* Niet ingelogd: logo en naam in het midden, rustige voet met het domein */
.hero { display: grid; justify-items: center; gap: 12px; padding: calc(max(7vh, 32px) + env(safe-area-inset-top)) 16px 4px; }
.hero .logo { width: 60px; height: 60px; border-radius: 15px; box-shadow: 0 10px 28px rgba(17, 20, 24, .18); }
.hero-name { font-size: 1.4rem; font-weight: 700; letter-spacing: -.02em; }
.guest .card.narrow { margin-top: 14px; }
.foot { text-align: center; color: var(--muted); font-size: .8rem; letter-spacing: .02em; padding: 0 16px calc(28px + env(safe-area-inset-bottom)); }
.foot a { color: inherit; text-underline-offset: 3px; }
/* Privacyverklaring en andere teksten */
.prose h2 { margin: 1.5rem 0 .4rem; }
.prose p, .prose ul { margin: 0 0 .9rem; }
.prose ul { padding-left: 1.2rem; }
.prose li { margin: .25rem 0; }
.editor { font-family: ui-monospace, Menlo, monospace; font-size: 14px; line-height: 1.55; }
.head-btns { display: flex; gap: 8px; }
.after-files { margin-top: 8px; }
.menu { position: relative; }
.menu summary { list-style: none; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; cursor: pointer; font-weight: 600; text-transform: uppercase; }
.menu summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: 46px; min-width: 230px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 8px; display: grid; }
.menu-panel a, .menu-panel .linkish { padding: 11px 12px; border-radius: 9px; text-decoration: none; text-align: left; font-size: 1rem; }
.menu-panel a:hover, .menu-panel .linkish:hover { background: var(--bg); }
.who { margin: 4px 12px 8px; font-weight: 600; display: grid; }
.who small { color: var(--muted); font-weight: 400; }

.wrap { max-width: 760px; margin: 0 auto; padding: 18px 16px calc(40px + env(safe-area-inset-bottom)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 18px; margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(17, 20, 24, .04), 0 8px 24px rgba(17, 20, 24, .04); }
.card.narrow { max-width: 440px; margin: 6vh auto 16px; }
.card.center { text-align: center; }
.empty { padding: 36px 18px; }
.head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.head h1 { margin: 0; }
.back { display: inline-block; margin: 0 0 12px; color: var(--muted); text-decoration: none; padding: 6px 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 20px; border-radius: 12px;
  background: var(--accent); color: var(--accent-ink); border: 0; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn:active { transform: scale(.98); }
@media (hover: hover) { .btn:hover { background: #262a30; } .btn.ghost:hover { background: #fff; border-color: #d3cfc7; } }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn[disabled] { opacity: .6; }
.linkish { background: none; border: 0; padding: 6px 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linkish.danger { color: var(--err); }

.form { display: grid; gap: 16px; }
.form .btn { width: 100%; }
label { display: grid; gap: 6px; font-weight: 600; font-size: .95rem; }
label small { font-weight: 400; color: var(--muted); }
input, textarea, select { width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid #d6d3cc; border-radius: 11px; background: #fff; color: var(--ink); }
input:focus, textarea:focus, select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: transparent; }

.drop { position: relative; display: block; border: 1.5px dashed #c9c5bd; border-radius: var(--radius); padding: 26px 16px; text-align: center; background: #faf9f7; cursor: pointer; }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-ui { display: grid; gap: 4px; pointer-events: none; }
.drop-ui strong { font-size: 1.05rem; }
.drop-ui small { color: var(--muted); font-weight: 400; }
.drop-list { display: grid; gap: 4px; margin-top: 10px; font-weight: 500; font-size: .9rem; pointer-events: none; }
.drop.has { border-style: solid; border-color: var(--ink); background: #fff; }

.flash { padding: 12px 14px; border-radius: 11px; background: #e7f3ec; color: var(--ok); margin-bottom: 14px; }
.flash.err { background: #fbeae8; color: var(--err); }
.flash.pw { background: #fff; border: 1px solid var(--ink); color: var(--ink); display: grid; gap: 8px; }
.flash.pw code { font-size: 1.3rem; letter-spacing: .04em; background: var(--bg); padding: 10px 12px; border-radius: 9px; user-select: all; word-break: break-all; }

.list { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.item .title { font-weight: 600; grid-column: 1; }
.item .meta { grid-column: 1; color: var(--muted); font-size: .88rem; }
.item .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.item .actions { grid-column: 1 / -1; display: flex; gap: 18px; margin-top: 6px; }
.item.off { opacity: .55; }

.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.s-nieuw { background: #fff1d6; color: var(--warn); }
.s-in_behandeling { background: #e3ecfb; color: #1d4f9c; }
.s-geleverd { background: #e2f2e9; color: var(--ok); }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 16px; }
.stat { border-radius: var(--radius); padding: 12px; display: grid; }
.stat strong { font-size: 1.6rem; line-height: 1.1; }
.stat span { font-size: .8rem; font-weight: 600; }

.files { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.files li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; }
.files a { font-weight: 500; word-break: break-word; }
.files small { color: var(--muted); white-space: nowrap; }
.notes { background: var(--bg); padding: 12px 14px; border-radius: 11px; margin: 0; }

.deliver { margin: 18px 0 6px; padding: 18px; border-radius: var(--radius); background: var(--bg); display: grid; gap: 12px; }
.deliver h2 { margin: 0; }
.share { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; }
.share input { font-size: .85rem; padding: 10px 12px; color: var(--muted); }
.share .btn { min-height: 44px; padding: 0 14px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 16px 0 6px; }
.step { padding: 10px 8px; border-radius: 10px; background: var(--bg); color: var(--muted); font-size: .82rem; font-weight: 600; text-align: center; }
.step.done { background: #e2f2e9; color: var(--ok); }
.step.now { background: #e3ecfb; color: #1d4f9c; }

.inline { display: flex; gap: 8px; margin: 8px 0 0; }
.inline select { flex: 1; }

.delivery { display: grid; gap: 4px; padding: 14px 0; border-top: 1px solid var(--line); }
.delivery.off { opacity: .55; }
.delivery .actions { display: flex; gap: 18px; flex-wrap: wrap; }
.mono { font-family: ui-monospace, Menlo, monospace; font-size: .85rem; word-break: break-all; }

/* Wat ziet de klant? Schakelaars per onderdeel (groen = zichtbaar) */
.vis { margin-top: 6px; }
.vis summary { cursor: pointer; padding: 6px 0; font-weight: 600; font-size: .95rem; }
.vis summary small { margin-left: 6px; color: var(--muted); font-weight: 400; }
.vis form { display: grid; padding: 4px 0 6px; }
.vis .btn { margin-top: 14px; justify-self: start; }
.vis-group { margin: 14px 0 2px; font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.vis-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line);
  font-weight: 500; font-size: .95rem; cursor: pointer; }
.switch { -webkit-appearance: none; appearance: none; flex: none; width: 46px; height: 28px; padding: 0; margin: 0; border: 0; border-radius: 14px;
  background: #e3e1dc; position: relative; cursor: pointer; transition: background .2s ease; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .3s cubic-bezier(.3, 1.4, .5, 1); }
.switch:checked { background: #34c759; }
.switch:checked::after { transform: translateX(18px); }
.switch:focus { outline: none; }
.switch:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

@media (min-width: 700px) {
  .wrap { padding-top: 32px; }
  h1 { font-size: 1.8rem; }
  .card { padding: 28px; }
  .form .btn { width: auto; justify-self: start; }
}
