/* Websolutics CMS - beheeromgeving (donker ontwerp) */

:root {
    --bg: #090a22;
    --sidebar: #0b0c28;
    --surface: #12143a;
    --surface-2: #171a47;
    --surface-3: #1e2257;
    --border: rgba(128, 132, 255, .13);
    --border-strong: rgba(128, 132, 255, .26);
    --text: #eef0ff;
    --text-2: #c9cbef;
    --muted: #8e93c2;
    --primary: #5b4cf5;
    --primary-2: #7b5cff;
    --grad: linear-gradient(135deg, #4a56f0 0%, #6a4af5 55%, #8b47f0 100%);
    --grad-soft: linear-gradient(135deg, rgba(74, 86, 240, .35), rgba(139, 71, 240, .35));
    --green: #3ddc97;  --green-bg: rgba(61, 220, 151, .13);
    --red: #ff7a8a;    --red-bg: rgba(255, 122, 138, .13);
    --orange: #ffc457; --orange-bg: rgba(255, 196, 87, .13);
    --blue: #6ea8ff;   --blue-bg: rgba(110, 168, 255, .14);
    --purple: #a99bff; --purple-bg: rgba(123, 92, 255, .2);
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 12px 40px rgba(3, 4, 20, .45);
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background:
        radial-gradient(900px 500px at 85% 110%, rgba(110, 60, 255, .28), transparent 60%),
        radial-gradient(700px 400px at 10% -10%, rgba(60, 80, 255, .14), transparent 60%),
        var(--bg);
    background-attachment: fixed;
    color: var(--text);
    font: 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    -webkit-font-smoothing: antialiased;
}

a { color: #8f9bff; text-decoration: none; }
a:hover { color: #b4bcff; }
a.plain, a.plain:hover { color: inherit; }
h1 { font-size: 1.85rem; font-weight: 700; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 0 0 1rem; letter-spacing: -.01em; }
h3 { font-size: 1rem; margin: 0; }
code { background: rgba(128, 132, 255, .12); padding: .1em .4em; border-radius: 6px; font-size: .88em; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.block { display: block; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.pad { padding: 1.25rem 1.5rem; margin: 0; }
.icon { flex-shrink: 0; display: inline-block; vertical-align: middle; }

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

.sidebar {
    width: 272px;
    flex-shrink: 0;
    background: linear-gradient(180deg, rgba(14, 15, 48, .96), rgba(10, 11, 36, .96));
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 1.4rem 1rem 1.25rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 30;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: 0 .5rem; color: #fff; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; }
.brand:hover { color: #fff; }

.site-switch-btn {
    display: flex; align-items: center; gap: .7rem;
    padding: .6rem .75rem;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    background: rgba(255, 255, 255, .025);
    cursor: pointer;
    list-style: none;
    color: var(--text);
}
.site-switch-btn::-webkit-details-marker { display: none; }
.site-switch-btn:hover { border-color: rgba(128, 132, 255, .45); }
.site-switch-btn.is-static { cursor: default; }
.site-switch-btn > .icon:last-child { margin-left: auto; color: var(--muted); }
.site-switch-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.site-switch-text strong { font-size: .92rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-switch-text small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-switch-icon { display: grid; place-items: center; width: 30px; height: 30px; color: var(--text-2); }
.site-switch-icon.small { width: 32px; height: 22px; }
.site-switch-menu { left: 0; right: 0; max-height: 60vh; overflow-y: auto; }
.site-switch-menu form { margin: 0; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav a {
    display: flex; align-items: center; gap: .85rem;
    padding: .66rem 1rem;
    border-radius: 10px;
    color: var(--text-2);
    font-weight: 500;
    transition: background .15s, color .15s;
}
.nav a .icon { color: #a9addb; }
.nav a:hover { background: rgba(128, 132, 255, .09); color: #fff; }
.nav a.active { background: var(--grad); color: #fff; box-shadow: 0 8px 22px rgba(91, 76, 245, .35); }
.nav a.active .icon { color: #fff; }

.help-box {
    margin-top: auto;
    display: flex; gap: .75rem; align-items: flex-start;
    padding: .9rem;
    border-radius: 12px;
    color: var(--text);
}
.help-box:hover { background: rgba(128, 132, 255, .07); color: var(--text); }
.help-box span { display: flex; flex-direction: column; }
.help-box strong { font-weight: 600; font-size: .95rem; }
.help-box small { color: var(--muted); font-size: .8rem; line-height: 1.4; margin-top: .15rem; }
.help-icon { color: var(--primary-2); }

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

.topbar {
    display: flex; align-items: center; gap: 1rem;
    padding: .9rem 2rem;
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 20;
    background: rgba(9, 10, 34, .82);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}
.menu-toggle { display: none; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: .75rem; }

.search {
    display: flex; align-items: center; gap: .6rem;
    width: 100%; max-width: 420px;
    padding: 0 .9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: rgba(255, 255, 255, .035);
    color: var(--muted);
}
.search:focus-within { border-color: var(--primary-2); }
.search input { border: 0 !important; background: transparent !important; padding: .62rem 0 !important; outline: none !important; box-shadow: none !important; }
.search-inline { max-width: 360px; }

.icon-btn {
    position: relative;
    display: inline-grid; place-items: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    border: 0;
    background: transparent;
    color: var(--text-2);
    cursor: pointer;
    list-style: none;
}
.icon-btn::-webkit-details-marker { display: none; }
.icon-btn:hover { background: rgba(128, 132, 255, .1); color: #fff; }
.bell .dot {
    position: absolute; top: 4px; right: 3px;
    min-width: 17px; height: 17px; padding: 0 4px;
    border-radius: 99px;
    background: linear-gradient(135deg, #a855f7, #ec4899);
    color: #fff; font-size: .65rem; font-weight: 700; line-height: 17px; text-align: center;
    box-shadow: 0 0 0 2px var(--bg);
}

.user-btn { display: flex; align-items: center; gap: .7rem; padding: .3rem .5rem .3rem .3rem; border-radius: 12px; cursor: pointer; list-style: none; }
.user-btn::-webkit-details-marker { display: none; }
.user-btn:hover { background: rgba(128, 132, 255, .08); }
.user-btn > .icon { color: var(--muted); }
.user-text { display: flex; flex-direction: column; line-height: 1.25; }
.user-text strong { font-size: .92rem; font-weight: 600; }
.user-text small { color: var(--muted); font-size: .8rem; }

.avatar {
    display: inline-grid; place-items: center;
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 50%;
    background: var(--grad);
    color: #fff; font-weight: 600; font-size: .9rem;
}
.avatar-sm { width: 28px; height: 28px; font-size: .7rem; }

.content { padding: 2rem; width: 100%; max-width: 1440px; }

.sidebar-backdrop { display: none; }

/* ============ Dropdowns ============ */
.dropdown { position: relative; }
.dropdown > summary { list-style: none; }
.dropdown > summary::-webkit-details-marker { display: none; }
.dropdown-menu {
    position: absolute; top: calc(100% + 8px); left: 0;
    min-width: 240px;
    padding: .4rem;
    background: #151842;
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    box-shadow: var(--shadow);
    z-index: 50;
}
.dropdown-right { left: auto; right: 0; }
.dropdown-head { padding: .5rem .7rem .6rem; color: var(--muted); font-size: .8rem; border-bottom: 1px solid var(--border); margin-bottom: .3rem; }
.dropdown-empty { padding: .8rem .7rem; margin: 0; color: var(--muted); font-size: .9rem; }
.dropdown-item {
    display: flex; align-items: center; gap: .7rem;
    width: 100%;
    padding: .55rem .7rem;
    border: 0; border-radius: 8px;
    background: transparent;
    color: var(--text);
    font: inherit; text-align: left;
    cursor: pointer;
}
.dropdown-item:hover { background: rgba(128, 132, 255, .12); color: #fff; }
.dropdown-item.is-active { background: rgba(128, 132, 255, .16); }
.dropdown-item .icon { color: var(--muted); }
.dropdown-item > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.dropdown-item small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dropdown-item strong { font-weight: 500; }
.dropdown-item-action { border-top: 1px solid var(--border); border-radius: 0 0 8px 8px; margin-top: .3rem; color: #a9b2ff; }
.notif-menu { width: 360px; max-width: calc(100vw - 32px); }
.notif-menu .dropdown-item { align-items: flex-start; }
.notif-menu .activity-icon { width: 34px; height: 34px; }

/* ============ Pagina-kop ============ */
.page-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
    margin-bottom: 1.75rem;
}
.page-head h1 { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sub { margin: .4rem 0 0; color: var(--text-2); }
.wave { display: inline-block; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--muted); font-size: .88rem; margin-bottom: .5rem; }
.back-link:hover { color: var(--text); }
.row-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.row-actions form { margin: 0; }

.period-select {
    position: relative;
    display: flex; align-items: center; gap: .5rem;
    padding: 0 .8rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: rgba(255, 255, 255, .03);
    color: var(--text-2);
}
.period-select select {
    appearance: none; -webkit-appearance: none;
    border: 0 !important; background: transparent !important;
    padding: .6rem 1.4rem .6rem 0 !important;
    color: var(--text); font-size: .9rem;
    cursor: pointer; width: auto;
}
.period-select > .icon:last-child { position: absolute; right: .7rem; pointer-events: none; color: var(--muted); }
.period-select option { background: #151842; }

/* ============ Kaarten ============ */
.card {
    background: linear-gradient(180deg, rgba(24, 27, 72, .78), rgba(17, 19, 56, .78));
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.25rem 1.5rem; }
.card-head h2 { margin: 0; }
.card-head-inline { padding: 0; margin-bottom: 1rem; }
.card-danger { border-color: rgba(255, 122, 138, .25); }
.link-arrow { display: inline-flex; align-items: center; gap: .35rem; font-size: .9rem; font-weight: 500; }

.stack > .card:last-child { margin-bottom: 0; }
.stack-sm { display: flex; flex-direction: column; gap: .6rem; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.grid-2 > .card { margin-bottom: 0; }

/* ============ Statistieken ============ */
.stats { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.stats-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stats-1 { grid-template-columns: minmax(0, 1fr); }
.stat {
    display: flex; align-items: center; gap: 1rem;
    margin: 0;
    padding: 1.2rem 1.25rem;
    color: var(--text);
    position: relative;
    min-height: 96px;
}
a.stat:hover { border-color: var(--border-strong); color: var(--text); }
.stat-icon {
    display: grid; place-items: center;
    width: 56px; height: 56px; flex-shrink: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(74, 86, 240, .55), rgba(110, 72, 245, .55));
    color: #dfe2ff;
    box-shadow: 0 6px 18px rgba(74, 86, 240, .25);
}
.stat-body { display: flex; flex-direction: column; min-width: 0; }
.stat-value { font-size: 1.75rem; font-weight: 700; line-height: 1.15; letter-spacing: -.02em; }
.stat-label { color: var(--text-2); font-size: .9rem; }
.stat-side { margin-left: auto; display: flex; flex-direction: column; align-items: flex-end; gap: .2rem; align-self: stretch; justify-content: space-between; }
.stat > .change { margin-left: auto; }
.sparkline { width: 92px; height: 36px; display: block; overflow: visible; }

.change { font-size: .82rem; font-weight: 600; color: var(--muted); }
.change.up { color: var(--green); }
.change.down { color: var(--red); }

/* ============ Dashboard ============ */
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 1.5rem; align-items: start; }
.dash-grid > .card { margin-bottom: 0; }
.dash-grid-even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); margin-bottom: 1.5rem; }
.dash-side > .card:last-child { margin-bottom: 0; }

.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.qa {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55rem;
    min-height: 86px;
    padding: .9rem .5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(30, 34, 87, .55);
    color: var(--text);
    font-size: .86rem; font-weight: 500; text-align: center;
    transition: transform .15s, border-color .15s, background .15s;
}
.qa .icon { color: #8f9bff; }
.qa:hover { color: #fff; border-color: var(--border-strong); background: rgba(40, 45, 110, .7); transform: translateY(-1px); }
.qa-primary { background: var(--grad); border-color: transparent; box-shadow: 0 10px 26px rgba(91, 76, 245, .4); }
.qa-primary .icon { color: #fff; }
.qa-primary:hover { background: var(--grad); filter: brightness(1.08); }

.activity { list-style: none; margin: 0; padding: 0; }
.activity li { display: flex; align-items: center; gap: .85rem; padding: .7rem 0; border-bottom: 1px solid var(--border); }
.activity li:last-child { border-bottom: 0; padding-bottom: 0; }
.activity li:first-child { padding-top: 0; }
.activity-icon {
    display: grid; place-items: center;
    width: 40px; height: 40px; flex-shrink: 0;
    border-radius: 10px;
    background: rgba(128, 132, 255, .1);
    border: 1px solid var(--border);
    color: var(--text-2);
}
.activity-body { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.activity-body strong { font-weight: 500; font-size: .92rem; overflow: hidden; text-overflow: ellipsis; }
.activity-body small { font-size: .82rem; }
.activity-time { font-size: .8rem; white-space: nowrap; }

.bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .7rem; }
.bars li { display: grid; grid-template-columns: minmax(0, 220px) 1fr auto; gap: 1rem; align-items: center; }
.bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); font-size: .9rem; }
.bar { height: 8px; border-radius: 99px; background: rgba(128, 132, 255, .1); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 99px; background: var(--grad); }
.bar-value { font-weight: 600; font-size: .9rem; }

/* ============ Tabellen ============ */
.table-wrap { overflow-x: auto; }
table, .table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .85rem 1.5rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .85rem; color: var(--text-2); font-weight: 500; background: rgba(128, 132, 255, .04); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(128, 132, 255, .04); }
tfoot td { border-top: 1px solid var(--border-strong); border-bottom: 0; }
tr.is-unread td { background: rgba(123, 92, 255, .05); }
.unread-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--primary-2); margin-right: .5rem; vertical-align: middle; }

.site-cell, .row-title { display: flex; align-items: center; gap: .9rem; color: var(--text); min-width: 0; }
.site-cell:hover, .row-title:hover { color: #fff; }
.site-cell > span:last-child { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.site-cell strong, .row-title strong { font-weight: 600; }
.site-cell small { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.row-icon { color: var(--muted); display: inline-flex; }

.thumb {
    display: inline-grid; place-items: center; flex-shrink: 0;
    width: 64px; height: 40px;
    border-radius: 7px;
    overflow: hidden;
    background: #232768;
    border: 1px solid var(--border);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.thumb-letter { color: #c7cbff; font-weight: 600; background: var(--grad-soft); }
.thumb-sm { width: 46px; height: 32px; }
.thumb-xs { width: 32px; height: 22px; border-radius: 5px; font-size: .7rem; }
.thumb-lg { width: 100%; height: 150px; border-radius: 10px; font-size: 2rem; }
.thumb-square { width: 44px; height: 44px; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; padding: .6rem 0; border-bottom: 1px solid var(--border); }
.list li:last-child { border-bottom: 0; }

.meta-list { display: grid; grid-template-columns: max-content 1fr; gap: .55rem 1.5rem; margin: 0 0 1.25rem; }
.meta-list dt { color: var(--muted); }
.meta-list dd { margin: 0; word-break: break-word; }
.meta-list-wide { gap: 1rem 2rem; margin: 0; }
.meta-list-wide dd { white-space: normal; }

/* ============ Tabs & werkbalk ============ */
.tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); }
.tabs a {
    display: inline-flex; align-items: center; gap: .45rem;
    padding: .65rem .9rem;
    color: var(--muted); font-weight: 500; font-size: .92rem;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}
.tabs a:hover { color: var(--text); }
.tabs a.active { color: #fff; border-bottom-color: var(--primary-2); }
.tabs a span { font-size: .75rem; padding: .05rem .45rem; border-radius: 99px; background: rgba(128, 132, 255, .14); color: var(--text-2); }

.toolbar { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.25rem; }
.toolbar-split .search { flex: 1 1 220px; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; margin: 0; }
.inline-form input { width: auto; min-width: 180px; }
form.inline { display: inline-flex; gap: .3rem; margin: 0; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 0 0 1.5rem; }

/* ============ Formulieren ============ */
.form { display: flex; flex-direction: column; gap: 1.1rem; }
.form h2 { margin: 0; }
.form > .btn { align-self: flex-start; }
.form > .btn-block { align-self: stretch; }
label, .field { display: flex; flex-direction: column; gap: .4rem; font-weight: 500; font-size: .92rem; color: var(--text-2); }
.card > label + label, .card > label + .field { margin-top: 1.1rem; }
.field-label { font-weight: 500; }
label .muted { font-weight: 400; }
label.checkbox { flex-direction: row; align-items: center; gap: .55rem; color: var(--text); cursor: pointer; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.fieldset { border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.1rem; margin: 0; display: flex; flex-direction: column; gap: .7rem; }
.fieldset legend { padding: 0 .4rem; color: var(--text-2); font-weight: 500; font-size: .92rem; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .55rem 1rem; }
.chip-check { padding: .45rem .75rem; border: 1px solid var(--border); border-radius: 10px; }
.chip-check:has(input:checked) { border-color: var(--primary-2); background: rgba(123, 92, 255, .12); }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=datetime-local], input[type=url], select, textarea {
    font: inherit;
    font-weight: 400;
    width: 100%;
    padding: .65rem .85rem;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: rgba(8, 9, 30, .55);
    color: var(--text);
    transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: #6c70a0; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(123, 92, 255, .22); }
select option { background: #151842; color: var(--text); }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--primary-2); }
input[type=datetime-local]::-webkit-calendar-picker-indicator { filter: invert(.8); }
.input-lg { font-size: 1.2rem !important; font-weight: 600 !important; padding: .75rem .95rem !important; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span { display: grid; place-items: center; padding: 0 .75rem; border: 1px solid var(--border-strong); border-right: 0; border-radius: 10px 0 0 10px; background: rgba(128, 132, 255, .08); color: var(--muted); }
.input-prefix input { border-radius: 0 10px 10px 0; }
textarea { resize: vertical; }
textarea.code, .code-block {
    font-family: ui-monospace, "SF Mono", Consolas, monospace;
    font-size: .83rem;
    line-height: 1.55;
}
.code-block {
    margin: 0;
    padding: 1rem 1.1rem;
    border-radius: 10px;
    background: rgba(5, 6, 22, .7);
    border: 1px solid var(--border);
    overflow-x: auto;
    color: #cfd3ff;
}
.code-block code { background: none; padding: 0; font-size: inherit; }
.field-error { color: var(--red); font-size: .85rem; font-weight: 400; }
.counter { font-size: .78rem; color: var(--muted); font-weight: 400; text-align: right; margin-top: -.15rem; }

.copy-field { display: flex; gap: .5rem; margin-bottom: 1rem; }
.copy-field input { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; }

.editor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.5rem; align-items: start; }
.editor-layout > .card, .editor-layout > .stack > .card:last-child { margin-bottom: 0; }

.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; align-items: start; }
.settings-grid > .card { margin: 0; }

.steps { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .5rem; color: var(--text-2); }
.steps strong { color: var(--text); }

/* ============ Teksteditor ============ */
.editor { border: 1px solid var(--border-strong); border-radius: 12px; overflow: hidden; background: rgba(8, 9, 30, .45); }
.editor:focus-within { border-color: var(--primary-2); box-shadow: 0 0 0 3px rgba(123, 92, 255, .18); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: .4rem; border-bottom: 1px solid var(--border); background: rgba(128, 132, 255, .05); }
.editor-toolbar button {
    display: inline-grid; place-items: center;
    min-width: 34px; height: 32px; padding: 0 .55rem;
    border: 0; border-radius: 7px;
    background: transparent;
    color: var(--text-2);
    font: inherit; font-size: .85rem; font-weight: 500;
    cursor: pointer;
}
.editor-toolbar button:hover, .editor-toolbar button.active { background: rgba(128, 132, 255, .16); color: #fff; }
.editor-sep { width: 1px; margin: 4px 4px; background: var(--border-strong); }
.editor-area { min-height: 320px; max-height: 70vh; overflow-y: auto; padding: 1rem 1.2rem; outline: none; color: var(--text); font-weight: 400; }
.editor-area:empty::before { content: attr(data-placeholder); color: #6c70a0; }
.editor-source { display: block; width: 100%; min-height: 320px; border: 0 !important; border-radius: 0 !important; font-family: ui-monospace, Consolas, monospace; font-size: .83rem; box-shadow: none !important; }

.prose { line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 1.4rem; margin: 1.4em 0 .5em; }
.prose h3 { font-size: 1.15rem; margin: 1.3em 0 .4em; }
.prose p { margin: 0 0 1em; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose blockquote { margin: 1em 0; padding: .4em 1em; border-left: 3px solid var(--primary-2); color: var(--text-2); }
.prose ul, .prose ol { padding-left: 1.4em; }

/* ============ Knoppen ============ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
    font: inherit; font-weight: 500; font-size: .92rem;
    padding: .62rem 1.05rem;
    border-radius: 10px;
    border: 1px solid var(--border-strong);
    background: rgba(128, 132, 255, .08);
    color: var(--text);
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s, filter .15s;
}
.btn:hover { color: #fff; background: rgba(128, 132, 255, .16); border-color: rgba(128, 132, 255, .4); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 8px 22px rgba(91, 76, 245, .35); }
.btn-primary:hover { background: var(--grad); border-color: transparent; filter: brightness(1.1); }
.btn-danger { background: rgba(255, 122, 138, .14); border-color: rgba(255, 122, 138, .35); color: #ffb3bd; }
.btn-danger:hover { background: rgba(255, 122, 138, .24); border-color: rgba(255, 122, 138, .55); color: #fff; }
.btn-ghost { background: transparent; }
.btn-small { padding: .38rem .7rem; font-size: .84rem; border-radius: 8px; }
.btn-block { width: 100%; }

/* ============ Labels & meldingen ============ */
.badge {
    display: inline-flex; align-items: center; gap: .4rem;
    font-size: .78rem; font-weight: 500;
    padding: .22rem .65rem;
    border-radius: 99px;
    background: rgba(142, 147, 194, .14); color: var(--text-2);
    white-space: nowrap;
}
.badge-green { background: var(--green-bg); color: var(--green); }
.badge-red { background: var(--red-bg); color: var(--red); }
.badge-orange { background: var(--orange-bg); color: var(--orange); }
.badge-blue { background: var(--blue-bg); color: var(--blue); }
.badge-purple { background: var(--purple-bg); color: var(--purple); }
.badge-grey { background: rgba(142, 147, 194, .14); color: var(--text-2); }
.badge-dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip { display: inline-block; font-size: .75rem; padding: .15rem .55rem; border-radius: 6px; background: rgba(128, 132, 255, .12); color: var(--text-2); }

.alert { padding: .85rem 1.1rem; border-radius: 12px; margin-bottom: 1.25rem; border: 1px solid transparent; }
.alert-success { background: var(--green-bg); color: #9ff0c9; border-color: rgba(61, 220, 151, .3); }
.alert-error { background: var(--red-bg); color: #ffc2ca; border-color: rgba(255, 122, 138, .3); }
.alert-info { background: var(--blue-bg); color: #c4dbff; border-color: rgba(110, 168, 255, .3); }

.empty { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { display: inline-grid; place-items: center; width: 60px; height: 60px; border-radius: 16px; background: var(--grad-soft); color: #c7cbff; margin-bottom: 1rem; }
.empty h3 { font-size: 1.05rem; margin-bottom: .35rem; }
.empty p { margin: 0 auto 1.2rem; max-width: 420px; }

/* ============ Media ============ */
.upload-form { margin-bottom: 1.5rem; }
.upload-zone {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4rem;
    padding: 2rem 1rem;
    border: 2px dashed var(--border-strong);
    border-radius: var(--radius);
    background: rgba(128, 132, 255, .04);
    color: var(--text);
    cursor: pointer;
    text-align: center;
    transition: border-color .15s, background .15s;
}
.upload-zone:hover, .upload-zone.is-drag { border-color: var(--primary-2); background: rgba(123, 92, 255, .1); }
.upload-zone-small { flex-direction: row; padding: .9rem; font-size: .92rem; }
.upload-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--grad); color: #fff; margin-bottom: .3rem; }

.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.media-item {
    position: relative;
    display: block;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: rgba(128, 132, 255, .06);
    padding: 0;
    cursor: pointer;
}
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item:hover, .media-item.is-selected { border-color: var(--primary-2); box-shadow: 0 0 0 2px var(--primary-2); }
.media-name {
    position: absolute; left: 0; right: 0; bottom: 0;
    padding: 1.2rem .6rem .45rem;
    background: linear-gradient(transparent, rgba(5, 6, 22, .85));
    color: #fff; font-size: .75rem;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    opacity: 0; transition: opacity .15s;
}
.media-item:hover .media-name { opacity: 1; }
.file-icon { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem; height: 100%; color: var(--text-2); font-size: .8rem; font-weight: 600; }
.media-detail { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.5rem; }
.media-detail-preview { display: grid; place-items: center; background: rgba(5, 6, 22, .5); border-radius: 12px; min-height: 260px; overflow: hidden; }
.media-detail-preview img { max-width: 100%; max-height: 420px; display: block; }
.media-detail-info h2 { word-break: break-all; }
.media-detail-info .form { margin-bottom: 1rem; }

.media-field { display: flex; flex-direction: column; gap: .75rem; }
.media-field-preview { display: grid; place-items: center; aspect-ratio: 16 / 10; border-radius: 12px; overflow: hidden; border: 1px dashed var(--border-strong); background: rgba(5, 6, 22, .35); }
.media-field-preview img { width: 100%; height: 100%; object-fit: cover; }
.media-field-empty { display: flex; flex-direction: column; align-items: center; gap: .3rem; color: var(--muted); font-size: .85rem; }
.media-field-actions { display: flex; gap: .5rem; flex-wrap: wrap; }

.modal {
    width: min(900px, calc(100vw - 32px));
    max-height: calc(100vh - 64px);
    padding: 0;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: #12143a;
    color: var(--text);
    box-shadow: var(--shadow);
}
.modal::backdrop { background: rgba(4, 5, 18, .7); backdrop-filter: blur(3px); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.modal-head h2 { margin: 0; }
.modal-body { padding: 1.25rem; overflow-y: auto; max-height: calc(100vh - 160px); }
.picker-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); margin: 0; }
.picker-status { margin: .75rem 0; min-height: 1.2em; }

/* ============ Overige onderdelen ============ */
.site-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1.25rem; }
.site-card {
    display: flex; flex-direction: column; align-items: flex-start; gap: .75rem;
    margin: 0; padding: 1rem;
    font: inherit; color: var(--text); text-align: left;
    cursor: pointer;
}
.site-card:hover { border-color: var(--primary-2); }
.site-card-body { display: flex; flex-direction: column; }

.form-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.25rem; margin-bottom: 1.5rem; }
.form-card { display: flex; align-items: center; gap: 1rem; margin: 0; color: var(--text); }
.form-card:hover { border-color: var(--border-strong); color: var(--text); }
.form-card .stat-icon { width: 48px; height: 48px; }
.form-card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.form-card-body strong { font-weight: 600; }

.day-label { color: var(--text-2); font-size: .9rem; font-weight: 600; margin: 1.5rem 0 .75rem; }
.day-label:first-of-type { margin-top: 0; }
.social-list { display: flex; flex-direction: column; gap: .75rem; }
.social-post { display: flex; gap: 1rem; margin: 0; padding: 1rem 1.25rem; color: var(--text); }
.social-post:hover { border-color: var(--border-strong); color: var(--text); }
.social-image { width: 72px; height: 72px; flex-shrink: 0; border-radius: 10px; overflow: hidden; }
.social-image img { width: 100%; height: 100%; object-fit: cover; }
.social-body { display: flex; flex-direction: column; gap: .4rem; min-width: 0; }
.social-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; }
.social-text { color: var(--text-2); white-space: pre-line; }

/* ============ Inloggen / installatie / fouten ============ */
.bare { display: block; }
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem 16px; }
.auth-card { width: 100%; max-width: 420px; padding: 2.25rem 2rem; box-shadow: var(--shadow); }
.auth-card-wide { max-width: 580px; }
.auth-card h1 { margin-bottom: .4rem; font-size: 1.6rem; }
.auth-brand { display: flex; align-items: center; gap: .6rem; font-size: 1.5rem; font-weight: 600; margin-bottom: 1.5rem; }

.checks { list-style: none; padding: 0; margin: 1rem 0; }
.checks li { padding: .25rem 0; }
.checks .ok { color: var(--green); }
.checks .fail { color: var(--red); }

/* ============ Responsief ============ */
@media (max-width: 1280px) {
    .stats-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dash-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 1100px) {
    .editor-layout { grid-template-columns: minmax(0, 1fr); }
    .settings-grid { grid-template-columns: minmax(0, 1fr); }
    .stats-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 960px) {
    .sidebar {
        position: fixed; left: 0; top: 0; bottom: 0;
        transform: translateX(-100%);
        transition: transform .25s ease;
        box-shadow: var(--shadow);
    }
    .sidebar-open .sidebar { transform: none; }
    .sidebar-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(4, 5, 18, .6); z-index: 25; }
    .menu-toggle { display: inline-grid; }
    .topbar { padding: .75rem 16px; gap: .5rem; }
    .content { padding: 1.5rem 16px; }
    .grid-2, .dash-grid-even, .media-detail { grid-template-columns: minmax(0, 1fr); }
    .user-text, .user-btn > .icon { display: none; }
}
@media (max-width: 640px) {
    h1 { font-size: 1.5rem; }
    .stats-4, .stats-2 { grid-template-columns: minmax(0, 1fr); }
    .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    th, td { padding: .75rem 1rem; }
    .card { padding: 1.15rem; }
    .card-flush { padding: 0; }
    .card-head { padding: 1rem; }
    .bars li { grid-template-columns: minmax(0, 1fr) 80px auto; }
    .search { max-width: none; }
    .activity-time { display: none; }
    .copy-field { flex-direction: column; }
}

/* =====================================================================
   Afwerking: inlogscherm, profielfoto's, meldingen en invulformulieren
   ===================================================================== */

/* ---------- Animaties ---------- */
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes toast-in { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: no-preference) {
    .content > * { animation: fade-up .35s ease both; }
    .content > *:nth-child(2) { animation-delay: .04s; }
    .content > *:nth-child(3) { animation-delay: .08s; }
    .content > *:nth-child(4) { animation-delay: .12s; }
}
.card { transition: border-color .2s, box-shadow .2s, transform .2s; }
a.card:hover, button.card:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(3, 4, 20, .4); }

/* ---------- Profielfoto's ---------- */
.avatar { overflow: hidden; }
.avatar.has-photo { background: #1e2257; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-xs { width: 20px; height: 20px; font-size: .55rem; }
.avatar-lg { width: 48px; height: 48px; font-size: 1rem; }
.avatar-xl { width: 104px; height: 104px; font-size: 2rem; box-shadow: 0 0 0 4px var(--bg), 0 0 0 6px rgba(123, 92, 255, .6); }
.user-btn .avatar { box-shadow: 0 0 0 2px rgba(123, 92, 255, .5); }
.activity-who { display: inline-flex; align-items: center; gap: .35rem; }

.user-menu { min-width: 270px; }
.user-menu-head { display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem .8rem; margin-bottom: .3rem; border-bottom: 1px solid var(--border); color: var(--text); border-radius: 8px 8px 0 0; }
.user-menu-head:hover { color: #fff; background: rgba(128, 132, 255, .08); }
.user-menu-head span { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.user-menu-head strong { font-weight: 600; }
.user-menu-head small { color: var(--muted); font-size: .8rem; overflow: hidden; text-overflow: ellipsis; }

.photo-upload { position: relative; display: inline-block; cursor: pointer; border-radius: 50%; flex-shrink: 0; }
.photo-upload-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem;
    border-radius: 50%;
    background: rgba(9, 10, 34, .7);
    color: #fff; font-size: .75rem; font-weight: 500;
    opacity: 0; transition: opacity .2s;
}
.photo-upload:hover .photo-upload-overlay, .photo-upload:focus-within .photo-upload-overlay { opacity: 1; }

.profile-hero { padding: 0; overflow: hidden; }
.profile-cover {
    height: 120px;
    background:
        radial-gradient(400px 160px at 20% 0%, rgba(110, 168, 255, .45), transparent 70%),
        radial-gradient(500px 200px at 90% 100%, rgba(168, 85, 247, .55), transparent 70%),
        var(--grad);
}
.profile-main { display: flex; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; padding: 0 1.75rem 1.5rem; margin-top: -52px; }
.profile-photo { margin: 0; }
.profile-info { flex: 1; min-width: 200px; padding-bottom: .25rem; }
.profile-info h2 { font-size: 1.5rem; margin: 0; }
.profile-info p { margin: .15rem 0 .6rem; }
.profile-badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.profile-actions { padding-bottom: .25rem; }
.page-head-user { display: flex; align-items: center; gap: 1.25rem; }
.page-head-user form { margin: 0; }

/* ---------- Meldingen (toasts) ---------- */
.toasts { position: fixed; top: 84px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: .6rem; width: min(400px, calc(100vw - 32px)); }
.toast {
    display: flex; align-items: flex-start; gap: .7rem;
    padding: .85rem .9rem;
    border-radius: 12px;
    background: rgba(21, 24, 66, .96);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    animation: toast-in .35s cubic-bezier(.2, .9, .3, 1.2) both;
    transition: opacity .3s, transform .3s;
}
.toast.is-leaving { opacity: 0; transform: translateX(24px); }
.toast-icon { display: grid; place-items: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px; }
.toast-success .toast-icon { background: var(--green-bg); color: var(--green); }
.toast-error .toast-icon { background: var(--red-bg); color: var(--red); }
.toast-info .toast-icon { background: var(--blue-bg); color: var(--blue); }
.toast-error { border-color: rgba(255, 122, 138, .4); }
.toast-text { flex: 1; padding-top: .2rem; font-size: .92rem; }
.toast-close { border: 0; background: none; color: var(--muted); cursor: pointer; padding: .2rem; border-radius: 6px; }
.toast-close:hover { color: #fff; background: rgba(128, 132, 255, .12); }
.bare .toasts { top: 20px; }

/* ---------- Invulformulieren ---------- */
label, .field { color: var(--text); font-size: .9rem; }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=datetime-local], input[type=url], select, textarea {
    background: rgba(6, 7, 26, .6);
    border-color: rgba(128, 132, 255, .2);
    padding: .72rem .9rem;
}
input:hover:not(:focus):not(:disabled), select:hover:not(:focus), textarea:hover:not(:focus) { border-color: rgba(128, 132, 255, .38); }
input:focus, select:focus, textarea:focus { background: rgba(6, 7, 26, .85); box-shadow: 0 0 0 4px rgba(123, 92, 255, .18); }
input:disabled { opacity: .55; cursor: not-allowed; }
select {
    appearance: none; -webkit-appearance: none;
    padding-right: 2.4rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238e93c2' stroke-width='2' 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 .85rem center;
    cursor: pointer;
}
.period-select select { background-image: none; }
.field-error { display: flex; align-items: center; gap: .3rem; }
.field-error::before { content: "!"; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; background: var(--red-bg); font-size: .7rem; font-weight: 700; }

input[type=checkbox] {
    appearance: none; -webkit-appearance: none;
    width: 20px; height: 20px; flex-shrink: 0;
    margin: 0;
    border: 1.5px solid rgba(128, 132, 255, .4);
    border-radius: 6px;
    background: rgba(6, 7, 26, .6);
    display: inline-grid; place-items: center;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}
input[type=checkbox]::after {
    content: ""; width: 10px; height: 6px;
    border: solid #fff; border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translate(1px, -1px) scale(0);
    transition: transform .15s;
}
input[type=checkbox]:checked { background: var(--grad); border-color: transparent; }
input[type=checkbox]:checked::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
input[type=checkbox]:focus-visible { box-shadow: 0 0 0 4px rgba(123, 92, 255, .25); }

.card-title { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.25rem; }
.card-title h2 { margin: 0; }
.card-title p { margin: .15rem 0 0; }
.card-title-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 11px; background: var(--grad-soft); color: #c7cbff; border: 1px solid var(--border); }

/* Opslaan-balk blijft in beeld bij lange formulieren */
form.form > .page-head {
    position: sticky; top: 66px; z-index: 15;
    margin: -.5rem -1rem 0; padding: .75rem 1rem;
    border-radius: 14px;
    background: rgba(9, 10, 34, .82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Knop "bezig…" na versturen */
.btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
    content: ""; position: absolute; width: 18px; height: 18px;
    border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%;
    animation: spin .7s linear infinite;
}
.btn-lg { padding: .85rem 1.2rem; font-size: 1rem; border-radius: 12px; }

/* Invoer met icoon (inlogscherm) */
.input-icon { position: relative; display: flex; align-items: center; }
.input-icon > .icon { position: absolute; left: .95rem; color: var(--muted); pointer-events: none; transition: color .15s; }
.input-icon input { padding-left: 2.8rem; padding-right: 2.8rem; }
.input-icon:focus-within > .icon { color: #a99bff; }
.input-action { position: absolute; right: .5rem; display: grid; place-items: center; width: 34px; height: 34px; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.input-action:hover, .input-action.active { color: #fff; background: rgba(128, 132, 255, .14); }

/* ---------- Inlogscherm ---------- */
.auth:has(.login) { padding: 0; display: block; }
.login { width: 100%; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); min-height: 100vh; }
.login-visual {
    position: relative; overflow: hidden;
    display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
    padding: 2.5rem 3rem;
    background:
        radial-gradient(600px 400px at 85% 95%, rgba(168, 85, 247, .45), transparent 65%),
        radial-gradient(500px 360px at 10% 10%, rgba(74, 86, 240, .4), transparent 65%),
        linear-gradient(160deg, #10123d 0%, #0b0c2a 100%);
    border-right: 1px solid var(--border);
}
.login-glow {
    position: absolute; width: 520px; height: 520px; right: -160px; top: 18%;
    border-radius: 50%;
    background: conic-gradient(from 180deg, rgba(74, 86, 240, .0), rgba(123, 92, 255, .35), rgba(74, 86, 240, .0));
    filter: blur(60px);
    pointer-events: none;
}
.login-brand { position: relative; display: flex; align-items: center; gap: .65rem; font-size: 1.55rem; font-weight: 600; letter-spacing: -.02em; }
.login-pitch { position: relative; max-width: 470px; }
.login-pitch h2 { font-size: 2.6rem; line-height: 1.12; letter-spacing: -.03em; margin: 0 0 1rem; font-weight: 700; }
.login-pitch p { color: var(--text-2); font-size: 1.05rem; margin: 0; }
.text-grad { background: linear-gradient(90deg, #7aa2ff, #b18cff 60%, #e08cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-preview { position: relative; display: flex; flex-direction: column; gap: .8rem; max-width: 420px; }
.preview-card {
    display: flex; align-items: center; gap: .9rem;
    padding: 1rem 1.1rem;
    border-radius: 16px;
    background: rgba(24, 27, 72, .72);
    border: 1px solid var(--border-strong);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}
.preview-card .stat-icon { width: 48px; height: 48px; }
.preview-card .stat-value { font-size: 1.5rem; }
.preview-card-2 { margin-left: 2.5rem; }
.preview-card-3 { margin-left: 1rem; }
@media (prefers-reduced-motion: no-preference) {
    .preview-card-1 { animation: float 6s ease-in-out infinite; }
    .preview-card-2 { animation: float 6s ease-in-out 1.5s infinite; }
    .preview-card-3 { animation: float 6s ease-in-out 3s infinite; }
}
.login-points { position: relative; display: flex; gap: 1.5rem; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; color: var(--text-2); font-size: .9rem; }
.login-points li { display: flex; align-items: center; gap: .4rem; }
.login-points .icon { color: var(--green); }

.login-panel { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 2.5rem 16px 1.25rem; }
.login-box { width: 100%; max-width: 400px; margin: auto 0; animation: fade-up .4s ease both; }
.login-box h1 { font-size: 2rem; margin-bottom: .35rem; }
.login-box > .muted { margin: 0 0 1.75rem; }
.login-brand-mobile { display: none; margin-bottom: 2rem; }
.login-form { gap: 1.2rem; }
.login-form .btn { margin-top: .4rem; }
.login-error {
    display: flex; align-items: center; gap: .6rem;
    padding: .8rem 1rem; margin-bottom: 1.25rem;
    border-radius: 12px;
    background: var(--red-bg); border: 1px solid rgba(255, 122, 138, .35); color: #ffc2ca;
    font-size: .92rem;
}
.login-help { text-align: center; font-size: .88rem; margin: 1.75rem 0 0; line-height: 1.6; }
.login-footer { font-size: .8rem; margin: 2rem 0 0; }

@media (max-width: 960px) {
    .login { grid-template-columns: minmax(0, 1fr); }
    .login-visual { display: none; }
    .login-brand-mobile { display: flex; }
    .login-panel {
        background:
            radial-gradient(500px 300px at 100% 0%, rgba(123, 92, 255, .25), transparent 70%),
            radial-gradient(400px 300px at 0% 100%, rgba(74, 86, 240, .2), transparent 70%);
    }
}
@media (max-width: 640px) {
    .profile-main { flex-direction: column; align-items: flex-start; gap: 1rem; }
    .page-head-user { align-items: flex-start; }
    .page-head-user .avatar-xl { width: 72px; height: 72px; }
    form.form > .page-head { top: 60px; }
    .toasts { top: 70px; right: 16px; }
}

/* ---------- Teksten ---------- */
.texts-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 1.5rem; align-items: start; }
.texts-nav { position: sticky; top: 150px; display: flex; flex-direction: column; gap: 2px; }
.texts-nav .search { margin-bottom: .75rem; }
.texts-nav a { display: flex; justify-content: space-between; align-items: center; padding: .55rem .8rem; border-radius: 9px; color: var(--text-2); font-size: .9rem; }
.texts-nav a:hover { background: rgba(128, 132, 255, .09); color: #fff; }
.texts-nav a span { font-size: .75rem; color: var(--muted); }
.text-section { scroll-margin-top: 150px; }
.text-field { display: flex; flex-direction: column; gap: .4rem; scroll-margin-top: 160px; }
.text-field-head { display: flex; justify-content: space-between; align-items: center; gap: .75rem; }
.text-field-head label { font-weight: 500; }
.text-field-actions { display: flex; align-items: center; gap: .5rem; }
.link-btn { display: inline-flex; align-items: center; gap: .25rem; border: 0; background: none; color: var(--muted); font: inherit; font-size: .8rem; cursor: pointer; padding: .2rem .35rem; border-radius: 6px; }
.link-btn:hover { color: #fff; background: rgba(128, 132, 255, .12); }
.text-field:target textarea, .text-field:target input { border-color: var(--primary-2); box-shadow: 0 0 0 4px rgba(123, 92, 255, .2); }
@media (max-width: 960px) {
    .texts-layout { grid-template-columns: minmax(0, 1fr); }
    .texts-nav { position: static; flex-direction: row; flex-wrap: wrap; gap: .4rem; }
    .texts-nav .search { flex: 1 1 100%; max-width: none; }
    .texts-nav a { border: 1px solid var(--border); padding: .35rem .7rem; gap: .5rem; }
}

/* ---------- Alleen bekijken ---------- */
.readonly-banner {
    display: flex; align-items: center; gap: .6rem;
    padding: .8rem 1rem; margin-bottom: 1.5rem;
    border-radius: 12px;
    background: var(--blue-bg); border: 1px solid rgba(110, 168, 255, .3); color: #c4dbff;
    font-size: .92rem;
}
.is-readonly .content .page-head .btn-primary,
.is-readonly .content .card-danger,
.is-readonly .content .upload-form,
.is-readonly .editor-toolbar,
.is-readonly .media-field-actions,
.is-readonly .text-field-actions .link-btn { display: none !important; }
.is-readonly .editor-area { opacity: .85; }

/* ---------- Rechten per gebruiker ---------- */
.perm-table td, .perm-table th { padding: .7rem 1rem; }
.perm-table td:not(:first-child), .perm-table th:not(:first-child) { text-align: center; width: 120px; }
.perm-table tr.is-off td:first-child { opacity: .5; }
.perm-radio { display: inline-grid; place-items: center; cursor: pointer; }
.perm-radio input { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin: 0; border: 1.5px solid rgba(128, 132, 255, .4); border-radius: 50%; background: rgba(6, 7, 26, .6); cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.perm-radio input:checked { border: 6px solid var(--primary-2); background: #fff; }
.perm-radio input[value=none]:checked { border-color: #6c70a0; }
.perm-radio input[value=view]:checked { border-color: var(--blue); }
.perm-radio input[value=edit]:checked { border-color: var(--green); }
.perm-presets { display: flex; gap: .5rem; flex-wrap: wrap; }
.perm-full { display: flex; align-items: center; gap: .6rem; padding: .85rem 1rem; border: 1px solid var(--border); border-radius: 12px; margin-bottom: 1rem; cursor: pointer; }
.perm-full:has(input:checked) { border-color: var(--primary-2); background: rgba(123, 92, 255, .1); }
.perm-full span { display: flex; flex-direction: column; }
.perm-full small { color: var(--muted); font-weight: 400; }

.section-gap { margin-top: 1.5rem; }
.perm-presets + .table-wrap { margin-top: .75rem; }
