/* ============================================================
   Mulish — het lettertype van computrain.nl
   Open Font License, zelf gehost.

   Zelf hosten in plaats van via fonts.gstatic.com laden: dan gaat het
   IP-adres van de bezoeker niet naar Google, en blijft de CSP in fase 7
   strak zonder externe hosts.

   Variabel lettertype: één bestand per subset dekt alle gewichten van
   200 tot 1000, vandaar de reeks in font-weight.
   ============================================================ */

@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('fonts/mulish-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Mulish';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('fonts/mulish-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ============================================================
   Computrain huisstijl
   Primair rood:     #E41E2D
   Diep zwartgrijs:  #131E29
   Donkerpaars:      #3B1E63
   Warmgrijs licht:  #D2CDCD
   Warmgrijs donker: #BDB4B4
   Accentgeel:       #FFE600
   ============================================================ */

/* Algemene layout */
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #ffffff;
    color: #131E29;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.site-header {
    background: #ffffff;
    color: #131E29;
    padding: 12px 16px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    position: relative;
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.btn-beheer {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    color: #BDB4B4;
    text-decoration: none;
    border: 1px solid #BDB4B4;
    padding: 4px 10px;
    white-space: nowrap;
}

.btn-beheer:hover {
    color: #131E29;
    border-color: #131E29;
}

.logo-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo {
    height: 40px;
    width: auto;
    object-fit: contain;
}

.title-block h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #131E29;
}

.subtitle {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: #555;
}

/* Content */
.content {
    flex: 1;
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px 24px;
}

/* Kaarten / secties */
.intro-card,
.table-card,
.footer-note {
    background: #fff;
    border-radius: 0;
    padding: 10px 18px;
    margin-bottom: 16px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    border-left: 4px solid #E41E2D;
}

.intro-card h2 {
    margin-top: 0;
    color: #E41E2D;
}

.intro-card h3,
.table-card h3 {
    color: #131E29;
}

.info-text {
    font-size: 0.9rem;
    color: #555;
}

.info-text code {
    background: #D2CDCD;
    padding: 2px 4px;
    font-family: "Courier New", monospace;
}

/* Tabel met bestanden */
.table-wrapper {
    overflow-x: auto;
}

.file-table {
    width: 100%;
    border-collapse: collapse;
}

.file-table thead {
    background: #E41E2D;
}

.file-table th,
.file-table td {
    padding: 10px 8px;
    text-align: left;
    font-size: 0.95rem;
    border-bottom: 1px solid #BDB4B4;
}

.file-table th {
    font-weight: 700;
    color: #ffffff;
}

.file-table tr:hover {
    background: #D2CDCD;
}

.file-name a {
    color: #131E29;
    text-decoration: none;
    font-weight: 500;
}

.file-name a:hover {
    color: #E41E2D;
    text-decoration: underline;
}

/* Downloadknop */
.download-cell {
    text-align: right;
}

.btn-download {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.9rem;
    border-radius: 0;
    border: none;
    text-decoration: none;
    background: #E41E2D;
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-download:hover {
    background: #131E29;
    color: #ffffff;
}

/* Footer */
.site-footer {
    text-align: center;
    font-size: 0.85rem;
    color: #131E29;
    background: #BDB4B4;
    padding: 10px 16px 16px;
}

/* Responsiveness */
@media (max-width: 600px) {
    .logo-title {
        flex-direction: row;
        align-items: center;
    }

    .title-block h1 {
        font-size: 1.25rem;
    }

    .file-table th:nth-child(3),
    .file-table td:nth-child(3) {
        display: none;
    }
}

/* Eenvoudige formulierstijl voor login en upload */
.simple-form {
    max-width: 420px;
    margin-top: 12px;
}

.form-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-row label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #131E29;
}

.simple-form input[type="text"],
.simple-form input[type="password"],
.simple-form input[type="file"] {
    padding: 8px;
    border-radius: 0;
    border: 1px solid #BDB4B4;
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
}

.simple-form input[type="text"]:focus,
.simple-form input[type="password"]:focus,
.simple-form input[type="file"]:focus {
    outline: none;
    border-color: #3B1E63;
    box-shadow: 0 0 0 1px rgba(59,30,99,0.2);
}

.form-actions {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.link-secondary {
    font-size: 0.9rem;
    color: #131E29;
    text-decoration: none;
}

.link-secondary:hover {
    color: #E41E2D;
    text-decoration: underline;
}

/* Badges voor rollen in admin-scherm */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 2px;
    font-size: 0.8rem;
    font-weight: 600;
}

.badge-admin {
    background: #131E29;
    color: #fff;
}

.badge-uploader {
    background: #D2CDCD;
    color: #131E29;
}

/* Kleine knoppen in admin */
.btn-small {
    display: inline-block;
    padding: 4px 8px;
    font-size: 0.8rem;
    border-radius: 0;
    border: none;
    background: #131E29;
    color: #fff;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.btn-small:hover {
    background: #3B1E63;
}

.btn-danger {
    background: #E41E2D;
}

.btn-danger:hover {
    background: #131E29;
}

/* Categorie-accordion op de publieke downloadpagina */
.category-accordion {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.category-section {
    border: 1px solid #BDB4B4;
    border-radius: 0;
    overflow: hidden;
    background: #fff;
}

.category-header {
    width: 100%;
    padding: 10px 12px;
    border: none;
    background: #131E29;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    font-size: 0.95rem;
}

.category-header:hover {
    background: #3B1E63;
}

.category-title {
    font-weight: 700;
    color: #ffffff;
}

.category-count {
    font-size: 0.85rem;
    color: #D2CDCD;
    margin-right: 8px;
}

.category-toggle-indicator {
    font-weight: 700;
    font-size: 1.1rem;
    width: 18px;
    text-align: center;
    color: #ffffff;
}

/* Accordion: grid-truc voor vloeiende animatie zonder layout-reflow */
.category-body {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.25s ease;
    overflow: hidden;
}

.category-body > .table-wrapper {
    overflow: hidden;
    min-height: 0;
}

.category-section.open .category-body {
    grid-template-rows: 1fr;
}

/* Open accordion-header krijgt rode accentkleur */
.category-section.open .category-header {
    background: #E41E2D;
}

.category-section.open .category-header:hover {
    background: #131E29;
}

/* ----------------------------------------------------------- */
/*  VASTE BREEDTES voor ALLE tabellen in de accordion          */
/* ----------------------------------------------------------- */

.category-accordion table.file-table {
    table-layout: fixed !important;
    width: 100%;
}

/* Kolom 1 = bestandsnaam → breedste */
.category-accordion table.file-table th:nth-child(1),
.category-accordion table.file-table td:nth-child(1) {
    width: 100%;
    overflow-wrap: anywhere;
}

/* Kolom 2 = Grootte → vaste breedte, rechts uitgelijnd */
.category-accordion table.file-table th:nth-child(2),
.category-accordion table.file-table td:nth-child(2) {
    width: 120px;
    text-align: right;
    white-space: nowrap;
}

/* Kolom 3 = Downloadknop → vaste breedte */
.category-accordion table.file-table th:nth-child(3),
.category-accordion table.file-table td:nth-child(3) {
    width: 140px;
    text-align: right;
    white-space: nowrap;
}

/* Zorgen dat downloadknop nooit breekt */
.category-accordion .btn-download {
    white-space: nowrap;
}

/* Hero-afbeelding op de downloadpagina */
.hero-section {
    max-width: 1288px;
    margin: 16px auto 0;
    padding: 0 16px;
}

.hero-inner {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}

.hero-image {
    display: block;
    width: 100%;
    aspect-ratio: 1300 / 543;
    object-fit: cover;
    object-position: center;
}

.hero-overlay {
    display: none;
}

.hero-content {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    left: 40px;
    max-width: 580px;
}

.hero-subtitle {
    margin: 0 0 8px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.75);
}

.hero-title {
    margin: 0;
    font-size: 2.75rem;
    font-weight: 600;
    line-height: 1.1;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
}

@media (max-width: 600px) {
    .hero-content {
        left: 20px;
        max-width: calc(100% - 40px);
    }

    .hero-title {
        font-size: 1.5rem;
    }
}

/* Header + zoekveld boven de categorie-accordion */
.download-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.download-header-row h3 {
    margin: 0;
}

/* Zoekformulier rechts */
.download-search {
    display: flex;
    align-items: center;
    gap: 6px;
}

.download-search input[type="text"] {
    padding: 6px 8px;
    border-radius: 0;
    border: 1px solid #BDB4B4;
    font-size: 0.9rem;
    min-width: 220px;
    font-family: Arial, sans-serif;
}

.download-search input[type="text"]:focus {
    outline: none;
    border-color: #3B1E63;
    box-shadow: 0 0 0 1px rgba(59,30,99,0.2);
}

.download-search button {
    border: none;
    border-radius: 0;
    padding: 6px 10px;
    font-size: 0.95rem;
    cursor: pointer;
    background: #E41E2D;
    color: #fff;
    font-family: Arial, sans-serif;
}

.download-search button:hover {
    background: #131E29;
}

/* Feedback-meldingen */
.msg-success {
    color: #007f3f;
    font-weight: 600;
}

.msg-error {
    color: #E41E2D;
    font-weight: 600;
}

/* Beheerpagina: layout met linker navigatiebalk (vast, zoals Portainer) */
.beheer-layout {
    flex: 1;
    display: flex;
}

.beheer-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: #fff;
    box-shadow: 2px 0 4px rgba(0,0,0,0.08);
    padding: 90px 12px 12px;
    overflow-y: auto;
    z-index: 50;
}

