/* =====================================================
   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;
}
/* ===========================
   ACTIEKNOPPEN (EDIT / DELETE)
=========================== */

.btn-small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    transition: all .2s ease;
    line-height: 1;
}

/* Bewerken */
.btn-small.edit {
    background: #e9f2ff;
    color: #1c5fa8;
    border: 1px solid #c7dcff;
}

.btn-small.edit:hover {
    background: #dbeaff;
    color: #174e87;
}

/* Verwijderen */
.btn-small.danger {
    background: #ffecec;
    color: #b00000;
    border: 1px solid #f5b5b5;
}

.btn-small.danger:hover {
    background: #ffd6d6;
    color: #8a0000;
}

/* Ruimte tussen knoppen */
.btn-small + .btn-small {
    margin-left: 6px;
}
/* ===========================
   LOGOUT KNOP (POWER ICON)
=========================== */

.btn-logout {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    background: #f1f5fa;
    color: #444;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border: 1px solid #d3dcea;
    cursor: pointer;
    transition: all .2s ease;
}

/* Power-icoon */
.btn-logout .power-icon {
    font-size: 18px;
    line-height: 1;
    color: #c0392b;
}

/* Hover */
.btn-logout:hover {
    background: #ffecec;
    border-color: #f5b5b5;
    color: #8a0000;
}

.btn-logout:hover .power-icon {
    color: #8a0000;
}

/* Actieve klik */
.btn-logout:active {
    transform: scale(0.97);
}


/* =====================================================
   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;
}
/* ===========================
   TABEL RIJ HOVER
=========================== */

.modern-table tbody tr {
    transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.modern-table tbody tr:hover {
    background-color: #f5f9ff; /* licht blauw */
}

.modern-table tbody tr:hover td {
    background-color: #f5f9ff;
}

/* Extra focus op actieknoppen bij hover */
.modern-table tbody tr:hover .btn-small {
    box-shadow: 0 2px 6px rgba(28, 95, 168, 0.15);
}

/* =====================================================
   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;
}
/* ===========================
   ZOEKFORMULIER
=========================== */

.search-form {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    padding: 12px 14px;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

.search-form .input {
    width: 280px;
    padding: 10px 14px;
    font-size: 14px;
    border-radius: 6px;
    border: 1px solid #cfd8e3;
    background: #f9fbfd;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.search-form .input:focus {
    outline: none;
    border-color: #1c5fa8;
    box-shadow: 0 0 0 2px rgba(28,95,168,0.15);
    background: #fff;
}

/* Knoppen in zoekbalk zelfde hoogte */
.search-form .btn-primary,
.search-form .btn-secondary {
    padding: 10px 16px;
    font-size: 14px;
    border-radius: 6px;
    white-space: nowrap;
}

/* Reset knop iets neutraler */
.search-form .btn-secondary {
    background: #eef3f8;
    color: #333;
}

.search-form .btn-secondary:hover {
    background: #dde6f1;
}

/* Mobiel */
@media (max-width: 700px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-form .input {
        width: 100%;
    }
}
/* Ruimte tussen zoekveld en tabel */
.search-form {
    margin-bottom: 24px;
}
/* ===========================
   TABEL WATERMERK (POONA LOGO)
=========================== */

.table-card {
    position: relative;
    background-color: #ffffff;
    overflow: hidden;
}

/* Watermerklaag */
.table-card::before {
    content: "";
    position: fixed; /* blijft staan bij scrollen */
    top: 50%;
    left: 50%;
    width: 420px;
    height: 420px;
    background-image: url("assets/poona-logo.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    opacity: 0.08; /* subtiel watermerk */
    transform: translate(-50%, -50%);
    pointer-events: none; /* klikbaar blijft */
    z-index: 0;
    width: 600px;
    height: 600px;
}

/* Zorg dat tabel boven watermerk ligt */
.table-card > * {
    position: relative;
    z-index: 1;
}
/* ===========================
   HEADER LOGO + TITEL
=========================== */

.header-brand {
    display: flex;
    align-items: center;
    gap: 18px;
}

.header-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    flex-shrink: 0;
}

.header-text h1 {
    margin-bottom: 6px;
}
