/* =============================================
   Bookmarks App - Stijlen + 6 Thema's
   ============================================= */

/* --- THEMA VARIABELEN --- */

/* 1. Donker (Neon) - standaard */
[data-thema="donker"], :root {
    --bg-gradient: linear-gradient(135deg, #0a0a1a 0%, #0d1b2a 50%, #001a33 100%);
    --header-bg: rgba(0, 0, 0, 0.85);
    --tile-bg: rgba(0, 0, 0, 0.55);
    --tile-hover-bg: rgba(0, 0, 0, 0.8);
    --tile-border: rgba(0, 200, 255, 0.2);
    --tile-hover-border: rgba(0, 200, 255, 0.8);
    --glow: 0 0 18px rgba(0, 200, 255, 0.7);
    --tekst: #ffffff;
    --tekst-zacht: rgba(255,255,255,0.65);
    --accent: #00c8ff;
    --accent2: #7b2ff7;
    --badge-team: #00c8ff;
    --badge-persoonlijk: #7b2ff7;
    --modal-bg: rgba(10, 10, 30, 0.97);
    --input-bg: rgba(255,255,255,0.07);
    --input-border: rgba(255,255,255,0.2);
    --knop-bg: rgba(0, 200, 255, 0.2);
    --knop-hover: rgba(0, 200, 255, 0.4);
    --sidebar-bg: rgba(0,0,0,0.6);
    --scrollbar: #00c8ff;
    --cat-header: rgba(0,200,255,0.12);
}

/* 2. Licht Zakelijk */
[data-thema="zakelijk"] {
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #e8edf2 100%);
    --header-bg: #ffffff;
    --tile-bg: #ffffff;
    --tile-hover-bg: #f8fbff;
    --tile-border: #d0dae5;
    --tile-hover-border: #2563eb;
    --glow: 0 4px 12px rgba(37, 99, 235, 0.2);
    --tekst: #1e293b;
    --tekst-zacht: #64748b;
    --accent: #2563eb;
    --accent2: #7c3aed;
    --badge-team: #2563eb;
    --badge-persoonlijk: #7c3aed;
    --modal-bg: #ffffff;
    --input-bg: #f8fafc;
    --input-border: #cbd5e1;
    --knop-bg: #2563eb;
    --knop-hover: #1d4ed8;
    --sidebar-bg: #ffffff;
    --scrollbar: #2563eb;
    --cat-header: #eff6ff;
}

/* 3. UMCG */
[data-thema="zonsondergang"] {
    --bg-gradient: linear-gradient(135deg, #001a40 0%, #002a6b 45%, #003070 100%);
    --header-bg: rgba(0, 30, 80, 0.95);
    --tile-bg: rgba(0, 25, 65, 0.65);
    --tile-hover-bg: rgba(0, 40, 100, 0.88);
    --tile-border: rgba(220, 140, 40, 0.3);
    --tile-hover-border: rgba(220, 140, 40, 0.9);
    --glow: 0 0 18px rgba(220, 140, 40, 0.55);
    --tekst: #ffffff;
    --tekst-zacht: rgba(220, 235, 255, 0.65);
    --accent: #DC8C28;
    --accent2: #5b9bd5;
    --badge-team: #DC8C28;
    --badge-persoonlijk: #5b9bd5;
    --modal-bg: rgba(0, 20, 60, 0.97);
    --input-bg: rgba(255,255,255,0.07);
    --input-border: rgba(220,140,40,0.4);
    --knop-bg: rgba(220, 140, 40, 0.2);
    --knop-hover: rgba(220, 140, 40, 0.45);
    --sidebar-bg: rgba(0, 25, 65, 0.80);
    --scrollbar: #DC8C28;
    --cat-header: rgba(220,140,40,0.1);
}

/* UMCG drie stippen achtergrond */
html[data-thema="zonsondergang"]::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 68%),
        radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 68%),
        radial-gradient(circle, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0) 68%);
    background-size: 180px 180px, 180px 180px, 180px 180px;
    background-position:
        50% calc(50% - 160px),
        50% 50%,
        50% calc(50% + 160px);
    background-repeat: no-repeat;
}