.beheer-nav-item {
    display: block;
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    border-left: 4px solid transparent;
    padding: 10px 12px;
    font-size: 0.95rem;
    font-family: Arial, sans-serif;
    color: #131E29;
    text-decoration: none;
    cursor: pointer;
}

.beheer-nav-item:hover {
    background: #D2CDCD;
}

.beheer-nav-item.active {
    border-left-color: #E41E2D;
    background: #D2CDCD;
    font-weight: 700;
}

.beheer-nav-secondary {
    margin-top: 8px;
    border-top: 1px solid #D2CDCD;
    padding-top: 12px;
    color: #555;
    font-size: 0.9rem;
}

.beheer-content {
    flex: 1;
    min-width: 0;
    margin-left: 220px;
    max-width: 1100px;
    padding: 20px 16px 24px;
}

.beheer-panel {
    display: none;
}

.beheer-panel.active {
    display: block;
}

@media (max-width: 700px) {
    .beheer-layout {
        flex-direction: column;
    }

    .beheer-sidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
        width: 100%;
        height: auto;
        padding: 12px;
    }

    .beheer-content {
        margin-left: 0;
    }

    .beheer-nav-item {
        width: auto;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .beheer-nav-item.active {
        border-left-color: transparent;
        border-bottom-color: #E41E2D;
    }
}

