/* =====================================================
   RESET & BASIS
===================================================== */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    background: #f6f9fc;
    color: #1a1a1a;
}

/* =====================================================
   HEADER
===================================================== */

.header {
    background: #ffffff;
    padding: 20px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid #1c5fa8;
}

.header h1 {
    margin: 0;
    font-size: 24px;
    color: #1c5fa8;
}

.header-actions a {
    margin-left: 10px;
}

/* =====================================================
   CONTAINER
===================================================== */

.container {
    padding: 30px;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn-primary,
.btn-secondary,
.btn-outline {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.btn-primary {
    background: #1c5fa8;
    color: #fff;
}

.btn-primary:hover {
    background: #174e87;
}

.btn-secondary {
    background: #e2e8f0;
    color: #333;
}

.btn-secondary:hover {
    background: #cfd8e3;
}

.btn-outline {
    background: #fff;
    border: 1px solid #1c5fa8;
    color: #1c5fa8;
}

/* =====================================================
   TABLE (index / export)
===================================================== */

.table-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
}

.modern-table th {
    background: #f1f5fa;
    text-align: left;
    padding: 12px;
    color: #1c5fa8;
    border-bottom: 2px solid #d3dcea;
}

.modern-table td {
    padding: 12px;
    border-bottom: 1px solid #e8eef5;
}

/* =====================================================
   MODAL
===================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-box {
    background: #fff;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    background: #1c5fa8;
    color: #fff;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 18px;
}

.modal-close {
    background: none;
    border: none;
    font-size: 22px;
    color: #fff;
    cursor: pointer;
}

.modal-content {
    padding: 24px;
}

/* =====================================================
   FORMULIEREN (ADD & EDIT – DEFINITIEF)
===================================================== */

.form-grid {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-row {
    display: grid;
    grid-template-columns: 180px 1fr;
    align-items: center;
    gap: 16px;
}

.form-row label {
    font-weight: 600;
    font-size: 14px;
    text-align: right;
    white-space: nowrap;
}

.form-row input,
.form-row select {
    width: 100%;
    height: 42px;
    padding: 0 12px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cfd8e3;
    background: #fff;
}

.form-row input:focus,
.form-row select:focus {
    outline: none;
    border-color: #1c5fa8;
    box-shadow: 0 0 0 2px rgba(28,95,168,0.15);
}

/* Buttons onder formulier */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    margin-left: 196px; /* 180 + 16 */
}

/* =====================================================
   STATUS BADGES
===================================================== */

.badge {
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
}

.badge.actief-lid {
    background: #d9f7d9;
    color: #107d10;
}

.badge.oud-lid {
    background: #f7e5d9;
    color: #9f4d00;
}

.badge.ere-lid {
    background: #e3e3ff;
    color: #3b3bb3;
}

/* =====================================================
   ERROR
===================================================== */

.error-box {
    background: #ffe2e2;
    color: #b00000;
    padding: 10px 14px;
    border-radius: 6px;
    margin-bottom: 15px;
}

/* =====================================================
   MOBILE
===================================================== */

@media (max-width: 700px) {

    .form-grid {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .form-row label {
        text-align: left;
    }

    .modal-buttons {
        margin-left: 0;
    }

    .modal-box {
        width: 95%;
    }
}
/* ===========================
   PASSWORD UX
=========================== */

.password-wrap {
    position: relative;
    width: 100%;
}

.password-wrap input {
    width: 100%;
    padding-right: 40px;
}

.toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

input.password-error-border {
    border-color: #d00000 !important;
}

.password-error {
    color: #d00000;
    font-size: 13px;
}

/* Strength bar */
.password-strength {
    width: 100%;
}

#strength-bar {
    height: 8px;
    border-radius: 4px;
    background: #ddd;
    margin-bottom: 4px;
    transition: width .2s, background .2s;
}

.strength-weak {
    width: 33%;
    background: #d00000;
}

.strength-medium {
    width: 66%;
    background: #f0a500;
}

.strength-strong {
    width: 100%;
    background: #1fa750;
}
/* ===========================
   LOGIN
=========================== */

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f6f9fc;
}

.login-card {
    background: white;
    width: 100%;
    max-width: 380px;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.login-card h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #1c5fa8;
}
/* ===========================
   TOOLBAR (EXPORT / FILTER)
=========================== */

.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

/* ===========================
   EXPORT BUTTONS
=========================== */

.export-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.export-buttons a {
    padding: 10px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    background: #ffffff;
    border: 1px solid #1c5fa8;
    color: #1c5fa8;
    transition: all 0.2s ease-in-out;
}

.export-buttons a:hover {
    background: #e9f2ff;
}

/* ===========================
   FILTER FORM (export.php)
=========================== */

.toolbar form {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.toolbar fieldset {
    border: none;
    padding: 0;
    margin: 0;
}

.toolbar label {
    font-size: 14px;
    margin-right: 10px;
    cursor: pointer;
}

.toolbar input[type="checkbox"] {
    margin-right: 4px;
}