/* 4. Bos / Natuur */
[data-thema="natuur"] {
    --bg-gradient: linear-gradient(135deg, #0a1f0e 0%, #122b14 40%, #1a3a1c 100%);
    --header-bg: rgba(10, 30, 12, 0.92);
    --tile-bg: rgba(10, 40, 15, 0.65);
    --tile-hover-bg: rgba(15, 55, 20, 0.88);
    --tile-border: rgba(80, 200, 100, 0.25);
    --tile-hover-border: rgba(100, 230, 120, 0.85);
    --glow: 0 0 18px rgba(80, 200, 100, 0.55);
    --tekst: #e8f5e9;
    --tekst-zacht: rgba(200,240,210,0.65);
    --accent: #50c864;
    --accent2: #a5d6a7;
    --badge-team: #50c864;
    --badge-persoonlijk: #81c784;
    --modal-bg: rgba(8, 25, 10, 0.97);
    --input-bg: rgba(255,255,255,0.06);
    --input-border: rgba(80,200,100,0.35);
    --knop-bg: rgba(80, 200, 100, 0.2);
    --knop-hover: rgba(80, 200, 100, 0.45);
    --sidebar-bg: rgba(10,30,12,0.75);
    --scrollbar: #50c864;
    --cat-header: rgba(80,200,100,0.1);
}

/* 5. Oceaan */
[data-thema="oceaan"] {
    --bg-gradient: linear-gradient(135deg, #001220 0%, #002a4a 40%, #004d7a 70%, #0077b6 100%);
    --header-bg: rgba(0, 18, 40, 0.9);
    --tile-bg: rgba(0, 25, 55, 0.6);
    --tile-hover-bg: rgba(0, 40, 80, 0.85);
    --tile-border: rgba(0, 180, 230, 0.25);
    --tile-hover-border: rgba(0, 220, 255, 0.85);
    --glow: 0 0 20px rgba(0, 180, 230, 0.6);
    --tekst: #e0f7ff;
    --tekst-zacht: rgba(180, 230, 255, 0.65);
    --accent: #00b4e4;
    --accent2: #0077b6;
    --badge-team: #00b4e4;
    --badge-persoonlijk: #48cae4;
    --modal-bg: rgba(0, 15, 35, 0.97);
    --input-bg: rgba(255,255,255,0.06);
    --input-border: rgba(0,180,230,0.35);
    --knop-bg: rgba(0, 180, 230, 0.2);
    --knop-hover: rgba(0, 180, 230, 0.45);
    --sidebar-bg: rgba(0,18,40,0.78);
    --scrollbar: #00b4e4;
    --cat-header: rgba(0,180,230,0.1);
}

/* 6. Minimalistische Grijs */
[data-thema="minimaal"] {
    --bg-gradient: linear-gradient(135deg, #18181b 0%, #27272a 100%);
    --header-bg: #18181b;
    --tile-bg: #27272a;
    --tile-hover-bg: #3f3f46;
    --tile-border: #3f3f46;
    --tile-hover-border: #71717a;
    --glow: 0 4px 12px rgba(0,0,0,0.4);
    --tekst: #fafafa;
    --tekst-zacht: #a1a1aa;
    --accent: #e4e4e7;
    --accent2: #71717a;
    --badge-team: #e4e4e7;
    --badge-persoonlijk: #71717a;
    --modal-bg: #18181b;
    --input-bg: #3f3f46;
    --input-border: #52525b;
    --knop-bg: #3f3f46;
    --knop-hover: #52525b;
    --sidebar-bg: #18181b;
    --scrollbar: #71717a;
    --cat-header: rgba(255,255,255,0.04);
}

/* --- RESET & BASIS --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
    font-family: 'Segoe UI', system-ui, Arial, sans-serif;
    background: var(--bg-gradient);
    min-height: 100vh;
    overflow-x: hidden;
    color: var(--tekst);
    display: flex;
    flex-direction: column;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* --- LAYOUT --- */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    padding-top: 64px;
    position: relative;
}

/* Achtergrond sidebar over volledige paginahoogte */
.app-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    bottom: 0;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--tile-border);
    z-index: 0;
    pointer-events: none;
}
.topbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 64px;
    background: var(--header-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--tile-border);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    z-index: 200;
    box-shadow: 0 2px 16px rgba(0,0,0,0.3);
    width: 100%;
    overflow: hidden;
}

