/* =========================================================
   Buurtje.nl Beheer — admin.buurtje.nl  (rework 2026-06)
   Stil, precies, Mollie-achtig: hairlines, weinig kleur,
   één accent. Geen decoratie die niets doet.
   ========================================================= */

:root {
    --bg:          #f6f7f9;
    --vlak:        #ffffff;
    --vlak-zacht:  #fafbfc;
    --rand:        #e6e9ee;
    --rand-sterk:  #d3d8e0;
    --tekst:       #16191d;
    --tekst-2:     #5d6673;
    --tekst-3:     #9aa3af;
    --accent:      #e7643e;
    --accent-don:  #c84e2b;
    --accent-bg:   #fceee9;
    --groen:       #16794c;
    --groen-bg:    #e6f4ec;
    --rood:        #c0392b;
    --rood-bg:     #fcebe8;
    --focus:       0 0 0 3px rgba(231, 100, 62, .14);
    --r-kaart:     10px;
    --r-ctrl:      8px;
    --schaduw:     0 1px 2px rgba(16, 24, 40, .04);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--bg);
    color: var(--tekst);
    font-family: "Plus Jakarta Sans", -apple-system, "Segoe UI", sans-serif;
    font-size: 13.5px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
svg { flex-shrink: 0; }

/* =========================================================
   Raamwerk
   ========================================================= */
.app { display: flex; min-height: 100vh; }

.hoofd { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.inhoud {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto;
    padding: 24px 32px 72px;
}

/* =========================================================
   Sidebar
   ========================================================= */
.sidebar {
    width: 232px;
    flex-shrink: 0;
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--vlak);
    border-right: 1px solid var(--rand);
    padding: 20px 12px 16px;
}

.logo { display: block; padding: 4px 12px 22px; }
.logo img { display: block; }

.nav-kop {
    padding: 0 12px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--tekst-3);
}

.nav { display: flex; flex-direction: column; gap: 1px; }

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: var(--r-ctrl);
    font-size: 13px;
    font-weight: 600;
    color: var(--tekst-2);
    transition: background .1s ease, color .1s ease;
}

.nav-item svg { width: 16px; height: 16px; }
.nav-item:hover { background: var(--vlak-zacht); color: var(--tekst); }

.nav-item.actief {
    background: #f1f3f6;
    color: var(--tekst);
}

.nav-item.actief::before {
    content: "";
    position: absolute;
    left: -12px;
    top: 7px;
    bottom: 7px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--accent);
}

.nav-item.actief svg { color: var(--accent); }

/* ---- gebruiker onderin ---- */
.sidebar-voet {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 8px 0;
    border-top: 1px solid var(--rand);
}

.gebruiker { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }

.avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    border-radius: 50%;
    background: var(--tekst);
    color: #fff;
    font-size: 13px;
    font-weight: 700;
}

