#blazor-error-ui {
    display: none;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

:root {
    --tifa-bg: #f4f6f8;
    --tifa-surface: #ffffff;
    --tifa-surface-soft: #f9fafb;
    --tifa-border: #e5e7eb;
    --tifa-text: #111827;
    --tifa-muted: #6b7280;
    --tifa-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    --tifa-red: #dc2626;
    --tifa-red-soft: #fef2f2;
    --tifa-orange: #d97706;
    --tifa-orange-soft: #fffbeb;
    --tifa-green: #16a34a;
    --tifa-green-soft: #f0fdf4;
    --tifa-blue-dark: #0f172a;
}

html {
    font-size: 20px;
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 32rem), linear-gradient(135deg, #f8fafc 0%, #eef2f7 45%, #e5eaf1 100%);
    color: var(--tifa-text);
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    font-weight: 400;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

.page {
    min-height: 100vh;
}

.tifa-dashboard {
    min-height: 100vh;
    padding: 28px;
}

/* Header */
.tifa-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    gap: 24px;
    margin-bottom: 22px;
    padding: 28px 30px;
    border-radius: 24px;
    background: linear-gradient(135deg, #111827 0%, #1e293b 55%, #334155 100%);
    color: white;
    box-shadow: var(--tifa-shadow);
    overflow: hidden;
    position: relative;
}

    .tifa-dashboard-header::after {
        content: "";
        position: absolute;
        right: -80px;
        top: -100px;
        width: 280px;
        height: 280px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
    }

    .tifa-dashboard-header h1 {
        margin: 0;
        font-size: clamp(34px, 4vw, 80px);
        line-height: 1;
        font-weight: 600;
        letter-spacing: -0.05em;
    }

    .tifa-dashboard-header p {
        margin: 10px 0 0 0;
        color: #cbd5e1;
        font-size: 16px;
    }

.tifa-header-expand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    align-self: flex-start;
    padding: 10px 18px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #111827 0%, #1e293b 55%, #334155 100%);
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--tifa-shadow);
    transition: opacity 140ms ease;
}

    .tifa-header-expand:hover {
        opacity: 0.9;
    }

.tifa-header-collapse-toggle {
    align-self: flex-start;
    background: rgba(255, 255, 255, 0.14);
    color: white;
    z-index: 1;
}

    .tifa-header-collapse-toggle:hover {
        background: rgba(255, 255, 255, 0.24);
    }

.tifa-header-card {
    min-width: 190px;
    align-self: center;
    padding: 18px 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.16);
    backdrop-filter: blur(12px);
    z-index: 1;
}

.tifa-header-card-label {
    display: block;
    margin-bottom: 6px;
    color: #cbd5e1;
    font-size: 13px;
}

.tifa-header-card strong {
    display: block;
    font-size: 24px;
    font-weight: 800;
}

/* Summary cards */
.tifa-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.tifa-summary-card {
    padding: 18px 20px;
    border-radius: 20px;
    background: var(--tifa-surface);
    border: 1px solid var(--tifa-border);
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

    .tifa-summary-card::before {
        content: "";
        width: 10px;
        height: 42px;
        border-radius: 999px;
        margin-right: 14px;
    }

    .tifa-summary-card strong {
        margin-left: auto;
        font-size: 32px;
        line-height: 1;
        font-weight: 800;
    }

.tifa-summary-label {
    color: var(--tifa-muted);
    font-weight: 700;
}

.tifa-summary-card.urgent::before {
    background: var(--tifa-red);
}

.tifa-summary-card.active::before {
    background: var(--tifa-orange);
}

.tifa-summary-card.done::before {
    background: var(--tifa-green);
}

/* Board */
.tifa-board-wrapper {
    position: relative;
}

.tifa-board {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-auto-rows: 1fr;
    align-items: stretch;
    gap: 22px;
    min-height: 520px;
}

    .tifa-board > .rz-col {
        display: flex;
        flex-direction: column;
        min-width: 0;
        width: 100% !important;
        max-width: none !important;
        flex: 1 1 auto !important;
    }

.tifa-column {
    min-width: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    border-radius: 22px;
    background: #ffffff;
    border: 2px solid #cbd5e1;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    position: relative;
}

    .tifa-column:has(.tifa-status-dot.unplanned) {
        border-color: #6b7280;
    }

    .tifa-column:has(.tifa-status-dot.active) {
        border-color: #f59e0b;
    }

    .tifa-column:has(.tifa-status-dot.urgent) {
        border-color: #ef4444;
    }

    .tifa-column:has(.tifa-status-dot.done) {
        border-color: #22c55e;
    }

/* Collapsible columns */
.tifa-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: inherit;
    cursor: pointer;
    flex: 0 0 auto;
    transition: background-color 140ms ease;
}

    .tifa-collapse-toggle:hover {
        background: rgba(15, 23, 42, 0.12);
    }

.tifa-column-expand {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    height: 100%;
    width: 100%;
    padding: 16px 0;
    border: 2px solid #22c55e;
    border-radius: 22px;
    background: #ffffff;
    color: #166534;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    transition: background-color 140ms ease, border-color 140ms ease;
}

    .tifa-column-expand:hover {
        background: #f0fdf4;
        border-color: #16a34a;
    }

    .tifa-column-expand-icon {
        font-size: 20px;
        transform: rotate(-90deg);
    }

    .tifa-column-expand-label {
        writing-mode: vertical-rl;
        transform: rotate(180deg);
        letter-spacing: 0.02em;
    }

