/* Beheerpaneel. Kleuren volgen het logo: merkzwart en merkgeel (zie src/styles.css). */
:root {
  --dark: #0a1014;
  --dark-2: #171d23;
  --yellow: #f5a80c;
  --yellow-2: #ffbb36;
  --accent: #b87800;
  --ink: #12171c;
  --text: #3e4349;
  --muted: #6b6f75;
  --line: #e4e2dd;
  --soft: #f4f3ef;
  --tint: #fdf1d6;
  --bg: #f7f6f3;
  --white: #fff;
  --ok: #1e8e4e;
  --ok-bg: #e7f6ec;
  --bad: #c62e2e;
  --bad-bg: #fdecec;
  --warn: #b26a00;
  --radius: 12px;
  --top-h: 60px;
  --side-w: 220px;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', Consolas, monospace;
  --shadow: 0 10px 30px -18px rgba(10, 16, 20, .35);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
h1, h2, h3 { color: var(--ink); line-height: 1.25; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
[hidden] { display: none !important; }
.mono { font-family: var(--mono); font-size: .9em; }
.muted { color: var(--muted); }

.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.flag { display: inline-flex; width: 18px; height: 12px; border-radius: 2px; overflow: hidden; box-shadow: 0 0 0 1px rgba(0, 0, 0, .12); flex: none; }
.flag svg { width: 100%; height: 100%; display: block; }

/* ---------- Knoppen en invoer ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 7px 14px;
  border: 1px solid var(--line); border-radius: 9px; background: var(--white); color: var(--ink); font-weight: 600; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, box-shadow .15s;
}
.btn:hover { border-color: #cfccc4; background: var(--soft); }
.btn:focus-visible, .ibtn:focus-visible, .input:focus-visible, textarea:focus-visible, .tbtn:focus-visible, .nav-item:focus-visible, .picker:focus-visible {
  outline: 3px solid var(--accent); outline-offset: 1px;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn-primary { background: var(--yellow); border-color: var(--yellow); color: var(--dark); }
.btn-primary:hover { background: var(--yellow-2); border-color: var(--yellow-2); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; }
.btn-danger:hover { background: #a92424; border-color: #a92424; }
.btn-ghost { background: transparent; }
.btn-danger-ghost { background: transparent; color: var(--bad); }
.btn-danger-ghost:hover { background: var(--bad-bg); border-color: #f2c4c4; }
.btn-sm { min-height: 32px; padding: 4px 10px; font-size: 13.5px; border-radius: 8px; }
.btn-lg { min-height: 48px; padding: 10px 22px; font-size: 16px; }
.btn-block { width: 100%; }

.ibtn {
  display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; padding: 0; flex: none;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer;
}
.ibtn:hover { background: var(--soft); color: var(--ink); }
.ibtn.active { background: var(--dark); color: var(--yellow); }
.ibtn.off { opacity: .3; pointer-events: none; }
.ibtn.danger:hover { color: var(--bad); background: var(--bad-bg); }
.ibtn.tiny { width: 24px; height: 24px; }
.ibtn.tiny .ic { width: 14px; height: 14px; }

.input, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid #d9d6cf; border-radius: 9px; background: var(--white); color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:hover, textarea:hover { border-color: #c4c0b7; }
.input:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(245, 168, 12, .25); }
textarea { display: block; resize: vertical; min-height: 40px; overflow: hidden; line-height: 1.45; }
select.input { padding-right: 28px; }
.input-sm { min-height: 32px; padding: 4px 8px; width: auto; }

.switch { position: relative; display: inline-block; width: 46px; height: 26px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cfccc4; transition: background .15s; pointer-events: none; }
.switch span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.switch input:checked + span { background: var(--ok); }
.switch input:checked + span::after { transform: translateX(20px); }
.switch input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }

.badge { display: inline-block; padding: 1px 7px; border-radius: 99px; background: var(--tint); color: var(--accent); font-size: 11.5px; font-weight: 700; letter-spacing: .02em; }
.badge.soft { background: var(--soft); color: var(--muted); font-weight: 600; }
.badge.warn { background: #fff1d6; color: var(--warn); }
.chip { display: inline-block; padding: 2px 9px; border-radius: 99px; background: var(--tint); color: #7a5200; font-size: 12.5px; font-weight: 600; }
.chip.muted { background: var(--soft); color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }

.spinner { display: inline-block; width: 18px; height: 18px; border: 2.5px solid rgba(0, 0, 0, .15); border-top-color: var(--yellow); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Inloggen ---------- */

.login { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; background: radial-gradient(1200px 600px at 50% -10%, #fff 0, var(--bg) 60%); }
.login-card { width: 100%; max-width: 380px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 30px 26px; box-shadow: var(--shadow); display: grid; gap: 14px; text-align: center; }
.login-card h1 { font-size: 21px; }
.login-card label, label.stack { display: grid; gap: 5px; text-align: left; font-weight: 600; color: var(--ink); font-size: 14px; }
.login-error { margin: 0; min-height: 1.2em; color: var(--bad); font-size: 14px; }
.brand-mark { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 9px; background: var(--dark); color: var(--yellow); font-weight: 800; font-size: 20px; flex: none; }
.brand-mark.big { width: 56px; height: 56px; font-size: 32px; border-radius: 14px; margin: 0 auto; }
.seg { display: inline-flex; gap: 4px; flex-wrap: wrap; justify-content: center; }

/* ---------- Opbouw ---------- */

.top {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 12px; height: var(--top-h); padding: 0 16px;
  background: var(--dark); color: #d9dde2;
}
.top .ibtn { color: #aeb5bd; }
.top .ibtn:hover { background: var(--dark-2); color: #fff; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; width: calc(var(--side-w) - 28px); }
.brand .brand-mark { background: var(--yellow); color: var(--dark); }
.brand div { display: grid; min-width: 0; line-height: 1.2; }
.brand strong { color: #fff; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { color: #8b939b; font-size: 12px; }
.nav-toggle { display: none; }

.search-wrap { position: relative; flex: 1; max-width: 520px; display: flex; align-items: center; }
.search-wrap > .ic { position: absolute; left: 11px; color: #8b939b; pointer-events: none; }
.search { width: 100%; height: 38px; padding: 0 12px 0 36px; border: 1px solid #2b333b; border-radius: 9px; background: var(--dark-2); color: #fff; }
.search::placeholder { color: #8b939b; }
.search:focus { outline: none; border-color: var(--yellow); }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; max-height: 70vh; overflow: auto; z-index: 60;
  background: var(--white); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 6px; color: var(--text);
}
.search-results .empty { padding: 12px; color: var(--muted); }
.hit { display: grid; gap: 2px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; text-align: left; cursor: pointer; }
.hit:hover, .hit:focus { background: var(--soft); outline: none; }
.hit-where { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.hit-text { font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hit mark { background: var(--tint); color: inherit; border-radius: 3px; padding: 0 1px; }

.src-lang { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8b939b; margin-left: auto; }
.src-lang select { background: var(--dark-2); color: #fff; border-color: #2b333b; }
.save-state { font-size: 13px; color: #8b939b; white-space: nowrap; }
.save-state.dirty { color: var(--yellow); font-weight: 600; }
.save-state.dirty::before { content: '●'; margin-right: 5px; }

.side {
  position: fixed; top: var(--top-h); bottom: 0; left: 0; width: var(--side-w); z-index: 30; overflow-y: auto;
  padding: 14px 10px 30px; background: var(--white); border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px;
}
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%; padding: 9px 12px; border: 0; border-radius: 9px; background: none;
  color: var(--text); font-weight: 600; text-align: left; cursor: pointer;
}
.nav-item:hover { background: var(--soft); color: var(--ink); }
.nav-item.active { background: var(--tint); color: var(--ink); }
.nav-item.active .ic { color: var(--accent); }
.nav-item[data-view='preview'] { color: var(--ink); }
.nav-item[data-view='preview'] .ic { color: var(--accent); }
.nav-item[data-view='publish'] { margin-top: 12px; position: relative; }
.nav-item[data-view='publish']::before { content: ''; position: absolute; left: 8px; right: 8px; top: -7px; border-top: 1px solid var(--line); }
.nav-publish { color: var(--ok); }
.nav-publish.active { background: var(--ok-bg); }
.nav-publish.active .ic { color: var(--ok); }

.view { margin-left: var(--side-w); padding: 26px 30px 90px; max-width: calc(var(--side-w) + 1280px); }
.view-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.view-head h1 { font-size: 26px; }
.lead { margin: 6px 0 0; max-width: 72ch; color: var(--muted); }
.hint { margin: 2px 0 6px; font-size: 13px; color: var(--muted); max-width: 90ch; }

.busy {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 90; display: flex; align-items: center; gap: 10px;
  padding: 11px 18px; border-radius: 99px; background: var(--dark); color: #fff; box-shadow: var(--shadow); font-weight: 600; font-size: 14px;
}

/* ---------- Kaarten en velden ---------- */

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 18px; box-shadow: 0 1px 0 rgba(0, 0, 0, .02); }
.card-head { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.card-head h2 { font-size: 16.5px; margin-right: auto; }
.card > .hint { padding: 10px 18px 0; margin: 0; }
.card-body { padding: 14px 18px 6px; }
.card-extra { display: flex; gap: 6px; flex-wrap: wrap; }
.tr-tools { display: flex; gap: 6px; flex-wrap: wrap; }

.field { margin-bottom: 16px; }
.field-head { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; flex-wrap: wrap; }
.field-head label, fieldset > legend { font-weight: 700; color: var(--ink); font-size: 14px; }
.field-site { max-width: 640px; }
.field-site .field-head + .input, .field-site .hint + .input { margin-top: 2px; }
.field-toggle { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 16px; max-width: 640px; }
.field-toggle .field-head, .field-toggle .hint { grid-column: 1; }
.field-toggle .switch { grid-column: 2; grid-row: 1 / span 2; }
.field-one { max-width: 640px; }

.cells { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.cell { position: relative; min-width: 0; }
.cell-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; min-height: 26px; font-size: 12px; color: var(--muted); }
.cell-head b { font-weight: 700; letter-spacing: .04em; }
.count { margin-left: auto; font-variant-numeric: tabular-nums; }
.count.over { color: var(--bad); font-weight: 700; }
.tbtn {
  display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 8px; border: 1px solid transparent; border-radius: 99px;
  background: transparent; color: var(--accent); font-size: 12px; font-weight: 600; cursor: pointer;
}
.count + .tbtn { margin-left: 6px; }
.tbtn .ic { width: 14px; height: 14px; }
.tbtn:hover { background: var(--tint); border-color: #f3dca8; }
.stale-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--yellow); box-shadow: 0 0 0 3px var(--tint); }
.cell.stale .stale-dot { display: inline-block; }
.cell.stale textarea { border-color: #ecc66e; background: #fffcf3; }

.flash { animation: flash 1.4s ease-out; }
@keyframes flash { 0% { box-shadow: 0 0 0 4px rgba(30, 142, 78, .45); border-color: var(--ok); } 100% { box-shadow: 0 0 0 0 rgba(30, 142, 78, 0); } }

fieldset.group { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 2px; margin: 4px 0 16px; background: #fcfcfa; }
fieldset.group > legend { padding: 0 6px; }

.array { margin-bottom: 14px; }
.item { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: #fcfcfa; }
.item-head { display: flex; align-items: center; gap: 8px; padding: 6px 8px 6px 12px; border-bottom: 1px solid var(--line); }
.item-title { flex: 1; min-width: 0; color: var(--ink); font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-body { padding: 12px 12px 0; }
.item-tools { display: flex; gap: 2px; margin-left: auto; }
.num { display: inline-grid; place-items: center; min-width: 26px; height: 22px; padding: 0 6px; border-radius: 99px; background: var(--soft); color: var(--muted); font-size: 12px; font-weight: 700; flex: none; }
.item-str { display: flex; align-items: flex-start; gap: 8px; padding: 8px 6px 0 10px; }
.item-str > .num { margin-top: 30px; }
.item-str > .field { flex: 1; min-width: 0; margin-bottom: 8px; }
.item-str > .item-tools { margin-top: 26px; }
.add-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 6px; }

.picker {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 12px 6px 6px; border: 1px solid #d9d6cf; border-radius: 10px;
  background: var(--white); cursor: pointer; text-align: left; max-width: 100%;
}
.picker:hover { border-color: var(--accent); }
.picker .link { color: var(--accent); font-weight: 600; font-size: 13px; margin-left: 6px; }
.icon-picker .ic { width: 30px; height: 30px; padding: 5px; border-radius: 8px; background: var(--tint); color: var(--accent); }
.icon-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.icon-cell { display: grid; justify-items: center; gap: 4px; padding: 12px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); cursor: pointer; }
.icon-cell .ic { width: 28px; height: 28px; color: var(--ink); }
.icon-cell small { font-size: 11.5px; color: var(--muted); }
.icon-cell:hover, .icon-cell.active { border-color: var(--yellow); background: var(--tint); }

.thumb, .thumb-sm, .thumb-xs { display: block; object-fit: cover; background: var(--soft); flex: none; }
.thumb { width: 100%; aspect-ratio: 4 / 3; }
.thumb-sm { width: 64px; height: 48px; border-radius: 7px; }
.thumb-xs { width: 36px; height: 28px; border-radius: 5px; }
.missing { display: grid; place-items: center; color: var(--bad); font-size: 12px; font-weight: 600; background: var(--bad-bg); text-align: center; }

/* ---------- Lijst + editor (diensten, projecten) ---------- */

.master { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 18px; align-items: start; }
.list { position: sticky; top: calc(var(--top-h) + 16px); display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; padding: 8px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.list-item { display: flex; align-items: center; gap: 2px; border-radius: 9px; }
.list-item.active { background: var(--tint); }
.list-item:not(.active):hover { background: var(--soft); }
.list-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: none; text-align: left; cursor: pointer; font-weight: 600; color: var(--ink); }
.list-main span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-main .ic { color: var(--accent); }
.list .btn-block { margin-top: 6px; }
.list .ibtn { width: 28px; height: 28px; }

.before-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px 18px; padding-bottom: 12px; }
.check, .day { display: inline-flex; align-items: center; gap: 7px; cursor: pointer; font-weight: 500; }
.check input, .day input { width: 18px; height: 18px; accent-color: var(--accent); }
.days { display: flex; flex-wrap: wrap; gap: 6px 14px; }

.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 10px; padding: 0; }
.tag { display: inline-flex; align-items: center; gap: 2px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--soft); border: 1px solid var(--line); font-weight: 600; font-size: 14px; color: var(--ink); }
.tag .ibtn.tiny:first-child { margin-left: -6px; }
.tag-add { display: flex; gap: 8px; max-width: 420px; }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.tab { padding: 8px 14px; border: 1px solid var(--line); border-radius: 99px; background: var(--white); font-weight: 600; cursor: pointer; color: var(--text); }
.tab:hover { border-color: #cfccc4; }
.tab.active { background: var(--dark); border-color: var(--dark); color: #fff; }

.seo-page { padding: 4px 0 6px; border-bottom: 1px dashed var(--line); margin-bottom: 14px; }
.seo-page:last-child { border-bottom: 0; }
.seo-page h3 { font-size: 15px; margin-bottom: 8px; }

/* ---------- Foto's ---------- */

.drop {
  display: grid; justify-items: center; gap: 4px; padding: 26px 16px; margin-bottom: 18px; border: 2px dashed #d3cfc6; border-radius: 12px;
  background: var(--soft); text-align: center; cursor: pointer; transition: border-color .15s, background .15s;
}
.drop .ic { width: 30px; height: 30px; color: var(--accent); }
.drop strong { color: var(--ink); }
.drop span { color: var(--muted); font-size: 13.5px; }
.drop:hover, .drop.over { border-color: var(--yellow); background: var(--tint); }
.photo-list { display: grid; gap: 16px; }
.photo-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); grid-template-areas: 'img meta' 'img text'; gap: 6px 18px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fcfcfa; }
.photo-img { grid-area: img; position: relative; }
.photo-img .thumb { border-radius: 9px; }
.photo-name { display: block; margin-top: 6px; color: var(--ink); word-break: break-all; }
.photo-meta { grid-area: meta; display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; align-items: center; }
.photo-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.photo-card > .field { grid-area: text; margin-bottom: 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.photo-pick { display: grid; gap: 6px; padding: 6px; border: 2px solid transparent; border-radius: 10px; background: var(--soft); cursor: pointer; text-align: left; }
.photo-pick .thumb { border-radius: 6px; }
.photo-pick span { font-size: 12.5px; word-break: break-all; }
.photo-pick:hover, .photo-pick.active { border-color: var(--yellow); background: var(--tint); }
.gallery-edit { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.gal-item { display: inline-flex; align-items: center; gap: 8px; padding: 4px 4px 4px 4px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); font-size: 13px; }

/* ---------- Algemene gegevens en formulierweergaven ---------- */

.back-link { display: inline-flex; align-items: center; gap: 6px; margin: -8px 0 12px; padding: 6px 10px 6px 4px; border: 0; border-radius: 8px; background: none; color: var(--accent); font-weight: 600; cursor: pointer; }
.back-link:hover { background: var(--tint); }
details.fold > summary { padding: 14px 18px; font-weight: 700; color: var(--ink); font-size: 16.5px; cursor: pointer; }
details.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.fold > .hint { padding: 10px 18px 0; margin: 0; }
details.fold .tr-tools { margin-bottom: 12px; }
.adv-links { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 12px; }

.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; margin-bottom: 18px; border-radius: var(--radius); background: var(--tint); border: 1px solid #f3dca8; color: #5c4100; }
.notice p { margin: 0; }
.notice .ic { color: var(--accent); margin-top: 2px; }
.notice.ok { background: var(--ok-bg); border-color: #b9e3c8; color: #145c33; }
.notice.ok .ic { color: var(--ok); }
.notice.bad { background: var(--bad-bg); border-color: #f2c4c4; color: #7d1d1d; }
.notice.bad .ic { color: var(--bad); }

/* ---------- Voorbeeld en publiceren ---------- */

.preview-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.preview-bar select { width: auto; max-width: 280px; min-height: 36px; padding: 5px 8px; }
.preview-bar .seg { background: var(--white); border: 1px solid var(--line); border-radius: 10px; padding: 2px; }
.find-toggle { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 5px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--white); font-weight: 600; cursor: pointer; font-size: 14px; }
.find-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.find-toggle.on { background: var(--yellow); border-color: var(--yellow); color: var(--dark); }
.preview-wrap { position: relative; display: flex; justify-content: center; padding: 14px; border-radius: var(--radius); background: #e6e4de; }
.preview-frame { width: 100%; height: calc(100vh - 250px); min-height: 480px; border: 0; border-radius: 8px; background: #fff; box-shadow: var(--shadow); transition: max-width .25s, opacity .2s; }
.preview-wrap.loading .preview-frame { opacity: .45; }
.preview-wrap.loading::after { content: ''; position: absolute; top: 50%; left: 50%; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 3px solid rgba(0, 0, 0, .15); border-top-color: var(--yellow); border-radius: 50%; animation: spin .8s linear infinite; }

/* ---------- Bewerkvensters (vanuit het voorbeeld) ---------- */

.modal-editor { display: grid; gap: 4px; }
.modal-editor > fieldset.group { margin-top: 0; }
.photo-edit { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 14px; }
.photo-big { border-radius: 10px; }
.photo-edit-side { display: grid; gap: 10px; justify-items: start; }
.photo-edit-side p { margin: 0; }
.usages { display: flex; flex-wrap: wrap; gap: 10px; }
.usage { display: grid; gap: 6px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfa; }
.usage > span { font-size: 13px; font-weight: 600; color: var(--ink); }
.pick-head { display: flex; justify-content: flex-end; }
.choice { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 700px) {
  .photo-edit { grid-template-columns: minmax(0, 1fr); }
}

.publish-hero { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 20px 22px; margin-bottom: 18px; border-radius: var(--radius); background: var(--white); border: 1px solid var(--line); }
.publish-hero p { margin: 2px 0; }
.log-wrap { margin-bottom: 18px; }
.log-wrap summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.log { max-height: 340px; overflow: auto; padding: 12px; border-radius: 10px; background: var(--dark); color: #d5dbe1; font: 12.5px/1.5 var(--mono); white-space: pre-wrap; }
.check-box h3 { font-size: 15px; margin: 6px 0 8px; }
.check-box h3.bad { color: var(--bad); }
.ok-line { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; }
.errors { margin: 6px 0 12px; padding-left: 18px; }
.errors li { margin-bottom: 6px; }
.errors .btn { margin-left: 8px; }

.history { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.history li { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 8px 10px; border-radius: 9px; background: var(--soft); }
.history li > span:first-child { font-weight: 600; color: var(--ink); min-width: 170px; }
.history .btn, .history .chip { margin-left: auto; }

/* ---------- Dialogen en meldingen ---------- */

.overlay { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 16px; background: rgba(10, 16, 20, .5); animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 32px); display: flex; flex-direction: column; background: var(--white); border-radius: 16px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); }
.overlay.wide .modal { max-width: 1120px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px 10px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 17px; }
.modal-body { padding: 16px 20px; overflow: auto; display: grid; gap: 10px; }
.modal-body p { margin: 0; }
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--line); }

#toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 36px)); }
.toast { padding: 12px 16px; border-radius: 10px; background: var(--dark); color: #fff; box-shadow: var(--shadow); font-size: 14px; animation: slide .2s ease-out; transition: opacity .5s, transform .5s; }
.toast.ok { background: #14532d; }
.toast.err { background: #8f1d1d; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes slide { from { opacity: 0; transform: translateY(10px); } }

/* ---------- Kleinere schermen ---------- */

@media (max-width: 1200px) {
  .cells { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}

@media (max-width: 900px) {
  :root { --side-w: 0px; }
  .nav-toggle { display: inline-flex; }
  .brand { width: auto; }
  .brand div { display: none; }
  .src-lang span { display: none; }
  .save-state { display: none; }
  .side { width: 260px; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .nav-open .side { transform: none; }
  .view { margin-left: 0; padding: 18px 16px 80px; }
  .master { grid-template-columns: minmax(0, 1fr); }
  .list { position: static; }
  .photo-card { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'img' 'meta' 'text'; }
  .photo-img .thumb { max-width: 320px; }
  .before-after { grid-template-columns: minmax(0, 1fr); }
  .card-head, .card-body { padding-left: 14px; padding-right: 14px; }
}

@media (max-width: 560px) {
  .top { gap: 6px; padding: 0 10px; }
  .src-lang { display: none; }
  #save-btn span { display: none; }
  .search { font-size: 14px; }
  .view-head h1 { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
