/* Beheer trainenmetstacey.nl. Mobile-first (390 px), tikdoelen van 48 px, nergens
   horizontaal scrollen. Tokens uit de css van de site. Geen frameworks. */

@font-face { font-family: 'Poppins'; font-weight: 400; font-display: swap; src: url(/statisch/fonts/poppins-400.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 600; font-display: swap; src: url(/statisch/fonts/poppins-600.woff2) format('woff2'); }
@font-face { font-family: 'Poppins'; font-weight: 700; font-display: swap; src: url(/statisch/fonts/poppins-700.woff2) format('woff2'); }

:root {
  --pink: #FD099E; --pink-btn: #FF2D95; --pink-ink: #D1007F; --orange: #FF6823;
  --ink: #141218; --muted: #5d5864; --soft: #FFF3F9; --soft-2: #FFE4F2; --line: #F5D3E6; --night: #0E0C10;
  --wit: #fff; --groen: #1f8a5b; --groen-licht: #e6f6ee; --geel: #b26a00; --geel-licht: #fff4dc; --rood: #c6263f; --rood-licht: #ffe9ec;
  --font: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 18px; --radius-s: 12px; --shadow: 0 12px 32px rgba(209, 0, 127, .08), 0 2px 6px rgba(20, 18, 24, .05);
  --tik: 48px; --gutter: 16px; --onderbalk: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.5; color: var(--ink); background: var(--soft); overflow-x: hidden; }
body:not(.los) { padding-bottom: calc(var(--onderbalk) + env(safe-area-inset-bottom)); }
img, svg { max-width: 100%; display: block; }
a { color: var(--pink-ink); text-underline-offset: 3px; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.4rem; } h2 { font-size: 1.15rem; } h3 { font-size: 1rem; }
p { margin: 0 0 .75em; }
.stil { color: var(--muted); font-size: .9em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; z-index: 1000; }
.icoon { width: 22px; height: 22px; flex: none; }
.icoon--klein { width: 16px; height: 16px; }

/* Kop */
.kop { position: sticky; top: 0; z-index: 20; background: rgba(255, 243, 249, .92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.kop__binnen { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 6px var(--gutter); }
.kop__merk { display: none; }
.kop__merk-naam { font-weight: 700; } .kop__merk-sub { color: var(--pink-ink); font-weight: 600; text-transform: uppercase; letter-spacing: .1em; font-size: .7rem; margin-left: 6px; }
.kop__titel { font-size: 1.1rem; margin: 0; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kop__terug { display: inline-flex; align-items: center; justify-content: center; width: var(--tik); height: var(--tik); margin-left: -12px; border-radius: 50%; color: var(--ink); }
.doel { display: inline-flex; align-items: center; gap: 4px; font-size: .75rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--wit); border: 1px solid var(--line); white-space: nowrap; }
.doel--productie { background: var(--groen-licht); color: var(--groen); border-color: #bfe6d1; }
.doel--staging { color: var(--geel); background: var(--geel-licht); border-color: #f3dfb0; }

.raam { display: block; }
.inhoud { padding: var(--gutter); max-width: 760px; margin: 0 auto; }
.breed .inhoud { max-width: 1100px; }
.zijbalk { display: none; }

/* Onderbalk (telefoon) */
.onderbalk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--wit); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.onderbalk__lijst { list-style: none; margin: 0; padding: 0 4px; display: grid; grid-template-columns: repeat(4, 1fr) 1fr; height: var(--onderbalk); }
.onderbalk__lijst li { display: none; }
.onderbalk__lijst a[data-onderbalk="1"] { display: flex; }
.onderbalk__lijst li:has(a[data-onderbalk="1"]) { display: block; }
.onderbalk__lijst a, .meer__knop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: var(--onderbalk); font-size: .7rem; font-weight: 600; color: var(--muted); text-decoration: none; border-radius: 10px; }
.onderbalk__lijst a[aria-current="page"] { color: var(--pink-ink); }
.meer { position: absolute; right: 4px; bottom: 0; width: 20%; }
.meer__knop { list-style: none; cursor: pointer; width: 100%; }
.meer__knop::-webkit-details-marker { display: none; }
.meer[open] .meer__knop { color: var(--pink-ink); }
.meer__paneel { position: fixed; left: 0; right: 0; bottom: calc(var(--onderbalk) + env(safe-area-inset-bottom)); max-height: calc(100vh - var(--onderbalk) - 60px); overflow: auto; background: var(--wit); border-top: 1px solid var(--line); border-radius: 20px 20px 0 0; box-shadow: 0 -12px 32px rgba(20, 18, 24, .12); padding: 12px var(--gutter) 16px; }
.meer__kop { display: flex; justify-content: space-between; align-items: baseline; padding: 4px 8px 10px; }
.meer__lijst { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; }
.meer__lijst a { display: flex; align-items: center; gap: 10px; min-height: var(--tik); padding: 8px 10px; border-radius: var(--radius-s); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
.meer__lijst a[aria-current="page"] { background: var(--soft); color: var(--pink-ink); }
.meer__uit { margin: 12px 8px 0; }

/* Kaarten en lijsten */
.kaart { background: var(--wit); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px var(--gutter); margin: 0 0 16px; }
.kaart > h2:first-child { margin-top: 0; }
.kaart--accent { background: var(--night); color: #fff; }
.kaart--accent a { color: #fff; }
.kaart--zacht { background: var(--soft-2); box-shadow: none; }
.tegels { display: grid; grid-template-columns: 1fr; gap: 10px; list-style: none; margin: 0 0 16px; padding: 0; }
.tegel { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 12px 14px; background: var(--wit); border-radius: var(--radius-s); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; }
.tegel__icoon { width: 40px; height: 40px; border-radius: 12px; background: var(--soft); color: var(--pink-ink); display: grid; place-items: center; flex: none; }
.tegel__tekst { flex: 1; min-width: 0; }
.tegel__tekst strong { display: block; }
.tegel__tekst span { color: var(--muted); font-size: .85rem; display: block; }
.tegel__badge { font-size: .75rem; font-weight: 700; color: var(--pink-ink); background: var(--soft-2); padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.lijst-plat { list-style: none; margin: 0; padding: 0; }
.lijst-plat li { display: flex; gap: 12px; align-items: center; min-height: var(--tik); padding: 10px 0; border-bottom: 1px solid var(--line); }
.lijst-plat li:last-child { border-bottom: 0; }
.lijst-plat a { color: var(--ink); text-decoration: none; font-weight: 600; flex: 1; }

/* Meldingen */
.melding { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-s); margin: 0 0 14px; background: var(--wit); border: 1px solid var(--line); }
.melding .icoon { margin-top: 1px; }
.melding--goed { background: var(--groen-licht); color: var(--groen); border-color: #bfe6d1; }
.melding--fout { background: var(--rood-licht); color: var(--rood); border-color: #f3c3cb; }
.melding--waarschuwing { background: var(--geel-licht); color: var(--geel); border-color: #f3dfb0; }
.melding ul { margin: 6px 0 0; padding-left: 18px; }
.melding a { color: inherit; }

/* Knoppen */
.knop { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--tik); padding: 10px 20px; border-radius: 999px; border: 2px solid var(--pink-btn); background: var(--pink-btn); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; }
.knop:hover { background: var(--pink); border-color: var(--pink); }
.knop:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.knop--licht { background: var(--wit); color: var(--ink); border-color: var(--line); }
.knop--licht:hover { background: var(--soft); border-color: var(--line); }
.knop--donker { background: var(--ink); border-color: var(--ink); }
.knop--donker:hover { background: #000; border-color: #000; }
.knop--weg { color: var(--rood); border-color: #f3c3cb; background: var(--wit); }
.knop--weg:hover { background: var(--rood-licht); border-color: #f3c3cb; }
.knop--klein { min-height: var(--tik); padding: 6px 14px; font-size: .9rem; }
.knop--ikoon { min-width: var(--tik); min-height: var(--tik); padding: 0 10px; background: var(--wit); color: var(--ink); border-color: var(--line); }
.knop[disabled] { opacity: .4; cursor: default; }
.knop--breed { width: 100%; }
.knoppen { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.knoppen--onder { position: sticky; bottom: calc(var(--onderbalk) + env(safe-area-inset-bottom) + 8px); background: rgba(255, 243, 249, .96); padding: 10px 0; margin: 8px calc(-1 * var(--gutter)) 0; padding-left: var(--gutter); padding-right: var(--gutter); border-top: 1px solid var(--line); z-index: 5; }

/* Formulieren */
form { margin: 0; }
.veld { margin: 0 0 18px; }
.veld label, .veld-label, fieldset legend { display: block; font-weight: 600; margin-bottom: 6px; }
.veld .teller { float: right; font-weight: 400; color: var(--muted); font-size: .8rem; }
.veld .teller.teller--vol { color: var(--rood); font-weight: 700; }
.verplicht { color: var(--pink-ink); }
input[type="text"], input[type="email"], input[type="tel"], input[type="number"], input[type="password"], input[type="url"], textarea, select {
  width: 100%; min-height: var(--tik); padding: 10px 14px; font: inherit; color: var(--ink); background: var(--wit); border: 1.5px solid var(--line); border-radius: var(--radius-s);
}
textarea { resize: vertical; line-height: 1.5; }
input:focus, textarea:focus, select:focus { outline: 3px solid var(--soft-2); border-color: var(--pink); }
[aria-invalid="true"] { border-color: var(--rood) !important; }
.veld-fout { color: var(--rood); font-size: .9rem; margin: 6px 0 0; font-weight: 600; }
.veld--met-fout > label { color: var(--rood); }
.uitleg { color: var(--muted); font-size: .85rem; margin: 6px 0 0; }
fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
fieldset.veld--groep { background: var(--wit); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px var(--gutter); }
fieldset.veld--groep > legend { float: left; width: 100%; font-size: 1.05rem; margin: 0 0 10px; padding: 0; }
fieldset.veld--groep > legend + * { clear: both; }
fieldset.veld--groep fieldset.veld--groep { box-shadow: none; background: var(--soft); padding: 12px; }
fieldset.veld--groep fieldset.veld--groep > legend { font-size: 1rem; }
.getal-rij { display: flex; align-items: center; gap: 8px; }
.getal-rij .voorvoegsel { font-weight: 600; }
.getal-rij input { max-width: 180px; }
.schakel { display: flex; align-items: center; gap: 12px; min-height: var(--tik); cursor: pointer; font-weight: 500 !important; }
.schakel input { width: 24px; height: 24px; accent-color: var(--pink); flex: none; }
.keuzes { display: grid; gap: 2px; }
.vast-badge { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--soft); padding: 2px 8px; border-radius: 999px; margin-left: 6px; vertical-align: middle; font-weight: 600; }
.vast-waarde { padding: 10px 14px; background: var(--soft); border-radius: var(--radius-s); color: var(--muted); min-height: var(--tik); display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.vast-lijst { margin: 0; padding-left: 18px; } .vast-groep { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; } .vast-groep dt { font-weight: 600; } .vast-groep dd { margin: 0; }

/* Lijsten in formulieren */
fieldset.veld--lijst { background: var(--wit); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px var(--gutter); }
fieldset.veld--lijst > legend { float: left; width: 100%; font-size: 1.05rem; margin: 0 0 8px; }
.lijst { list-style: none; margin: 0 0 12px; padding: 0; clear: both; }
.lijst-item { background: var(--soft); border-radius: var(--radius-s); padding: 12px; margin: 0 0 10px; }
.lijst-item__kop { display: flex; align-items: center; justify-content: space-between; margin: 0 0 8px; }
.lijst-item__nr { font-weight: 700; color: var(--pink-ink); width: 30px; height: 30px; border-radius: 50%; background: var(--wit); display: grid; place-items: center; font-size: .85rem; }
.lijst-item__knoppen { display: flex; gap: 6px; }
.lijst-item .veld:last-child { margin-bottom: 0; }
.lijst-item fieldset.veld--groep { background: var(--wit); }
.leeg { color: var(--muted); font-style: italic; }

/* Werkbalk en live voorbeeld */
.werkbalk { display: flex; gap: 6px; margin: 0 0 6px; }
.werkbalk button { min-width: var(--tik); min-height: var(--tik); border: 1.5px solid var(--line); background: var(--wit); border-radius: 10px; font: inherit; cursor: pointer; padding: 0 10px; }
.werkbalk button:hover { background: var(--soft); }
.live-voorbeeld, .nadruk-voorbeeld { margin: 8px 0 0; padding: 12px 14px; border: 1.5px dashed var(--line); border-radius: var(--radius-s); background: var(--wit); }
.live-voorbeeld__kop { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.live-voorbeeld__inhoud p { margin: 0 0 .6em; } .live-voorbeeld__inhoud p:last-child { margin: 0; }
.live-voorbeeld__inhoud h2 { font-size: 1.05rem; margin: .4em 0 .2em; }
.nadruk-voorbeeld { font-weight: 800; font-size: 1.15rem; line-height: 1.2; }
.roze { color: var(--pink); }

/* Beeldveld en fotobibliotheek */
.beeld-rij { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.beeld-rij select { flex: 1; min-width: 180px; }
.beeld-mini { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; background: var(--soft-2); flex: none; }
.beeld-mini--leeg { display: block; border: 1.5px dashed var(--line); }
.raster { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; list-style: none; margin: 0; padding: 0; }
.raster__item { background: var(--wit); border-radius: var(--radius-s); box-shadow: var(--shadow); overflow: hidden; }
.raster__item a { display: block; color: var(--ink); text-decoration: none; }
.raster__item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: var(--soft-2); }
.raster__item--leeg img { opacity: .4; }
.raster__tekst { padding: 8px 10px 10px; font-size: .85rem; }
.raster__tekst strong { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.raster__tekst span { color: var(--muted); display: block; }
.foto-detail img { width: 100%; max-height: 60vh; object-fit: contain; border-radius: var(--radius-s); background: var(--night); }
.focus-vlak { position: relative; display: inline-block; max-width: 100%; cursor: crosshair; touch-action: manipulation; }
.focus-vlak img { display: block; max-height: 60vh; width: auto; max-width: 100%; }
.focus-stip { position: absolute; width: 28px; height: 28px; margin: -14px 0 0 -14px; border: 3px solid #fff; border-radius: 50%; background: rgba(253, 9, 158, .85); box-shadow: 0 0 0 2px rgba(0, 0, 0, .3); pointer-events: none; left: var(--fx, 50%); top: var(--fy, 50%); }
.focus-stip[hidden] { display: none; }
.focus-vlak--zonder .focus-stip { display: none; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 24px var(--gutter); text-align: center; background: var(--wit); }
.drop input[type="file"] { width: 100%; min-height: var(--tik); }
.voortgang { display: grid; gap: 6px; margin: 12px 0 0; }
.voortgang__rij { display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; padding: 8px 12px; border-radius: 10px; background: var(--soft); }
.voortgang__rij--fout { background: var(--rood-licht); color: var(--rood); }
.voortgang__rij--goed { background: var(--groen-licht); color: var(--groen); }
.gebruik { margin: 0; padding-left: 18px; font-size: .9rem; }

/* Beeldkiezer (dialog, alleen met JS) */
dialog.kiezer { border: 0; border-radius: var(--radius); padding: 0; width: min(100vw - 24px, 720px); max-height: 90vh; background: var(--wit); box-shadow: var(--shadow); }
dialog.kiezer::backdrop { background: rgba(14, 12, 16, .55); }
.kiezer__kop { display: flex; align-items: center; justify-content: space-between; padding: 12px var(--gutter); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--wit); }
.kiezer__kop h2 { margin: 0; font-size: 1.05rem; }
.kiezer__inhoud { padding: var(--gutter); overflow: auto; max-height: calc(90vh - 70px); }
.kiezer__raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; list-style: none; margin: 0 0 14px; padding: 0; }
.kiezer__raster button { width: 100%; padding: 0; border: 2px solid transparent; border-radius: 12px; background: var(--soft); text-align: left; font: inherit; cursor: pointer; overflow: hidden; }
.kiezer__raster button[aria-pressed="true"] { border-color: var(--pink); }
.kiezer__raster img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.kiezer__raster span { display: block; padding: 6px 8px; font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kiezer__upload { border-top: 1px solid var(--line); padding-top: 12px; }

/* Tabellen (geschiedenis, logboek) als kaartjes op mobiel */
.rijen { list-style: none; margin: 0; padding: 0; }
.rij { background: var(--wit); border-radius: var(--radius-s); box-shadow: var(--shadow); padding: 12px 14px; margin: 0 0 10px; }
.rij__kop { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rij__kop strong { font-size: 1rem; }
.rij ul { margin: 6px 0 0; padding-left: 18px; font-size: .9rem; color: var(--muted); }
.status { display: inline-block; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.status--klaar { background: var(--groen-licht); color: var(--groen); }
.status--mislukt { background: var(--rood-licht); color: var(--rood); }
.status--bezig, .status--wacht { background: var(--geel-licht); color: var(--geel); }
.log { background: var(--night); color: #e8e6ea; font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace; padding: 12px 14px; border-radius: var(--radius-s); white-space: pre-wrap; word-break: break-word; max-height: 40vh; overflow: auto; margin: 10px 0 0; }
.stappen { counter-reset: s; list-style: none; padding: 0; margin: 0 0 16px; }
.stappen li { counter-increment: s; display: flex; gap: 12px; padding: 8px 0; }
.stappen li::before { content: counter(s); width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--pink); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: .85rem; }
.cijfer { font-size: 2rem; font-weight: 800; line-height: 1; }
.geheim { font: 600 1.05rem/1.6 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; word-break: break-all; background: var(--soft); padding: 10px 14px; border-radius: var(--radius-s); user-select: all; }
.herstelcodes { columns: 2; font: 600 1.05rem/1.8 ui-monospace, SFMono-Regular, Menlo, monospace; list-style: none; padding: 12px 16px; margin: 0 0 12px; background: var(--soft); border-radius: var(--radius-s); }
.qr { width: 220px; height: 220px; margin: 0 auto 12px; background: #fff; padding: 8px; border-radius: 12px; }
.qr svg { width: 100%; height: 100%; }

/* Losse pagina's */
.los { display: grid; place-items: start center; padding: 24px var(--gutter) 40px; min-height: 100vh; }
.los__kaart { width: 100%; max-width: 440px; background: var(--wit); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 20px 28px; }
.los__merk { margin: 0 0 14px; }
.los h1 { font-size: 1.3rem; margin: 0 0 14px; }

/* Desktop */
@media (min-width: 900px) {
  :root { --gutter: 28px; }
  body:not(.los) { padding-bottom: 0; }
  .onderbalk { display: none; }
  .kop__binnen { padding-left: 290px; }
  .raam { display: block; }
  .zijbalk { display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; width: 260px; background: var(--wit); border-right: 1px solid var(--line); padding: 20px 14px; z-index: 25; overflow: auto; }
  .zijbalk__merk { padding: 4px 10px 18px; }
  .zijbalk__lijst { list-style: none; margin: 0; padding: 0; flex: 1; }
  .zijbalk__lijst a { display: flex; align-items: center; gap: 12px; min-height: var(--tik); padding: 8px 12px; border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; }
  .zijbalk__lijst a:hover { background: var(--soft); }
  .zijbalk__lijst a[aria-current="page"] { background: var(--soft-2); color: var(--pink-ink); }
  .zijbalk__wie { font-size: .85rem; padding: 12px 10px 0; border-top: 1px solid var(--line); margin: 8px 0 0; display: flex; gap: 8px; align-items: flex-start; }
  .zijbalk__uit { padding: 10px 10px 0; }
  .zijbalk__uit .knop { width: 100%; }
  .inhoud { margin-left: 260px; max-width: none; padding: 28px 40px 60px; }
  .inhoud > *, .inhoud > form { max-width: 820px; }
  .breed .inhoud > *, .breed .inhoud > form { max-width: 1100px; }
  .tegels { grid-template-columns: repeat(2, 1fr); }
  .raster { grid-template-columns: repeat(4, 1fr); }
  .knoppen--onder { position: static; background: none; border: 0; margin: 16px 0 0; padding: 0; }
  h1 { font-size: 1.6rem; }
}
@media (min-width: 1280px) { .tegels { grid-template-columns: repeat(3, 1fr); } .raster { grid-template-columns: repeat(5, 1fr); } }
@media (prefers-reduced-motion: no-preference) { .knop, .tegel { transition: background .15s, transform .15s; } .tegel:active { transform: scale(.99); } }