/* Klein hulpelement voor screenreaders (label verbergen, maar wel toegankelijk) */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ===================== DOWNLOAD DASHBOARD ===================== */
.dl-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 16px;
}

.dl-kpi-card {
    background: #fff;
    border-left: 4px solid #E41E2D;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 14px 16px 12px;
    border-radius: 0;
}

.dl-kpi-value {
    font-size: 2rem;
    font-weight: 700;
    color: #131E29;
    line-height: 1.1;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-kpi-value--sm {
    font-size: 1.1rem;
    font-weight: 600;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}

.dl-kpi-label {
    font-size: 0.8rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: wrap;
}

.dl-kpi-badge {
    background: #E41E2D;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 1px 6px;
    border-radius: 10px;
    white-space: nowrap;
}

/* Top 5 balk */
.dl-top5 {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 4px 0 6px;
}

.dl-top5-row {
    display: grid;
    grid-template-columns: 200px 1fr 48px;
    align-items: center;
    gap: 12px;
}

.dl-top5-name {
    font-size: 0.85rem;
    color: #131E29;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dl-top5-bar-wrap {
    background: #f0f0f0;
    border-radius: 3px;
    height: 14px;
    overflow: hidden;
}

.dl-top5-bar {
    height: 100%;
    background: #E41E2D;
    border-radius: 3px;
    min-width: 4px;
    transition: width 0.3s ease;
}

.dl-top5-count {
    font-size: 0.85rem;
    font-weight: 600;
    color: #131E29;
    text-align: right;
    white-space: nowrap;
}

/* Paginering */
.dl-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.dl-page-info {
    font-size: 0.85rem;
    color: #555;
}

.dl-page-btns {
    display: flex;
    gap: 6px;
}

/* Responsive: 2 kolommen op tablet */
@media (max-width: 900px) {
    .dl-cards {
        grid-template-columns: repeat(2, 1fr);
    }
    .dl-top5-row {
        grid-template-columns: 140px 1fr 40px;
    }
}

/* Responsive: 1 kolom op mobiel */
@media (max-width: 600px) {
    .dl-cards {
        grid-template-columns: 1fr 1fr;
    }
    .dl-top5-row {
        grid-template-columns: 110px 1fr 36px;
    }
}

/* ============================================================
   Examenaanvraag — eigen opmaak
   Losser en rustiger dan de tabelpagina's hierboven: ruimere
   witruimte, zachte hoeken, en rood alleen waar het iets betekent.
   ============================================================ */

.aanvraag-pagina {
    --rand: #dfe3e8;
    --rand-sterk: #c4ccd4;
    --inkt: #131E29;
    --gedempt: #5f6b76;
    --plaatshouder: #9aa4ae;
    --rood: #E41E2D;
    --vlak: #f7f8f9;

    background: #fff;
    font-family: 'Mulish', -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--inkt);
    line-height: 1.55;
}