.topbar-logo {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
    letter-spacing: 1px;
    white-space: nowrap;
    text-shadow: var(--glow);
    flex-shrink: 0;
    cursor: pointer;
}

.topbar-logo a { color: var(--accent); text-decoration: none; }
.topbar-logo a:hover { opacity: 0.85; }
.topbar-logo span { color: var(--tekst); font-weight: 300; }

.topbar-search {
    flex: 1;
    min-width: 160px;
    max-width: 400px;
    position: relative;
}

.topbar-search input {
    width: 100%;
    padding: 8px 36px 8px 16px;
    border-radius: 20px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--tekst);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.zoek-wis {
    display: none;
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--tekst-zacht);
    font-size: 14px;
    cursor: pointer;
    padding: 2px 4px;
    line-height: 1;
    border-radius: 50%;
    transition: color 0.15s, background 0.15s;
}

.zoek-wis.zichtbaar { display: block; }
.zoek-wis:hover { color: var(--tekst); background: var(--tile-border); }

.topbar-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent), 0.1);
}

.topbar-search input::placeholder { color: var(--tekst-zacht); }

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

/* ── Modus toggle (Werk / Vrijetijd) ── */
.modus-toggle {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    padding: 4px 2px;
    border-radius: 20px;
    transition: opacity 0.2s;
}
.modus-toggle:hover { opacity: 0.85; }

.modus-label {
    font-size: 16px;
    opacity: 0.35;
    transition: opacity 0.25s, transform 0.25s;
    line-height: 1;
}
.modus-label.actief {
    opacity: 1;
    transform: scale(1.15);
}

.toggle-track {
    width: 40px;
    height: 22px;
    border-radius: 11px;
    background: var(--input-border);
    border: 1px solid var(--tile-border);
    position: relative;
    transition: background 0.25s;
    flex-shrink: 0;
}
.toggle-track.vrijetijd {
    background: var(--accent);
    box-shadow: 0 0 8px color-mix(in srgb, var(--accent) 50%, transparent);
}
.toggle-knop {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--tekst-zacht);
    transition: transform 0.25s, background 0.25s;
}
.toggle-track.vrijetijd .toggle-knop {
    transform: translateX(18px);
    background: #fff;
}

.btn {
    padding: 8px 14px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--knop-bg);
    color: var(--tekst);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    background: var(--knop-hover);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.btn-primair {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.btn-primair:hover { opacity: 0.88; }

.btn-gevaar { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.5); }
.btn-gevaar:hover { background: rgba(239,68,68,0.4); }

.gebruiker-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 8px;
    border: 1px solid var(--tile-border);
    font-size: 13px;
    color: var(--tekst-zacht);
    cursor: pointer;
    position: relative;
}

.gebruiker-info:hover { border-color: var(--accent); }

.avatar {
    width: 30px; height: 30px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
}

/* --- SIDEBAR --- */
.sidebar {
    width: 220px;
    flex-shrink: 0;
    padding: 20px 0;
    position: sticky;
    top: 64px;
    align-self: flex-start;
    z-index: 1;
}

.sidebar-sectie { margin-bottom: 24px; }

.sidebar-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--tekst-zacht);
    padding: 0 16px 8px;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 16px;
    cursor: pointer;
    border-radius: 0;
    font-size: 14px;
    color: var(--tekst-zacht);
    transition: all 0.15s;
    text-decoration: none;
    border-left: 3px solid transparent;
}