.gebruiker-info { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.gebruiker-info strong { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gebruiker-info span { font-size: 11px; color: var(--tekst-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.uitloggen { color: var(--tekst-3); padding: 7px; border-radius: var(--r-ctrl); }
.uitloggen:hover { background: var(--vlak-zacht); color: var(--tekst); }
.uitloggen svg { width: 15px; height: 15px; display: block; }

/* =========================================================
   Topbar — paginatitel links, acties rechts
   ========================================================= */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 60px;
    padding: 0 32px;
    background: rgba(255, 255, 255, .88);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--rand);
}

.topbar-links { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar h1 { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.terug-knop {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r-ctrl);
    border: 1px solid var(--rand);
    background: var(--vlak);
    color: var(--tekst-2);
}

.terug-knop:hover { border-color: var(--rand-sterk); color: var(--tekst); }
.terug-knop svg { width: 15px; height: 15px; }

.topbar-acties { display: flex; align-items: center; gap: 8px; }

/* =========================================================
   Knoppen
   ========================================================= */
.knop {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    height: 34px;
    padding: 0 14px;
    border: 1px solid transparent;
    border-radius: var(--r-ctrl);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background .1s ease, border-color .1s ease;
}

.knop svg { width: 14px; height: 14px; }

.knop-primair { background: var(--tekst); color: #fff; }
.knop-primair:hover { background: #000; }

.knop-rand { background: var(--vlak); border-color: var(--rand); color: var(--tekst); }
.knop-rand:hover { border-color: var(--rand-sterk); background: var(--vlak-zacht); }

.knop-stil { background: transparent; color: var(--tekst-2); }
.knop-stil:hover { background: var(--vlak-zacht); color: var(--tekst); }

.knop-breed { width: 100%; }

/* =========================================================
   Kaarten & secties
   ========================================================= */
.kaart {
    background: var(--vlak);
    border: 1px solid var(--rand);
    border-radius: var(--r-kaart);
    box-shadow: var(--schaduw);
}

.kaart-pad { padding: 20px; }

.kaart h3 { font-size: 13.5px; font-weight: 700; }

.kaart-kop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--rand);
}

.sectie-kop {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 28px 0 12px;
}

.sectie-kop:first-child { margin-top: 0; }
.sectie-kop h2 { font-size: 14px; }
.sectie-kop .meta { font-size: 12px; color: var(--tekst-3); }

/* =========================================================
   Dashboard — statistieken
   ========================================================= */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.stat-kaart {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: var(--vlak);
    border: 1px solid var(--rand);
    border-radius: var(--r-kaart);
    box-shadow: var(--schaduw);
    padding: 18px 20px;
    transition: border-color .1s ease;
}

.stat-kaart:hover { border-color: var(--rand-sterk); }

.stat-kop { display: flex; align-items: center; justify-content: space-between; }
.stat-label { font-size: 12.5px; font-weight: 600; color: var(--tekst-2); }

.stat-icoon {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: var(--r-ctrl);
    background: var(--vlak-zacht);
    border: 1px solid var(--rand);
    color: var(--tekst-2);
}

.stat-icoon svg { width: 15px; height: 15px; }

.stat-cijfers { display: flex; align-items: baseline; gap: 10px; }
.stat-getal { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1; }

.stat-delta {
    font-size: 11.5px;
    font-weight: 600;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--groen-bg);
    color: var(--groen);
}

.stat-delta.neutraal { background: var(--vlak-zacht); color: var(--tekst-3); border: 1px solid var(--rand); }

/* =========================================================
   Tabellen
   ========================================================= */
.tabel-kaart { overflow: hidden; }

.tabel { width: 100%; border-collapse: collapse; font-size: 13px; }

.tabel th {
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--tekst-3);
    padding: 10px 16px;
    background: var(--vlak-zacht);
    border-bottom: 1px solid var(--rand);
    white-space: nowrap;
}

.tabel td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--rand);
    vertical-align: middle;
}

.tabel tr:last-child td { border-bottom: none; }
.tabel tbody tr { transition: background .08s ease; }
.tabel tbody tr:hover { background: var(--vlak-zacht); }
.rij-klikbaar { cursor: pointer; }

.td-titel { font-weight: 600; max-width: 420px; }
.td-titel a:hover { color: var(--accent-don); }
.td-slug { display: block; font-size: 11.5px; font-weight: 400; color: var(--tekst-3); margin-top: 1px; }
.td-stil { color: var(--tekst-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-tekst { max-width: 440px; color: var(--tekst-2); font-size: 12.5px; line-height: 1.5; }

.td-acties { white-space: nowrap; text-align: right; }
.td-acties form { display: inline-block; margin: 0; }

.actie {
    display: inline-grid;
    place-items: center;
    vertical-align: middle;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 7px;
    background: transparent;
    color: var(--tekst-3);
    cursor: pointer;
}

.actie svg { width: 14px; height: 14px; }
.actie:hover { background: #eef0f3; color: var(--tekst); }
.actie-rood:hover { background: var(--rood-bg); color: var(--rood); }

/* =========================================================
   Badges, score, tabs
   ========================================================= */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}

.badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.badge-groen { background: var(--groen-bg); color: var(--groen); }
.badge-grijs { background: #eef0f3; color: var(--tekst-2); }
.badge-rood  { background: var(--rood-bg); color: var(--rood); }

.score {
    display: inline-block;
    min-width: 34px;
    text-align: center;
    padding: 3px 7px;
    border-radius: 7px;
    border: 1px solid var(--rand);
    background: var(--vlak-zacht);
    font-weight: 700;
    font-size: 12.5px;
    font-variant-numeric: tabular-nums;
}

.tabs {
    display: inline-flex;
    gap: 2px;
    background: #eef0f3;
    padding: 3px;
    border-radius: var(--r-ctrl);
}

.tab {
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--tekst-2);
}

.tab:hover { color: var(--tekst); }
.tab.actief { background: var(--vlak); color: var(--tekst); box-shadow: 0 1px 2px rgba(16, 24, 40, .08); }

/* =========================================================
   Formulieren
   ========================================================= */
.veld { margin-bottom: 16px; }
.veld:last-child { margin-bottom: 0; }

label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; }
.label-hint { font-weight: 400; color: var(--tekst-3); }

input[type="text"], input[type="password"], input[type="search"], input[type="datetime-local"], textarea, select {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--rand);
    border-radius: var(--r-ctrl);
    background: var(--vlak);
    color: var(--tekst);
    font: inherit;
    font-size: 13px;
    transition: border-color .1s ease, box-shadow .1s ease;
}