/* Een eigen display-waarde wint van het hidden-attribuut. Zonder deze regel
   blijven verborgen stappen gewoon staan. */
.aanvraag-pagina [hidden] {
    display: none !important;
}

/* --- Kop --------------------------------------------------------- */

.app-header {
    border-bottom: 1px solid var(--rand);
    background: #fff;
}

.app-header-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.app-logo {
    height: 42px;
    width: auto;
}

.app-header-link {
    font-size: 0.9rem;
    color: var(--gedempt);
    text-decoration: none;
}

.app-header-link:hover {
    color: var(--rood);
}

.app-content {
    max-width: 1120px;
    margin: 0 auto;
    padding: 44px 24px 80px;
}

/* --- Introductie -------------------------------------------------- */

.pagina-intro {
    max-width: 620px;
    margin-bottom: 36px;
}

.pagina-intro h1 {
    margin: 0 0 12px;
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.12;
    color: var(--inkt);
}

.pagina-intro p {
    margin: 0;
    font-size: 1.02rem;
    color: var(--gedempt);
}

/* --- Indeling ----------------------------------------------------- */

.aanvraag-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 40px;
    align-items: start;
}

.aanvraag-hoofd {
    display: flex;
    flex-direction: column;
    gap: 40px;
    min-width: 0;
}

/* --- Blokken ------------------------------------------------------ */

.form-blok {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.form-blok > h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: -0.012em;
    color: var(--inkt);
}

.form-blok > h3 {
    margin: 26px 0 0;
    font-size: 1.02rem;
    font-weight: 600;
    color: var(--inkt);
}

