* { box-sizing: border-box; }
body { margin: 0; font-family: Arial, sans-serif; background: #f6f6f6; color: #222; }
a { color: #1f4a7d; text-decoration: none; }
a:hover { text-decoration: underline; }
.container { width: min(1200px, 92%); margin: 0 auto; }
.site-header, .site-footer { background: #111; color: #fff; }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; gap: 1rem; }
.site-title { margin: 0; font-size: 1.6rem; }
.site-subtitle { margin: .25rem 0 0 0; opacity: .75; }
nav a { color: #fff; margin-left: 1rem; }
.toolbar { margin: 1.5rem 0; }
.toolbar-split { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; }
.filter-form { display: flex; gap: .75rem; flex-wrap: wrap; }
.filter-form input, .filter-form select, .filter-form button,
.admin-form input, .admin-form select, .admin-form textarea, .admin-form button { padding: .75rem; border: 1px solid #ccc; border-radius: 6px; font: inherit; }
.filter-form button, .admin-form button { cursor: pointer; background: #1f4a7d; color: #fff; border-color: #1f4a7d; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.25rem; margin-bottom: 2rem; }
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.08); }
.card img { width: 100%; height: 240px; object-fit: contain; display: block; background:#f2f2f2; }
.card-body { padding: 1rem; }
.card h2 { margin-top: 0; font-size: 1.1rem; }
.muted { color: #666; font-size: .92rem; }
.badge { display: inline-block; padding: .35rem .55rem; border-radius: 999px; font-size: .82rem; background: #ddd; }
.badge-beschikbaar { background: #dff3df; }
.badge-uitgeleend { background: #fff2c9; }
.badge-verkocht { background: #f9d4d4; }
.badge-niet_beschikbaar { background: #e5e5e5; }
.badge-archief { background: #dbe7ff; }
.detail-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 2rem; margin: 2rem 0; }
.detail-image { width: 100%; border-radius: 12px; background: #fff; }
.detail-table { width: 100%; border-collapse: collapse; background: #fff; }
.detail-table th, .detail-table td { text-align: left; padding: .75rem; border-bottom: 1px solid #eee; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; margin-bottom: 2rem; }
.admin-table th, .admin-table td { text-align: left; padding: .75rem; border-bottom: 1px solid #eee; vertical-align: top; }
.table-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.button-link { display: inline-block; padding: .75rem 1rem; border-radius: 6px; background: #1f4a7d; color: #fff; text-decoration: none; }
.button-link:hover { text-decoration: none; }
.button-link-secondary { background: #eee; color: #222; }
.flash-success, .flash-error { background: #fff; border-radius: 10px; padding: 1rem 1.25rem; margin: 1rem 0; }
.flash-success { border-left: 5px solid #3a8f3a; }
.flash-error { border-left: 5px solid #c94040; }
.flash-error ul { margin-bottom: 0; }
.admin-form { background: #fff; border-radius: 12px; padding: 1.25rem; margin-bottom: 2rem; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.25rem; }
.form-field { display: flex; flex-direction: column; gap: .4rem; }
.form-field-wide { grid-column: 1 / -1; }
.checkbox-field { justify-content: end; }
.form-actions { display: flex; gap: .75rem; margin-top: 1.5rem; flex-wrap: wrap; }
.image-preview-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 220px)); gap: 1rem; margin-top: 1rem; }
.preview-thumb { width: 100%; height: 180px; object-fit: contain; border-radius: 10px; border: 1px solid #ddd; background: #fafafa; }
.site-footer { padding: 1rem 0; margin-top: 2rem; }
@media (max-width: 900px) {
  .detail-layout, .form-grid { grid-template-columns: 1fr; }
  .form-field-wide { grid-column: auto; }
}

.table-actions form { display:inline; }
.table-action-button {
    background:none;
    border:none;
    color:#9f1d1d;
    text-decoration:underline;
    cursor:pointer;
    padding:0;
    font:inherit;
}
.table-action-button:hover { opacity:.8; }

.toolbar-actions-right { display:flex; gap:.75rem; flex-wrap:wrap; }
.auth-card { max-width: 620px; margin: 2rem auto; background:#fff; border-radius:12px; padding:1.5rem; box-shadow: 0 1px 6px rgba(0,0,0,.06); }
.auth-form { box-shadow:none; padding:0; margin:1rem 0 0; }
.auth-help { margin-top: 1.5rem; padding-top: 1rem; border-top:1px solid #eee; }


.image-preview-grid-wide { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); align-items: start; }
.change-log-panel { background:#fafafa; border:1px solid #ddd; border-radius:10px; padding:1rem; min-height: 100%; }
.change-log-list { display:flex; flex-direction:column; gap:.65rem; max-height: 360px; overflow:auto; }
.change-log-item { border-bottom:1px solid #eee; padding-bottom:.55rem; }
.change-log-item:last-child { border-bottom:none; padding-bottom:0; }
.change-log-meta { color:#666; font-size:.85rem; margin-bottom:.15rem; }

.button-link-danger { background: #9f1d1d; color:#fff; }
.button-link-small { padding: .45rem .7rem; font-size: .88rem; }
.change-log-header { display:flex; justify-content:space-between; align-items:center; gap:.75rem; margin-bottom:.75rem; flex-wrap:wrap; }
.change-log-header .muted { margin:0; }
.change-log-header form { margin:0; }


.landing-body { background:#000; }
.landing-hero {
  position: relative;
  min-height: 100vh;
  background-size: cover;
  background-position: center center;
  display: flex;
  align-items: flex-end;
  padding: 2rem;
  color: #fff;
}
.landing-overlay {
  position:absolute;
  inset:0;
  background: linear-gradient(to bottom, rgba(0,0,0,.18) 0%, rgba(0,0,0,.25) 35%, rgba(0,0,0,.68) 100%);
}
.landing-topbar {
  position:absolute;
  top:1.5rem;
  right:1.5rem;
  z-index:2;
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
}
.landing-nav-link {
  color:#fff;
  background: rgba(17,17,17,.58);
  border:1px solid rgba(255,255,255,.18);
  padding:.75rem 1rem;
  border-radius:999px;
  text-decoration:none;
  backdrop-filter: blur(6px);
}
.landing-nav-link:hover { text-decoration:none; background: rgba(17,17,17,.78); }
.landing-nav-link-primary { background:#1f4a7d; border-color:#1f4a7d; }
.landing-content {
  position:relative;
  z-index:2;
  max-width: 760px;
  padding: 1.25rem 0;
}
.landing-kicker {
  margin:0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .85rem;
  opacity:.9;
}
.landing-content h1 {
  margin:0;
  font-size: clamp(2.3rem, 6vw, 4.8rem);
  line-height: 1.03;
}
.landing-intro {
  margin: 1rem 0 0;
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height:1.6;
  max-width: 48rem;
  color: rgba(255,255,255,.94);
}
.landing-actions {
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  margin-top:1.5rem;
}
.landing-actions .button-link { background:#1f4a7d; }
.landing-actions .button-link-secondary { background:rgba(255,255,255,.92); color:#111; }
@media (max-width: 720px) {
  .landing-hero { padding: 1.2rem; align-items: flex-end; }
  .landing-topbar { top:1rem; right:1rem; left:1rem; justify-content:flex-end; }
}


.landing-hero { position: relative; min-height: 100vh; overflow: hidden; }
.landing-carousel { position: absolute; inset: 0; }
.landing-slide { position: absolute; inset: 0; background-size: cover; background-position: center center; opacity: 0; transform: scale(1.03); transition: opacity 900ms ease, transform 6s ease; }
.landing-slide.is-active { opacity: 1; transform: scale(1); }
.landing-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,.25), rgba(10,10,10,.42)); }
.landing-content, .landing-topbar, .landing-dots { position: relative; z-index: 2; }
.landing-caption { margin-top: 1rem; display: inline-flex; gap: .75rem; flex-wrap: wrap; align-items: center; padding: .75rem 1rem; border-radius: 999px; background: rgba(255,255,255,.12); color: #fff; backdrop-filter: blur(8px); }
.landing-caption strong { font-weight: 700; }
.landing-dots { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); display: flex; gap: .6rem; }
.landing-dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(255,255,255,.8); background: rgba(255,255,255,.25); cursor: pointer; }
.landing-dot.is-active { background: #fff; }
.landing-selection-toolbar { margin: 1rem 0; }

.nav-user-label {
  color: rgba(255,255,255,.82);
  margin-left: 1rem;
  display: inline-block;
}

.card-select-row {
  padding: .75rem 1rem 0;
}

.select-checkbox {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .92rem;
  color: #444;
}

.select-checkbox input {
  width: 18px;
  height: 18px;
}

.selection-counter {
  display: inline-flex;
  align-items: center;
  padding: .55rem .8rem;
  border-radius: 999px;
  background: #eef3fa;
  color: #1f4a7d;
  font-weight: 700;
}

.bottom-selection-toolbar {
  margin-top: 1rem;
  margin-bottom: 2rem;
}

.print-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.print-item {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 1rem;
  display: grid;
  grid-template-columns: 8.4cm 1fr;
  gap: 1rem;
  align-items: start;
  break-inside: avoid;
  page-break-inside: avoid;
}

.print-image-wrap {
  width: 100%;
  min-height: 8cm;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8f8f8;
  border: 1px solid #eee;
  border-radius: 10px;
  overflow: hidden;
}

.print-image {
  max-width: 100%;
  max-height: 8cm;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
}

.print-table th,
.print-table td {
  text-align: left;
  vertical-align: top;
  padding: .45rem .35rem;
  border-bottom: 1px solid #eee;
}

.print-table th {
  width: 28%;
  color: #555;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  body {
    background: #fff;
    color: #000;
  }

  .site-header,
  .site-footer,
  .no-print {
    display: none !important;
  }

  .container {
    width: 100%;
    max-width: none;
    margin: 0;
  }

  .print-list {
    gap: 8mm;
  }

  .print-item {
    border: 1px solid #cfcfcf;
    box-shadow: none;
    border-radius: 0;
  }

  .print-table th,
  .print-table td {
    font-size: 11pt;
  }

  a {
    color: #000;
    text-decoration: none;
  }
}

@media (max-width: 900px) {
  .print-item {
    grid-template-columns: 1fr;
  }
}


/* ---- PRINT SELECTION FIX: afbeelding max 10cm x 10cm met behoud ratio ---- */

.print-list-10cm {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.print-item-10cm {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 16px;
    padding: 1.25rem;
}

.print-row-10cm {
    display: grid;
    grid-template-columns: 11cm minmax(0, 1fr);
    gap: 1.2cm;
    align-items: start;
}

.print-image-column-10cm {
    display: flex;
    align-items: flex-start;
    justify-content: center;
}

.print-image-box-10cm {
    width: 10cm;
    height: 10cm;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #ddd;
    overflow: hidden;
}

.print-image-10cm {
    max-width: 10cm;
    max-height: 10cm;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.print-meta-column-10cm {
    min-width: 0;
}

.print-title-10cm {
    margin: 0 0 1rem 0;
    font-size: 2rem;
    line-height: 1.1;
}

.print-table-10cm {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.print-table-10cm th,
.print-table-10cm td {
    padding: 0.85rem 0.9rem;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
    font-size: 1rem;
}

.print-table-10cm th {
    width: 34%;
    font-weight: 700;
    text-align: left;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 12mm;
    }

    html, body {
        background: #fff !important;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .container {
        width: auto !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .print-list-10cm {
        gap: 0 !important;
    }

    .print-item-10cm {
        break-inside: avoid-page !important;
        page-break-inside: avoid !important;
        break-before: page;
        page-break-before: always;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        min-height: 0 !important;
    }

    .print-item-10cm:first-child {
        break-before: auto;
        page-break-before: auto;
    }

    .print-row-10cm {
        display: grid !important;
        grid-template-columns: 10.6cm 1fr;
        gap: 0.9cm;
        align-items: start;
    }

    .print-image-column-10cm {
        width: 10.6cm;
        display: flex;
        align-items: flex-start;
        justify-content: center;
    }

    .print-image-box-10cm {
        width: 10cm !important;
        height: 10cm !important;
        max-width: 10cm !important;
        max-height: 10cm !important;
        box-sizing: border-box;
        border: 0.2mm solid #bbb !important;
        overflow: hidden;
        background: #fff !important;
    }

    .print-image-10cm {
        max-width: 10cm !important;
        max-height: 10cm !important;
        width: auto !important;
        height: auto !important;
        object-fit: contain !important;
        display: block;
    }

    .print-meta-column-10cm {
        overflow: hidden;
    }

    .print-title-10cm {
        margin: 0 0 8mm 0 !important;
        font-size: 18pt !important;
        line-height: 1.1 !important;
    }

    .print-table-10cm {
        width: 100%;
        border-collapse: collapse;
        table-layout: fixed;
    }

    .print-table-10cm th,
    .print-table-10cm td {
        padding: 3.5mm 3mm !important;
        border-bottom: 0.2mm solid #d5d5d5 !important;
        font-size: 11.5pt !important;
        vertical-align: top;
    }

    .print-table-10cm th {
        width: 34%;
    }
}

@media (max-width: 1100px) {
    .print-row-10cm {
        grid-template-columns: 1fr;
    }
}
