* {
    box-sizing: border-box;
}

body {
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    color: #0f172a;
}

body {
    margin: 0;
    font-family: Arial;
    background: #f3f4f6;   /* 👈 DIT was de missing link */
}

.sidebar {
    width: 240px;
    background: #ffffff;
    color: #0f172a;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    border-right: 1px solid #e5e7eb;
}

.sidebar a {
    display: block;
    padding: 15px;
    color: white;
    text-decoration: none;
}

.header {
    margin-left: 220px;
    padding: 15px;
    background: #f4f4f4;
    display: flex;
    align-items: center;
}

.rank {
    width: 40px;
    margin-right: 10px;
}

.content {
    margin-left: 220px;
    padding: 30px;
}

/* =========================
   LOGIN PAGINA (DEFINITIEF)
========================= */

.login-body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background: #eef2f7;
}

.login-wrapper {
    display: flex;
    height: 100vh;
}

/* LINKERKANT */
.login-panel {
    width: 40%;
    background: #ffffff;
    display: flex;
    justify-content: center;
}

.login-panel-inner {
    width: 100%;
    max-width: 420px;
    padding: 80px 0;
}

.login-panel h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f172a;
}

.login-subtitle {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 36px;
    line-height: 1.6;
}

.login-logo {
    width: 220px;
    margin-bottom: 60px;
}

.login-panel h1 {
    font-size: 34px;
    margin-bottom: 10px;
    color: #111827;
}

.login-subtitle {
    color: #6b7280;
    margin-bottom: 40px;
    font-size: 15px;
}

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #374151;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    background: #ffffff;
}

.form-group input:focus {
    outline: none;
    border-color: #004682;
    box-shadow: 0 0 0 2px rgba(0,70,130,0.12);
}

.form-options {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    font-size: 14px;
    color: #4b5563;
}

.form-options input {
    margin-right: 8px;
}

.login-button {
    width: 100%;
    padding: 14px 16px;
    background: #004682;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    margin-top: 10px;
}

.login-button:hover {
    background: #00365f;
}

.login-button:active {
    transform: scale(0.98);
}

.login-error {
    background: #fee2e2;
    color: #991b1b;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 25px;
    font-size: 14px;
}

/* RECHTERKANT – VOLLEDIG BEELD */
.login-image {
    width: 60%;
    background-image: linear-gradient(
        rgba(0, 70, 130, 0.45),
        rgba(0, 70, 130, 0.45)
    ),
    url("../images/login-illustration.png");

    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .login-image {
        display: none;
    }

    .login-panel {
        width: 100%;
    }
}

.login-panel {
    width: 38%;
}

.login-image {
    width: 62%;
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    font-size: 13px;
}

.forgot-password {
    color: #004682;
    text-decoration: none;
}

.forgot-password:hover {
    text-decoration: underline;

}

.topbar {
    position: fixed;        /* 👈 dit is de kern */
    top: 0;
    left: 240px;            /* 👈 breedte van je sidebar */
    right: 0;

    height: 70px;
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    z-index: 1000;          /* 👈 zorgt dat hij boven alles blijft */

    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 30px;
}


.user-info {
    display: flex;
    align-items: center;
    gap: 2px;
}

.rank-icon {
    width: 45px;
    height: 35px;
    object-fit: contain;
}

.user-text {
    display: flex;
    flex-direction: column;
    font-size: 14px;
}

.user-text span {
    font-size: 12px;
    color: #6b7280;
}

.sidebar {
    width: 240px;
    background: #ffffff;
    color: #ffffff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
}

.sidebar-logo {
    padding: 20px 30px 12px;
}

.sidebar-logo img {
    width: 160px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #334155;
    text-decoration: none;
    font-size: 14px;
    border-radius: 6px;
    margin: 2px 12px;
}

.sidebar-menu a.active,
.sidebar-menu a:hover {
    background: #f1f5f9;
    color: #334155;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    width: 100%;
}