.blok-uitleg {
    margin: 0;
    font-size: 0.94rem;
    color: var(--gedempt);
}

/* --- Velden ------------------------------------------------------- */

.veld {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 20px;
    min-width: 0;
}

.veld > label {
    font-size: 0.94rem;
    font-weight: 600;
    color: var(--inkt);
}

.verplicht {
    color: var(--rood);
    font-weight: 700;
}

.aanvraag-pagina input[type="text"],
.aanvraag-pagina input[type="date"],
.aanvraag-pagina input[type="email"],
.aanvraag-pagina select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--inkt);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    appearance: none;
}

.aanvraag-pagina select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath fill='%235f6b76' d='M1.4 0 6 4.6 10.6 0 12 1.4 6 7.4 0 1.4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 11px;
    padding-right: 38px;
}

.aanvraag-pagina ::placeholder {
    color: var(--plaatshouder);
}

.aanvraag-pagina input:hover:not(:disabled),
.aanvraag-pagina select:hover:not(:disabled) {
    border-color: var(--rand-sterk);
}

.aanvraag-pagina input:focus,
.aanvraag-pagina select:focus {
    outline: none;
    border-color: var(--inkt);
    box-shadow: 0 0 0 3px rgba(19, 30, 41, 0.08);
}

.aanvraag-pagina input:disabled {
    background: var(--vlak);
    color: var(--plaatshouder);
    cursor: not-allowed;
}

.veld-rij {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.veld-hint {
    margin: 0;
    font-size: 0.86rem;
    color: var(--gedempt);
}

.veld-fout {
    margin: 0;
    font-size: 0.87rem;
    color: var(--rood);
}

.veld.heeft-fout input,
.veld.heeft-fout select {
    border-color: var(--rood);
}

.veld.heeft-fout input:focus,
.veld.heeft-fout select:focus {
    box-shadow: 0 0 0 3px rgba(228, 30, 45, 0.12);
}

/* --- Keuzerondjes ------------------------------------------------- */
/* Gewone radio's op een rij, geen omkaderde blokken. */

.keuze-rij {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
    margin-top: 4px;
}

.keuze {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 0.97rem;
    color: var(--inkt);
}

.keuze input[type="radio"] {
    width: 19px;
    height: 19px;
    margin: 0;
    accent-color: var(--rood);
    cursor: pointer;
    flex: none;
}

.keuze input[type="radio"]:focus-visible {
    outline: 2px solid var(--inkt);
    outline-offset: 3px;
}

/* --- Vervolgvelden ------------------------------------------------ */

.sub-veld {
    margin-top: 22px;
    padding-left: 22px;
    border-left: 2px solid var(--rand);
}

.sub-veld > .veld:first-child,
.sub-veld > h3:first-child {
    margin-top: 0;
}

.voorkeur-rij {
    margin-top: 18px;
}

.mededeling {
    margin-top: 22px;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--vlak);
    font-size: 0.94rem;
    color: var(--gedempt);
}

.waarschuwing {
    padding: 14px 18px;
    margin-bottom: 28px;
    border-radius: 10px;
    background: #fdf2f3;
    border: 1px solid #f5c6ca;
    font-size: 0.95rem;
    color: var(--inkt);
}

/* Honeypot: onzichtbaar voor mensen, wel invulbaar voor bots */
.honeypot {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* --- Knop --------------------------------------------------------- */

.form-acties {
    padding-top: 8px;
}

.btn-primair {
    display: inline-block;
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    background: var(--rood);
    color: #fff;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.btn-primair:hover {
    background: #c4101e;
}

.btn-primair:focus-visible {
    outline: 3px solid var(--inkt);
    outline-offset: 2px;
}

/* --- Samenvatting -------------------------------------------------- */

.aanvraag-zijkant {
    position: sticky;
    top: 24px;
}

.samenvatting {
    padding: 24px 26px;
    border: 1px solid var(--rand);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(19, 30, 41, 0.04);
}

.samenvatting h2 {
    margin: 0 0 18px;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--inkt);
}