.tifa-column-header {
    padding: 18px 18px 16px 18px;
    border-bottom: 1px solid var(--tifa-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(249, 250, 251, 0.9);
}

    .tifa-column-header > div {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .tifa-column-header h2 {
        margin: 0;
        font-size: 36px;
        line-height: 1;
        font-weight: 700;
        letter-spacing: -0.02em;
    }

.tifa-status-dot {
    width: 11px;
    height: 11px;
    border-radius: 999px;
}

    .tifa-status-dot.urgent {
        background: var(--tifa-red);
        box-shadow: 0 0 0 5px var(--tifa-red-soft);
    }

    .tifa-status-dot.active {
        background: var(--tifa-orange);
        box-shadow: 0 0 0 5px var(--tifa-orange-soft);
    }

    .tifa-status-dot.done {
        background: var(--tifa-green);
        box-shadow: 0 0 0 5px var(--tifa-green-soft);
    }

    .tifa-status-dot.unplanned {
        background: #6b7280;
        box-shadow: 0 0 0 5px rgba(107, 114, 128, 0.2);
    }

.tifa-count {
    min-width: 30px;
    height: 28px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 750;
}

    .tifa-count.urgent {
        color: #991b1b;
        background: var(--tifa-red-soft);
    }

    .tifa-count.active {
        color: #92400e;
        background: var(--tifa-orange-soft);
    }

    .tifa-count.done {
        color: #166534;
        background: var(--tifa-green-soft);
    }

    .tifa-count.unplanned {
        color: #374151;
        background: rgba(107, 114, 128, 0.16);
    }

.tifa-column-body {
    flex: 1;
    padding: 14px;
    overflow-y: auto;
}

/* Project cards */
.tifa-project-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 16px 16px 18px;
    margin-bottom: 12px;
    border-radius: 16px;
    background: var(--tifa-surface);
    border: 1px solid var(--tifa-border);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.045);
    cursor: grab;
    user-select: none;
    transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

    .tifa-project-card::before {
        content: "";
        position: absolute;
        left: 0;
        top: 14px;
        bottom: 14px;
        width: 4px;
        border-radius: 999px;
    }

    .tifa-project-card.urgent::before {
        background: var(--tifa-red);
    }

    .tifa-project-card.active::before {
        background: var(--tifa-orange);
    }

    .tifa-project-card.done::before {
        background: var(--tifa-green);
    }

    .tifa-project-card:hover {
        transform: translateY(-2px);
        border-color: #cbd5e1;
        box-shadow: 0 12px 26px rgba(15, 23, 42, 0.09);
    }

.tifa-project-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

    .tifa-project-main strong {
        font-size: 15px;
        font-weight: 800;
        color: #111827;
    }

    .tifa-project-main span {
        font-size: 13px;
        color: var(--tifa-muted);
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.tifa-priority {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

    .tifa-priority.urgent {
        color: #991b1b;
        background: var(--tifa-red-soft);
    }

    .tifa-priority.active {
        color: #92400e;
        background: var(--tifa-orange-soft);
    }

    .tifa-priority.done {
        color: #166534;
        background: var(--tifa-green-soft);
    }

/* Scrollbar netter */
.tifa-column-body::-webkit-scrollbar {
    width: 10px;
}

.tifa-column-body::-webkit-scrollbar-track {
    background: transparent;
}

.tifa-column-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
    border: 3px solid transparent;
    background-clip: content-box;
}

/* Responsive */
@media (max-width: 1100px) {
    .tifa-board,
    .tifa-summary {
        grid-template-columns: 1fr !important;
    }

    .tifa-board {
        height: auto;
    }

    .tifa-column {
        min-height: 320px;
    }

    .tifa-column-collapsed {
        min-height: 56px;
    }

        .tifa-column-collapsed .tifa-column-header {
            padding: 8px;
        }

    .tifa-dashboard-header {
        flex-direction: column;
    }

    .tifa-header-card {
        align-self: flex-start;
    }
}


/* BEHEER PAGINA*/
.tifa-manage-layout {
    display: grid;
    grid-template-columns: minmax(360px, 520px) 1fr;
    gap: 22px;
}

.tifa-manage-panel {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
}

    .tifa-manage-panel h2 {
        margin: 0 0 20px 0;
        font-size: 24px;
        font-weight: 800;
        color: #111827;
    }

.tifa-form-grid {
    display: grid;
    gap: 16px;
}

    .tifa-form-grid label {
        display: grid;
        gap: 6px;
    }

        .tifa-form-grid label span {
            color: #374151;
            font-size: 15px;
            font-weight: 700;
        }

.tifa-input {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    border: 2px solid #d1d5db;
    padding: 0 14px;
    font-size: 16px;
    font-family: "Segoe UI", Roboto, Arial, sans-serif;
    color: #111827;
    background: #ffffff;
}

    .tifa-input:focus {
        outline: none;
        border-color: #2563eb;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
    }

.tifa-actions {
    margin-top: 22px;
}

.tifa-button-primary {
    height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

    .tifa-button-primary:hover {
        background: #1f2937;
    }

.tifa-empty-text {
    color: #6b7280;
    font-size: 16px;
}

.tifa-manage-list {
    display: grid;
    gap: 12px;
}

.tifa-manage-project {
    display: grid;
    gap: 4px;
    padding: 16px;
    border-radius: 14px;
    border: 2px solid #e5e7eb;
    background: #f9fafb;
}

    .tifa-manage-project strong {
        font-size: 18px;
        color: #111827;
    }

    .tifa-manage-project span {
        font-size: 15px;
        color: #4b5563;
    }

@media (max-width: 1100px) {
    .tifa-manage-layout {
        grid-template-columns: 1fr;
    }
}

.tifa-project-main small {
    margin-top: 4px;
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.tifa-empty-column {
    margin: 0;
    padding: 18px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    color: #64748b;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    background: #f8fafc;
}

.tifa-project-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.tifa-project-card:active {
    cursor: grabbing;
}

.tifa-project-card-dragging {
    opacity: 0.55;
}

.tifa-project-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.tifa-project-info {
    min-width: 0;
    flex: 1 1 auto;
}

.tifa-project-employees {
    width: 100%;
    flex-shrink: 0;
    margin-top: 0.35rem;
    padding-top: 0.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: left;
}

.tifa-project-employees-right {
    margin-left: 0;
    width: 100%;
    flex: 0 0 auto;
    text-align: left;
}

.tifa-project-employees-header,
.tifa-project-employee-list {
    width: 100%;
}

.tifa-project-employee-list {
    padding-left: 1.45rem;
}

.tifa-project-employee-item {
    width: 100%;
    margin-bottom: 0;
}

.tifa-project-employee-name {
    width: 100%;
    text-align: left;
    color: #4b5563;
    line-height: 1.1rem;
}

.tifa-project-employee-finished {
    width: 100%;
    text-align: left;
    color: #b45309;
    font-weight: 600;
    font-size: 0.8rem;
    line-height: 1.15rem;
}

.tifa-project-employees-title {
    font-weight: 600;
    color: #374151;
}

.tifa-project-employees-icon {
    font-size: 17px;
    opacity: 0.75;
}

/* PROJECTEN TOEVOEGEN DIALOG  */
.add-projects-dialog {
    max-height: calc(100vh - 120px) !important;
}

.rz-dialog.add-projects-radzen-dialog {
    max-width: 95vw !important;
}

.add-projects-dialog-content {
    height: calc(100% - 64px) !important;
    overflow: hidden !important;
}

    /* --- Pager (Radzen gebruikt .rz-pager, niet .rz-paginator) --- */
    .add-projects-dialog-content .rz-pager {
        padding: 0.6rem 0.25rem 0.2rem;
        border-top: 1px solid var(--tifa-border);
        margin-top: 0.5rem;
        color: var(--tifa-muted);
        font-size: 0.85rem;
        /* Radzen reserveert standaard te weinig ruimte voor de dropdown-waarde */
        --rz-pager-dropdown-width: 5rem;
    }

        /* De "per pagina" dropdown: ruime breedte + eigen styling */
        .add-projects-dialog-content .rz-pager .rz-dropdown {
            width: 5rem !important;
            min-width: 5rem !important;
            border-radius: 10px !important;
            border: 1px solid var(--tifa-border) !important;
            background: var(--tifa-surface) !important;
            transition: border-color .15s ease, box-shadow .15s ease;
        }

            .add-projects-dialog-content .rz-pager .rz-dropdown:hover {
                border-color: #cbd5e1 !important;
            }

            .add-projects-dialog-content .rz-pager .rz-dropdown.rz-state-focused,
            .add-projects-dialog-content .rz-pager .rz-dropdown:focus-within {
                border-color: #2563eb !important;
                box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14) !important;
            }

            /* Kernfix: Radzen kapt de waarde af met ellipsis en reserveert ruimte
               voor het pijltje. Beide uitschakelen zodat "20"/"50" volledig past. */
            .add-projects-dialog-content .rz-pager .rz-dropdown .rz-dropdown-label {
                overflow: visible !important;
                text-overflow: clip !important;
                white-space: nowrap !important;
                padding-inline-end: 1.5rem !important;
            }

        /* Pagina-knoppen met nette hover/active state */
        .add-projects-dialog-content .rz-pager .rz-pager-page:hover:not(.rz-state-active) {
            background: var(--tifa-surface-soft);
        }

        .add-projects-dialog-content .rz-pager .rz-pager-page.rz-state-active {
            background: #2563eb;
            color: #ffffff;
            font-weight: 600;
        }

/* --- Pager fix voor overige beheer-grids (bv. ArchiefBeheerSection) --- */
.tifa-archive-grid .rz-pager {
    --rz-pager-dropdown-width: 5rem;
}

    .tifa-archive-grid .rz-pager .rz-dropdown {
        width: 5rem !important;
        min-width: 5rem !important;
    }

        .tifa-archive-grid .rz-pager .rz-dropdown .rz-dropdown-label {
            overflow: visible !important;
            text-overflow: clip !important;
            white-space: nowrap !important;
            padding-inline-end: 1.5rem !important;
        }

.add-projects-form {
    height: 100%;
    overflow: hidden;
}

.add-projects-layout {
    height: 100%;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 1rem;
    overflow: hidden;
}

.add-projects-search {
    overflow: hidden;
}

.add-projects-grid {
    min-height: 0;
    overflow: hidden;
}

.add-projects-actions {
    overflow: hidden;
    background: white;
    padding-top: 0.5rem;
}
/* ============================== */


.tifa-manage-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(260px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    align-items: stretch;
    width: 100%;
}

.tifa-manage-column {
    display: flex;
    flex-direction: column;
    min-height: 620px;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid #d0d7de;
    background: #ffffff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.tifa-manage-column-header {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.tifa-manage-column-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

/* Elke kolom wordt een dashed dropzone zodra er gesleept wordt */
.tifa-manage-column.tifa-is-dragging {
    border-style: dashed;
}

/* De kolom waar de cursor nu boven hangt */
.tifa-manage-column.tifa-dropzone-hover {
    border-color: #2563eb;
    background: #f5f9ff;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.tifa-manage-card {
    cursor: grab;
    margin-bottom: 0.75rem;
    user-select: none;
    border-radius: 12px;
    transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
}

    .tifa-manage-card:active {
        cursor: grabbing;
    }

/* De kaart die versleept wordt */
.tifa-manage-card-dragging {
    opacity: 0.5;
    transform: rotate(1.5deg) scale(0.98);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.22);
}

.tifa-column-unplanned {
    border-color: #6b7280;
}

.tifa-column-active {
    border-color: #f0a000;
}

.tifa-column-urgent {
    border-color: #dc3545;
}

.tifa-column-done {
    border-color: #28a745;
}

/* Dropzones tussen en rond de kaarten */
.tifa-drop-placeholder {
    height: 6px;
    margin: 0.15rem 0;
    border-radius: 999px;
    border: 2px dashed transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0;
    transition: height .15s ease, background-color .15s ease, border-color .15s ease, opacity .15s ease;
}

/* De laatste dropzone vult de rest van de kolom zodat de onderkant volledig droppable is */
.tifa-drop-filler {
    flex: 1 1 auto;
    min-height: 90px;
    margin-top: 0.5rem;
    opacity: 1;
}

.tifa-drop-hint {
    display: none;
}

/* Tijdens slepen worden alle dropzones zichtbaar */
.tifa-manage-column.tifa-is-dragging .tifa-drop-placeholder {
    height: 16px;
    opacity: 1;
    border-color: #cbd5e1;
    background: rgba(148, 163, 184, 0.12);
}

.tifa-manage-column.tifa-is-dragging .tifa-drop-filler {
    color: #64748b;
    border-radius: 12px;
}

    .tifa-manage-column.tifa-is-dragging .tifa-drop-filler .tifa-drop-hint {
        display: inline;
    }

/* Het exacte invoegpunt (aangestuurd door state, niet door :hover) */
.tifa-manage-column.tifa-is-dragging .tifa-drop-placeholder.tifa-drop-active {
    height: 42px;
    border-style: solid;
    border-color: #2563eb;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.tifa-manage-column.tifa-is-dragging .tifa-drop-filler.tifa-drop-active {
    border-style: solid;
    border-color: #2563eb;
    background: #dbeafe;
    color: #1d4ed8;
    box-shadow: inset 0 0 0 3px rgba(37, 99, 235, 0.15);
}

@media (max-width: 1200px) {
    .tifa-manage-board {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .tifa-manage-board {
        grid-template-columns: 1fr;
    }
}

/* PROJECT DETAILS PAGINA */
.tifa-details {
    display: grid;
    grid-template-columns: minmax(280px, 320px) 1fr;
    gap: 22px;
    min-height: 100vh;
    padding: 28px;
    align-items: start;
}

    /* Ingeklapte sidebar: schuift naar links weg en geeft de content alle ruimte. */
    .tifa-details.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

        .tifa-details.sidebar-collapsed .tifa-sidebar {
            display: none;
        }

.tifa-details-panel-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    border: 1px solid var(--tifa-border);
    border-radius: 12px;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .tifa-details-panel-expand:hover {
        background: #f1f5f9;
        border-color: #94a3b8;
        color: #111827;
    }

    .tifa-details-panel-expand .rz-icon {
        font-size: 22px;
    }

.tifa-sidebar {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, #111827 0%, #1e293b 55%, #334155 100%);
    color: #ffffff;
    box-shadow: var(--tifa-shadow);
    overflow: hidden;
}

    .tifa-sidebar::after {
        content: "";
        position: absolute;
        right: -70px;
        top: -90px;
        width: 220px;
        height: 220px;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

.tifa-sidebar-header {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.tifa-sidebar-header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.tifa-sidebar-collapse {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    flex-shrink: 0;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .tifa-sidebar-collapse:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.28);
        color: #ffffff;
    }

    .tifa-sidebar-collapse .rz-icon {
        font-size: 20px;
    }

.tifa-sidebar-back {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    padding: 6px 12px 6px 8px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .tifa-sidebar-back:hover {
        background: rgba(255, 255, 255, 0.18);
        border-color: rgba(255, 255, 255, 0.28);
        color: #ffffff;
    }

    .tifa-sidebar-back .rz-icon {
        font-size: 18px;
    }

.tifa-sidebar-eyebrow {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.tifa-sidebar-title {
    margin: 0;
    font-size: clamp(26px, 2.4vw, 34px);
    line-height: 1.05;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    word-break: break-word;
}

.tifa-sidebar-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tifa-sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
    font-size: 15px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: transform 140ms ease, background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

    .tifa-sidebar-item:hover {
        transform: translateX(2px);
        background: rgba(255, 255, 255, 0.12);
        border-color: rgba(255, 255, 255, 0.16);
        color: #ffffff;
    }

    .tifa-sidebar-item.active {
        background: #ffffff;
        border-color: #ffffff;
        color: #111827;
        box-shadow: 0 12px 24px rgba(15, 23, 42, 0.22);
    }

.tifa-sidebar-item-icon {
    font-size: 20px;
    opacity: 0.9;
    flex-shrink: 0;
}

.tifa-sidebar-item.active .tifa-sidebar-item-icon {
    opacity: 1;
    color: #2563eb;
}

.tifa-sidebar-item-label {
    min-width: 0;
    line-height: 1.2;
}

.tifa-sidebar-group-chevron {
    margin-left: auto;
    font-size: 20px;
    opacity: 0.8;
    transition: transform 140ms ease;
}

.tifa-sidebar-group.expanded .tifa-sidebar-group-chevron {
    transform: rotate(180deg);
}

.tifa-sidebar-subnav {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 2px 0 2px 18px;
    padding-left: 12px;
    border-left: 1px solid rgba(255, 255, 255, 0.16);
}

.tifa-sidebar-subitem {
    padding: 10px 13px;
    font-size: 14px;
    font-weight: 500;
}

.tifa-details-content {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

.tifa-details-panel {
    background: #ffffff;
    border: 2px solid #cbd5e1;
    border-radius: 22px;
    box-shadow: 0 16px 35px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.tifa-details-panel-header {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 22px 24px;
    border-bottom: 1px solid var(--tifa-border);
    background: rgba(249, 250, 251, 0.9);
}

.tifa-details-panel-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border-radius: 14px;
    background: #111827;
    color: #ffffff;
}

    .tifa-details-panel-icon .rz-icon {
        font-size: 24px;
    }

.tifa-details-panel-title {
    font-weight: 800;
    color: #111827;
}

.tifa-details-panel-body {
    padding: 24px;
}

    /* Tekeningen levert een eigen header aan in de linkerkolom, dus geen dubbele padding. */
    .tifa-details-panel-body.tifa-details-panel-body--flush {
        padding: 0;
    }

.tifa-details-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 46px 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f5f8 100%);
    text-align: center;
}

.tifa-details-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}

    .tifa-details-empty-icon .rz-icon {
        font-size: 30px;
    }

.tifa-details-empty-title {
    font-weight: 800;
    color: #334155;
}

.tifa-details-empty-text {
    max-width: 360px;
}

/* Dropzone (PDF verwerken) */
.tifa-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    padding: 40px 24px;
    border: 2px dashed #cbd5e1;
    border-radius: 18px;
    background: linear-gradient(180deg, #f9fafb 0%, #f3f5f8 100%);
    text-align: center;
    transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

    .tifa-dropzone:hover {
        border-color: #94a3b8;
    }

    .tifa-dropzone.dragging {
        border-style: solid;
        border-color: #2563eb;
        background: #eef4ff;
        box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
        transform: translateY(-1px);
    }

    .tifa-dropzone.processing {
        border-style: solid;
        border-color: #cbd5e1;
        background: #f8fafc;
    }

/* De onzichtbare native file-input vult de hele zone zodat slepen + klikken werkt */
.tifa-dropzone-input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

    .tifa-dropzone-input:disabled {
        cursor: default;
    }

.tifa-dropzone-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

.tifa-dropzone-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 66px;
    height: 66px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #fee2e2;
    color: #dc2626;
    box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.12);
    transition: transform 140ms ease;
}

    .tifa-dropzone-icon .rz-icon {
        font-size: 34px;
    }

.tifa-dropzone.dragging .tifa-dropzone-icon {
    transform: scale(1.06);
}

.tifa-dropzone-title {
    font-weight: 800;
    color: #334155;
}

.tifa-dropzone-hint {
    max-width: 320px;
}

.tifa-dropzone-status {
    margin-top: 16px;
}

/* Uitklapbare lijst met verwerkte PDF's (bestandsnaam + pagina's) */
.tifa-pdf-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Scrollbare container met alle categorieën van de bestellingen-lijst. */
.tifa-pdf-list-scroll {
    max-height: 520px;
    overflow-y: auto;
    margin-top: 20px;
    padding-right: 4px;
}

.tifa-pdf-category + .tifa-pdf-category {
    margin-top: 14px;
}

.tifa-pdf-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 6px 4px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #334155;
}

    .tifa-pdf-category-header:hover {
        color: #1d4ed8;
    }

.tifa-pdf-category-chevron {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 20px;
}

.tifa-pdf-category-title {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tifa-pdf-category-count {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.tifa-pdf-category .tifa-pdf-list {
    margin-top: 8px;
}

.tifa-pdf-item {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    overflow: hidden;
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

    .tifa-pdf-item:hover {
        border-color: #cbd5e1;
    }

    .tifa-pdf-item.expanded {
        border-color: #94a3b8;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    }

.tifa-pdf-header {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 14px 16px;
    border: 0;
    background: transparent;
    text-align: left;
    cursor: pointer;
    font: inherit;
    color: #334155;
}

    .tifa-pdf-header:hover {
        background: #f8fafc;
    }

.tifa-pdf-file-icon {
    flex: 0 0 auto;
    color: #dc2626;
    font-size: 22px;
}

.tifa-pdf-name {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.tifa-pdf-count {
    flex: 0 0 auto;
    padding: 2px 10px;
    border-radius: 999px;
    background: #eef2f7;
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
}

.tifa-pdf-chevron {
    flex: 0 0 auto;
    color: #94a3b8;
    transition: transform 160ms ease;
}

.tifa-pdf-item.expanded .tifa-pdf-chevron {
    transform: rotate(180deg);
}

.tifa-pdf-pages {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    padding: 4px 16px 14px 52px;
    list-style: none;
    border-top: 1px solid #eef2f7;
}

.tifa-pdf-page-row {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 -8px;
    border-radius: 8px;
    transition: background-color 120ms ease;
}

    .tifa-pdf-page-row:hover {
        background: #f1f5f9;
    }

    .tifa-pdf-page-row.active {
        background: #e0ecff;
    }

.tifa-pdf-page {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 8px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 14px;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: color 120ms ease;
}

    .tifa-pdf-page:hover,
    .tifa-pdf-page-row.active .tifa-pdf-page {
        color: #1d4ed8;
    }

        .tifa-pdf-page:hover .tifa-pdf-page-icon,
        .tifa-pdf-page-row.active .tifa-pdf-page-icon {
            color: #1d4ed8;
        }

.tifa-pdf-page-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tifa-pdf-page-icon {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 18px;
}

.tifa-pdf-page-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    transition: background-color 120ms ease, color 120ms ease;
}

    .tifa-pdf-page-open-link:hover {
        background: #dbeafe;
        color: #1d4ed8;
    }

.tifa-pdf-page-open {
    flex: 0 0 auto;
    font-size: 16px;
}

/* Twee-koloms layout van de Tekeningen-sectie: links de lijst, rechts de viewer. */
.tifa-tekeningen {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 20px;
    padding: 24px;
    align-items: start;
}

.tifa-tekeningen-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tifa-tekeningen-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

    .tifa-tekeningen-header .tifa-details-panel-title {
        font-size: 1.35rem;
    }

.tifa-tekeningen-left .tifa-dropzone {
    min-height: 180px;
    padding: 28px 20px;
}

.tifa-tekeningen-left .tifa-pdf-list,
.tifa-tekeningen-left .tifa-pdf-list-scroll,
.tifa-tekeningen-left .tifa-dropzone-status {
    margin-top: 0;
}

/* Afkortlijsten: selecteerbare lijst links */
.tifa-tekeningen-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

/* Controlelijsten: selecteerbare lijst links (zelfde stijl als tekeningen-list) */
.tifa-controle-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tifa-controle-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 4px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

/* Groep per ControleType in de linker lijst van de Controles-sectie. */
.tifa-afkort-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tifa-afkort-group {
    transition: opacity 0.15s ease;
}

    .tifa-afkort-group.tifa-dragging {
        opacity: 0.5;
    }

    .tifa-afkort-group.tifa-drag-over {
        box-shadow: 0 0 0 2px var(--tifa-primary, #3b82f6) inset;
        border-radius: 6px;
    }

.tifa-afkort-group-header {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    padding: 6px 4px;
    border: none;
    background: transparent;
    color: var(--tifa-text-secondary, #64748b);
    font: inherit;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.02em;
    text-align: left;
    cursor: pointer;
}

    .tifa-afkort-group-header:hover {
        color: var(--tifa-text, #111827);
    }

.tifa-afkort-group .tifa-afkort-list-row {
    margin-left: 18px;
}

/* Twee-koloms layout van de Controles-sectie: links de lijst, rechts de details. */
.tifa-beheer-section.tifa-controle-layout {
    display: grid;
    grid-template-columns: minmax(300px, 380px) 1fr;
    gap: 20px;
    align-items: start;
}

.tifa-controle-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.tifa-controle-header {
    display: flex;
    align-items: center;
    gap: 14px;
}

.tifa-controle-detail {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
    min-height: 240px;
    padding: 16px;
    border: 1px solid var(--tifa-border);
    border-radius: 16px;
    background: #f8fafc;
}

.tifa-controle-detail-header {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--tifa-border);
}

.tifa-controle-detail-title {
    margin: 0;
    font-weight: 600;
}

.tifa-controle-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tifa-controle-detail-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.tifa-controle-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 200px;
    color: var(--tifa-text-secondary, #64748b);
    text-align: center;
}

/* Vraag-kaarten: vraag en beschrijving elk hun eigen helft, met nette wrapping. */
.rz-card.tifa-controle-question-card {
    display: flex;
    align-items: stretch;
    gap: 16px;
}

.tifa-controle-question-card-wrapper {
    cursor: grab;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.tifa-controle-question-card-wrapper.tifa-dragging {
    opacity: 0.5;
}

.tifa-controle-question-card-wrapper.tifa-drag-over {
    box-shadow: 0 0 0 2px var(--tifa-primary, #3b82f6) inset;
    border-radius: 6px;
}

.tifa-controle-question-drag-handle {
    align-self: center;
    color: var(--tifa-text-secondary, #9ca3af);
    cursor: grab;
}

.tifa-controle-question-col {
    flex: 1 1 50%;
    min-width: 0;
}

.tifa-controle-question-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--tifa-text-secondary, #9ca3af);
    margin-bottom: 2px;
}

.tifa-controle-question-text {
    display: block;
    white-space: normal;
    overflow-wrap: break-word;
    word-break: break-word;
}

.tifa-controle-question-divider {
    flex: 0 0 1px;
    align-self: stretch;
    background: var(--tifa-border, #e5e7eb);
}

/* Actieknoppen in het detailpaneel: rustig en consistent met de app-stijl. */
.tifa-controle-action.rz-button {
    border-radius: 10px;
    font-weight: 600;
    box-shadow: none;
}

/* Neutrale (Light) knoppen: zachte grijstint met subtiele rand. */
.tifa-controle-action.rz-light {
    background-color: var(--tifa-surface, #ffffff);
    color: var(--tifa-text, #111827);
    border: 1px solid var(--tifa-border, #e5e7eb);
}

    .tifa-controle-action.rz-light:hover {
        background-color: var(--tifa-surface-soft, #f9fafb);
        border-color: var(--tifa-primary, #2563eb);
    }

/* Primaire actie (opslaan): rustig blauw. */
.tifa-controle-action-primary.rz-primary {
    background-color: var(--tifa-primary, #2563eb);
    border: 1px solid var(--tifa-primary, #2563eb);
}

    .tifa-controle-action-primary.rz-primary:hover {
        background-color: #1d4ed8;
        border-color: #1d4ed8;
    }

/* Verwijderknop in de lijst: zachte rode tint i.p.v. felle kleuren. */
.tifa-controle-delete.rz-button {
    background-color: var(--tifa-red-soft, #fef2f2);
    color: var(--tifa-red, #dc2626);
    border: 1px solid transparent;
    box-shadow: none;
}

    .tifa-controle-delete.rz-button:hover {
        background-color: #fee2e2;
        border-color: var(--tifa-red, #dc2626);
    }

@media (max-width: 900px) {
    .tifa-beheer-section.tifa-controle-layout {
        grid-template-columns: 1fr;
    }

    .tifa-controle-detail {
        position: static;
    }
}

.tifa-afkort-list-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border: 1px solid var(--tifa-border);
    border-radius: 10px;
    background: #ffffff;
    transition: background-color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
}

    .tifa-afkort-list-row:hover {
        background: #f1f5f9;
    }

    .tifa-afkort-list-row.active {
        border-color: var(--tifa-primary, #2563eb);
        background: #eff6ff;
    }

    .tifa-afkort-list-row.tifa-dragging {
        opacity: 0.5;
    }

    .tifa-afkort-list-row.tifa-drag-over {
        box-shadow: 0 0 0 2px var(--tifa-primary, #3b82f6) inset;
    }

.tifa-tekeningen-list-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    padding: 6px 4px;
    border: none;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.tifa-afkort-item-icon {
    color: var(--tifa-primary, #2563eb);
    flex: 0 0 auto;
}

.tifa-afkort-item-title {
    overflow-wrap: break-word;
    word-break: break-word;
    white-space: normal;
}

/* Afkortlijsten: datagrid-paneel rechts */
.tifa-afkort-grid-panel {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    max-height: calc(100vh - 160px);
    padding: 16px;
    border: 1px solid var(--tifa-border);
    border-radius: 16px;
    background: #f8fafc;
    overflow: auto;
}

.tifa-afkort-grid-header {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.tifa-afkort-grid-icon {
    color: var(--tifa-primary, #2563eb);
}

.tifa-afkort-grid-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 240px;
    color: var(--tifa-text-secondary, #64748b);
}

/* Afkortlijsten-grid: kolommen op inhoud laten schalen en kopteksten laten
   afbreken, zodat alles leesbaar blijft met minimale horizontale scroll. */
.tifa-afkort-grid .rz-grid-table {
    table-layout: auto;
    width: 100%;
}

.tifa-afkort-grid .rz-column-title-content {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
    line-height: 1.2;
}

.tifa-afkort-grid .rz-cell-data {
    white-space: normal;
    overflow: visible;
    text-overflow: clip;
    word-break: break-word;
}

.tifa-pdf-viewer {
    position: sticky;
    top: 28px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: calc(100vh - 160px);
    min-height: 480px;
    border: 1px solid var(--tifa-border);
    border-radius: 16px;
    background: #f8fafc;
    overflow: hidden;
}

.tifa-pdf-viewer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--tifa-border);
    background: #ffffff;
}

.tifa-pdf-viewer-icon {
    flex: 0 0 auto;
    color: #dc2626;
    font-size: 22px;
}

.tifa-pdf-viewer-title {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 700;
    color: #334155;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tifa-pdf-viewer-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    color: #64748b;
    text-decoration: none;
    transition: background-color 120ms ease, color 120ms ease;
}

    .tifa-pdf-viewer-open:hover {
        background: #f1f5f9;
        color: #1d4ed8;
    }

.tifa-pdf-viewer-frame {
    flex: 1 1 auto;
    width: 100%;
    border: 0;
    background: #ffffff;
}

.tifa-pdf-viewer-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 100%;
    padding: 40px 24px;
    text-align: center;
}

.tifa-pdf-viewer-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 62px;
    height: 62px;
    margin-bottom: 4px;
    border-radius: 999px;
    background: #eef2f7;
    color: #94a3b8;
}

    .tifa-pdf-viewer-empty-icon .rz-icon {
        font-size: 30px;
    }

.tifa-pdf-viewer-empty-title {
    font-weight: 800;
    color: #334155;
}

.tifa-pdf-viewer-empty-text {
    max-width: 300px;
}

@media (max-width: 1100px) {
    .tifa-details {
        grid-template-columns: 1fr;
    }

    .tifa-sidebar {
        position: static;
    }

    .tifa-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .tifa-sidebar-item {
        width: auto;
        flex: 1 1 160px;
    }

    .tifa-tekeningen {
        grid-template-columns: 1fr;
    }

    .tifa-pdf-viewer {
        position: static;
        height: auto;
        min-height: 520px;
    }
}

.rz-dialog.tifa-confirm-wide {
    width: 600px !important;
    max-width: 90vw !important;
}

/* Orderbegeleidingsbon */
.tifa-orderguide {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tifa-orderguide-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 46px 24px;
    color: var(--tifa-muted);
}

.tifa-orderguide-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 6px 0;
    background: var(--tifa-surface);
}

.tifa-controles-subsection {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 4px 2px;
}

.tifa-controles-placeholder {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 1px dashed var(--tifa-border);
    border-radius: 12px;
    color: var(--tifa-muted);
    background: var(--tifa-surface);
}

.tifa-controletype-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid var(--tifa-border);
    border-radius: 14px;
    overflow: hidden;
    background: var(--tifa-surface);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.15s ease;
}

.tifa-controletype-card + .tifa-controletype-card {
    margin-top: 24px;
}

.tifa-controletype-card:hover {
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.1);
}

.tifa-controletype-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    cursor: pointer;
    background: linear-gradient(135deg, #334155 0%, #6b7280 100%);
    color: #ffffff;
    user-select: none;
}

.tifa-controletype-header:hover {
    filter: brightness(1.06);
}

.tifa-controletype-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.tifa-controletype-header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.tifa-controletype-chevron {
    flex-shrink: 0;
}

.tifa-controletype-title {
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tifa-controletype-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.18);
    font-size: 0.8rem;
    font-weight: 500;
    flex-shrink: 0;
}

.tifa-controletype-stat .rz-icon {
    font-size: 14px;
}

.tifa-controletype-stat-pending .rz-icon {
    color: #fcd34d;
}

.tifa-controletype-stat-done .rz-icon {
    color: #86efac;
}

.tifa-controletype-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.tifa-controletype-add-button.rz-button {
    width: 50px;
    height: 36px;
    min-width: 36px;
    border-radius: 10px;
    background: #ffffff;
    color: #3a5c85;
    border: none;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.2);
}

.tifa-controletype-add-button.rz-button:hover {
    background: #f1f5f9;
    color: #1d4ed8;
}

.tifa-controletype-body {
    padding: 16px 18px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tifa-controletype-panels {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.tifa-controletype-panel {
    width: 100%;
    min-width: 0;
}

.tifa-controletype-panel-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--tifa-text);
}

.tifa-controletype-panel-icon {
    font-size: 18px;
}

.tifa-controletype-panel-icon-pending {
    color: var(--tifa-orange);
}

.tifa-controletype-panel-icon-done {
    color: var(--tifa-green);
}

.tifa-controletype-badge-pending {
    background: var(--tifa-orange-soft);
    color: var(--tifa-orange);
}

.tifa-controletype-badge-done {
    background: var(--tifa-green-soft);
    color: var(--tifa-green);
}

.tifa-controletype-grid {
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid var(--tifa-border);
}

.tifa-controle-resumable {
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.tifa-controle-resumable:hover {
    border-color: var(--tifa-primary, #667eea);
    background: var(--tifa-surface-hover, rgba(102, 126, 234, 0.06));
}

.tifa-verflaagdikte-photos {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tifa-photo-capture {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    align-self: flex-start;
    padding: 10px 16px;
    border-radius: 12px;
    border: 1px solid var(--tifa-border);
    background: var(--tifa-surface);
    color: var(--tifa-text);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s ease;
}

    .tifa-photo-capture:hover {
        border-color: var(--tifa-muted);
        background: #f8fafc;
    }

.tifa-photo-input {
    display: none;
}

.tifa-photo-error {
    color: var(--tifa-red);
}

.tifa-photo-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.tifa-photo-thumb {
    position: relative;
    width: 100%;
    max-width: 480px;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--tifa-border);
    background: #000;
}

    .tifa-photo-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
        cursor: zoom-in;
    }

.tifa-photo-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: zoom-in;
}

.tifa-photo-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: none;
    background: rgba(15, 23, 42, 0.65);
    color: #fff;
    cursor: pointer;
    transition: background 0.15s ease;
}

    .tifa-photo-remove:hover {
        background: rgba(220, 38, 38, 0.9);
    }

.tifa-photo-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-width: 480px;
}

.tifa-photo-date {
    font-size: 0.8rem;
    line-height: 1.2;
    color: var(--tifa-text-secondary, #64748b);
}

/* Compacte fotogrid binnen de controle-uitvoerdialoog: kleine tegels i.p.v. volle-breedte
   foto's, zodat meerdere foto's geen schermruimte opslokken. */
.tifa-run-controle-card {
    max-height: 65vh;
    overflow-y: auto;
}

.tifa-run-controle-card .tifa-photo-list {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    max-height: 220px;
    overflow-y: auto;
    padding: 2px;
}

.tifa-run-controle-card .tifa-photo-item,
.tifa-run-controle-card .tifa-photo-thumb {
    max-width: 96px;
}

.tifa-run-controle-card .tifa-photo-thumb {
    aspect-ratio: 1 / 1;
    border-radius: 8px;
}

.tifa-run-controle-card .tifa-photo-remove {
    width: 22px;
    height: 22px;
    top: 3px;
    right: 3px;
}

.tifa-photo-lightbox {
    position: fixed;
    inset: 0;
    /* Boven alle Radzen-overlays (dialog/tooltip/notification) zodat de klikken hier landen. */
    z-index: 2000000;
    isolation: isolate;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.85);
    /* pointer i.p.v. zoom-out zodat iOS/touch de (gedelegeerde) click doorstuurt naar Blazor. */
    cursor: pointer;
    touch-action: manipulation;
    overflow: auto;
}

    .tifa-photo-lightbox img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        border-radius: 8px;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
        cursor: default;
        /* JS handelt zoom (wheel/pinch) en pan af; browser mag deze gestures niet kapen. */
        touch-action: none;
        transform-origin: center center;
        will-change: transform;
    }

/* Op muis-apparaten de rijkere zoom-cursors tonen; touch heeft toch geen cursor. */
@media (hover: hover) and (pointer: fine) {
    .tifa-photo-lightbox {
        cursor: default;
    }

        .tifa-photo-lightbox img {
            cursor: zoom-in;
        }

            .tifa-photo-lightbox img.tifa-zoomed {
                cursor: grab;
            }
}

.tifa-photo-lightbox-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
    cursor: pointer;
    touch-action: manipulation;
    transition: background 0.15s ease;
}

    .tifa-photo-lightbox-close:hover {
        background: rgba(255, 255, 255, 0.3);
    }

.tifa-orderguide-scroll {
    max-height: calc(100vh - 260px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tifa-orderguide-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: auto;
    font-size: 13.5px;
    font-weight: 600;
}

    .tifa-orderguide-status.success {
        color: var(--tifa-green);
    }

    .tifa-orderguide-status.error {
        color: var(--tifa-red);
    }

    .tifa-orderguide-status .rz-icon {
        font-size: 18px;
    }

.tifa-orderguide-section {
    flex: 0 0 auto;
    border: 1px solid var(--tifa-border);
    border-radius: 16px;
    background: var(--tifa-surface);
    overflow: hidden;
}

.tifa-orderguide-section-title {
    margin: 0;
    padding: 12px 18px;
    font-size: 15px;
    font-weight: 700;
    color: white;
    background: #0c304f;
    border-bottom: 1px solid var(--tifa-border);
}

.tifa-orderguide-items {
    display: flex;
    flex-direction: column;
}

.tifa-orderguide-item {
    display: grid;
    grid-template-columns: minmax(150px, 1.3fr) auto minmax(150px, 1fr) auto minmax(160px, 1.4fr);
    align-items: center;
    gap: 14px;
    padding: 4px 18px;
    border-bottom: 1px solid var(--tifa-border);
}

    .tifa-orderguide-item:last-child {
        border-bottom: none;
    }

.tifa-orderguide-item-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--tifa-text);
}

.tifa-orderguide-approval {
    display: inline-flex;
    gap: 14px;
}

.tifa-orderguide-approve,
.tifa-orderguide-na,
.tifa-orderguide-reject {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 2px solid var(--tifa-border);
    background: var(--tifa-surface);
    color: var(--tifa-muted);
    cursor: pointer;
    transition: all 0.5s ease;
}

    .tifa-orderguide-approve:hover {
        border-color: var(--tifa-green);
        color: var(--tifa-green);
    }

    .tifa-orderguide-na:hover {
        border-color: var(--tifa-muted);
        color: var(--tifa-text);
    }

    .tifa-orderguide-reject:hover {
        border-color: var(--tifa-red);
        color: var(--tifa-red);
    }

    .tifa-orderguide-approve.active-approve {
        background: var(--tifa-green);
        border-color: var(--tifa-green);
        color: #ffffff;
    }

    .tifa-orderguide-na.active-na {
        background: #eef2f7;
        border-color: var(--tifa-muted);
        color: #334155;
    }

    .tifa-orderguide-reject.active-reject {
        background: var(--tifa-red);
        border-color: var(--tifa-red);
        color: #ffffff;
    }

.tifa-orderguide-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: center;
    width: 128px;
    padding: 4px 10px;
    border: 1px solid var(--tifa-border);
    border-radius: 9px;
    background: var(--tifa-surface-soft);
    color: var(--tifa-text);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

    .tifa-orderguide-date .rz-icon {
        font-size: 16px;
        color: var(--tifa-muted);
    }

    .tifa-orderguide-date.empty {
        color: var(--tifa-muted);
        font-weight: 500;
        font-style: italic;
    }

.tifa-orderguide-filledby,
.tifa-orderguide-remark {
    width: 100%;
}

@media (max-width: 900px) {
    .tifa-orderguide-item {
        grid-template-columns: 1fr auto;
        grid-template-areas:
            "name approval"
            "filledby date"
            "remark remark";
        row-gap: 8px;
    }

        .tifa-orderguide-item .tifa-orderguide-item-name {
            grid-area: name;
        }

        .tifa-orderguide-item .tifa-orderguide-approval {
            grid-area: approval;
            justify-self: end;
        }

        .tifa-orderguide-item .tifa-orderguide-filledby {
            grid-area: filledby;
        }

        .tifa-orderguide-item .tifa-orderguide-date {
            grid-area: date;
            justify-self: end;
        }

        .tifa-orderguide-item .tifa-orderguide-remark {
            grid-area: remark;
        }
}

/* Opmerkingen (remarks) */
.tifa-remarks-list {
    list-style: none;
    margin: 14px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tifa-remark-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    border: 1px solid var(--tifa-border);
    border-radius: 14px;
    background: var(--tifa-surface);
    box-shadow: 0 1px 2px rgba(12, 48, 79, 0.05);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

    .tifa-remark-item:hover {
        border-color: #0c304f;
        box-shadow: 0 4px 12px rgba(12, 48, 79, 0.1);
    }

.tifa-remark-edit-button,
.tifa-remark-delete-button {
    flex: 0 0 auto;
    align-self: flex-start;
    height: 32px;
    min-height: 32px;
}

.tifa-remark-avatar {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #0c304f;
    color: white;
}

    .tifa-remark-avatar .rz-icon {
        font-size: 20px;
    }

.tifa-remark-body {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tifa-remark-text {
    margin: 0;
    font-size: 14.5px;
    line-height: 1.5;
    color: var(--tifa-text, #1f2933);
    white-space: pre-wrap;
    word-break: break-word;
}

.tifa-remark-meta {
    display: flex;
    justify-content: right;
    margin-top: 10px;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 12.5px;
    color: var(--tifa-text-secondary, #6b7280);
}

.tifa-remark-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

    .tifa-remark-meta-item .rz-icon {
        font-size: 15px;
    }

.tifa-remark-edited {
    font-style: italic;
}

.tifa-remarks-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-align: center;
    padding: 36px 16px;
    margin-top: 14px;
    border: 1px dashed var(--tifa-border);
    border-radius: 14px;
    background: var(--tifa-surface);
}

.tifa-remarks-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(12, 48, 79, 0.08);
    color: #0c304f;
    margin-bottom: 4px;
}

    .tifa-remarks-empty-icon .rz-icon {
        font-size: 26px;
    }

.tifa-remarks-empty-title {
    font-weight: 700;
}

/* Beheer secties */
.tifa-beheer-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.tifa-beheer-toolbar {
    margin-bottom: 4px;
    gap: 0.75rem;
}

.tifa-beheer-subtabs {
    align-self: flex-start;
}

.tifa-beheer-add-row {
    width: 100%;
}

.tifa-beheer-grid {
    border-radius: 14px;
    overflow: hidden;
    margin-top: 18px;
}

.tifa-archive-grid {
    border-radius: 14px;
    overflow: hidden;
    margin-top: 18px;
}

.tifa-archive-grid .rz-data-row {
    min-height: 34px;
}

.tifa-archive-grid-clickable .rz-data-row {
    cursor: pointer;
}

    .tifa-archive-grid-clickable .rz-data-row:hover td {
        background: var(--tifa-surface-soft);
    }

.tifa-archive-grid .rz-data-row td {
    overflow: visible !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
}

/* Radzen kapt cel-inhoud standaard af met overflow:hidden op de span,
   waardoor de onderkant van letters met een staart (bv. g, j, y) werd afgesneden */
.tifa-archive-grid .rz-cell-data {
    overflow: visible !important;
    text-overflow: clip !important;
    line-height: 1.4 !important;
}

/* Rollen-grid: consistente rijhoogte, compacte look */
.tifa-roles-grid {
    max-width: 930px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
    margin-top: 18px;
}

    .tifa-roles-grid .rz-grid-table {
        font-size: 12.5px;
    }

        .tifa-roles-grid .rz-grid-table thead th {
            background: #f8fafc;
        }

    .tifa-roles-grid .rz-data-row:hover td {
        background: #f5f7ff !important;
    }

    .tifa-roles-grid .rz-data-row td,
    .tifa-roles-grid .rz-data-row th {
        height: 44px;
        vertical-align: middle;
        padding-top: 4px;
        padding-bottom: 4px;
    }

    .tifa-roles-grid .rz-column-title {
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0.02em;
        text-transform: uppercase;
        color: #64748b;
    }

    /* Forceer de breedte van de "Rol"-kolom betrouwbaar via de eigen CssClass */
    .tifa-roles-grid th.tifa-rol-col,
    .tifa-roles-grid td.tifa-rol-col {
        width: 240px !important;
        min-width: 240px !important;
        max-width: 240px !important;
        overflow: visible !important;
    }

    /* Radzen kapt cel-inhoud standaard af met overflow:hidden; hierdoor werd de dropdown afgesneden */
    .tifa-roles-grid .rz-cell-data {
        overflow: visible !important;
        text-overflow: clip !important;
        white-space: normal !important;
    }

/* Compacte, vaste dropdown zodat rijen even hoog blijven */
.tifa-role-dropdown.rz-dropdown {
    width: 200px;
    min-height: 30px;
    height: 30px;
    border-radius: 8px;
    font-size: 11.5px;
}

    .tifa-role-dropdown.rz-dropdown .rz-dropdown-trigger,
    .tifa-role-dropdown.rz-dropdown .rz-inputtext {
        height: 30px;
        line-height: 30px;
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Toon de geselecteerde rol netjes verticaal gecentreerd, niet onder de pijl */
    .tifa-role-dropdown.rz-dropdown .rz-dropdown-label {
        display: flex;
        align-items: center;
        height: 28px;
        line-height: 28px;
        padding: 0 32px 0 12px;
        font-size: 11.5px;
        font-weight: 700;
        letter-spacing: 0.02em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        color: #334155;
    }

/* Zoek-/toewijsrij */
.tifa-roles-add-row {
    width: auto;
    flex-wrap: wrap;
}

.tifa-roles-email-field {
    flex: 0 1 420px;
    max-width: 420px;
    min-width: 240px;
}

.tifa-roles-add-row .rz-dropdown,
.tifa-roles-add-row .rz-textbox {
    border-radius: 10px;
}

.tifa-roles-add-row .rz-dropdown {
    transition: border-color 140ms ease, box-shadow 140ms ease;
}

    .tifa-roles-add-row .rz-dropdown:hover {
        border-color: #a5b4fc;
    }

/* Badge voor niet-bewerkbare rollen (bijv. ADMIN) */
.tifa-role-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 200px;
    height: 30px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: #eef2ff;
    color: #4338ca;
    border: 1px solid #c7d2fe;
}

    .tifa-role-badge.tifa-role-admin {
        background: #eef2ff;
        color: #4338ca;
        border-color: #c7d2fe;
    }

    .tifa-role-badge.tifa-role-werkvoorbereiding {
        background: #ecfdf5;
        color: #047857;
        border-color: #a7f3d0;
    }

    .tifa-role-badge.tifa-role-productie {
        background: #fff7ed;
        color: #c2410c;
        border-color: #fed7aa;
    }

.tifa-app-header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0.75rem 1.5rem;
    width: 100%;
}

.tifa-user-menu {
    display: inline-flex;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

    .tifa-user-menu .rz-navigation-item,
    .tifa-user-menu .rz-navigation-item-wrapper {
        background: transparent !important;
        border: none !important;
        box-shadow: none !important;
    }

    .tifa-user-menu .rz-navigation-menu {
        background: #2b3648 !important;
        border: 1px solid rgba(255, 255, 255, 0.12) !important;
        border-radius: 12px !important;
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35) !important;
        overflow: hidden;
        margin-top: 6px;
        z-index: 10;
    }

        .tifa-user-menu .rz-navigation-menu .rz-navigation-item-link {
            border: none !important;
            border-radius: 0 !important;
            background: transparent !important;
            padding: 10px 16px !important;
            color: #ffffff !important;
        }

            .tifa-user-menu .rz-navigation-menu .rz-navigation-item-link .rz-navigation-item-text,
            .tifa-user-menu .rz-navigation-menu .rz-navigation-item-link .rz-navigation-item-icon {
                color: #ffffff !important;
            }

            .tifa-user-menu .rz-navigation-menu .rz-navigation-item-link:hover {
                background: rgba(255, 255, 255, 0.08) !important;
            }

    .tifa-user-menu .rz-navigation-item-link {
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px;
        padding: 6px 12px 6px 8px;
        border: 1px solid rgba(255, 255, 255, 0.16) !important;
        border-radius: 999px !important;
        background: rgba(255, 255, 255, 0.1) !important;
        cursor: pointer;
        transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
    }

    /* De template (naam) zit in .item-text; centreer die t.o.v. de chevron */
    .tifa-user-menu .item-text {
        display: inline-flex !important;
        align-items: center !important;
        line-height: 1 !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Zorg dat alle tussenlagen van de profielknop verticaal centreren */
    .tifa-user-menu .rz-navigation-item,
    .tifa-user-menu .rz-navigation-item-wrapper {
        display: inline-flex !important;
        align-items: center !important;
    }

        .tifa-user-menu .rz-navigation-item-wrapper > .rz-navigation-item-link {
            display: inline-flex;
            align-items: center;
        }

        .tifa-user-menu .rz-navigation-item-link:hover {
            background: rgba(255, 255, 255, 0.18) !important;
            border-color: rgba(255, 255, 255, 0.28) !important;
        }

    .tifa-user-menu .tifa-user-name {
        display: inline-flex !important;
        align-items: center !important;
        line-height: 1 !important;
        text-align: center;
        font-size: 13px;
        font-weight: 700;
        color: #e2e8f0;
    }

    .tifa-user-menu .rz-navigation-item-link:hover .tifa-user-name {
        color: #ffffff;
    }

    .tifa-user-menu .rz-navigation-item-link > i {
        font-size: 18px;
        color: #e2e8f0;
        margin: 0;
        line-height: 1 !important;
        display: inline-flex !important;
        align-items: center !important;
    }

    .tifa-user-menu .rz-navigation-item-link:hover > i {
        color: #ffffff;
    }

.tifa-header-link {
    font-size: 14px;
    font-weight: 700;
    color: #e2e8f0;
    text-decoration: none;
}

    .tifa-header-link:hover {
        color: #ffffff;
    }

/* Gele kaart */
.tifa-gelekaart-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 14px;
}

    .tifa-gelekaart-table thead th {
        text-align: left;
        padding: 10px 12px;
        font-size: 13px;
        font-weight: 700;
        color: var(--tifa-text-secondary, #6b7280);
        border-bottom: 1px solid var(--tifa-border);
    }

    .tifa-gelekaart-table thead th:first-child {
        font-size: 15px;
        font-weight: 600;
        color: inherit;
    }

    .tifa-gelekaart-col-entry {
        width: auto;
    }

    .tifa-gelekaart-col-geboekt {
        width: 100px;
    }

    .tifa-gelekaart-col-actions {
        width: 60px;
    }

    .tifa-gelekaart-table tbody td {
        padding: 8px 12px;
        border-bottom: 1px solid var(--tifa-border);
        vertical-align: middle;
    }

    .tifa-gelekaart-table tbody tr:last-child td {
        border-bottom: none;
    }

.tifa-gelekaart-checkbox-cell {
    text-align: center;
}

.tifa-gelekaart-input {
    width: 100%;
}

.tifa-gelekaart-delete-button {
    height: 32px;
    min-height: 32px;
}
