/* ===== Beheerdashboard ===== */
.admin { background: var(--bg-soft); }
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }

.admin-side {
    background: var(--navy-900); color: #b9cbdd; padding: 1.4rem 1rem; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
}
.admin-brand { margin: .3rem .5rem 1.6rem; }
.admin-brand img { height: 30px; background: #fff; padding: 7px 11px; border-radius: 9px; }
.admin-nav { display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.admin-nav a {
    display: flex; align-items: center; gap: .7rem; padding: .7rem .8rem; border-radius: 10px;
    color: #b9cbdd; font-weight: 600; font-size: .93rem;
}
.admin-nav a svg { width: 18px; height: 18px; }
.admin-nav a:hover { background: rgba(255,255,255,.07); color: #fff; text-decoration: none; }
.admin-nav a.active { background: var(--green); color: #fff; }
.admin-nav-group { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: #64809c; font-weight: 700; margin: 1rem .8rem .3rem; }
.admin-nav-group:first-child { margin-top: 0; }
.admin-logout { margin-top: 1rem; }

/* Rechten-checkboxes */
.perm-check { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; border: 1.5px solid var(--line); border-radius: 10px; cursor: pointer; font-weight: 500; transition: .15s; }
.perm-check:hover { border-color: var(--green); background: var(--green-100); }
.perm-check input { width: 18px; height: 18px; accent-color: var(--green); }

/* Grafiekraster monitoring */
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 0; }
.chart-grid .panel { margin-bottom: 0; }
@media (max-width: 900px) { .chart-grid { grid-template-columns: 1fr; } }
.admin-logout .btn { color: #cfe0f0; border-color: rgba(255,255,255,.2); }
.admin-logout .btn:hover { background: rgba(255,255,255,.08); }

.admin-main { display: flex; flex-direction: column; }
.admin-top {
    background: #fff; border-bottom: 1px solid var(--line); padding: 1.1rem 2rem;
    display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 10;
}
.admin-top h1 { font-size: 1.4rem; margin: 0; }
.admin-user { color: var(--muted); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.admin-user svg { width: 16px; height: 16px; }
.admin-content { padding: 2rem; max-width: 1100px; width: 100%; }

/* Kaarten & stats */
.admin-cards { display: grid; grid-template-columns: repeat(4,1fr); gap: 1.2rem; margin-bottom: 2rem; }
.admin-stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.3rem; box-shadow: var(--shadow); }
.admin-stat .num { font-size: 2rem; font-weight: 800; color: var(--navy); }
.admin-stat .label { color: var(--muted); font-weight: 600; font-size: .9rem; }
.admin-stat .ic { float: right; width: 40px; height: 40px; border-radius: 11px; background: var(--green-100); color: var(--green); display: grid; place-items: center; }

.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1.5rem; }
.panel-head { padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.panel-head h2 { margin: 0; font-size: 1.15rem; }
.panel-body { padding: 1.4rem; }

/* Tabellen */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); font-size: .93rem; }
.table th { color: var(--muted); font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; }
.table tr:last-child td { border-bottom: 0; }
.table td .btn { padding: .35rem .8rem; font-size: .82rem; }

/* Status badges */
.badge { display: inline-block; padding: .2rem .6rem; border-radius: 6px; font-size: .78rem; font-weight: 700; }
.badge.is-green { background: var(--green-100); color: var(--green-600); }
.badge.is-blue  { background: var(--blue-100); color: var(--navy); }
.badge.is-amber { background: #fdf0dd; color: #b06f18; }
.badge.is-grey  { background: #eef1f4; color: #64748b; }

/* Content-editor rijen */
.editor-row { display: grid; grid-template-columns: 220px 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: start; }
.editor-row:last-child { border-bottom: 0; }
.editor-row .lbl { font-weight: 600; color: var(--navy); font-size: .92rem; }
.editor-row .lbl small { display: block; color: var(--muted); font-weight: 500; }

.form-actions { display: flex; gap: .8rem; margin-top: 1.5rem; }

/* Media grid */
.media-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(150px,1fr)); gap: 1rem; }
.media-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.media-item .m-thumb { aspect-ratio: 1; background: var(--bg-soft); display: grid; place-items: center; }
.media-item .m-thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-item .m-meta { padding: .5rem .6rem; font-size: .75rem; color: var(--muted); word-break: break-all; }
.media-item .m-meta code { user-select: all; background: var(--bg-soft); padding: .1rem .3rem; border-radius: 4px; display: block; margin-top: .3rem; }

/* Login */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--navy-900); padding: 2rem; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 2.5rem; width: 100%; max-width: 420px; }
.auth-card .brand { display: block; text-align: center; margin-bottom: 1.5rem; }
.auth-card .brand img { height: 46px; margin: 0 auto; }
.auth-card h1 { font-size: 1.5rem; text-align: center; margin-bottom: 1.5rem; }

@media (max-width: 860px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-cards { grid-template-columns: repeat(2,1fr); }
    .editor-row { grid-template-columns: 1fr; gap: .4rem; }
}