.samenvatting h3 {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--inkt);
}

.samenvatting-lijst {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.samenvatting-regel {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 16px;
    font-size: 0.93rem;
}

.samenvatting-regel dt {
    color: var(--gedempt);
    flex: none;
}

.samenvatting-regel dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
    color: var(--inkt);
    overflow-wrap: anywhere;
}

.samenvatting-kosten {
    margin-top: 22px;
    padding: 20px 20px 18px;
    border: 1px solid var(--rand);
    border-radius: 10px;
    background: var(--vlak);
}

.samenvatting-regel.totaal {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--rand-sterk);
    font-size: 1rem;
}

.samenvatting-leeg {
    margin: 18px 0 0;
    font-size: 0.88rem;
    color: var(--gedempt);
}

/* --- Bevestigingspagina -------------------------------------------- */

.bevestiging {
    max-width: 640px;
}

.bevestiging-vink {
    width: 46px;
    height: 46px;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #e8f5ec;
    display: grid;
    place-items: center;
    color: #1a7f43;
    font-size: 1.4rem;
    font-weight: 700;
}

.gegevens-kaart {
    margin-top: 28px;
    padding: 22px 24px;
    border: 1px solid var(--rand);
    border-radius: 12px;
}

.gegevens-kaart dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.kenmerk {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.95rem;
    letter-spacing: 0.06em;
}

.app-footer {
    border-top: 1px solid var(--rand);
    padding: 22px 24px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--gedempt);
}

/* --- Responsief ---------------------------------------------------- */

@media (max-width: 900px) {
    .aanvraag-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .aanvraag-zijkant {
        position: static;
        order: -1;
    }
}

@media (max-width: 560px) {
    .app-content {
        padding: 28px 18px 56px;
    }

    .veld-rij {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .aanvraag-hoofd {
        gap: 32px;
    }

    .sub-veld {
        padding-left: 16px;
    }
}

/* --- Stappenbalk ---------------------------------------------------- */

.stappenbalk {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--rand);
}

.stappen {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
    flex-wrap: wrap;
}

.stap {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.93rem;
    color: var(--gedempt);
}

/* Streepje tussen de stappen */
.stap + .stap::before {
    content: "";
    width: clamp(20px, 6vw, 90px);
    height: 1px;
    background: var(--rand);
    margin-right: 2px;
}

.stap a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: inherit;
    text-decoration: none;
}

.stap a:hover .stap-titel {
    color: var(--rood);
    text-decoration: underline;
}

.stap-bol {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.83rem;
    font-weight: 600;
    border: 1.5px solid var(--rand-sterk);
    background: #fff;
    color: var(--gedempt);
}

.stap.actief .stap-bol {
    border-color: var(--inkt);
    background: var(--inkt);
    color: #fff;
}

.stap.actief .stap-titel {
    color: var(--inkt);
    font-weight: 600;
}

.stap.af .stap-bol {
    border-color: #1a7f43;
    background: #1a7f43;
    color: #fff;
}

.stap.af .stap-titel {
    color: var(--inkt);
}

/* --- Extra veldindelingen ------------------------------------------- */

.veld-rij.naam-rij {
    grid-template-columns: 1fr 0.6fr 1.2fr;
}

.veld-rij.adres-rij {
    grid-template-columns: 1fr 0.7fr 0.7fr;
}

.veld-rij.drie-kolommen {
    grid-template-columns: repeat(3, 1fr);
}

/* --- Knoppen -------------------------------------------------------- */

