* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
}

/* Achtergrond */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/img/background.jpg') no-repeat center center fixed;
    background-size: cover;
    filter: blur(8px) brightness(0.7);
    z-index: -1;
}

/* Header */
header, footer {
    text-align: center;
    padding: 1em;
    background-color: rgba(0, 0, 0, 0.8);
    box-shadow: 0 2px 4px rgba(255, 255, 255, 0.1);
}

.main-header {
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 1em;
    position: sticky;
    top: 0;
    z-index: 999;
    width: 100%;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.logo-container {
    position: absolute;
    left: 1em;
    top: 50%;
    transform: translateY(-50%);
}

.logo {
    height: 50px;
}

.header-title {
    font-size: 1.5rem;
    color: white;
    margin: 0;
    text-align: center;
    width: 100%;
}

/* Footer */
.main-footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: white;
    text-align: center;
    padding: 1.5em 1em;
    margin-top: auto;
}

.footer-content p {
    margin: 0;
    font-size: 0.9rem;
}

/* Main layout */
main {
    flex: 1;
    padding: 2em;
}

footer {
    margin-top: auto;
}

/* Containers */
.login-container,
main {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(4px);
    border-radius: 12px;
    padding: 2em;
    margin: 2em auto;
}

/* Login */
.login-container h2 {
    text-align: center;
    margin-bottom: 1em;
}

.login-container input[type="email"],
.login-container input[type="password"] {
    width: 100%;
    padding: 0.75em;
    margin-bottom: 1em;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #e6f3ff;
    font-size: 1em;
}

.login-container button {
    width: 100%;
    padding: 0.75em;
    background-color: #007acc;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-container button:hover {
    background-color: #005fa3;
}

/* Tabellen stijl */
.relatie-tabel {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    min-width: 700px;
}

.relatie-tabel th,
.relatie-tabel td {
    padding: 10px;
    border-bottom: 1px solid #ccc;
    word-break: break-word;
    text-align: left;
}

.relatie-tabel th {
    background-color: #007acc;
    color: white;
}

/* Knoppen */
.menu-button {
    display: inline-block;
    padding: 1em 2em;
    background-color: #007acc;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 1.1em;
    transition: background-color 0.3s ease;
    text-align: center;
}

.menu-button:hover {
    background-color: #005fa3;
}

/* voeg dit toe */
.menu-button-alert {
    background-color: #d9534f;
}

.menu-button-alert:hover {
    background-color: #c9302c;
}

.apparaten-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.terugknop-wrapper {
    text-align: right;
}

.filter-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1em;
    margin-bottom: 1em;
}

.filter-form input[type="text"] {
    padding: 0.5em;
    border: 1px solid #ccc;
    border-radius: 5px;
    min-width: 200px;
}

.pagination.centered {
    display: flex;
    justify-content: center;
    margin-top: 1.5em;
    flex-wrap: wrap;
    gap: 0.5em;
}

.page-link {
    padding: 0.4em 0.8em;
    border: 1px solid #007acc;
    border-radius: 4px;
    text-decoration: none;
    color: #007acc;
    transition: background-color 0.3s ease;
}

.page-link:hover {
    background-color: #e6f3ff;
}

.page-link.active {
    background-color: #007acc;
    color: white;
    font-weight: bold;
}


/* Responsive */
@media (max-width: 768px) {
    .header-title {
        font-size: 1.2rem;
        padding: 0 3em;
    }

    .logo {
        height: 30px;
    }

    .logo-container {
        left: 0.5em;
    }

    .login-container {
        margin: 2em 1em;
        padding: 1.5em;
    }

    .relatie-tabel th,
    .relatie-tabel td {
        font-size: 14px;
        padding: 8px;
    }

    .filter-form {
        flex-direction: column;
    }

    .filter-form input,
    .filter-form button {
        width: 100%;
    }
}

/* Popup overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9998;
}

/* Popup venster */
.popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2em;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
    max-width: 400px;
    width: 90%;
    z-index: 9999;
    text-align: center;
}

.popup p {
    margin: 0;
    color: red;
    font-weight: bold;
}