.sidebar-item:hover, .sidebar-item.actief {
    background: var(--cat-header);
    color: var(--tekst);
    border-left-color: var(--accent);
}

.sidebar-item.actief { font-weight: 600; }

.cat-kleur {
    width: 10px; height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sidebar-toevoegen {
    margin: 8px 16px 0;
    padding: 7px 12px;
    font-size: 12px;
}

/* --- HOOFDCONTENT --- */
.hoofdcontent {
    flex: 1;
    padding: 24px;
    min-width: 0;
}

.categorie-sectie { margin-bottom: 36px; }

.categorie-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 10px 16px;
    background: var(--cat-header);
    border-radius: 10px;
    border-left: 4px solid var(--accent);
}

.categorie-header h2 {
    font-size: 16px;
    font-weight: 600;
}

.categorie-header .badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 10px;
    background: var(--knop-bg);
    color: var(--tekst-zacht);
}

/* --- TEGELS GRID --- */
.tegels-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 120px);
    gap: 16px;
    justify-content: start;
}

.tegel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--tile-bg);
    border: 1px solid var(--tile-border);
    border-radius: 14px;
    padding: 14px 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
    color: var(--tekst);
    user-select: none;
    -webkit-user-select: none;
    overflow: visible;
    width: 120px;
    height: 140px;
}

.tegel:hover {
    transform: translateY(-4px) scale(1.04);
    background: var(--tile-hover-bg);
    border-color: var(--tile-hover-border);
    box-shadow: var(--glow);
}

.tegel img {
    width: 56px;
    height: 56px;
    object-fit: contain;
    margin-bottom: 8px;
    pointer-events: none;
    border-radius: 8px;
}