.form-acties {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.btn-terug,
.link-terug {
    font-size: 0.94rem;
    color: var(--gedempt);
    text-decoration: none;
}

.btn-terug:hover,
.link-terug:hover {
    color: var(--rood);
    text-decoration: underline;
}

/* --- Controlepagina -------------------------------------------------- */

.controle-blok {
    padding: 22px 24px;
    border: 1px solid var(--rand);
    border-radius: 12px;
    margin-bottom: 16px;
}

.controle-blok h2 {
    margin: 0 0 16px;
    font-size: 1.1rem;
    font-weight: 700;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
}

.controle-blok dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wijzig-link {
    font-size: 0.86rem;
    font-weight: 500;
    color: var(--gedempt);
    text-decoration: none;
    white-space: nowrap;
}

.wijzig-link:hover {
    color: var(--rood);
    text-decoration: underline;
}

.gemaskeerd {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

@media (max-width: 700px) {
    .veld-rij.naam-rij,
    .veld-rij.adres-rij,
    .veld-rij.drie-kolommen {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .stap-titel {
        display: none;
    }

    .stap.actief .stap-titel {
        display: inline;
    }
}

/* Opmerking bij een leverancier of examen, direct onder de keuze. */
.opmerking-vendor,
#examen-opmerking {
    margin: 2px 0 0;
    padding: 12px 14px;
    border-left: 3px solid var(--rand-sterk);
    background: var(--vlak);
    border-radius: 0 8px 8px 0;
    font-size: 0.9rem;
    color: var(--gedempt);
}

/* ============================================================
   Beheeromgeving
   ============================================================ */

.inlog-kaart {
    max-width: 420px;
}

.beheer-gebruiker {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 0.9rem;
    color: var(--gedempt);
}

.uitlog-form {
    display: inline;
}

.knop-tekst {
    border: none;
    background: none;
    padding: 0;
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--gedempt);
    cursor: pointer;
    text-decoration: underline;
}

.knop-tekst:hover {
    color: var(--rood);
}

.aanvraag-pagina input[type="password"] {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.97rem;
    color: var(--inkt);
}

.aanvraag-pagina input[type="password"]:focus {
    outline: none;
    border-color: var(--inkt);
    box-shadow: 0 0 0 3px rgba(19, 30, 41, 0.08);
}

/* Kengetallen */

.kpi-rij {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 16px;
    margin-bottom: 28px;
}

.kpi {
    padding: 18px 20px;
    border: 1px solid var(--rand);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.kpi-getal {
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.1;
    color: var(--inkt);
    font-variant-numeric: tabular-nums;
}

.kpi-label {
    font-size: 0.85rem;
    color: var(--gedempt);
}

/* Tegels naar de onderdelen */

.beheer-tegels {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 28px;
}

.tegel {
    padding: 20px 22px;
    border: 1px solid var(--rand);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tegel h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
}

.tegel p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--gedempt);
}

.tegel-status {
    margin-top: 8px;
    align-self: flex-start;
    padding: 3px 10px;
    border-radius: 20px;
    background: var(--vlak);
    border: 1px solid var(--rand);
    font-size: 0.78rem;
    color: var(--gedempt);
}

.tegel-open {
    opacity: 0.75;
}

/* Tabel in het beheer */

.sectiekop {
    margin: 40px 0 16px;
    font-size: 1.15rem;
    font-weight: 700;
}

.beheer-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    min-width: 520px;
}

.beheer-tabel thead th {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--rand-sterk);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gedempt);
}

.beheer-tabel td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--rand);
    color: var(--inkt);
}

.beheer-tabel tbody tr:last-child td {
    border-bottom: none;
}

.beheer-tabel code {
    font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
    font-size: 0.85em;
    color: var(--gedempt);
}

/* --- Navigatie in het beheer ---------------------------------------- */

.beheer-nav {
    border-bottom: 1px solid var(--rand);
    background: #fff;
}

.beheer-nav-inner {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
}

.beheer-nav-item {
    padding: 14px 16px;
    font-size: 0.93rem;
    color: var(--gedempt);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    white-space: nowrap;
}

.beheer-nav-item:hover {
    color: var(--inkt);
}

