@font-face {
  font-family: 'HistoriaDemoRegular';
  src: url('/fonts/HistoriaDemoRegular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'letterpressheadline';
  src: url('/fonts/letterpressheadline.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'letterpressaurora';
  src: url('/fonts/letterpressaurora.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'OperaLyricsSmooth';
  src: url('/fonts/OperaLyricsSmooth.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* === Admin UI === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --sidebar-w: 240px;
  --brand:     #1d3c4d;
  --accent:    #c75d3b;
  --accent-lt: #f7efe9;
  --success:   #22c55e;
  --danger:    #ef4444;
  --warning:   #f59e0b;
  --muted:     #5a6472;
  --border:    #dfe6eb;
  --radius:    8px;
  --shadow:    0 1px 4px rgba(0,0,0,0.08);
  --admin-ui-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --admin-heading-font: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --museum-bg: #f5f1e8;
  --museum-panel: #ffffff;
  --museum-header: #1d3c4d;
  --museum-accent: #c75d3b;
  --museum-text: #1f2430;
  --museum-title-font: 'HistoriaDemoRegular';
  --museum-body-font: 'OperaLyricsSmooth';
}

body.admin-body {
  font-family: var(--admin-ui-font);
  background:
    radial-gradient(circle at top left, rgba(199, 93, 59, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(29, 60, 77, 0.10), transparent 28%),
    linear-gradient(180deg, #f8f4ec 0%, #f3efe7 100%);
  color: var(--museum-text);
  min-height: 100vh;
  display: flex;
}

/* ── Sidebar ──────────────────────────── */
.admin-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--museum-header) 0%, #162b36 100%);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s ease;
  box-shadow: 12px 0 30px rgba(15, 23, 42, 0.18);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.brand-icon { font-size: 1.4rem; }
.brand-text {
  font-family: var(--admin-heading-font);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  color: #fff;
}

.sidebar-nav {
  flex: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  color: rgba(255,255,255,0.76);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}
.sidebar-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255,255,255,0.1); color: #fff; }
.sidebar-link.actief { background: rgba(199, 93, 59, 0.92); color: #fff; }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.sidebar-user { display: flex; align-items: center; gap: 0.6rem; flex: 1; min-width: 0; }
.user-avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; flex-shrink: 0;
}
.user-info { min-width: 0; }
.user-name  { display: block; color: #fff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role  { display: block; color: rgba(255,255,255,0.5); font-size: 0.7rem; }
.btn-logout {
  background: none; border: none;
  color: rgba(255,255,255,0.5);
  cursor: pointer; padding: 4px;
  border-radius: 4px; display: flex;
  transition: color 0.15s;
}
.btn-logout svg { width: 18px; height: 18px; }
.btn-logout:hover { color: #fff; }

/* ── Sidebar toggle (mobiel) ──────────── */
.sidebar-toggle {
  display: none;
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 300;
  background: var(--brand);
  color: #fff; border: none;
  border-radius: 6px;
  padding: 6px 8px; cursor: pointer;
}
.sidebar-toggle svg { width: 20px; height: 20px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 150;
}

/* ── Hoofd content ────────────────────── */
.admin-main {
  margin-left: var(--sidebar-w);
  padding: 2rem;
  flex: 1;
  max-width: calc(100vw - var(--sidebar-w));
  min-width: 0;
}
.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(29, 60, 77, 0.12);
  border-radius: 18px;
  background: rgba(255, 250, 244, 0.82);
  backdrop-filter: blur(8px);
  box-shadow: 0 14px 35px rgba(29, 60, 77, 0.08);
}
.admin-header h1 {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: var(--admin-heading-font);
  color: var(--museum-header);
}
.editor-grid-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 0.75rem 0 1.25rem;
}
.museum-page {
  background: var(--museum-bg);
  color: var(--museum-text);
  font-family: var(--museum-body-font), serif;
  border: 1px solid rgba(29,60,77,0.12);
  border-radius: 16px;
  padding: 1rem;
}
.museum-page h1,
.museum-page h2,
.museum-page h3,
.museum-page h4,
.museum-page .museum-heading {
  font-family: var(--museum-title-font), serif;
  color: var(--museum-header);
}
.museum-page .museum-cta,
.museum-page a {
  color: var(--museum-accent);
}
.museum-style-museum-standaard {
  --museum-bg: #f5f1e8;
  --museum-panel: #ffffff;
  --museum-header: #1d3c4d;
  --museum-accent: #c75d3b;
  --museum-text: #1f2430;
}
.museum-style-klassiek {
  --museum-bg: #ede7dd;
  --museum-panel: #f8f3ed;
  --museum-header: #2e2d2a;
  --museum-accent: #a76a45;
  --museum-text: #201d1b;
}
.museum-style-modern {
  --museum-bg: #f6f7f8;
  --museum-panel: #ffffff;
  --museum-header: #1b2a3a;
  --museum-accent: #c96b2a;
  --museum-text: #1c2430;
}
.museum-style-toegankelijk {
  --museum-bg: #ffffff;
  --museum-panel: #f3f3f1;
  --museum-header: #111111;
  --museum-accent: #b14a2d;
  --museum-text: #111111;
}
.museum-style-campaign {
  --museum-bg: #f5efe7;
  --museum-panel: #fffaf3;
  --museum-header: #3b2a32;
  --museum-accent: #d14c41;
  --museum-text: #1b1a1c;
}
.alert {
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  margin-bottom: 0.9rem;
  font-size: 0.86rem;
}
.alert-success {
  background: #ecfdf5;
  border: 1px solid #86efac;
  color: #166534;
}
.alert-error {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  color: #991b1b;
}

/* ── Tabel ───────────────────────────── */
.admin-table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,0.92); border-radius: 16px; overflow: hidden; box-shadow: 0 12px 30px rgba(29,60,77,0.08); }
.admin-table th { background: linear-gradient(180deg, #f8f4ec 0%, #f2ebe1 100%); padding: 0.7rem 1rem; text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--museum-header); border-bottom: 1px solid rgba(29,60,77,0.12); font-weight: 700; }
.admin-table td { padding: 0.8rem 1rem; border-bottom: 1px solid #f3f4f6; font-size: 0.9rem; vertical-align: middle; }
.admin-table tbody tr { transition: background 0.1s; }
.admin-table tbody tr:hover { background: #f9fafb; }
.admin-table tr:last-child td { border-bottom: none; }

/* ── Knoppen ──────────────────────────── */
.btn-primary {
  background: linear-gradient(180deg, var(--museum-accent), #b54b2e);
  color: #fff; border: none;
  padding: 0.5rem 1.1rem; border-radius: 6px;
  cursor: pointer; font-size: 0.9rem; font-weight: 500;
  transition: background 0.15s, transform 0.1s;
  display: inline-flex; align-items: center; gap: 0.4rem;
}
.btn-primary:hover { background: linear-gradient(180deg, #a84a30, #8f3823); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-small {
  background: rgba(255,255,255,0.96); border: 1px solid rgba(29,60,77,0.14);
  padding: 0.25rem 0.65rem; border-radius: 5px;
  cursor: pointer; font-size: 0.8rem;
  text-decoration: none; color: #374151;
  transition: background 0.1s;
  display: inline-flex; align-items: center; gap: 0.2rem;
}
.btn-small:hover { background: #f8efe6; }
.btn-small.btn-danger { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.btn-small.btn-danger:hover { background: #fee2e2; }

.btn-danger { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; padding: 0.5rem 1rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.btn-danger:hover { background: #fee2e2; }
.btn-icon { background: none; border: none; cursor: pointer; color: #9ca3af; padding: 0 4px; font-size: 1rem; line-height: 1; }
.btn-icon:hover { color: var(--danger); }
.btn-nav { background: rgba(255,255,255,0.15); color: #fff; border: none; padding: 0.3rem 0.75rem; border-radius: 4px; cursor: pointer; font-size: 0.8rem; }

/* ── Status ───────────────────────────── */
.status-dot { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; font-weight: 500; }
.status-dot::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.status-dot.online::before  { background: var(--success); box-shadow: 0 0 0 2px rgba(34,197,94,0.2); }
.status-dot.offline::before { background: #d1d5db; }

/* ── IP tags ─────────────────────────── */
.ip-tag { display: inline-flex; align-items: center; gap: 0.25rem; background: #eff6ff; border: 1px solid #bfdbfe; padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.78rem; margin: 0.1rem; }

/* ── Dashboard cards ──────────────────── */
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.dashboard-card {
  background: #fff; border-radius: var(--radius);
  padding: 1.5rem 1.25rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.4rem;
  border-top: 3px solid var(--accent);
}
.dashboard-card:nth-child(1) { border-top-color: var(--success); }
.dashboard-card:nth-child(2) { border-top-color: var(--accent); }
.dashboard-card:nth-child(3) { border-top-color: var(--warning); }
.dashboard-card:nth-child(4) { border-top-color: #8b5cf6; }
.card-number { font-size: 2.25rem; font-weight: 800; color: var(--brand); line-height: 1; }
.card-label  { font-size: 0.8rem; color: var(--muted); font-weight: 500; }

/* ── Modals ───────────────────────────── */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex; align-items: center; justify-content: center; z-index: 1000; backdrop-filter: blur(2px); }
.modal-content {
  background: #fff; border-radius: 12px;
  padding: 1.75rem; min-width: 400px; max-width: 92vw;
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  animation: modal-in 0.18s ease;
}
@keyframes modal-in { from { opacity:0; transform: translateY(-12px) scale(0.97); } to { opacity:1; transform:none; } }
.modal-content h2 { margin-bottom: 1.25rem; font-size: 1.1rem; }
.modal-content label { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; font-size: 0.88rem; font-weight: 500; color: #374151; }
.modal-content input, .modal-content select { padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; font-size: 0.9rem; transition: border-color 0.15s, box-shadow 0.15s; }
.modal-content input:focus, .modal-content select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.modal-actions { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1.25rem; }

/* ── Pagina editor ────────────────────── */
.paginas-layout { display: grid; grid-template-columns: 280px 1fr; gap: 1.5rem; }
.paginas-lijst { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.pagina-item { padding: 0.75rem 1rem; border-bottom: 1px solid #f3f4f6; display: flex; justify-content: space-between; align-items: center; transition: background 0.1s; }
.pagina-item:hover { background: #f9fafb; }
.pagina-item:last-child { border-bottom: none; }
.pagina-item.actief { background: var(--accent-lt); border-left: 3px solid var(--accent); }
.pagina-item strong { display: block; font-size: 0.9rem; }
.pagina-item small { color: #9ca3af; font-size: 0.75rem; }
.pagina-acties { display: flex; gap: 0.35rem; flex-shrink: 0; align-items: center; margin-left: auto; }
.btn-editor-action {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  color: #334155;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}
.btn-editor-action svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.btn-editor-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(15,23,42,0.08);
  border-color: #cbd5e1;
}
.icon-action:hover { background: #eff6ff; color: #1d4ed8; }
.icon-danger { color: #b91c1c; }
.icon-danger:hover { background: #fff1f2; border-color: #fca5a5; color: #dc2626; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.paginas-editor { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.5rem; }
.input-full { width: 100%; padding: 0.55rem 0.75rem; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 0.75rem; font-size: 0.9rem; }
.input-full:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.editor-acties { display: flex; justify-content: flex-end; gap: 0.5rem; margin-top: 1rem; }
.editor-placeholder { display: flex; align-items: center; justify-content: center; height: 300px; color: #9ca3af; flex-direction: column; gap: 0.5rem; }
.template-toolbar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
}
.template-label {
  font-size: 0.82rem;
  color: #475569;
  font-weight: 600;
}
.template-select {
  min-width: 230px;
  padding: 0.38rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 0.85rem;
  color: #334155;
}
.template-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(79,70,229,0.12);
}
.preserve-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: #475569;
  margin-left: auto;
}
.preserve-toggle input {
  width: 15px;
  height: 15px;
}
.source-editor {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.75rem;
  background: #f8fafc;
  margin-top: 0.7rem;
}
.source-textarea {
  width: 100%;
  min-height: 160px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.65rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  line-height: 1.45;
  margin-top: 0.3rem;
}
.source-actions {
  margin-top: 0.6rem;
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
.template-manager {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 1rem;
  margin-top: 1rem;
}
.template-manager h3 {
  font-size: 1rem;
  margin: 0 0 0.35rem;
}
.template-manager p {
  font-size: 0.84rem;
  color: #64748b;
  margin-bottom: 0.75rem;
}
.template-load-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.65rem;
}
.template-note {
  font-size: 0.82rem;
  color: #64748b;
}
.template-versions {
  margin-top: 1rem;
}
.template-versions h3 {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}
.template-preview-panel {
  margin-top: 1.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #ffffff;
  padding: 0.9rem;
}
.template-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}
.template-preview-header h3 {
  margin: 0;
  font-size: 1rem;
}
.template-preview-header span {
  font-size: 0.78rem;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 0.25rem 0.6rem;
}
.template-compare-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.template-compare-column {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
}
.template-compare-label {
  display: inline-block;
  margin-bottom: 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #475569;
}
.template-compare-content {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 1rem;
  min-height: 220px;
}
.template-demo-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin: 1rem 0;
}
.template-demo-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.75rem;
}
.template-demo-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #e0f2fe);
  color: #1d4ed8;
  font-weight: 700;
}
.template-demo-callout {
  margin-top: 0.75rem;
  border-left: 4px solid #3b82f6;
  background: #eff6ff;
  color: #1e3a8a;
  border-radius: 8px;
  padding: 0.7rem 0.8rem;
}
.css-textarea {
  min-height: 120px;
}
#template-verwijder-form {
  margin-top: 0.65rem;
}
.help-layout {
  display: grid;
  gap: 1rem;
}
.help-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1rem;
  box-shadow: var(--shadow);
}
.help-card h2 {
  font-size: 1.05rem;
  margin: 0 0 0.7rem;
}
.help-steps,
.help-list {
  margin-left: 1.2rem;
  color: #334155;
}
.help-steps li,
.help-list li {
  margin-bottom: 0.4rem;
}
.help-code {
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 10px;
  padding: 0.8rem;
  overflow: auto;
  border: 1px solid #334155;
  margin: 0.45rem 0 0.95rem;
}
.help-code code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}
.template-layout {
  padding: 1.4rem;
  border-radius: 16px;
  margin-bottom: 1rem;
}
.template-layout h2,
.template-layout h3 {
  margin-top: 0;
}
.template-layout p {
  margin-top: 0;
}
.template-hero {
  background: linear-gradient(120deg, #1e293b, #334155);
  color: #f8fafc;
}
.template-kicker {
  margin: 0 0 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  opacity: 0.85;
  font-size: 0.72rem;
}
.template-panel-grid,
.template-two-col,
.template-three-cols,
.template-media-grid {
  display: grid;
  gap: 1rem;
}
.template-panel-grid,
.template-two-col {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.template-three-cols,
.template-media-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.template-panel,
.template-callout,
.template-media-card {
  border-radius: 12px;
  padding: 0.9rem;
}
.template-panel-light,
.template-callout-light,
.template-callout-white {
  background: rgba(255,255,255,0.16);
  color: inherit;
}
.template-panel-dark,
.template-callout-dark {
  background: rgba(15,23,42,0.55);
  color: #f8fafc;
}
.template-three-col {
  background: #eff6ff;
  color: #0f172a;
}
.template-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 12px;
}
.template-three-col .template-table td,
.template-three-col .template-table th {
  width: 33.33%;
  vertical-align: top;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  padding: 0.85rem;
}
.template-timeline {
  background: #f8fafc;
  color: #0f172a;
}
.template-timeline-table td {
  border: 1px solid #e2e8f0;
  background: #fff;
  padding: 0.75rem 0.9rem;
}
.template-timeline-year {
  width: 120px;
  color: #fff;
  border-radius: 10px 0 0 10px;
  text-align: center;
  font-weight: 700;
}
.template-timeline-year-dark { background: #0f172a; }
.template-timeline-year-blue { background: #1d4ed8; }
.template-timeline-year-green { background: #047857; }
.template-list {
  margin: 0;
  padding-left: 1.2rem;
}
.template-matrix {
  background: #fff;
  border: 1px solid #d1d5db;
  color: #0f172a;
}
.template-matrix-table {
  border-collapse: collapse;
}
.template-matrix-table th,
.template-matrix-table td {
  padding: 0.7rem 0.8rem;
  border: 1px solid #d1d5db;
  text-align: left;
}
.template-matrix-table thead th {
  background: #111827;
  color: #f9fafb;
}
.template-status-ok { color: #166534; font-weight: 700; }
.template-status-warn { color: #b45309; font-weight: 700; }
.template-media-panel {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #0f172a;
}
.template-media-card {
  background: #fff;
  border: 1px solid #e5e7eb;
}
.template-media-card img,
.template-media-card video {
  width: 100%;
  border-radius: 8px;
  display: block;
  margin-bottom: 0.6rem;
}
.template-media-card p {
  margin: 0;
  color: #6b7280;
  font-size: 0.82rem;
}
.pagina-preview-canvas {
  min-height: 420px;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #fff;
  padding: 24px;
  overflow: hidden;
  color: #111827;
}
.paginas-layout,
.paginas-editor {
  min-width: 0;
}
.pagina-preview-canvas * { box-sizing: border-box; }
.pagina-preview-canvas video {
  width: 100%;
  max-width: 100%;
  height: auto;
  display: block;
}

.pagina-preview-canvas img {
  max-width: 100%;
  height: auto;
  display: block;
}

.preview-language-content img {
  width: 100%;
}

.quill-editor .ql-editor video {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  display: block;
}
.pagina-preview-canvas img { border-radius: 14px; }
.pagina-preview-canvas table { width: 100%; border-collapse: collapse; }
.pagina-preview-canvas td,
.pagina-preview-canvas th { border: 1px solid #d1d5db; padding: 8px 10px; }
.pagina-preview-canvas .three-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pagina-preview-canvas .two-cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.pagina-preview-canvas .callout { padding: 14px 16px; border-radius: 14px; }

.preview-display-shell {
  border: 1px solid #d6dde4;
  border-radius: 10px;
  overflow: hidden;
  background: #f3efe8;
  width: 1366px;
  max-width: none;
}

.preview-scale-frame {
  width: 100%;
  overflow: hidden;
}

.preview-scale-target {
  transform-origin: top left;
}

.preview-display-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem 1.25rem;
  background: #0f4d5b;
  color: #f8f0e7;
  border-bottom: 4px solid #d9482d;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08);
}

.preview-header-copy {
  flex: 1;
  min-width: 0;
}

.preview-header-title {
  margin: 0;
  font-family: 'letterpressheadline', serif !important;
  font-weight: 400;
  color: #f5efe9 !important;
  font-size: 5rem;
  line-height: 0.92;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-shadow: 0 4px 0 rgba(18, 25, 35, 0.2), 0 0 14px rgba(255,255,255,0.08);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.preview-header-subtitle {
  margin: 0.9rem 0 0;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(248, 240, 231, 0.96);
}

.preview-header-logo {
  width: 150px;
  aspect-ratio: 1;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.preview-display-languages {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "nl nl"
    "de eng";
  gap: 2rem;
  padding: 2rem;
  min-height: calc(100vh - 210px);
  background: #f5f1e8;
}

.preview-language-nl { grid-area: nl; }
.preview-language-de { grid-area: de; }
.preview-language-eng { grid-area: eng; }

.preview-language-column {
  display: flex;
  flex-direction: column;
  border-left: 5px solid var(--museum-accent);
  padding-left: 1.5rem;
  overflow: hidden;
}

.preview-language-content {
  flex: 1;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--museum-text);
}

.preview-language-nl .preview-language-content {
  font-size: 1rem;
  line-height: 1.6;
}

.preview-language-de .preview-language-content,
.preview-language-eng .preview-language-content {
  font-size: 0.88rem;
  line-height: 1.5;
}

.preview-language-content h1 {
  font-family: 'letterpressheadline', serif !important;
  color: #f8f4ec !important;
  background: linear-gradient(180deg, #0b5969 0%, #0d4655 100%);
  display: inline-block;
  padding: 0.2em 0.7em 0.18em;
  border-radius: 0.2em;
  letter-spacing: 0.02em;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.08), 0 8px 18px rgba(13,70,85,0.10);
  margin-bottom: 0.5em;
}

.preview-language-content h2 {
  font-family: var(--museum-title-font), serif;
  color: var(--museum-header);
  background: transparent;
  display: block;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: clamp(1.4rem, 4.1vw, 2.45rem);
  line-height: 1.15;
  margin: 0 0 0.45em;
}

@media (max-width: 1400px) {
  .preview-display-languages {
    gap: 1.5rem;
    padding: 1.5rem;
  }

  .preview-language-content {
    font-size: 0.95rem;
  }

  .preview-language-de .preview-language-content,
  .preview-language-eng .preview-language-content {
    font-size: 0.84rem;
  }
}

@media (max-width: 900px) {
  .preview-display-languages {
    grid-template-columns: 1fr;
    grid-template-areas:
      "nl"
      "de"
      "eng";
    gap: 1rem;
    padding: 1rem;
  }
}

/* ── Login ────────────────────────────── */
.login-wrap {
  min-height: 100vh; display: flex;
  align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
}
.login-card { background: #fff; border-radius: 16px; padding: 2.5rem 2rem; width: 360px; box-shadow: 0 25px 50px rgba(0,0,0,0.25); }
.login-card h1 { margin-bottom: 0.25rem; text-align: center; font-size: 1.3rem; }
.login-subtitle { text-align: center; color: var(--muted); font-size: 0.85rem; margin-bottom: 1.75rem; }
.login-card label { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; font-size: 0.88rem; font-weight: 500; color: #374151; }
.login-card input { padding: 0.65rem 0.75rem; border: 1px solid var(--border); border-radius: 8px; font-size: 0.95rem; transition: border-color 0.15s, box-shadow 0.15s; }
.login-card input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.login-card .btn-primary { width: 100%; padding: 0.75rem; font-size: 1rem; margin-top: 0.5rem; justify-content: center; }
.login-error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; border-radius: 8px; padding: 0.65rem 0.9rem; font-size: 0.85rem; margin-bottom: 1rem; }

/* ── Media bibliotheek ────────────────── */
.media-header { align-items: flex-end; gap: 1rem; }
.media-subtitle { margin-top: 0.35rem; color: var(--muted); font-size: 0.92rem; max-width: 48rem; }
.media-count-pill {
  align-self: center;
  background: linear-gradient(135deg, #111827, #374151);
  color: #fff;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  white-space: nowrap;
}
.media-upload-panel {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 1.25rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfd 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem;
  box-shadow: var(--shadow);
  margin-bottom: 1.25rem;
}
.media-upload-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  justify-content: center;
}
.media-upload-copy strong { font-size: 1.05rem; }
.media-upload-copy span { color: var(--muted); line-height: 1.5; font-size: 0.92rem; }
.media-upload-form-wrap { min-width: 0; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1rem; }
.media-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}
.media-card:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(15,23,42,0.10); }
.media-preview { position: relative; height: 168px; background: linear-gradient(180deg, #111827, #0f172a); display: flex; align-items: center; justify-content: center; overflow: hidden; }
.preview-video { width: 100%; height: 100%; object-fit: cover; }
.preview-img   { width: 100%; height: 100%; object-fit: cover; }
.media-badge { position: absolute; top: 0.7rem; left: 0.7rem; padding: 0.3rem 0.55rem; border-radius: 999px; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.04em; }
.media-badge.video { background: #2563eb; color: #fff; }
.media-badge.img   { background: #059669; color: #fff; }
.media-info { padding: 0.9rem 0.95rem 0.6rem; flex: 1; }
.media-naam { font-size: 0.88rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.media-meta { font-size: 0.77rem; color: var(--muted); margin-top: 0.2rem; }
.media-actions {
  padding: 0.9rem 0.95rem 1rem;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 0.6rem;
}
.media-actions-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
}
.media-actions-row-secondary {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}
.media-actions .btn,
.media-actions a,
.media-actions button {
  width: 100%;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  line-height: 1.1;
  justify-content: center;
}
.media-actions .btn-sm { border-radius: 999px; }
.media-actions form { margin: 0; }
.upload-form .form-row { display: flex; flex-direction: column; gap: 0.3rem; }
.upload-form .form-control { padding: 0.72rem 0.8rem; border: 1px solid var(--border); border-radius: 12px; font-size: 0.92rem; background: #fff; }
.upload-form .form-control:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79,70,229,0.12); }
.media-upload-button { margin-top: 0.9rem; min-width: 140px; justify-content: center; }
.alert-warning { background: #fef9c3; border: 1px solid #fde047; color: #713f12; padding: 0.75rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; }

.media-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.media-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
  backdrop-filter: blur(8px);
}
.media-modal-panel {
  position: relative;
  width: min(1100px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  margin: 1rem auto;
  background: #0b1220;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.media-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.1rem;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0));
}
.media-modal-header strong { display: block; font-size: 1rem; }
.media-modal-meta { color: rgba(255,255,255,0.62); font-size: 0.82rem; margin-top: 0.2rem; }
.media-modal-close { flex-shrink: 0; }
.media-modal-body {
  padding: 1rem;
  background: #050814;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  overflow: auto;
}
.media-modal-media {
  width: 100%;
  max-height: 72vh;
  border-radius: 16px;
  object-fit: contain;
  background: #000;
}
.media-modal-video { aspect-ratio: 16 / 9; }
.media-modal-image { background: #fff; }

@media (max-width: 900px) {
  .media-upload-panel { grid-template-columns: 1fr; }
  .media-header { align-items: flex-start; }
  .media-count-pill { align-self: flex-start; }
}

/* ── Toast notificaties ───────────────── */
.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: 0.5rem;
  z-index: 9999;
}
.toast {
  padding: 0.7rem 1.2rem; border-radius: 8px;
  font-size: 0.9rem; font-weight: 500; color: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateX(120%); transition: transform 0.3s ease, opacity 0.3s;
  opacity: 0; min-width: 200px;
}
.toast.show { transform: translateX(0); opacity: 1; }
.toast-success { background: #16a34a; }
.toast-error   { background: #dc2626; }
.toast-info    { background: #2563eb; }
.kopieer-toast { position: fixed; bottom: 1.5rem; right: 1.5rem; background: #1e293b; color: #fff; padding: 0.6rem 1.2rem; border-radius: 8px; font-size: 0.9rem; z-index: 9999; box-shadow: 0 2px 10px rgba(0,0,0,0.3); }

/* ── Secties / typografie ─────────────── */
h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.75rem; color: #111827; }
h3 { font-size: 0.95rem; font-weight: 600; }

/* ── Responsief ───────────────────────── */
@media (max-width: 768px) {
  .admin-sidebar { transform: translateX(-100%); }
  .admin-sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: flex; }
  .admin-main { margin-left: 0; padding: 1rem; padding-top: 3.5rem; max-width: 100vw; }
  .dashboard-grid { grid-template-columns: repeat(2, 1fr); }
  .paginas-layout { grid-template-columns: 1fr; }
  .modal-content { min-width: 0; width: calc(100vw - 2rem); }
}
