﻿/* =========================================================
   BASIS
========================================================= */
* {
    box-sizing: border-box;
    font-family: 'Nunito', sans-serif;
}

body {
    margin: 0;
    background: #f4f6f8;
    color: #111827;
    overflow: hidden;
}

/* =========================================================
   HEADER
========================================================= */
.admin-header {
    height: 84px;
    background: #111827;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #1f2933;
    position: relative;
    z-index: 10;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 22px;
}

.logo-bronit {
    height: 50px;
    filter: invert(1);
}

.logo-divider {
    width: 1px;
    height: 32px;
    background: rgba(255,255,255,.25);
}

.logo-client {
    height: 30px;
    filter: invert(1);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 24px;
}

.top-nav a {
    color: #d1d5db;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-left: 18px;
}

    .top-nav a:hover,
    .top-nav a.active {
        color: #ffffff;
    }

.user-box {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #d1d5db;
}

/* =========================================================
   LAYOUT (ENIGE WAARHEID)
========================================================= */
#container {
    display: grid;
    grid-template-columns: 280px 1px 1fr; /* sidebar | divider | content */
    height: calc(100vh - 64px);
}

/* =========================================================
   SIDEBAR
========================================================= */
.sidebar {
    background: #ffffff;
    padding: 18px 16px;
    overflow-y: auto;
}

.layout-divider {
    background: #e5e7eb;
}

/* actieknop */
.btn-primary {
    width: 100%;
    padding: 10px 14px;
    border-radius: 6px;
    background: #111827;
    color: #ffffff;
    font-weight: 700;
    border: none;
    cursor: pointer;
    margin-bottom: 20px;
}

/* =========================================================
   MENU GROEPEN
========================================================= */
.menu-group {
    margin-bottom: 16px;
}

.menu-group-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    padding: 8px 10px;
    cursor: pointer;
    text-transform: uppercase;
}

.menu-group:not(.open) .menu-item {
    display: none;
}

.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    margin: 2px 0;
    border-radius: 6px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
}

    .menu-item:hover {
        background: #f3f4f6;
    }

    .menu-item.active {
        background: #e5e7eb;
        font-weight: 700;
    }

/* =========================================================
   CONTENT
========================================================= */
.content {
    background: #f4f6f8;
    padding: 32px 40px;
    overflow-y: auto;
}

/* =========================================================
   EDITOR STRUCTUUR
========================================================= */
.editor-card {
    width: 100%;
    background: transparent;
    border: none;
    padding: 0;
}

.doc-editor {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* =========================================================
   EDITOR SECTIES
========================================================= */
.editor-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 20px 22px;
}

    .editor-section h2 {
        margin: 0 0 16px;
        font-size: 18px;
        font-weight: 700;
    }

    /* inhoud iets begrenzen voor leesbaarheid */
    .editor-section h2,
    .editor-section .field {
        max-width: 1100px;
    }

/* =========================================================
   FORM VELDEN
========================================================= */
.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

    .field label {
        font-weight: 600;
        font-size: 14px;
        color: #374151;
    }

    .field input,
    .field textarea {
        padding: 10px 12px;
        border-radius: 6px;
        border: 1px solid #d1d5db;
        font-size: 14px;
    }

/* =========================================================
   GRID (MEDIA / PUBLICATIE)
========================================================= */
.editor-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 1400px;
}

/* =========================================================
   MINI CARDS (MEDIA / BIJLAGEN)
========================================================= */
.editor-card-mini {
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    padding: 16px;
}

    .editor-card-mini h3 {
        margin: 0 0 8px;
        font-size: 15px;
        font-weight: 700;
    }

.hint {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
}

/* =========================================================
   SECONDARY BUTTON
========================================================= */
.btn-secondary {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    font-weight: 600;
    cursor: pointer;
}

    .btn-secondary:hover {
        background: #f3f4f6;
    }

/* =========================================================
   TOGGLE (PUBLICEREN)
========================================================= */
.field-toggle {
    justify-content: flex-end;
}

.toggle {
    position: relative;
    width: 44px;
    height: 24px;
}

    .toggle input {
        display: none;
    }

    .toggle .slider {
        position: absolute;
        inset: 0;
        background: #d1d5db;
        border-radius: 20px;
        cursor: pointer;
        transition: .2s;
    }

        .toggle .slider:before {
            content: "";
            position: absolute;
            width: 18px;
            height: 18px;
            background: #ffffff;
            border-radius: 50%;
            top: 3px;
            left: 3px;
            transition: .2s;
        }

    .toggle input:checked + .slider {
        background: #16a34a;
    }

        .toggle input:checked + .slider:before {
            transform: translateX(20px);
        }

