/* Beheeromgeving */
:root { --blue: #004B9B; --green: #0A7A3D; --ink: #1B2A44; --grey: #E9EEF2; --line: #d8e0e8; --muted: #5d6b82; --red: #b3322b; --radius: 10px; --font: "Montserrat", system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; font-family: var(--font); color: #243049; background: #f4f7fa; font-size: 15px; line-height: 1.55; }
a { color: var(--blue); }
.icon { vertical-align: middle; flex: none; }
.muted { color: var(--muted); }
small { font-size: .8rem; }
code { background: var(--grey); padding: .1rem .4rem; border-radius: 4px; font-size: .85em; }

.admin { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--ink); color: #c8d3e3; display: flex; flex-direction: column; padding: 1.2rem 1rem; position: sticky; top: 0; height: 100vh; }
.side-brand { display: block; text-decoration: none; padding: .3rem .5rem 1.2rem; }
.side-brand small { display: block; color: #8fa3c2; letter-spacing: .2em; text-transform: uppercase; font-size: .65rem; margin-top: .5rem; font-weight: 700; }
.wordmark { display: inline-flex; align-items: center; gap: .6rem; }
.wordmark-mark { width: 38px; height: auto; }
.wordmark-text { display: flex; flex-direction: column; line-height: 1; }
.wm-sjo { font-weight: 800; font-style: italic; font-size: 1.45rem; color: var(--ink); }
.wm-name { font-weight: 800; font-style: italic; font-size: .95rem; margin-top: 2px; }
.wm-dees { color: var(--blue); } .wm-vessem { color: var(--green); }
.on-dark .wm-sjo { color: #fff; } .on-dark .wm-dees { color: #7db4ee; } .on-dark .wm-vessem { color: #6fd29a; }
.sidebar nav { display: flex; flex-direction: column; gap: .15rem; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: .7rem; color: #c8d3e3; text-decoration: none; padding: .65rem .8rem; border-radius: 8px; font-weight: 500; }
.sidebar nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sidebar nav a.is-active { background: var(--green); color: #fff; }
.sidebar hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .12); margin: .8rem 0; width: 100%; }
.side-user { display: flex; align-items: center; justify-content: space-between; gap: .5rem; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 1rem; color: #fff; }
.side-user small { display: block; color: #8fa3c2; }
.icon-btn { background: none; border: 0; color: inherit; cursor: pointer; padding: .4rem; border-radius: 8px; }
.icon-btn:hover { background: rgba(255, 255, 255, .12); }
.topbar { display: flex; align-items: center; gap: .8rem; padding: 1.1rem 2rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.topbar h1 { margin: 0; font-size: 1.3rem; color: var(--ink); }
.menu-btn { display: none; color: var(--ink); }
.content { padding: 1.8rem 2rem 3rem; max-width: 1200px; }
@media (max-width: 900px) {
    .admin { grid-template-columns: 1fr; }
    .sidebar { position: fixed; z-index: 20; width: 260px; transform: translateX(-100%); transition: transform .25s; }
    .sidebar.open { transform: none; }
    .menu-btn { display: inline-flex; }
    .topbar, .content { padding-inline: 1rem; }
}

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .45rem; padding: .6rem 1.1rem; border-radius: 8px; border: 1px solid transparent; font: 600 .88rem var(--font); cursor: pointer; text-decoration: none; }
.btn-primary { background: var(--green); color: #fff; } .btn-primary:hover { background: #086431; color: #fff; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--ink); } .btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-danger { background: #fff; border-color: #e3c3c1; color: var(--red); } .btn-danger:hover { background: var(--red); color: #fff; }
.btn-sm { padding: .35rem .75rem; font-size: .8rem; }
.btn-block { width: 100%; margin-top: .6rem; }

.alert { padding: .8rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-weight: 500; }
.alert-success { background: #e3f2ea; color: #0a5a2d; border: 1px solid #b7dfc7; }
.alert-error { background: #fbe9e7; color: #8a2a22; border: 1px solid #efc2bd; }

.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.card h2 { margin: 0 0 .8rem; font-size: 1.05rem; color: var(--ink); }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: var(--radius); padding: 1.1rem 1.2rem; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.stat:nth-child(even) { border-left-color: var(--green); }
.stat b { font-size: 2.2rem; line-height: 1.1; font-weight: 800; }
.stat span { font-weight: 600; } .stat small { color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
@media (max-width: 900px) { .two-col { grid-template-columns: 1fr; } }
.quick-links { display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-form { margin-top: 1.2rem; display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; }
.activity { list-style: none; margin: 0; padding: 0; }
.activity li { padding: .55rem 0; border-bottom: 1px solid var(--grey); font-size: .9rem; }
.activity li:last-child { border: 0; }
.activity small { display: block; color: var(--muted); }

.toolbar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: .7rem .9rem; text-align: left; border-bottom: 1px solid var(--grey); vertical-align: middle; }
.table thead th { background: #f8fafc; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td { border-bottom: 0; }
.table .right { text-align: right; white-space: nowrap; }
.actions { display: flex; gap: .4rem; justify-content: flex-end; }
.actions form { margin: 0; }
.indent { padding-left: 1.6rem; position: relative; }
.indent::before { content: "↳"; position: absolute; left: .2rem; color: var(--muted); }
.badge { display: inline-block; padding: .15rem .6rem; border-radius: 999px; font-size: .72rem; font-weight: 700; }
.badge-ok { background: #e3f2ea; color: var(--green); } .badge-draft { background: #fff3d6; color: #8a6200; }
.empty-box { background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); padding: 2rem; text-align: center; color: var(--muted); }

.form label, .form .field { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; font-weight: 600; font-size: .85rem; color: var(--ink); }
.form .label { font-weight: 600; font-size: .85rem; color: var(--ink); display: block; margin-bottom: .3rem; }
.form input[type=text], .form input[type=date], .form input[type=time], .form input[type=datetime-local], .form input[type=number], .form input[type=password], .form select, .form textarea {
    font: 500 .95rem var(--font); padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; width: 100%; color: #243049; }
.form input:focus, .form select:focus, .form textarea:focus, .editor-area:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: var(--blue); }
.form small { font-weight: 400; }
.form .check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 500; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.5rem; align-items: start; }
@media (max-width: 1000px) { .form-grid { grid-template-columns: 1fr; } }
.form-side .card label { margin-bottom: .8rem; }
.narrow-form { max-width: 560px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-actions { display: flex; gap: .6rem; margin-top: .5rem; }
.seo { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.seo summary { cursor: pointer; font-weight: 700; margin-bottom: .6rem; }
.image-field img { max-width: 100%; border-radius: 8px; margin-bottom: .5rem; border: 1px solid var(--line); }
.image-field input[type=file] { width: 100%; font-size: .85rem; }

/* WYSIWYG */
.editor { border: 1px solid var(--line); border-radius: 8px; background: #fff; overflow: hidden; }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: .25rem; padding: .4rem; background: #f8fafc; border-bottom: 1px solid var(--line); position: sticky; top: 64px; z-index: 3; }
.editor-toolbar button { background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: .3rem .6rem; font: 700 .8rem var(--font); cursor: pointer; color: var(--ink); min-width: 2rem; }
.editor-toolbar button:hover { border-color: var(--blue); color: var(--blue); }
.editor-toolbar button.on { background: var(--ink); color: #fff; }
.editor-area { min-height: 320px; padding: 1rem; font-weight: 400; font-size: 1rem; line-height: 1.65; overflow-wrap: anywhere; }
.editor-area img { max-width: 100%; height: auto; }
.editor-area blockquote { border-left: 4px solid var(--green); margin-left: 0; padding-left: 1rem; color: var(--muted); }
.editor-area iframe { max-width: 100%; }
.editor-msg { padding: .4rem .8rem; font-size: .8rem; color: var(--red); }

/* Login */
.login-page { display: grid; place-items: center; min-height: 100vh; background: linear-gradient(120deg, var(--ink) 55%, #12365f 55% 57%, var(--green) 57% 60%, var(--ink) 60%); }
.login-card { background: #fff; width: min(420px, calc(100% - 2rem)); padding: 2rem; border-radius: 14px; box-shadow: 0 20px 60px rgba(0, 0, 0, .35); }
.login-brand { display: inline-block; margin-bottom: 1.2rem; text-decoration: none; }
.login-card h1 { margin: 0 0 .2rem; color: var(--ink); font-size: 1.5rem; }
.login-card label { display: flex; flex-direction: column; gap: .3rem; margin-bottom: 1rem; font-weight: 600; font-size: .85rem; color: var(--ink); }
.login-card input { font: 500 1rem var(--font); padding: .7rem .8rem; border: 1px solid var(--line); border-radius: 8px; }
.login-card input:focus { outline: 2px solid var(--blue); }
.back-link { text-align: center; margin: 1rem 0 0; font-size: .85rem; }

/* Statistieken */
.segmented-admin { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: .2rem; }
.segmented-admin a { padding: .4rem 1rem; border-radius: 999px; text-decoration: none; font-weight: 600; font-size: .85rem; color: var(--ink); }
.segmented-admin a.is-active { background: var(--ink); color: #fff; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 180px; padding-bottom: 1.4rem; }
.bar { flex: 1; height: 100%; display: flex; align-items: flex-end; position: relative; min-width: 0; }
.bar span { display: block; width: 100%; background: linear-gradient(0deg, var(--blue), #2a77c9); border-radius: 3px 3px 0 0; }
.bar:nth-child(even) span { background: linear-gradient(0deg, var(--green), #2aa05f); }
.bar em { position: absolute; bottom: -1.3rem; left: 0; right: 0; text-align: center; font-style: normal; font-size: .65rem; color: var(--muted); }
.hbar { display: flex; align-items: center; gap: .6rem; }
.hbar span { display: block; height: 10px; border-radius: 5px; background: linear-gradient(90deg, var(--blue), var(--green)); min-width: 4px; }
.hbar b { font-size: .85rem; }
.top-list { list-style: none; margin: 0 0 .8rem; padding: 0; }
.top-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0; border-bottom: 1px solid var(--grey); }
.top-list .t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.more-link { font-weight: 600; font-size: .88rem; }
.thumb { height: 32px; width: auto; max-width: 110px; object-fit: contain; display: block; }
.thumb-wide { height: 44px; max-width: 120px; border-radius: 6px; object-fit: cover; }
.arrow-btn { min-width: 2rem; padding-inline: .5rem; font-size: 1rem; line-height: 1; }
.arrow-btn:disabled { opacity: .3; cursor: not-allowed; }
.actions form { display: inline-block; }
.row-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; }