.sidebar-footer a {
    display: block;
    padding: 14px 30px;
    color: #ffffff;
    text-decoration: none;
}

.sidebar-section {
    margin-top: 20px;
}

.sidebar-section-title {
    display: block;
    padding: 8px 24px;
    font-size: 11px;
    font-weight: 600;
    color: #474b50;
    letter-spacing: 0.05em;
}

.sidebar-menu .icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.main {
    margin-left: 240px;
    background: #f3f4f6;
    min-height: calc(100vh - 70px);
    padding-top: 70px;
}

.dashboard-content {
    padding: 30px;
}

.dashboard-card {
    margin-bottom: 27px;
}

.logout-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
}

.logout-link:hover {
    background: #fee2e2;
    border-radius: 6px;
}

.sidebar-link {
    display: flex;              /* 👈 dit is de sleutel */
    align-items: center;

    gap: 8px;                   /* dit werkt nu wel */
    
    padding: 8px 16px;
    margin: 2px 12px;
    border-radius: 6px;

    font-size: 14px;
    font-weight: 400;
    color: #334155;
    text-decoration: none;
}

.sidebar-link:hover {
    background: #f1f5f9;
    color: #334155;            /* iets donkerder grijs */
}

.sidebar-link.active {
    background: #eef2f7;
    color: #334155;      /* 👈 grijs, niet blauw */
    font-weight: 400;
}

.sidebar-footer .sidebar-logout {
    color: #b91c1c;
}

.sidebar-logout {
    display: flex;
    align-items: center;
}

.sidebar-footer .sidebar-logout:hover {
    background: #fee2e2;
    color: #991b1b;
}
 
.logout-link {
    color: #334155;
}

.logout-link:hover {
    background: #fee2e2;
    color: #281b99;
}

.sidebar .icon {
    width: 20px;
    min-width: 20px;          /* 👈 heel belangrijk */
    height: 20px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .icon img {
    width: 18px;
    height: 18px;
    object-fit: contain;      /* 👈 voorkomt vervorming */
    display: block;
}

.sidebar-section {
    margin-top: 28px;
}

.sidebar-section-title {
    display: block;
    padding: 8px 24px 6px;

    font-size: 11px;
    font-weight: 400;          /* 👈 niet dik */
    color: #334155;            /* 👈 lichtgrijs */

    letter-spacing: 0.04em;
    text-transform: uppercase; /* mag blijven, oogt netjes */
}

.sidebar .icon svg {
    stroke: currentColor;
    opacity: 0.9;
}

/* Forceer horizontale layout voor logout */
.sidebar-footer .sidebar-logout {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.sidebar-divider {
    height: 1px;
    background: #e5e7eb;
    margin: 12px 16px;
}

.sidebar-footer-title {
    padding: 8px 24px 6px;
    margin-top: 4px;
}

.sidebar-footer {
    position: absolute;
    bottom: 16px;
    width: 100%;
}

/* Forceer horizontale layout voor footer items */
.sidebar-footer .sidebar-link {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.sidebar-footer .icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-footer .text {
    display: inline-block;
}

/* Footer links standaard (Instellingen) */
.sidebar-footer .sidebar-link {
    color: #334155;
}

/* Logout altijd rood houden (overschrijft footer default) */
.sidebar-footer .sidebar-link.sidebar-logout {
    color: #b91c1c;
}

.sidebar-menu a {
    padding: 6px 16px !important;
}

.sidebar-footer a {
    padding: 6px 16px !important;
}

.dashboard-banner {
    height: 220px;
    border-radius: 12px;
    margin-bottom: 24px;

    background-image: url("../images/dashboard-banner.png");
    background-size: cover;
    background-position: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto 1fr;;
    grid-template-areas:
        "opleiding vacatures"
        "opleiding onder";
    gap: 32px;
    align-items: stretch;

}

.grid-rechts {
    display: flex;
    flex-direction: column;
    gap: 20px; /* minder ruimte tussen boven en onder */
}

.grid-links {
    grid-row: 1 / span 2; /* ⭐ links over beide rijen */
}

.grid-vacatures {
    display: flex;
    flex-direction: column;
}

.grid-opleiding {
    grid-area: opleiding;
}

.grid-opleiding {
    display: flex;
    height: 605px;
}

.grid-opleiding .dashboard-card {
    flex: 1;
}

.grid-vacatures {
    grid-area: vacatures;
}

.grid-onder {
    grid-area: onder;
}

.dashboard-subgrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px; /* minder ruimte tussen de twee onderste vakken */
}

.dashboard-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 24px;   /* 👈 minder boven/onder, zelfde links/rechts */
    display: flex;
    flex-direction: column;
}

.dashboard-card h3 {
    margin: -24px -24px 12px -24px; /* 👈 minder ruimte onder */
    padding: 18px 20px 10px 20px;

    background: #004682;
    border-bottom: 1px solid #e5e7eb;

    font-size: 15px;
    font-weight: 500;
    color: #ffffff;

    border-radius: 12px 12px 0 0;
}

.dashboard-card > :not(h3) {
    overflow-y: auto;
}

.dashboard-card > *:first-child + * {
    margin-top: 0;
}

.dashboard-card .dashboard-more {
    margin-top: auto;
    padding-top: 15px;
}

.dashboard-item {
    display: block;
    padding: 10px 0;
    font-size: 14px;
    color: #334155;
    text-decoration: none;
    border-top: 1px solid #e5e7eb;
}

.dashboard-item:first-of-type {
    border-top: none;
}

.dashboard-item:hover {
    color: #004682;
}

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 520px;
    width: 90%;
    position: relative;
}