textarea { height: auto; padding: 10px 12px; resize: vertical; line-height: 1.6; }

select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%235d6673' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 32px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: var(--focus);
}

.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12.5px; }

/* ---- slug met prefix ---- */
.slug-rij {
    display: flex;
    align-items: center;
    height: 36px;
    border: 1px solid var(--rand);
    border-radius: var(--r-ctrl);
    background: var(--vlak);
    overflow: hidden;
}

.slug-rij:focus-within { border-color: var(--accent); box-shadow: var(--focus); }

.slug-prefix {
    align-self: stretch;
    display: flex;
    align-items: center;
    padding: 0 10px;
    background: var(--vlak-zacht);
    border-right: 1px solid var(--rand);
    color: var(--tekst-3);
    font-size: 12.5px;
    white-space: nowrap;
}

.slug-rij input { border: none; height: 100%; border-radius: 0; }
.slug-rij input:focus { box-shadow: none; }

/* ---- file-upload ---- */
input[type="file"] { width: 100%; font-size: 12.5px; color: var(--tekst-2); }

input[type="file"]::file-selector-button {
    margin-right: 10px;
    height: 30px;
    padding: 0 12px;
    border: 1px solid var(--rand);
    border-radius: 7px;
    background: var(--vlak);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--tekst);
    cursor: pointer;
}

input[type="file"]::file-selector-button:hover { background: var(--vlak-zacht); }

/* ---- zoekveld ---- */
.zoekveld { position: relative; flex: 1; max-width: 320px; }

.zoekveld svg {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--tekst-3);
    pointer-events: none;
}

.zoekveld input { padding-left: 33px; }

/* =========================================================
   Flash & lege staat
   ========================================================= */
.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: var(--r-ctrl);
    border: 1px solid;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 18px;
}

.flash svg { width: 15px; height: 15px; }
.flash-ok   { background: var(--groen-bg); border-color: #c4e5d2; color: var(--groen); }
.flash-fout { background: var(--rood-bg); border-color: #f3cfc8; color: var(--rood); }

.leeg { color: var(--tekst-3); text-align: center; padding: 48px 24px; font-size: 13px; }

.leeg-kaart { text-align: center; padding: 56px 32px; max-width: 420px; margin: 56px auto 0; }
.leeg-kaart h2 { font-size: 16px; }
.leeg-kaart p { color: var(--tekst-2); margin: 8px 0 20px; }

/* =========================================================
   Blogformulier
   ========================================================= */
.blog-form-kolommen {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 296px;
    gap: 18px;
    align-items: start;
}

.blog-zijbalk { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 78px; }

.blog-afbeelding-preview {
    display: block;
    width: 100%;
    border-radius: var(--r-ctrl);
    border: 1px solid var(--rand);
    margin-bottom: 14px;
}

.meta-regels { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--tekst-3); }
.meta-regels b { color: var(--tekst-2); font-weight: 600; }

/* =========================================================
   WYSIWYG-editor
   ========================================================= */
.editor {
    border: 1px solid var(--rand);
    border-radius: var(--r-ctrl);
    background: var(--vlak);
    overflow: hidden;
}

.editor:focus-within { border-color: var(--accent); box-shadow: var(--focus); }

.editor-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1px;
    padding: 6px;
    border-bottom: 1px solid var(--rand);
    background: var(--vlak-zacht);
}

