body.admin-body { background: var(--cream-dark); }

.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar {
  width: 240px; flex: none; background: var(--deep-dark); color: rgba(255,255,255,0.85);
  padding: 1.6rem 1.2rem; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.admin-sidebar .brand-text strong { color: #fff; }
.admin-sidebar .brand-text small { color: rgba(255,255,255,0.55); }
.admin-sidebar a.back-link { display: inline-block; margin: 1.4rem 0 1.6rem; font-size: 0.85rem; color: var(--accent-light); }
.admin-nav { display: flex; flex-direction: column; gap: 0.2rem; }
.admin-nav a {
  color: rgba(255,255,255,0.78); padding: 0.65em 0.8em; border-radius: 8px; font-size: 0.92rem; font-weight: 500;
  display: flex; align-items: center; justify-content: space-between;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: #fff; }
.admin-nav a.active { background: var(--accent); color: var(--deep-dark); }
.admin-nav .count { background: rgba(255,255,255,0.15); border-radius: 999px; padding: 0.05em 0.55em; font-size: 0.75rem; }
.admin-nav a.active .count { background: rgba(0,0,0,0.15); }

.admin-main { flex: 1; padding: 2.2rem 2.6rem 4rem; max-width: 980px; }
.admin-topbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.8rem; }
.admin-topbar h1 { margin: 0; }
/* Staat op de donkere zijbalk: dus lichte tekst en een lichte rand. */
.logout-form button {
  background: none; border: 1px solid rgba(255,255,255,0.35); border-radius: 999px;
  padding: 0.5em 1.1em; font-weight: 600; color: #fff; cursor: pointer; font-size: 0.85rem;
  width: 100%;
}
.logout-form button:hover { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.6); }

.admin-card { background: #fff; border-radius: var(--radius); padding: 1.8rem; box-shadow: var(--shadow); margin-bottom: 1.6rem; }
.admin-card h2 { font-size: 1.15rem; margin-bottom: 1.2rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem 1.4rem; }
.field { display: flex; flex-direction: column; gap: 0.35em; margin-bottom: 1rem; }
.field.full { grid-column: 1 / -1; }
.field label { font-weight: 600; font-size: 0.85rem; color: var(--deep); }
.field .hint { font-weight: 400; color: var(--muted); font-size: 0.78rem; }
.field input, .field textarea, .field select {
  font-family: var(--font-body); font-size: 0.95rem; padding: 0.65em 0.8em;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream);
  width: 100%;
}
.field input:focus, .field textarea:focus { outline: 2px solid var(--accent); border-color: var(--accent); }

.repeater-item { border: 1px dashed var(--line); border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1rem; position: relative; background: var(--cream); }
.repeater-item .remove-btn {
  position: absolute; top: 0.6rem; right: 0.6rem; background: #fff; border: 1px solid var(--line);
  color: #b3413e; border-radius: 999px; width: 26px; height: 26px; cursor: pointer; font-size: 0.9rem; line-height: 1;
}
.repeater-item .remove-btn:hover { background: #fdeceb; }
.add-btn {
  background: transparent; border: 1.5px dashed var(--deep); color: var(--deep); border-radius: var(--radius-sm);
  padding: 0.6em 1.1em; font-weight: 600; cursor: pointer; font-size: 0.88rem; margin-top: 0.3rem;
}
.add-btn:hover { background: rgba(23,57,47,0.06); }

.save-row { display: flex; justify-content: flex-end; gap: 0.8rem; align-items: center; margin-top: 1.5rem; }
.message-actions a { display: inline-flex; }
.flash-msg {
  background: #e4f3ea; color: var(--green); border: 1px solid #bfe3cd; padding: 0.9em 1.2em;
  border-radius: var(--radius-sm); margin-bottom: 1.4rem; font-weight: 500;
}
.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 1.2rem; }
.dash-tile {
  background: #fff; border-radius: var(--radius); padding: 1.5rem; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 0.4rem;
}
.dash-tile strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--deep); }
.dash-tile span { color: var(--muted); font-size: 0.88rem; }

.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--deep-dark); }
.login-card { background: #fff; border-radius: var(--radius); padding: 2.5rem; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); }
.login-card h1 { font-size: 1.4rem; }
.login-error { background: #fdeceb; color: #b3413e; padding: 0.8em 1em; border-radius: var(--radius-sm); margin-bottom: 1rem; font-size: 0.9rem; }

.messages-list { display: flex; flex-direction: column; gap: 1rem; }
.message-item { background: #fff; border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); }
.message-item.unread { border-left: 4px solid var(--accent); }
.message-meta { display: flex; justify-content: space-between; font-size: 0.82rem; color: var(--muted); margin-bottom: 0.6rem; }
.message-actions { display: flex; gap: 0.6rem; margin-top: 0.9rem; }
.message-actions button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0.4em 1em;
  font-size: 0.8rem; font-weight: 600; cursor: pointer; color: var(--deep);
}
.message-actions button:hover { background: var(--cream-dark); }

@media (max-width: 860px) {
  .admin-shell { flex-direction: column; }
  .admin-sidebar { width: 100%; height: auto; position: relative; }
  .admin-main { padding: 1.6rem 1.2rem 3rem; }
  .field-grid { grid-template-columns: 1fr; }
}

/* ---------- Nieuwsbeheer ---------- */
.admin-filter { display: flex; gap: 0.6rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.4rem; }
.admin-filter input, .admin-filter select {
  font-family: var(--font-body); font-size: 0.92rem; padding: 0.55em 0.8em;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff;
}
.admin-filter input { min-width: 220px; }

.post-row { display: flex; gap: 1.1rem; align-items: flex-start; }
.post-row-thumb {
  width: 76px; height: 76px; object-fit: contain; flex: none;
  background: var(--cream-dark); border-radius: var(--radius-sm); padding: 4px;
}
.post-row-body { flex: 1; min-width: 0; }
.post-row .message-meta { gap: 1rem; }
.post-row .message-meta span:first-child { min-width: 0; overflow-wrap: anywhere; }

.block-item .field-grid { gap: 0.6rem 1.2rem; }
.block-item .field { margin-bottom: 0.4rem; }
.block-item[data-type="table"]::after {
  content: "Tabellen worden hier niet bewerkt; ze blijven ongewijzigd op de website staan.";
  display: block; font-size: 0.8rem; color: var(--muted); font-style: italic;
}

/* Aankruisregels en labels in de paginabeheerder */
.checkline { display: flex; align-items: center; gap: 0.55em; font-weight: 500; margin-bottom: 0.5em; }
.checkline input { width: auto; }
.tag {
  display: inline-block; background: var(--cream-dark); color: var(--deep);
  border-radius: 999px; padding: 0.1em 0.6em; font-size: 0.7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em; margin-left: 0.4em;
}
.tag-off { background: #f3ded6; color: #a3542f; }

/* Voorbeeldweergave van een afbeelding in een formulierveld.
   .field is een flex-kolom, dus zonder align-self wordt de afbeelding over de
   volle breedte uitgerekt en platgedrukt. */
.img-preview, .block-preview {
  align-self: flex-start;
  width: auto; max-width: 100%;
  border-radius: 8px; background: #fff;
}
.img-preview { height: 56px; margin-top: 0.6rem; padding: 4px; border: 1px solid var(--line); }
.block-preview { max-width: 200px; height: auto; margin-top: 0.6rem; padding: 4px; border: 1px solid var(--line); }