/* =========================================================
   BIJLAGEN
========================================================= */
.bijlage-lijst {
    margin-top: 10px;
    list-style: none;
    padding: 0;
}

    .bijlage-lijst li {
        font-size: 13px;
        padding: 6px 0;
        display: flex;
        justify-content: space-between;
    }

/* =========================================================
   ACTIONS
========================================================= */
.editor-actions {
    margin-top: 24px;
}


/* ================= MENU ANIMATIE ================= */

/* pijltje */
.menu-group-title i {
    transition: transform 0.25s ease;
    font-size: 12px;
}

.menu-group.open .menu-group-title i {
    transform: rotate(180deg);
}

/* ================= UITKLAP CONTAINER ================= */

.menu-group-items {
    display: grid;
    grid-template-rows: 0fr;
    /*transition: grid-template-rows 0.4s cubic-bezier(.4,0,.2,1);*/
}

/* open */
.menu-group.open .menu-group-items {
    grid-template-rows: 1fr;
}

/* ================= INNER (CLIPT INHOUD) ================= */

.menu-group-inner {
    overflow: hidden; /* 🔥 dit fixeert jouw probleem */
    display: flex;
    flex-direction: column;
}

/* menu items zelf NIET animeren */
.menu-item {
    margin: 2px 0;
}

.login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 25, 0.75);
    backdrop-filter: blur(6px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.login-box-large {
    width: 520px;
    background: #ffffff;
    border-radius: 18px;
    padding: 50px 60px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.35);
    text-align: center;
}

.login-top {
    margin-bottom: 25px;
}

.login-bronit {
    height: 40px;
    opacity: 0.8;
}

.login-client {
    margin-bottom: 30px;
}

.login-client-logo {
    max-height: 90px;
    margin-bottom: 15px;
}

.login-client h2 {
    margin: 5px 0;
    font-size: 22px;
    font-weight: 700;
    color: #222;
}

.login-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 10px;
}

.login-form {
    margin-top: 20px;
}

.login-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
    font-size: 15px;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: #3c1d59;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: 0.2s ease;
}

    .login-btn:hover {
        opacity: 0.9;
    }

.login-error {
    display: block;
    margin-top: 12px;
    color: #d60000;
}

.logout-link {
    margin-left: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

    .logout-link:hover {
        opacity: 0.8;
    }

.home-link {
    margin-right: 15px;
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
}

    .home-link:hover {
        opacity: 0.8;
    }

/* ===== OVERZICHT ===== */
/* GRID STRUCTUUR */

.doc-grid {
    width: 100%;
    font-size: 14px;
}

.doc-header,
.doc-search-row,
.doc-row {
    display: grid;
    grid-template-columns: 160px 1fr 160px 120px;
    align-items: center;
}

.doc-header {
    font-weight: 600;
    padding: 12px 10px;
    border-bottom: 2px solid #ddd;
    background: #f5f5f5;
}

.doc-search-row {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    background: #fafafa;
}

.doc-row {
    padding: 10px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.doc-row {
    background: #ffffff;
    transition: background 0.15s ease;
}

    .doc-row:hover {
        background: #eef2f7; /* iets donkerder dan #f8fafc */
    }

/* ZOEK INPUT */

.search-input {
    width: 95%;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* ACTIE KNOPPEN */

.doc-actions {
    display: flex;
    gap: 6px;
}

.btn-square {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    text-decoration: none;
    color: #444;
    transition: 0.2s;
}

    .btn-square:hover {
        background: #f0f0f0;
        border-color: #999;
    }

.btn-preview:hover {
    color: #444;
}

.btn-edit:hover {
    color: #2c7be5;
}

.btn-delete:hover {
    color: #dc3545;
}

/* TOGGLE SWITCH */

.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    inset: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

    .slider:before {
        content: "";
        position: absolute;
        height: 18px;
        width: 18px;
        left: 3px;
        top: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

.switch input:checked + .slider {
    background-color: #28a745;
}

    .switch input:checked + .slider:before {
        transform: translateX(22px);
    }


.doc-highlight {
    animation: highlightFade 2.5s ease forwards;
    background-color: #fff9c4;
}

@keyframes highlightFade {
    0% {
        background-color: #fff176;
    }

    50% {
        background-color: #fff9c4;
    }

    100% {
        background-color: transparent;
    }
}


.doc-toolbar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.doc-toolbar2 {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 15px;
}

.btn-primary {
    background: #2563eb;
    color: white;
    padding: 8px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    transition: background 0.2s ease;
}

    .btn-primary:hover {
        background: #1e4fd1;
    }


.field-hidden {
    display: none;
}