.beheer-nav-item.actief {
    color: var(--inkt);
    font-weight: 600;
    border-bottom-color: var(--rood);
}

/* --- Meldingen ------------------------------------------------------- */

.melding {
    padding: 14px 18px;
    margin-bottom: 28px;
    border-radius: 10px;
    font-size: 0.94rem;
    border: 1px solid;
}

.melding-goed {
    background: #eefaf1;
    border-color: #bfe3cb;
    color: #14532d;
}

.melding-fout {
    background: #fdf2f3;
    border-color: #f5c6ca;
    color: var(--inkt);
}

/* --- Lijsten --------------------------------------------------------- */

.lijst-acties {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 18px;
}

.beheer-tabel .rechts {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.rij-inactief td {
    color: var(--plaatshouder);
}

.rij-inactief td strong {
    font-weight: 500;
}

.rij-knoppen {
    display: flex;
    gap: 14px;
    align-items: center;
    white-space: nowrap;
}

.rij-knoppen a {
    color: var(--gedempt);
    text-decoration: none;
    font-size: 0.88rem;
}

.rij-knoppen a:hover {
    color: var(--rood);
    text-decoration: underline;
}

.rij-knoppen form {
    display: inline;
}

.knop-gevaar {
    font-size: 0.88rem;
    color: var(--gedempt);
}

.knop-gevaar:hover {
    color: var(--rood);
}

.gedempt {
    color: var(--plaatshouder);
}

/* --- Pillen ---------------------------------------------------------- */

.pil {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 20px;
    background: var(--vlak);
    border: 1px solid var(--rand);
    font-size: 0.76rem;
    color: var(--gedempt);
    white-space: nowrap;
}

.pil-aan {
    background: #eefaf1;
    border-color: #bfe3cb;
    color: #14532d;
}

.pil-let-op {
    background: #fff8e6;
    border-color: #f0dca8;
    color: #7a5c00;
}

.pil-intern {
    background: #f2effa;
    border-color: #d6cdee;
    color: #4a3a7a;
}

/* --- Beheerformulieren ------------------------------------------------ */

.beheer-form {
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.beheer-form .form-blok > h2 {
    margin-bottom: 4px;
}

.aanvraag-pagina textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--rand);
    border-radius: 8px;
    background: #fff;
    font-family: inherit;
    font-size: 0.97rem;
    line-height: 1.5;
    color: var(--inkt);
    resize: vertical;
}

.aanvraag-pagina textarea:focus {
    outline: none;
    border-color: var(--inkt);
    box-shadow: 0 0 0 3px rgba(19, 30, 41, 0.08);
}

.veld.smal {
    max-width: 200px;
}

.vinkje {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    font-size: 0.94rem;
    cursor: pointer;
}

.vinkje input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: var(--rood);
    flex: none;
    cursor: pointer;
}

/* Interne velden krijgen een eigen kleur, zodat je ze niet verwart met
   iets wat de bezoeker te zien krijgt. */
.intern-veld {
    padding: 16px 18px;
    border-radius: 10px;
    background: #f8f6fd;
    border-left: 3px solid #6b5aa5;
}

.intern-veld > label {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tegels als link */

a.tegel {
    text-decoration: none;
    color: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

a.tegel:hover {
    border-color: var(--rood);
    box-shadow: 0 2px 8px rgba(19, 30, 41, 0.06);
}

/* Waar verschijnt deze tekst? Onmisbaar zodra een leverancier vier vrije
   tekstvelden heeft.

   Het woord staat in de HTML en niet in een ::before: gegenereerde inhoud
   wordt door schermlezers onbetrouwbaar voorgelezen, en verdwijnt zodra de
   stylesheet niet laadt. */
.veld-hint.verschijnt {
    display: flex;
    align-items: baseline;
    gap: 7px;
    color: var(--inkt);
}

.hint-label {
    flex: none;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--gedempt);
}

.hint-label.intern {
    color: #6b5aa5;
}