.editor-knop {
    display: grid;
    place-items: center;
    height: 28px;
    min-width: 28px;
    padding: 0 6px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--tekst-2);
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    cursor: pointer;
    line-height: 1;
}

.editor-knop svg { width: 15px; height: 15px; }
.editor-knop:hover { background: #e9ecf0; color: var(--tekst); }
.editor-knop.actief { background: var(--accent-bg); color: var(--accent-don); }
.editor-knop:disabled { opacity: .35; cursor: default; }

.editor-sep { width: 1px; height: 16px; background: var(--rand); margin: 0 5px; }

.editor-vlak {
    min-height: 440px;
    max-height: 68vh;
    overflow-y: auto;
    padding: 24px 28px;
    outline: none;
    font-size: 14.5px;
    line-height: 1.75;
    color: var(--tekst);
}

/* inhoudstypografie */
.editor-vlak > :first-child { margin-top: 0; }
.editor-vlak h2 { font-size: 20px; margin: 1.3em 0 .45em; }
.editor-vlak h3 { font-size: 16px; margin: 1.2em 0 .4em; }
.editor-vlak p  { margin: 0 0 1em; }
.editor-vlak a  { color: var(--accent-don); text-decoration: underline; text-underline-offset: 2px; }
.editor-vlak ul, .editor-vlak ol { margin: 0 0 1em; padding-left: 1.45em; }
.editor-vlak li { margin-bottom: .25em; }

.editor-vlak blockquote {
    margin: 0 0 1em;
    padding: 10px 16px;
    border-left: 3px solid var(--accent);
    background: var(--vlak-zacht);
    border-radius: 0 var(--r-ctrl) var(--r-ctrl) 0;
    color: var(--tekst-2);
}

.editor-vlak img { max-width: 100%; height: auto; border-radius: var(--r-ctrl); }
.editor-vlak hr { border: none; border-top: 1px solid var(--rand); margin: 1.6em 0; }

.editor textarea#content {
    display: block;
    border: none;
    border-radius: 0;
    min-height: 440px;
    max-height: 68vh;
    padding: 20px 24px;
}

.editor textarea#content:focus { box-shadow: none; }

.editor-status {
    padding: 5px 12px;
    border-top: 1px solid var(--rand);
    background: var(--vlak-zacht);
    font-size: 11.5px;
    color: var(--tekst-3);
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* =========================================================
   Login
   ========================================================= */
.login-body {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
    padding: 24px;
}

.login-logo { margin-bottom: 28px; }

.login-kaart {
    width: 100%;
    max-width: 360px;
    background: var(--vlak);
    border: 1px solid var(--rand);
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px rgba(16, 24, 40, .06);
    padding: 28px;
}

.login-kaart .veld { margin-bottom: 14px; }

.login-voet { margin-top: 24px; color: var(--tekst-3); font-size: 12px; }

/* =========================================================
   Responsief
   ========================================================= */
@media (max-width: 1000px) {
    .blog-form-kolommen { grid-template-columns: 1fr; }
    .blog-zijbalk { position: static; }
}

@media (max-width: 760px) {
    .app { flex-direction: column; }

    .sidebar {
        width: 100%;
        height: auto;
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 6px;
        padding: 8px 12px;
        overflow-x: auto;
    }

    .logo { padding: 0 8px 0 0; }
    .logo img { width: 84px; height: auto; }
    .nav-kop { display: none; }
    .nav { flex-direction: row; flex: 1; }
    .nav-item { white-space: nowrap; }
    .nav-item.actief::before { display: none; }
    .sidebar-voet { margin: 0; border: none; padding: 0; }
    .gebruiker-info { display: none; }

    .topbar { padding: 0 16px; }
    .inhoud { padding: 16px 16px 56px; }
    .td-tekst, .td-titel { max-width: none; }
}
