* { box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; margin: 0; padding: 0; }
body { background-color: #121212; color: #ffffff; display: flex; height: 100vh; overflow: hidden; }

/* Login Pagina Styling */
body.login-page { justify-content: center; align-items: center; padding: 20px; }
.login-container { background-color: #1e1e1e; padding: 40px 30px; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,0.7); width: 100%; max-width: 400px; text-align: center; }
.login-container h1 { margin-bottom: 10px; font-size: 28px; font-weight: 700; letter-spacing: 1px; color: #f39c12; }
.login-container p { color: #888; margin-bottom: 30px; font-size: 14px; }
#errorMessage { color: #ff4d4d; font-size: 14px; margin-top: 15px; display: none; }

/* Mobiele Topbar */
.mobile-header { 
    display: none; 
    background-color: #1e1e1e; 
    padding: 0 20px; 
    border-bottom: 1px solid #333; 
    align-items: center; 
    justify-content: space-between;
    width: 100%; 
    position: fixed; 
    top: 0; 
    left: 0; 
    z-index: 100; 
    height: 60px; 
}

.mobile-header h2 { 
    color: #f39c12; 
    font-size: 18px; 
    letter-spacing: 1px; 
    font-weight: bold;
}

.menu-toggle, #menuToggle { 
    position: absolute !important;
    right: 20px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    background: none !important; 
    border: none !important; 
    color: #f39c12 !important; 
    font-size: 28px !important; 
    cursor: pointer !important; 
    padding: 5px !important;
    line-height: 1 !important;
    width: auto !important;
    margin: 0 !important;
}

/* Zijbalk Menu */
.sidebar { width: 260px; background-color: #1e1e1e; padding: 25px 20px; display: flex; flex-direction: column; border-right: 1px solid #333; transition: transform 0.3s ease; z-index: 99; flex-shrink: 0; }
.sidebar h2 { color: #f39c12; font-size: 22px; margin-bottom: 35px; letter-spacing: 1px; text-transform: uppercase; }
.sidebar a { display: block; color: #b3b3b3; text-decoration: none; padding: 12px 16px; margin-bottom: 8px; border-radius: 6px; font-weight: 500; transition: all 0.2s ease; border-left: 3px solid transparent; }
.sidebar a:hover { background-color: #2a2a2a; color: #fff; }
.sidebar a.active { background-color: rgba(243, 156, 18, 0.15); color: #f39c12; border-left-color: #f39c12; font-weight: bold; }

/* Uitlogknop */
.sidebar .logout-btn { margin-top: auto; border: 1px solid #ff4d4d; color: #ff4d4d; padding: 12px; border-radius: 6px; cursor: pointer; text-align: center; transition: 0.3s; font-weight: bold; }
.sidebar .logout-btn:hover { background-color: #ff4d4d; color: #121212; }

/* Hoofdcontent */
.main-content { flex: 1; padding: 40px; overflow-y: auto; width: 100%; }
h1 { margin-bottom: 25px; font-weight: 300; font-size: 28px; }

/* Responsive Grid Layouts */
.grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 25px; align-items: start; }
.cards-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.card { background-color: #1e1e1e; padding: 25px; border-radius: 8px; border: 1px solid #333; width: 100%; overflow: hidden; }
.card h2, .card h3 { font-size: 16px; margin-bottom: 15px; color: #f39c12; text-transform: uppercase; letter-spacing: 0.5px; }

/* Formulieren & Input velden */
.input-group { margin-bottom: 15px; text-align: left; }
.input-group label { display: block; margin-bottom: 6px; font-size: 11px; color: #aaa; text-transform: uppercase; }
.input-group input, .input-group select { width: 100%; padding: 12px; background: #2a2a2a; border: 1px solid #333; color: white; border-radius: 6px; outline: none; font-size: 14px; }
button { width: 100%; padding: 14px; background-color: #f39c12; border: none; font-weight: bold; cursor: pointer; border-radius: 6px; color: #121212; transition: 0.3s; font-size: 14px; }
button:hover { background-color: #d68910; }

/* Tabellen responsiviteit */
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 14px; }
th, td { padding: 12px 10px; border-bottom: 1px solid #333; word-break: break-word; }
th { color: #888; font-size: 11px; text-transform: uppercase; }

.status-tag { background-color: #27ae60; color: white; padding: 4px 8px; border-radius: 4px; font-size: 12px; display: inline-block; }
.role-badge { background-color: #333; color: #f39c12; padding: 4px 8px; border-radius: 4px; font-size: 12px; border: 1px solid #f39c12; display: inline-block; }
.role-admin { background-color: #f39c12; color: #121212; font-weight: bold; }

/* Breakpoints (Tablets & Mobiel) */
@media (max-width: 900px) {
    .grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    body { flex-direction: column; overflow-y: auto; }
    .mobile-header { display: flex; }
    .sidebar { position: fixed; top: 60px; left: -100%; width: 260px; height: calc(100vh - 60px); background-color: #1e1e1e; padding-top: 15px; }
    .sidebar h2 { display: none; } /* Verbergt de dubbele titel in het mobiele uitklapmenu */
    .sidebar.open { left: 0; }
    .main-content { padding: 80px 15px 30px 15px; }
    
    .card { padding: 18px; }
    table { min-width: 500px; }
    .card:has(table) { overflow-x: auto; }
}

/* Landscape Mode (Mobiel liggend) */
@media (max-height: 500px) and (orientation: landscape) {
    .sidebar { top: 50px; height: calc(100vh - 50px); overflow-y: auto; }
    .mobile-header { height: 50px; }
    .main-content { padding-top: 65px; }
}