.modal-content h2 {
    margin-top: 0;
    font-size: 20px;
}

.modal-content p {
    font-size: 14px;
    line-height: 1.6;
    color: #334155;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    border: none;
    background: none;
    font-size: 22px;
    cursor: pointer;
}

.dashboard-more {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: #004682;
    text-decoration: none;
}

.dashboard-more:hover {
    text-decoration: underline;
}

.dashboard-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.item-title {
    font-size: 14px;
    color: #334155;
}

.item-date {
    font-size: 12px;
    color: #6b7280;
    white-space: nowrap;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.modal-footer {
    margin-top: 24px;
    padding-top: 12px;
    border-top: 1px solid #e5e7eb;
    font-size: 12px;
    color: #6b7280;
    text-align: right;
}

.leden-card {
    padding: 0;
}

.leden-header,
.leden-row {
    display: grid;
    grid-template-columns: 2fr 2fr 2fr 2fr 2fr;
    padding: 14px 20px;
    align-items: center;
}

.leden-header {
    font-size: 12px;
    font-weight: 500;
    background: #004682;     /* 👈 politie-blauw */
    color: #ffffff;          /* 👈 witte tekst */
    border-bottom: none;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}


.leden-row {
    font-size: 14px;
    border-bottom: 1px solid #e5e7eb;
}

.leden-row:last-child {
    border-bottom: none;
}

.leden-row:hover {
    background: #f1f5f9;
}

select,
textarea {
    width: 100%;
    padding: 14px 16px;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
    font-size: 14px;
    font-family: inherit;
    resize: none;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 24px;
}

.empty {
    font-size: 14px;
    color: #6b7280;
    padding: 10px 0;
}

.card-header-with-action {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-action-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 18px;
    font-weight: bold;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
}

.card-action-btn:hover {
    background: rgba(255,255,255,0.35);
}

/* Hover effect voor leden in herscholing popup */
#herscholing-modal .dashboard-item {
    cursor: pointer;
    transition: background-color 0.15s ease;
}

#herscholing-modal .dashboard-item:hover {
    background: #f1f5f9;      /* zelfde als sidebar hover */
}

select {
    padding-right: 40px; /* extra ruimte voor icoon */
}

select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;

    padding-right: 45px;

    background: url("../images/chevron-down.svg") no-repeat right 16px center;
    background-size: 14px;
}