.tegel span {
    font-size: 12px;
    font-weight: 500;
    line-height: 1.3;
    pointer-events: none;
    word-break: break-word;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tegel .zichtbaarheid-badge {
    position: absolute;
    top: 6px;
    right: 6px;
    font-size: 9px;
    padding: 2px 5px;
    border-radius: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-team { background: rgba(0,200,255,0.2); color: var(--badge-team); }
.badge-persoonlijk { background: rgba(123,47,247,0.2); color: var(--badge-persoonlijk); }
.badge-geselecteerd { background: rgba(255,165,0,0.2); color: #ffa500; }

.tegel.dragging { opacity: 0.75; transform: scale(1.08); box-shadow: var(--glow); z-index: 50; }
.tegel.drag-over { border: 2px dashed var(--accent); background: var(--cat-header); }

.tegel .bewerkknop {
    display: none;
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0,0,0,0.6);
    border: none;
    color: var(--tekst-zacht);
    border-radius: 6px;
    width: 22px; height: 22px;
    font-size: 11px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.tegel:hover .bewerkknop { display: flex; }

/* --- MODALS --- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    z-index: 500;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    padding: 20px;
}

.modal-overlay.actief { display: flex; }

.modal {
    background: var(--modal-bg);
    border: 1px solid var(--tile-border);
    border-radius: 16px;
    padding: 28px;
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.modal h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--accent);
}

.form-groep {
    margin-bottom: 16px;
}

.form-groep label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--tekst-zacht);
}

.form-groep input,
.form-groep select,
.form-groep textarea {
    width: 100%;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--input-border);
    background: var(--input-bg);
    color: var(--tekst);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-groep input:focus,
.form-groep select:focus,
.form-groep textarea:focus {
    border-color: var(--accent);
}

.form-groep select option { background: #1a1a2e; color: #fff; }
[data-thema="zakelijk"] .form-groep select option { background: #fff; color: #1e293b; }
[data-thema="minimaal"] .form-groep select option { background: #27272a; color: #fafafa; }

.afbeelding-preview {
    display: none;
    margin-top: 8px;
    align-items: center;
    gap: 10px;
}

.afbeelding-preview img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    border: 1px solid var(--tile-border);
}

.afbeelding-preview.zichtbaar { display: flex; }

.toegang-gebruikers {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--input-border);
    border-radius: 8px;
    background: var(--input-bg);
}

.toegang-gebruikers.zichtbaar { display: flex; }

.toegang-gebruikers label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--tekst);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    background: var(--knop-bg);
}

.modal-knoppen {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 24px;
}

/* --- CONTEXTMENU --- */
.contextmenu {
    display: none;
    position: fixed;
    background: var(--modal-bg);
    border: 1px solid var(--tile-border);
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    z-index: 600;
    min-width: 160px;
    overflow: hidden;
}

.contextmenu.zichtbaar { display: block; }

.contextmenu ul { list-style: none; }

.contextmenu li {
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.15s;
}

.contextmenu li:hover { background: var(--cat-header); color: var(--accent); }
.contextmenu li.gevaar:hover { background: rgba(239,68,68,0.15); color: #ef4444; }
.contextmenu hr { border: none; border-top: 1px solid var(--tile-border); margin: 4px 0; }

/* --- LOGIN PAGINA --- */
.login-wrapper {
    min-height: 100vh;
    background: var(--bg-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-box {
    background: var(--modal-bg);
    border: 1px solid var(--tile-border);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.login-box h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    text-align: center;
    margin-bottom: 8px;
    text-shadow: var(--glow);
}

.login-box p {
    text-align: center;
    color: var(--tekst-zacht);
    font-size: 14px;
    margin-bottom: 28px;
}

.foutmelding {
    background: rgba(239,68,68,0.15);
    border: 1px solid rgba(239,68,68,0.4);
    color: #ef4444;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

.succesbericht {
    background: rgba(34,197,94,0.15);
    border: 1px solid rgba(34,197,94,0.4);
    color: #22c55e;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 16px;
}

/* --- THEMA KIEZER --- */
.thema-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 8px;
}

.thema-optie {
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.thema-optie:hover, .thema-optie.actief { border-color: var(--accent); }

.thema-preview {
    height: 50px;
    border-radius: 8px 8px 0 0;
}

.thema-naam {
    text-align: center;
    font-size: 11px;
    padding: 5px;
    background: var(--input-bg);
    color: var(--tekst-zacht);
}

/* --- LEGE STAAT --- */
.leeg-staat {
    text-align: center;
    padding: 60px 20px;
    color: var(--tekst-zacht);
}

.leeg-staat .icoon { font-size: 48px; margin-bottom: 12px; }
.leeg-staat h3 { font-size: 18px; margin-bottom: 8px; color: var(--tekst); }
.leeg-staat p { font-size: 14px; margin-bottom: 20px; }

/* --- TOAST NOTIFICATIES --- */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.toast.succes { background: rgba(34,197,94,0.9); color: #fff; }
.toast.fout { background: rgba(239,68,68,0.9); color: #fff; }
.toast.info { background: rgba(59,130,246,0.9); color: #fff; }

/* Persistente team-notificatie toast */
.toast-notificatie {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    background: rgba(22, 163, 74, 0.95);
    border: 1px solid rgba(34,197,94,0.5);
    color: #fff;
    max-width: 320px;
    animation: slideIn 0.3s ease;
    backdrop-filter: blur(8px);
}
.toast-notificatie-tekst { flex: 1; line-height: 1.4; }
.toast-notificatie-sluiten {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 16px;
    padding: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: color 0.15s;
}
.toast-notificatie-sluiten:hover { color: #fff; }

@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) and (pointer: coarse) {
    .sidebar { display: none; }
    .app-wrapper::before { display: none; }
    .topbar-logo span { display: none; }
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar-acties .btn { display: none; }
    .topbar-acties .gebruiker-info span { display: none; }
    .topbar-acties .gebruiker-info { display: none; }

    /* Verberg knoppen gebruikersmodal op mobiel — beschikbaar via rechtsklik/beheer */
    .modal-gebruiker-hr,
    .modal-gebruiker-knoppen { display: none; }

    /* Thema grid: 2 kolommen i.p.v. 3 */
    .thema-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .thema-preview { height: 44px; }
    .thema-naam { font-size: 10px; padding: 4px; }

    /* Backup rijen compacter */
    .backup-rij { font-size: 12px; gap: 8px; }
    .backup-type { min-width: 80px; }

    /* Stat gauges iets kleiner */
    .stat-ring { width: 48px; height: 48px; }
    .stat-pct  { font-size: 13px; }
    .stat-sub  { font-size: 9px; }
    .stat-kaart { padding: 8px 4px 6px; }

    .hoofdcontent { padding: 12px 8px; padding-bottom: 90px; }

    .tegels-grid {
        grid-template-columns: repeat(auto-fill, 104px);
        gap: 8px;
        justify-content: center;
    }

    .tegel {
        width: 104px;
        height: 122px;
        padding: 10px 6px;
        border-radius: 12px;
    }

    .tegel-wrapper {
        width: 104px;
        height: 122px;
        border-radius: 12px;
    }

    .tegel img { width: 44px; height: 44px; margin-bottom: 6px; }
    .tegel span { font-size: 11px; }
    .tegel:hover { transform: none; }
    .hoofdcontent { padding: 12px; padding-bottom: 90px; }

    /* ── Bottom navigation bar ── */
    .mobile-bottom-bar {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        height: 64px;
        background: var(--modal-bg);
        border-top: 1px solid var(--tile-border);
        backdrop-filter: blur(16px);
        z-index: 500;
        align-items: stretch;
    }

    .mobile-nav-knop {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        background: none;
        border: none;
        color: var(--tekst-zacht);
        font-size: 10px;
        font-weight: 600;
        letter-spacing: 0.5px;
        cursor: pointer;
        transition: color 0.15s;
        padding: 8px 4px;
    }

    .mobile-nav-knop .nav-icoon {
        font-size: 20px;
        line-height: 1;
    }

    .mobile-nav-knop:hover,
    .mobile-nav-knop.actief { color: var(--accent); }

    /* ── Overlay achtergrond ── */
    .mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 510;
        backdrop-filter: blur(2px);
    }

    .mobile-overlay.open { display: block; }

    /* ── Categorie drawer → nu ook slide-up ── */
    .mobile-cat-drawer {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        background: var(--modal-bg);
        border-top: 1px solid var(--tile-border);
        border-radius: 20px 20px 0 0;
        z-index: 520;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        overflow-y: auto;
        padding: 0 0 80px;
        max-height: 80vh;
    }

    .mobile-cat-drawer.open { transform: translateY(0); }

    .mobile-drawer-titel {
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--accent);
        padding: 0 20px 12px;
        border-bottom: 1px solid var(--tile-border);
        margin-bottom: 8px;
    }

    .mobile-cat-drawer .sidebar-item {
        padding: 14px 20px;
        font-size: 15px;
        border-left: none;
        border-radius: 0;
    }

    .mobile-cat-drawer .sidebar-item:hover,
    .mobile-cat-drawer .sidebar-item.actief {
        border-left: none;
        background: var(--cat-header);
    }

    .mobile-cat-drawer .sidebar-label { padding: 16px 20px 8px; }
    .mobile-cat-drawer .sidebar-toevoegen { margin: 8px 20px 0; }

    /* ── Slide-up panelen (filters & beheer) ── */
    .mobile-panel {
        position: fixed;
        left: 0; right: 0; bottom: 0;
        background: var(--modal-bg);
        border-top: 1px solid var(--tile-border);
        border-radius: 20px 20px 0 0;
        z-index: 520;
        transform: translateY(100%);
        transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
        padding: 0 0 80px;
        max-height: 70vh;
        overflow-y: auto;
    }

    .mobile-panel.open { transform: translateY(0); }

    .mobile-panel-greep {
        width: 40px; height: 4px;
        background: var(--tile-border);
        border-radius: 2px;
        margin: 12px auto 16px;
    }

    .mobile-panel-titel {
        font-size: 13px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 1px;
        color: var(--accent);
        padding: 0 20px 12px;
        border-bottom: 1px solid var(--tile-border);
        margin-bottom: 8px;
    }

    .mobile-panel .sidebar-item {
        padding: 14px 20px;
        font-size: 15px;
        border-left: none;
        border-radius: 0;
    }

    .mobile-panel .sidebar-item:hover,
    .mobile-panel .sidebar-item.actief {
        border-left: none;
        background: var(--cat-header);
    }

    .mobile-panel-knop-plus {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 14px 20px;
        font-size: 15px;
        color: var(--accent);
        cursor: pointer;
        background: none;
        border: none;
        width: 100%;
        text-align: left;
    }
}

@media (min-width: 769px), (pointer: fine) {
    .mobile-bottom-bar,
    .mobile-cat-drawer,
    .mobile-panel,
    .mobile-overlay { display: none !important; }
}

/* --- TEGEL NOTITIE INDICATOR --- */
.tegel-notitie {
    position: absolute;
    bottom: 6px;
    right: 6px;
    font-size: 10px;
    opacity: 0.6;
    pointer-events: none;
}

/* --- FAVORIET STER --- */
.ster-knop {
    position: absolute;
    bottom: 8px;
    left: 6px;
    background: none;
    border: none;
    font-size: 26px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
    padding: 0;
    line-height: 1;
    z-index: 10;
    color: var(--tekst-zacht);
    text-shadow: 0 1px 3px rgba(0,0,0,0.8);
}

.tegel-wrapper {
    position: relative;
    width: 120px;
    height: 140px;
    overflow: hidden;
    border-radius: 14px;
}

.tegel-wrapper:hover .ster-knop { opacity: 0.6; }
.ster-knop.actief { opacity: 1; color: #fbbf24; text-shadow: 0 0 6px rgba(251,191,36,0.6); }
/* ── Snelfilter knoppen ── */
.snelfilter-balk {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    position: relative;
}

.snelfilter-knop {
    padding: 5px 14px;
    border-radius: 20px;
    border: 1px solid var(--tile-border);
    background: var(--input-bg);
    color: var(--tekst-zacht);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    user-select: none;
}

.snelfilter-knop:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb, 0,200,255), 0.08);
}

.snelfilter-knop.actief {
    background: var(--accent);
    border-color: var(--accent);
    color: #000;
    font-weight: 600;
    box-shadow: 0 0 10px rgba(var(--accent-rgb, 0,200,255), 0.4);
}

.snelfilter-nieuw {
    padding: 4px 10px;
    font-size: 16px;
    font-weight: 300;
    opacity: 0.5;
}

.snelfilter-nieuw:hover { opacity: 1; }

/* Uitklap-knop — alleen zichtbaar op smal scherm */
.snelfilter-uitklap {
    display: none;
    padding: 5px 10px;
    border-radius: 20px;
    border: 1px solid var(--tile-border);
    background: var(--input-bg);
    color: var(--tekst-zacht);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s;
    flex-shrink: 0;
}

.snelfilter-uitklap:hover,
.snelfilter-uitklap.actief { border-color: var(--accent); color: var(--accent); }

/* Uitgevouwen dropdown op smal scherm */
.snelfilter-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    background: var(--modal-bg);
    border: 1px solid var(--tile-border);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    padding: 8px;
    gap: 6px;
    flex-direction: column;
    z-index: 300;
    min-width: 160px;
}

.snelfilter-dropdown.open { display: flex; }

.snelfilter-dropdown .snelfilter-knop {
    border-radius: 8px;
    text-align: left;
    width: 100%;
}

@media (max-width: 1100px) and (pointer: coarse) {
    /* Verberg individuele knoppen en + op smal scherm */
    .snelfilter-balk .snelfilter-knop,
    .snelfilter-balk .snelfilter-nieuw {
        display: none;
    }
    /* Toon uitklapknop */
    .snelfilter-uitklap { display: block; }
    /* Knoppen in dropdown altijd zichtbaar */
    .snelfilter-dropdown .snelfilter-knop,
    .snelfilter-dropdown .snelfilter-nieuw { display: block; }
}