html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
    position: relative;
    min-height: 100%;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow-x: hidden;
}

body {
    margin-bottom: 60px;
}

.login-wrap {
    min-height: calc(100dvh - 0px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    background: #fff;
}

.logo-strip {
    display: flex;
    justify-content: center;
    padding-bottom: 16px;
    margin-bottom: 24px;
    border-bottom: 1px solid #cfcfd1;
}

    .logo-strip img {
        max-height: 80px;
        height: auto;
        width: auto;
        max-width: 100%;
        display: block;
    }

    .logo-strip .divider {
        width: 1px;
        height: 26px;
        background: #e9ecef;
    }

.login-card {
    width: min(520px, 92vw);
    background: #fff;
    border: 1px solid #cfcfd1;
    border-radius: 20px;
    padding: 34px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
}

    .login-card h1 {
        font-size: 28px;
        margin: 0 0 22px 0;
        font-weight: 700;
        color: #111827;
    }

form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

label {
    font-size: 14px;
    color: #5b5f67;
    margin-top: 6px;
}

input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #cfd3d8;
    border-radius: 6px;
    outline: none;
    font-size: 16px;
    background: #fff;
}

    input:focus {
        border-color: #2ea39a;
        box-shadow: 0 0 0 3px rgba(46,163,154,.15);
    }

.row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.forgot {
    font-size: 12px;
    color: #5570ff;
    text-decoration: none;
}

    .forgot:hover {
        text-decoration: underline;
    }

.btn-primary {
    margin-top: 18px;
    height: 52px;
    border: none;
    cursor: pointer;
    background: #1aa5a0;
    color: #fff;
    border-radius: 10px;
    border: 2px solid #004b4d;
    font-size: 22px;
    font-weight: 700;
    transition: transform .02s ease, filter .2s ease;
    width: 210px;
    align-self: flex-end;
}

    .btn-primary:hover {
        filter: brightness(0.95);
    }

    .btn-primary:active {
        transform: translateY(1px);
    }

.val-summary {
    color: #b42318;
    font-size: 14px;
    margin-bottom: 4px;
}

.val-msg {
    color: #b42318;
    font-size: 12px;
}

.qr-code {
    display: block;
    margin: 0 auto 16px;
    max-width: 100%;
    height: auto;
}

.page-wrap {
    padding: 24px 28px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.logout-form {
    margin-left: auto;
}

.btn-outline.logout-btn {
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #cfd3d8;
    background: #fff;
}

.filters {
    margin-bottom: 12px;
}

.filters-form {
    width: 100%;
}

.filters .form-control,
.filters .form-select,
.filters .input {
    border: 1px solid #929292 !important;
    border-radius: 5px;
    box-sizing: border-box;
}

.filters-row {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr 0.9fr auto;
    gap: 12px;
    align-items: center;
}

.input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #cfd3d8;
    border-radius: 6px;
}

    .input:focus {
        border-color: #2ea39a;
        box-shadow: 0 0 0 3px rgba(46,163,154,.15);
    }

.search-btn {
    height: 44px;
    padding: 0 18px;
}

.table-wrap {
    border: 1px solid #0b3b3d;
    border-top-left-radius: 15px;
    border-top-right-radius: 15px;
    border-bottom-left-radius: 7px;
    border-bottom-right-radius: 7px;
    overflow: hidden;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

    .table.equal-cols {
        table-layout: fixed;
        width: 100%;
    }

        .table.equal-cols th,
        .table.equal-cols td {
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

    .table thead th {
        background: #004b4d;
        color: #fff;
        text-align: left;
        padding: 14px 12px;
        font-weight: 700;
        border-left: 1px solid #0b3b3d;
        border-right: 1px solid #0b3b3d;
    }

        .table thead th:first-child {
            border-left: none;
        }

        .table thead th:last-child {
            border-right: none;
        }

    .table tbody td {
        padding: 14px 12px;
        border-top: 1px solid #e6e7ea;
        border-left: 1px solid #0b3b3d;
        border-right: 1px solid #0b3b3d;
    }

        .table tbody td:first-child {
            border-left: none;
        }

        .table tbody td:last-child {
            border-right: none;
        }

.text-center {
    text-align: center;
}

.empty-state {
    text-align: center;
    color: #5b5f67;
    padding: 24px;
}

.btn.btn-chip {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #0b3b3d;
    background: #e6faf9;
    text-decoration: none;
}

.bottom-bar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

    .bottom-bar .new-client {
        justify-self: start;
    }

.pagination {
    display: inline-flex;
    gap: 6px;
    justify-self: center;
}

.page-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    border: 1px solid #cfd3d8;
    border-radius: 8px;
    text-decoration: none;
    padding: 0 8px;
}

    .page-btn.is-active {
        border-color: #004b4d;
        background: #e6faf9;
        font-weight: 700;
    }

.page-ellipsis {
    padding: 0 4px;
}

.status-legenda {
    justify-self: end;
    text-decoration: none;
    color: #5b5f67;
}

    .status-legenda:hover {
        text-decoration: underline;
    }

@media (max-width: 980px) {
    .filters-row {
        grid-template-columns: 1fr 1fr 1fr;
    }

    .partner-select, .search-btn {
        grid-column: span 1;
    }
}

@media (max-width: 640px) {
    .filters-row {
        grid-template-columns: 1fr;
    }

    .bottom-bar {
        grid-template-columns: 1fr;
        row-gap: 10px;
    }

    .status-legenda {
        justify-self: start;
    }
}

.filters-form {
    display: contents;
    gap: 0;
}

.filters .form-select,
.filters input.form-control {
    height: 44px;
}

.filters .form-select {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.filters .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px !important;
    padding: 0 20px;
    width: auto !important;
    border: 2px solid #004b4d;
    margin-top: 0 !important;
    font-size: 16px;
    line-height: 1;
}

.pagination .page-item .page-link.active,
.pagination .page-item .page-link.active:hover {
    background-color: var(--bs-dark);
    border-color: var(--bs-dark);
    color: #fff;
}

.table.table-compact thead th {
    padding: 8px 10px;
    line-height: 2;
}

.table.table-compact tbody td {
    padding: 8px 10px;
    line-height: 1.4;
    font-size: 0.95rem;
}

.table.table-compact .btn.btn-sm {
    padding: .2rem .45rem;
    line-height: 1.1;
}

.table.table-compact .nowrap {
    white-space: nowrap;
}

.table.table-compact,
.table {
    margin-bottom: 0;
}

    .table tbody tr:last-child td,
    .table.table-compact tbody tr:last-child td {
        padding-top: 8px;
        padding-bottom: 8px;
        border-bottom: none;
    }

.btn.new-client {
    background: #1aa5a0;
    color: #fff;
    border: 2px solid #004b4d;
    border-radius: 10px;
    padding: 8px 18px;
    font-weight: 700;
    line-height: 1;
    box-shadow: none;
    text-decoration: none;
}

    .btn.new-client:hover {
        filter: brightness(0.95);
        color: #fff;
    }

    .btn.new-client:active {
        transform: translateY(1px);
    }

    .btn.new-client:focus {
        outline: none;
        box-shadow: 0 0 0 3px rgba(0,75,77,.25);
    }

.pagination.pagination-teal {
    display: inline-flex;
    gap: 6px;
}

    .pagination.pagination-teal .page-item {
        margin: 0;
    }

    .pagination.pagination-teal .page-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 45px;
        height: 34px;
        padding: 0 10px;
        border: 2px solid #004b4d;
        border-radius: 8px;
        background: #fff;
        color: #0b3b3d;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
    }

        .pagination.pagination-teal .page-link:hover {
            filter: brightness(0.98);
            text-decoration: none;
        }

        .pagination.pagination-teal .page-item.active .page-link,
        .pagination.pagination-teal .page-link.active {
            background: #1aa5a0;
            color: #fff;
            border-color: #004b4d;
        }

        .pagination.pagination-teal .page-link.arrow {
            background: #2e888d;
            color: #fff;
            margin-left: 10px;
            margin-right: 10px;
        }

    .pagination.pagination-teal .page-item.disabled .page-link {
        background: #e0e0e0;
        color: #8a8f98;
        border-color: #cfd3d8;
        pointer-events: none;
    }

    .pagination.pagination-teal .page-link.ellipsis {
        background: #e6e6e6;
        color: #666;
        border-color: #cfd3d8;
        font-weight: 600;
    }

input#Filter_DateFrom {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

input#Filter_DateTo {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
}

th.sortable {
    padding: 0;
}

    th.sortable > a.th-link {
        display: block;
        width: 100%;
        height: 100%;
        padding: .5rem .75rem;
        color: inherit;
        text-decoration: none;
    }

        th.sortable > a.th-link:hover,
        th.sortable > a.th-link:focus {
            text-decoration: underline;
            background-color: rgba(255,255,255,.06);
        }

@media (min-width: 992px) {
    .container-wider {
        max-width: 1100px;
    }
}

@media (min-width: 1200px) {
    .container-wider {
        max-width: 1340px;
    }
}

@media (min-width: 1400px) {
    .container-wider {
        max-width: 1560px;
    }
}

/* ===========================
   Client Details Modal (scoped to this modal only)
   =========================== */

#clientDetailsModal {
    --cd-container-w: 920px;
    --cd-pane-h: 420px;
    --cd-gutter-x: 1.5rem;
    --cd-teal: #1aa5a0; /* active tab */
    --cd-teal-dark: #0c4443; /* inactive tab */
    --cd-ink: #223432;
}

    /* Modal sizing & structure */
    #clientDetailsModal .modal-dialog {
        --bs-modal-width: 980px; /* fixed width so it doesn't grow wider */
    }

    #clientDetailsModal .modal-content {
        max-height: calc(100dvh - 4rem);
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        border: 1px solid #d7e3e1;
        width: 100%;
        max-width: 100%;
    }

    #clientDetailsModal .modal-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        align-items: stretch; /* use full modal width for content */
    }

    /* Header title styling */
    #clientDetailsModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #clientDetailsModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: var(--cd-teal);
    }

    /* Tabs ABOVE the card, attached to its top border */
    #clientDetailsModal .cd-tabs-outer {
        --tab-pad-y: .40rem; /* base vertical padding */
        --tab-pad-y-active: .68rem; /* selected tab vertical padding */
        --tab-raise: -2px; /* how far the active tab lifts up */
    }

        #clientDetailsModal .cd-tabs-outer .nav-link {
            padding: var(--tab-pad-y) 1.05rem;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            background: var(--cd-teal-dark);
            color: #fff;
            font-weight: 800;
            transition: padding .18s ease, transform .18s ease, background-color .18s ease, box-shadow .18s ease;
        }

            /* inactive tabs look slightly smaller and flatter */
            #clientDetailsModal .cd-tabs-outer .nav-link:not(.active) {
                opacity: .95;
                filter: saturate(.9);
            }

            /* selected tab = bigger + raised */
            #clientDetailsModal .cd-tabs-outer .nav-link.active {
                background-color: #10a9a0;
                color: #fff;
                border-color: #d8e2e7;
                border-bottom-color: transparent; /* merge with card */
                padding: var(--tab-pad-y-active) 1.05rem;
                transform: translateY(var(--tab-raise));
                box-shadow: 0 6px 14px rgba(0,0,0,.08);
                z-index: 2;
            }

/* (optional) tone down the lift on narrow screens */
@media (max-width: 640px) {
    #clientDetailsModal .cd-tabs-outer {
        --tab-pad-y-active: .58rem;
        --tab-raise: -1px;
    }
}

/* Tab panes fill the modal width (no side gap) */
#clientDetailsModal .tab-content {
    width: 100%;
    padding: 0 var(--cd-gutter-x);
    margin: 0;
    min-height: var(--cd-pane-h);
}

#clientDetailsModal .tab-pane {
    display: none;
    width: 100%;
}

    #clientDetailsModal .tab-pane.active,
    #clientDetailsModal .tab-pane.show.active {
        display: block;
    }

#clientDetailsModal .cd-card {
    width: 100%;
    min-height: var(--cd-pane-h);
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #cfe0dd;
    border-radius: 14px;
    box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
    padding: 1rem;
}

    #clientDetailsModal .cd-card .table-responsive {
        flex: 1 1 auto;
        min-height: 0;
        overflow: auto;
    }

/* Labels & read-only inputs */
#clientDetailsModal .cd-label {
    display: block;
    margin-bottom: .25rem;
    font-weight: 700;
    color: #445b59;
}

#clientDetailsModal .cd-input {
    height: 36px;
    font-size: .95rem;
    color: #344b49;
    background: #f6faf9;
    border-color: #e3eeec;
}

    #clientDetailsModal .cd-input:read-only {
        opacity: .9;
    }

#clientDetailsModal .cd-input-narrow {
    max-width: 110px;
}

/* Acties button (teal) */
#clientDetailsModal .btn-teal {
    background: var(--cd-teal);
    border-color: var(--cd-teal);
    color: #fff;
}

    #clientDetailsModal .btn-teal:hover,
    #clientDetailsModal .btn-teal:focus {
        background: #0c5a51;
        border-color: #0c5a51;
        color: #fff;
    }

/* Footer logos */
#clientDetailsModal .modal-footer {
    justify-content: center;
}

#clientDetailsModal .cd-logo-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 96px;
    width: min(840px,calc(100% - 3rem));
    margin: 22px auto 0;
    padding: .6rem 1rem;
    background: #fff;
    border: 1px solid #e7efee;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

    #clientDetailsModal .cd-logo-pill img {
        max-height: 70px;
        height: auto;
        width: auto;
    }

/* Tickets table */
#clientDetailsModal .cd-tickets-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #fff;
    border: 1px solid #cfe0dd;
    border-radius: 10px;
    font-size: .92rem;
    line-height: 1.2;
}

    #clientDetailsModal .cd-tickets-table thead th {
        background: #0b5a57;
        color: #fff;
        font-weight: 700;
        padding: .45rem .65rem;
        text-align: left;
        border-right: 1px solid #094846;
        white-space: nowrap;
    }

        #clientDetailsModal .cd-tickets-table thead th:first-child {
            border-top-left-radius: 8px;
        }

        #clientDetailsModal .cd-tickets-table thead th:last-child {
            border-top-right-radius: 8px;
            border-right: none;
        }

    #clientDetailsModal .cd-tickets-table tbody td {
        padding: .40rem .60rem;
        border-top: 1px solid #e4ecea;
        border-right: 1px solid #e4ecea;
        vertical-align: middle;
    }

        #clientDetailsModal .cd-tickets-table tbody td:last-child {
            border-right: none;
        }

    #clientDetailsModal .cd-tickets-table tbody tr:nth-child(even) {
        background: #fafdfc;
    }

    #clientDetailsModal .cd-tickets-table .cd-empty {
        color: #7c8790;
        padding: .70rem 0;
    }
    /* Suggested column sizing */
    #clientDetailsModal .cd-tickets-table thead th:nth-child(1) {
        width: 12%;
    }
    /* Datum */
    #clientDetailsModal .cd-tickets-table thead th:nth-child(2) {
        width: 16%;
    }
    /* Activiteit */
    #clientDetailsModal .cd-tickets-table thead th:nth-child(3) {
        width: auto;
    }
    /* Inhoud */
    #clientDetailsModal .cd-tickets-table thead th:nth-child(4) {
        width: 16%;
    }
    /* Ticket Code */
    #clientDetailsModal .cd-tickets-table thead th:nth-child(5) {
        width: 12%;
        text-align: center;
    }
    /* Afgehandeld */
    #clientDetailsModal .cd-tickets-table tbody td:nth-child(5) {
        text-align: center;
    }

    #clientDetailsModal .cd-tickets-table tbody td:nth-child(3) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

/* Dropdown menu */
#clientDetailsModal .cd-dropdown .cd-dd-toggle {
    padding: .35rem .9rem;
    font-weight: 700;
    border-radius: .4rem;
}

    #clientDetailsModal .cd-dropdown .cd-dd-toggle:focus {
        box-shadow: 0 0 0 .18rem rgba(16,109,98,.25);
    }

#clientDetailsModal .cd-dd-menu {
    --rail-w: 42px;
    background: #1a8f8a;
    border: 1px solid #0e5b57;
    border-radius: .5rem;
    padding: 0;
    min-width: 220px;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(0,0,0,.18);
}

#clientDetailsModal .cd-dd-item {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: .75rem;
    padding: 0;
    color: #fff;
    font-weight: 700;
    background: #1a8f8a;
}

    #clientDetailsModal .cd-dd-item + .cd-dd-item {
        border-top: 1px solid rgba(255,255,255,.12);
    }

    #clientDetailsModal .cd-dd-item > span:first-child {
        padding: .55rem .75rem;
        flex: 1 1 auto;
    }

#clientDetailsModal .cd-dd-icon {
    width: var(--rail-w);
    background: #0c3f41;
    border-left: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

#clientDetailsModal .cd-dd-item:first-child .cd-dd-icon {
    border-top-right-radius: .5rem;
}

#clientDetailsModal .cd-dd-item:last-child .cd-dd-icon {
    border-bottom-right-radius: .5rem;
}

#clientDetailsModal .cd-dd-item:hover {
    background: #167a76;
    color: #fff;
}

    #clientDetailsModal .cd-dd-item:hover .cd-dd-icon {
        background: #0a3537;
    }

#clientDetailsModal .cd-dd-icon i {
    color: #fff;
    font-size: 1rem;
    line-height: 1;
}

/* Fade-in (server-rendered .show) */
#clientDetailsModal.modal.fade .modal-dialog {
    transform: none;
    transition: none;
}

@keyframes modalFadeUp {
    from {
        opacity: 0;
        transform: translate3d(0, 12px, 0);
    }

    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

#clientDetailsModal.show .modal-dialog {
    animation: modalFadeUp .22s ease-out both;
}

/* Backdrop fade-in */
@keyframes backdropFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: var(--bs-backdrop-opacity, .5);
    }
}

.modal-backdrop.fade.show {
    animation: backdropFadeIn .20s linear both;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    #clientDetailsModal.show .modal-dialog,
    .modal-backdrop.fade.show {
        animation: none !important;
    }
}

/* One-button dropdown that *looks* split */
#clientDetailsModal .cd-dropdown .cd-dd-toggle-one {
    position: relative;
    padding-right: calc(44px + 1rem); /* space for the right rail */
    font-weight: 800;
    border-radius: .6rem; /* full rounded pill */
    line-height: 1.1;
}

    /* Hide Bootstrap's default caret; we draw our own in the rail */
    #clientDetailsModal .cd-dropdown .cd-dd-toggle-one.dropdown-toggle::after {
        display: none;
    }

    /* The dark right rail with the chevron (purely visual) */
    #clientDetailsModal .cd-dropdown .cd-dd-toggle-one .cd-rail {
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        width: 44px;
        background: #0c3f41;
        border-left: 1px solid rgba(255,255,255,.15);
        border-top-right-radius: .6rem;
        border-bottom-right-radius: .6rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        pointer-events: none; /* entire button remains clickable */
    }

        #clientDetailsModal .cd-dropdown .cd-dd-toggle-one .cd-rail i {
            color: #fff;
            font-size: 1rem;
        }

    /* Optional hover focus state to match your palette */
    #clientDetailsModal .cd-dropdown .cd-dd-toggle-one:hover,
    #clientDetailsModal .cd-dropdown .cd-dd-toggle-one:focus {
        filter: brightness(.97);
    }
/* === Acties button & dropdown: unified height === */
#clientDetailsModal {
    --cd-dd-h: 44px; /* control height for button + items */
    --cd-dd-rail-w: 44px; /* width of the dark right rail on the button */
}

    /* One-button dropdown that looks split */
    #clientDetailsModal .cd-dropdown .cd-dd-toggle-one {
        position: relative;
        display: inline-flex;
        align-items: center;
        height: var(--cd-dd-h);
        line-height: 1;
        font-weight: 800;
        border-radius: .6rem;
        padding: 0 calc(var(--cd-dd-rail-w) + 1rem) 0 1rem; /* space for right rail */
    }

        /* kill default caret; we draw our own in the rail */
        #clientDetailsModal .cd-dropdown .cd-dd-toggle-one.dropdown-toggle::after {
            display: none;
        }

        /* Right rail with chevron — matches the menu icon rail height */
        #clientDetailsModal .cd-dropdown .cd-dd-toggle-one .cd-rail {
            position: absolute;
            top: 0;
            right: 0;
            bottom: 0;
            width: var(--cd-dd-rail-w);
            background: #0c3f41;
            border-left: 1px solid rgba(255,255,255,.15);
            border-top-right-radius: .6rem;
            border-bottom-right-radius: .6rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            pointer-events: none; /* whole button stays clickable */
        }

            #clientDetailsModal .cd-dropdown .cd-dd-toggle-one .cd-rail i {
                color: #fff;
                font-size: 1rem;
            }

    /* Menu items use the same height */
    #clientDetailsModal .cd-dd-menu {
        padding: 0; /* keep items flush */
    }

    #clientDetailsModal .cd-dd-item {
        min-height: var(--cd-dd-h);
        display: flex;
        align-items: stretch;
        justify-content: space-between;
        gap: .75rem;
        padding: 0; /* label rail handles padding */
    }

        #clientDetailsModal .cd-dd-item > span:first-child {
            display: flex;
            align-items: center;
            padding: 0 .75rem; /* vertical centering comes from flex */
        }

    #clientDetailsModal .cd-dd-icon {
        width: var(--cd-dd-rail-w);
        height: var(--cd-dd-h);
        background: #0c3f41;
        border-left: 1px solid rgba(255,255,255,.15);
        display: flex;
        align-items: center;
        justify-content: center;
    }

.cd-edit .cd-title {
    font-weight: 600;
}

.cd-title-underline {
    width: 210px;
    height: 2px;
    background: #e5e7eb;
}

.cd-back {
    color: #0f766e;
}

    .cd-back:hover {
        color: #0b4f4a;
    }

.cd-tabs-inner {
    display: inline-flex;
    border-bottom: 0;
    margin-bottom: .75rem;
}

    .cd-tabs-inner .nav-link {
        background: #0f766e;
        color: #fff;
        border-radius: .75rem;
        font-weight: 600;
        padding: .35rem .9rem;
        border: none;
        cursor: default;
    }

.cd-card {
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    background: #fff;
    box-shadow: 0 1px 1px rgba(16,24,40,.04);
}

.cd-label {
    display: block;
    font-size: .9rem;
    color: #475467;
    margin-bottom: .25rem;
    font-weight: 600;
}

.cd-input {
    background: #f8fbfb;
    border-color: #e6f1f0;
    border-radius: .6rem;
    height: 40px;
}

    .cd-input:focus {
        box-shadow: none;
        border-color: #0f766e;
        background: #fff;
    }

.cd-input-narrow {
    width: 120px;
}

.btn-teal {
    background: #0f766e;
    color: #fff;
    border-radius: .65rem;
    padding: .5rem 1rem;
    border: none;
}

    .btn-teal:hover {
        background: #0b625c;
        color: #fff;
    }

.cd-footer-logos {
    color: #667085;
}

.cd-logo {
    font-weight: 600;
    letter-spacing: .2px;
}

.cd-submit {
    min-width: 130px;
}

.btn-outline-teal {
    background: transparent;
    border: 1px solid #0f766e;
    color: #0f766e;
    border-radius: .65rem;
    padding: .5rem 1rem;
}

    .btn-outline-teal:hover {
        background: #e6f1f0;
        color: #0b625c;
    }

.btn-teal {
    background: #0f766e;
    color: #fff;
    border-radius: .65rem;
    padding: .5rem 1rem;
    border: none;
}

    .btn-teal:hover {
        background: #0b625c;
        color: #fff;
    }

.btn-outline-teal {
    background: transparent;
    border: 1px solid #0f766e;
    color: #0f766e;
    border-radius: .65rem;
    padding: .5rem 1rem;
}

    .btn-outline-teal:hover {
        background: #e6f1f0;
        color: #0b625c;
    }

.cd-actions {
    white-space: nowrap;
}

    .cd-actions .btn {
        height: 40px;
    }

.cd-edit .cd-input:not([readonly]) {
    border: 1.5px solid #7ca8a3;
    background: #f6fbfb;
}

    .cd-edit .cd-input:not([readonly]):hover {
        border-color: #5b948e;
    }

    .cd-edit .cd-input:not([readonly]):focus {
        border-color: #0f766e;
        box-shadow: 0 0 0 2px rgba(15,118,110,.15);
        background: #fff;
    }

.cd-input--readonly {
    pointer-events: none; /* not focusable/clickable */
}

    .cd-input--readonly[readonly] {
        /* keep your normal input background; don't gray out like disabled */
    }

/* Make an editable field visually stand out (white bg + darker outline) */
.cd-input--editable {
    background-color: #fff !important;
    border-color: var(--teal-600, #1b7a77) !important;
}

    .cd-input--editable:focus {
        background-color: #fff !important;
        border-color: var(--teal-700, #146866) !important;
        box-shadow: 0 0 0 .2rem rgba(20,104,102,.15);
        outline: 0;
    }
/* Non-interactive but visually identical to normal inputs */
.cd-input--readonly {
    pointer-events: none;
}

/* Make editable inputs stand out (white bg + stronger outline) */
.cd-input--editable {
    background-color: #fff !important;
    border-color: var(--teal-600, #1b7a77) !important;
}

    .cd-input--editable:focus {
        background-color: #fff !important;
        border-color: var(--teal-700, #146866) !important;
        box-shadow: 0 0 0 .2rem rgba(20,104,102,.15);
        outline: 0;
    }

textarea.cd-input {
    height: auto !important; /* ignore any fixed input height from .cd-input */
    min-height: 12rem; /* ~192px starting size */
    line-height: 1.4;
    resize: vertical; /* allow user to drag taller if needed */
}

/* Optional: clamp for responsive min-height (uncomment if you like)
textarea.cd-input {
  min-height: clamp(10rem, 30vh, 18rem);
}
*/
/* --- Client details tabs: flush-left, baseline aligned, no modal jump --- */
#clientDetailsModal .cd-tabs-outer {
    margin: 0 var(--cd-gutter-x) -1px var(--cd-gutter-x); /* FLUSH with card edges; sit on card border */
    padding: 0;
    display: flex;
    align-items: flex-end; /* bottoms aligned */
    gap: .5rem;
    border-bottom: 1px solid #cfe0dd; /* baseline continues into the card */
    height: 48px; /* fixed strip height -> no layout shift */
}

    #clientDetailsModal .cd-tabs-outer .nav-link {
        background: var(--cd-teal-dark);
        color: #fff;
        border: 1px solid #cfe0dd;
        border-bottom: none; /* weld to baseline */
        border-top-left-radius: 12px;
        border-top-right-radius: 12px;
        height: 34px; /* INACTIVE (shorter) */
        line-height: 34px;
        padding: 0 1rem;
        font-weight: 800;
        display: inline-flex;
        align-items: center;
        position: relative;
        z-index: 1;
    }

        #clientDetailsModal .cd-tabs-outer .nav-link.active {
            background: #10a9a0;
            height: 42px; /* ACTIVE (taller) */
            line-height: 42px;
            z-index: 2; /* in front of card edge */
        }

/* Card sits right under the tabs (tiny overlap so the borders meet) */
#clientDetailsModal .cd-card {
    border: 1px solid #cfe0dd;
    border-radius: 0 0 14px 14px; /* no top rounding */
    margin-top: -1px; /* touch the baseline */
    padding: 1rem;
}
/* Tabs strip: flush with the card left edge, a bit wider tabs */
#clientDetailsModal .cd-tabs-outer {
    /* sit right on top of the card’s top border */
    margin: 0 0 -1px 0;
    /* indent exactly like the card’s side inset */
    padding: 0 var(--cd-gutter-x);
    display: flex;
    align-items: flex-end; /* keep bottoms aligned */
    gap: .6rem;
    border-bottom: 1px solid #cfe0dd;
    height: 48px; /* fixed => no modal jump */
    list-style: none; /* kill UL bullets */
}

    /* wider tabs */
    #clientDetailsModal .cd-tabs-outer .nav-link {
        padding: 0 1.25rem; /* was ~1rem */
    }

        #clientDetailsModal .cd-tabs-outer .nav-link.active {
            padding: 0 1.25rem; /* match active */
        }
/* Collapse cards to content height in all partner modals */
#clientDetailsModal .tab-content,
#clientDetailsModal .cd-card,
#clientEditModal .cd-card,
#clientCancelModal .cd-card,
#clientOpenRequestModal .cd-card {
    min-height: 0 !important; /* or: unset */
}

/* (optional) slightly tighter padding if you want them extra snug */
#clientDetailsModal .cd-card,
#clientEditModal .cd-card,
#clientCancelModal .cd-card,
#clientOpenRequestModal .cd-card {
    padding-bottom: .75rem;
}

:root {
    --teal: #19a5a8;
    --text: #111827;
    --muted: #6b7280;
    --line: #e5e7eb;
}

/* full-page centering & whitespace */
.login-wrap {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    padding: 48px 16px;
    background: #fff;
}

/* logo pill */
.logo-strip {
    display: flex;
    align-items: center;
    gap: 16px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 8px 16px;
    box-shadow: 0 1px 0 rgba(0,0,0,.02);
}

    .logo-strip img {
        object-fit: contain;
    }

/* card */
.login-card {
    width: 520px;
    max-width: 100%;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 16px;
    padding: 28px 28px 32px;
    box-shadow: 0 2px 0 rgba(0,0,0,.02);
}

    .login-card h1 {
        margin: 6px 0 22px;
        font-size: 28px;
        font-weight: 700;
        color: var(--text);
    }

.dev-login {
    margin-bottom: 8px;
}

    .dev-login button {
        width: 100%;
        background: #f3f4f6;
        border: 1px dashed var(--line);
        color: #374151;
        border-radius: 6px;
        padding: 6px 10px;
        font-size: 12px;
    }

.form-field {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--muted);
}

.form-input {
    width: 100%;
    height: 44px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 16px;
}

    .form-input:focus {
        outline: none;
        border-color: var(--teal);
        box-shadow: 0 0 0 3px rgba(25,165,168,.12);
    }

.forgot {
    margin-top: 6px;
}

    .forgot a {
        font-size: 12px;
        text-decoration: none;
        color: #2563eb;
    }

        .forgot a:hover {
            text-decoration: underline;
        }

.val-summary {
    color: #b91c1c;
    margin-bottom: 12px;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 12px 20px;
    font-weight: 700;
    cursor: pointer;
}

.btn-lg {
    height: 48px;
    font-size: 20px;
}

.w-100 {
    width: 100%;
}

.two-fa,
.enroll {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.qr-code {
    width: 160px;
    height: 160px;
}

.th-with-icon {
    display: flex;
    align-items: center
}

.th-info-btn {
    line-height: 1
}
/* Fallback “i” badge if no icon font is available */
.th-info-fallback {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-weight: 700;
    font-size: .75rem;
    opacity: .85;
}
/* If Bootstrap Icons are present, hide the fallback dot */
.bi.bi-info-circle + .th-info-fallback {
    display: none
}
/* Make the TH a positioning context */
.table thead .th-status {
    position: relative;
}

/* White, top-right, small, and clickable without triggering sort */
.th-status .th-info-btn {
    position: absolute;
    top: .35rem;
    right: .5rem;
    line-height: 1;
    opacity: .9;
    text-decoration: none;
}

    .th-status .th-info-btn:hover {
        opacity: 1;
    }

/* Icon sizing */
.th-status .bi {
    font-size: 1rem;
}

/* Fallback round "i" if no Bootstrap Icons */
.th-status .th-info-fallback {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 18px;
    height: 18px;
    border: 1px solid #fff;
    border-radius: 50%;
    font-weight: 700;
    font-size: .75rem;
    color: #fff;
}
/* Hide fallback if icon font is present */
.th-status .bi + .th-info-fallback {
    display: none;
}

.page-wrap .bottom-counter {
    font-weight: 600;
}

.navbar .nav-link {
    font-weight: 600;
    color: #0f6e6e; /* teal-ish */
}

    .navbar .nav-link:hover {
        color: #0a4f4f;
    }

    .navbar .nav-link.active {
        text-decoration: underline;
        text-underline-offset: 4px;
    }
/* Ticket dashboard: closed rows look slightly muted */
.table .row-closed {
    background-color: #f6f7f9; /* soft gray */
}

    .table .row-closed td {
        color: #6c757d; /* Bootstrap's muted-ish text */
    }
/* Ticket modal look & feel (matches your sketch) */
.ticket-modal .modal-dialog {
    max-width: 820px;
}

.ticket-modal .modal-content {
    border-radius: 1rem;
}

.ticket-modal .modal-title {
    font-weight: 700;
}

.ticket-modal .td-underline {
    height: 3px;
    width: 210px;
    background: var(--teal, #0aa1a7);
    border-radius: 2px;
}

.ticket-modal .td-pill {
    display: inline-block;
    padding: .4rem 1rem;
    border-radius: 999px;
    background: rgba(10,161,167,.12);
    color: var(--teal, #0aa1a7);
    font-weight: 700;
}

.ticket-modal .td-label {
    font-weight: 600;
    color: #6c757d; /* muted */
}

.btn-teal {
    --bs-btn-bg: var(--teal, #0aa1a7);
    --bs-btn-border-color: var(--teal, #0aa1a7);
    --bs-btn-hover-bg: #078c92;
    --bs-btn-hover-border-color: #078c92;
    --bs-btn-active-bg: #067a7f;
    --bs-btn-active-border-color: #067a7f;
    color: #fff;
}
/* Modal card + slim header */
.modal-card {
    border-radius: 12px;
    border: 1px solid #e8ecee;
}

.modal-header-slim {
    padding-top: .6rem;
    padding-bottom: .6rem;
    border-bottom: 0;
}

/* Section title with left chip and underline */
.section-title {
    position: relative;
    padding-bottom: .5rem;
    border-bottom: 2px solid rgba(0,0,0,.08);
}

.section-chip {
    display: inline-block;
    padding: .35rem .75rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 600;
    line-height: 1;
}

.section-title .title-text {
    line-height: 1;
}

/* Compact labels like the filters/table style */
.form-label-compact {
    font-size: .85rem;
    color: #6c757d;
}

/* Bordered “panel” text areas to echo image 2 blocks */
.panel-field {
    border: 1px solid #dbe2e6;
    border-radius: 8px;
    background: #fff;
    padding: .25rem; /* thin inset like your table cells */
}

.panel-field-input {
    border: 0 !important;
    box-shadow: none !important;
    resize: vertical;
}

.form-control-plaintext {
    padding-top: .25rem;
    padding-bottom: .25rem;
}

#ticketDetailsModal {
    --cd-ink: #223432; /* same ink color used in client modal */
}

    #ticketDetailsModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #ticketDetailsModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: #1aa5a0; /* your teal */
    }

    #ticketDetailsModal .modal-dialog {
        --bs-modal-width: 980px; /* same as #clientDetailsModal */
        max-width: 980px; /* defensive: overrides any older max-width rules */
    }

    #ticketDetailsModal .cd-title-meta {
        margin-left: 1.5rem;
    }

    #ticketDetailsModal .cd-tabs-outer {
        /* sit right on the card’s top border */
        margin: 0 0 -1px 0;
        /* match your modal gutter if you want side alignment */
        padding: 0 var(--cd-gutter-x, 1.5rem);
        display: flex;
        align-items: flex-end; /* bottoms aligned */
        gap: .6rem;
        border-bottom: 1px solid #cfe0dd;
        height: 48px; /* fixed => no layout jump */
        list-style: none;
    }

        #ticketDetailsModal .cd-tabs-outer .nav-link {
            background: #0c4443;
            color: #fff;
            border: 1px solid #cfe0dd;
            border-bottom: none;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            height: 34px;
            line-height: 34px;
            padding: 0 1.25rem;
            font-weight: 800;
            display: inline-flex;
            align-items: center;
            position: relative;
            z-index: 1;
        }

            #ticketDetailsModal .cd-tabs-outer .nav-link.active {
                background: #10a9a0;
                height: 42px;
                line-height: 42px;
                padding: 0 1.25rem;
                z-index: 2;
            }

    #ticketDetailsModal .cd-card {
        border: 1px solid #cfe0dd;
        border-radius: 0 0 14px 14px;
        margin-top: -1px;
        padding: 1rem;
    }

    #ticketDetailsModal .cd-input.cd-input--readonly,
    #ticketDetailsModal textarea.cd-input.cd-input--readonly {
        background-color: #f8fbfb;
        border: 1.5px solid #cfe0dd;
    }

    #ticketDetailsModal .td-answer {
        background-color: #fff !important;
        border: 1.5px solid #cfe0dd;
    }

    #ticketDetailsModal .cd-input.cd-input--readonly,
    #ticketDetailsModal textarea.cd-input.cd-input--readonly {
        background-color: #f8fbfb;
        border: 1.5px solid #cfe0dd;
    }

    #ticketDetailsModal .td-answer {
        background-color: #fff;
        border: 1.5px solid #cfe0dd;
    }

    #ticketDetailsModal .td-inhoud-expanded {
        min-height: 24rem;
    }

    #ticketDetailsModal .cd-title-underline {
        background-color: #1aa5a0 !important;
        border-color: #1aa5a0 !important;
    }

    #ticketDetailsModal textarea.cd-input.cd-input--readonly {
        pointer-events: auto;
        user-select: text;
        overflow-y: auto;
        overflow-x: hidden;
        resize: none;
        white-space: pre-wrap;
    }

    #ticketDetailsModal #td-inhoud.td-inhoud-expanded {
        height: 24rem !important;
        max-height: 24rem;
    }

    #ticketDetailsModal #td-inhoud:not(.td-inhoud-expanded) {
        height: 12rem !important;
        max-height: 12rem;
    }

    #ticketDetailsModal #td-inhoud {
        overflow: auto;
        resize: none;
    }

.td-status-icon {
    font-size: 25px;
    line-height: 1;
}

.table.table-compact .td-status-icon {
    font-size: 20px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

#cd-tickets tr.cd-ticket-row {
    cursor: pointer;
}

    #cd-tickets tr.cd-ticket-row:hover {
        background: #f2f6f6;
    }

th.th-static {
    padding: 0;
}

    th.th-static > .th-label {
        display: block;
        width: 100%;
        height: 100%;
        padding: .5rem .75rem;
        color: inherit;
        text-decoration: none;
    }

:root {
    --content-xpad: 28px;
}

.page-wrap {
    padding: 24px var(--content-xpad);
}

.navbar .align-with-content {
    padding-left: var(--content-xpad);
    padding-right: var(--content-xpad);
}

:root {
    --content-xpad: 28px;
}

.page-wrap {
    padding: 24px var(--content-xpad);
}

.navbar > .container.align-with-content,
.navbar > .container-fluid.align-with-content {
    padding-left: calc(var(--bs-gutter-x, .75rem) + var(--content-xpad));
    padding-right: calc(var(--bs-gutter-x, .75rem) + var(--content-xpad));
}

.navbar > .container,
.navbar > .container-wider,
.navbar > .container-fluid {
    padding-left: 28px;
    padding-right: 28px;
}

.bottom-bar .bottom-counter {
    justify-self: end;
    text-align: right;
}
/* ===========================
   New User Modal — adopt the client modal look
   (ADD-ONLY: does not touch other modals)
   =========================== */

#newUserModal {
    --cd-container-w: 920px;
    --cd-pane-h: 420px;
    --cd-gutter-x: 1.5rem;
    --cd-teal: #1aa5a0; /* active tab */
    --cd-teal-dark: #0c4443; /* inactive tab */
    --cd-ink: #223432;
}

    #newUserModal .modal-dialog {
        --bs-modal-width: 980px;
    }

    #newUserModal .modal-content {
        max-height: calc(100dvh - 4rem);
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        border: 1px solid #d7e3e1;
        width: 100%;
        max-width: 100%;
    }

    #newUserModal .modal-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        align-items: stretch;
    }

    #newUserModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #newUserModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: var(--cd-teal);
    }

    /* Tabs sitting on the card border */
    #newUserModal .cd-tabs-outer {
        margin: 0 0 -1px 0;
        padding: 0 var(--cd-gutter-x);
        display: flex;
        align-items: flex-end;
        gap: .6rem;
        border-bottom: 1px solid #cfe0dd;
        height: 48px;
        list-style: none;
    }

        #newUserModal .cd-tabs-outer .nav-link {
            background: var(--cd-teal-dark);
            color: #fff;
            border: 1px solid #cfe0dd;
            border-bottom: none;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            height: 34px;
            line-height: 34px;
            padding: 0 1.25rem;
            font-weight: 800;
            display: inline-flex;
            align-items: center;
            position: relative;
            z-index: 1;
            transition: padding .18s ease, transform .18s ease, background-color .18s ease, box-shadow .18s ease;
        }

            #newUserModal .cd-tabs-outer .nav-link.active {
                background: #10a9a0;
                height: 42px;
                line-height: 42px;
                z-index: 2;
            }

    /* Tab panes + content card */
    #newUserModal .tab-content {
        width: 100%;
        padding: 0 var(--cd-gutter-x);
        margin: 0;
        min-height: var(--cd-pane-h);
    }

    #newUserModal .tab-pane {
        display: none;
        width: 100%;
    }

        #newUserModal .tab-pane.active,
        #newUserModal .tab-pane.show.active {
            display: block;
        }

    #newUserModal .cd-card {
        width: 100%;
        min-height: var(--cd-pane-h);
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #cfe0dd;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
        margin-top: -1px;
        padding: 1rem;
    }

    #newUserModal .cd-label {
        display: block;
        margin-bottom: .25rem;
        font-weight: 700;
        color: #445b59;
    }

    #newUserModal .cd-input {
        height: 36px;
        font-size: .95rem;
        color: #344b49;
        background: #f6faf9;
        border-color: #e3eeec;
    }

        #newUserModal .cd-input:read-only {
            opacity: .9;
        }

    #newUserModal .cd-input-narrow {
        max-width: 110px;
    }

    /* Buttons */
    #newUserModal .btn-teal {
        background: var(--cd-teal);
        border-color: var(--cd-teal);
        color: #fff;
    }

        #newUserModal .btn-teal:hover,
        #newUserModal .btn-teal:focus {
            background: #0c5a51;
            border-color: #0c5a51;
            color: #fff;
        }

    /* Animations (server-rendered .show) */
    #newUserModal.modal.fade .modal-dialog {
        transform: none;
        transition: none;
    }

    #newUserModal.show .modal-dialog {
        animation: modalFadeUp .22s ease-out both;
    }

    /* Match the “collapse-to-content” behavior of other partner modals */
    #newUserModal .tab-content,
    #newUserModal .cd-card {
        min-height: 0 !important;
    }

    #newUserModal .cd-card {
        padding-bottom: .75rem;
    }
    /* === Scoped styling for the no-JS multiselect (chips INSIDE) === */
    #newUserModal .cd-ms-njs {
        position: relative;
    }

        #newUserModal .cd-ms-njs .ms-box {
            position: relative;
        }

        #newUserModal .cd-ms-njs .ms-toggle {
            display: flex;
            align-items: center;
            gap: .5rem;
            min-height: 40px;
            padding: 6px 28px 6px 10px; /* room for chips + caret */
            cursor: pointer;
        }

        #newUserModal .cd-ms-njs .ms-caret {
            margin-left: auto;
            opacity: .6;
        }

        #newUserModal .cd-ms-njs .ms-chips {
            flex: 1 1 auto;
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: .35rem;
            pointer-events: none; /* clicks open the dropdown */
        }

        #newUserModal .cd-ms-njs .ms-placeholder {
            color: #6c757d;
        }

        #newUserModal .cd-ms-njs .ms-chip {
            display: none; /* shown when matching input is checked */
            background: #e6faf9;
            color: #0b4f4a;
            border: 1px solid #1b7a77;
            border-radius: 999px;
            padding: .15rem .5rem;
            font-weight: 600;
            line-height: 1;
        }

        /* Dropdown menu */
        #newUserModal .cd-ms-njs .ms-menu {
            position: absolute;
            top: calc(100% + .25rem);
            left: 0;
            right: 0;
            z-index: 1055;
            display: none;
            max-height: 240px;
            overflow: auto;
            background: #fff;
            border: 1px solid #cfe0dd;
            border-radius: .6rem;
            box-shadow: 0 10px 24px rgba(0,0,0,.10);
            padding: .25rem;
        }

        #newUserModal .cd-ms-njs .ms-open:checked ~ .ms-box .ms-menu {
            display: block;
        }

        #newUserModal .cd-ms-njs .ms-item {
            display: flex;
            align-items: center;
            gap: .5rem;
            padding: .35rem .5rem;
            border-radius: .4rem;
            cursor: pointer;
        }

            #newUserModal .cd-ms-njs .ms-item:hover {
                background: #f2f8f8;
            }

        #newUserModal .cd-ms-njs .ms-box-icon {
            width: 16px;
            height: 16px;
            border: 2px solid #0b4f4a;
            border-radius: 3px;
            background: #fff;
            display: inline-block;
        }

        #newUserModal .cd-ms-njs .ms-box .ms-opt:checked ~ .ms-toggle .ms-placeholder {
            display: none;
        }

        #newUserModal .cd-ms-njs .ms-backdrop {
            display: none;
            position: fixed; /* cover the whole viewport */
            inset: 0;
            z-index: 1054; /* below menu, above page */
            background: transparent;
            cursor: default;
        }

        #newUserModal .cd-ms-njs .ms-open:checked + .ms-box .ms-backdrop {
            display: block;
        }

        #newUserModal .cd-ms-njs .ms-menu {
            z-index: 1055; /* already present; keep higher than backdrop */
        }
    /* Multi-select control — used in both modals */
    #newUserModal .ms, #editUserModal .ms {
        position: relative;
    }

        /* Input look */
        #newUserModal .ms .ms-input, #editUserModal .ms .ms-input {
            display: flex;
            align-items: center;
            min-height: 40px;
            border: 1.5px solid #7ca8a3;
            border-radius: .6rem;
            background: #fff;
            padding: .25rem .75rem;
            cursor: pointer;
        }
        /* Chips area */
        #newUserModal .ms .ms-chips, #editUserModal .ms .ms-chips {
            display: flex;
            flex-wrap: wrap;
            gap: .35rem;
            flex: 1;
        }

        #newUserModal .ms .ms-chip, #editUserModal .ms .ms-chip {
            display: none; /* shown when its checkbox is :checked */
            padding: .15rem .55rem;
            border-radius: 999px;
            border: 1px solid #0f766e;
            color: #0f766e;
            font-weight: 700;
            line-height: 1;
        }
        /* Reveal chip when its preceding checkbox is checked */
        #newUserModal .ms .ms-cb:checked + .ms-chip,
        #editUserModal .ms .ms-cb:checked + .ms-chip {
            display: inline-flex;
        }

        /* Caret */
        #newUserModal .ms .ms-caret, #editUserModal .ms .ms-caret {
            margin-left: auto;
            opacity: .6;
        }

        /* Dropdown */
        #newUserModal .ms .ms-dropdown, #editUserModal .ms .ms-dropdown {
            position: absolute;
            z-index: 10;
            left: 0;
            right: 0;
            top: 100%;
            margin-top: .25rem;
            background: #fff;
            border: 1px solid #cfe0dd;
            border-radius: .5rem;
            box-shadow: 0 8px 22px rgba(0,0,0,.12);
            padding: .25rem;
            display: none;
        }

        /* Open/close via the hidden toggle */
        #newUserModal .ms .ms-open:checked ~ .ms-dropdown,
        #editUserModal .ms .ms-open:checked ~ .ms-dropdown {
            display: block;
        }

        /* Option rows */
        #newUserModal .ms .ms-option, #editUserModal .ms .ms-option {
            display: flex;
            align-items: center;
            gap: .6rem;
            padding: .40rem .55rem;
            border-radius: .4rem;
            cursor: pointer;
        }

            #newUserModal .ms .ms-option:hover, #editUserModal .ms .ms-option:hover {
                background: #f6fbfb;
            }

        /* Fake checkbox */
        #newUserModal .ms .ms-box, #editUserModal .ms .ms-box {
            width: 18px;
            height: 18px;
            border: 2px solid #0f766e;
            border-radius: .25rem;
            display: inline-block;
        }

        /* Mark the box when its checkbox is checked (pure CSS) */
        #newUserModal .ms .ms-cb:checked + .ms-chip ~ .ms-dropdown .ms-option[for*='opt-'] .ms-box, /* harmless default */
        #editUserModal .ms .ms-cb:checked + .ms-chip ~ .ms-dropdown .ms-option[for*='opt-'] .ms-box {
        }

        /* Backdrop label to close when clicking outside */
        #newUserModal .ms .ms-backdrop, #editUserModal .ms .ms-backdrop {
            position: fixed;
            inset: 0;
            display: none;
        }

        #newUserModal .ms .ms-open:checked ~ .ms-backdrop,
        #editUserModal .ms .ms-open:checked ~ .ms-backdrop {
            display: block;
        }

#editUserModal {
    --cd-container-w: 920px;
    --cd-pane-h: 420px;
    --cd-gutter-x: 1.5rem;
    --cd-teal: #1aa5a0;
    --cd-teal-dark: #0c4443;
    --cd-ink: #223432;
}

    #editUserModal .modal-dialog {
        --bs-modal-width: 980px;
    }

    #editUserModal .modal-content {
        max-height: calc(100dvh - 4rem);
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        border: 1px solid #d7e3e1;
        width: 100%;
        max-width: 100%;
    }

    #editUserModal .modal-body {
        flex: 1 1 auto;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        align-items: stretch;
    }

    #editUserModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #editUserModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: var(--cd-teal);
    }

    /* Tabs strip that sits on the card */
    #editUserModal .cd-tabs-outer {
        margin: 0 0 -1px 0;
        padding: 0 var(--cd-gutter-x);
        display: flex;
        align-items: flex-end;
        gap: .6rem;
        border-bottom: 1px solid #cfe0dd;
        height: 48px;
        list-style: none;
    }

        #editUserModal .cd-tabs-outer .nav-link {
            background: var(--cd-teal-dark);
            color: #fff;
            border: 1px solid #cfe0dd;
            border-bottom: none;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            height: 34px;
            line-height: 34px;
            padding: 0 1.25rem;
            font-weight: 800;
            display: inline-flex;
            align-items: center;
            position: relative;
            z-index: 1;
            transition: padding .18s ease, transform .18s ease, background-color .18s ease, box-shadow .18s ease;
        }

            #editUserModal .cd-tabs-outer .nav-link.active {
                background: #10a9a0;
                height: 42px;
                line-height: 42px;
                z-index: 2;
            }

    #editUserModal .tab-content {
        width: 100%;
        padding: 0 var(--cd-gutter-x);
        margin: 0;
        min-height: var(--cd-pane-h);
    }

    #editUserModal .tab-pane {
        display: none;
        width: 100%;
    }

        #editUserModal .tab-pane.active, #editUserModal .tab-pane.show.active {
            display: block;
        }

    #editUserModal .cd-card {
        width: 100%;
        min-height: var(--cd-pane-h);
        display: flex;
        flex-direction: column;
        background: #fff;
        border: 1px solid #cfe0dd;
        border-radius: 0 0 14px 14px;
        box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
        margin-top: -1px;
        padding: 1rem;
    }

    #editUserModal .cd-label {
        display: block;
        margin-bottom: .25rem;
        font-weight: 700;
        color: #445b59;
    }

    #editUserModal .cd-input {
        height: 36px;
        font-size: .95rem;
        color: #344b49;
        background: #f6faf9;
        border-color: #e3eeec;
    }

        #editUserModal .cd-input:read-only {
            opacity: .9;
        }

    #editUserModal .cd-input-narrow {
        max-width: 110px;
    }

    #editUserModal .btn-teal {
        background: var(--cd-teal);
        border-color: var(--cd-teal);
        color: #fff;
    }

        #editUserModal .btn-teal:hover, #editUserModal .btn-teal:focus {
            background: #0c5a51;
            border-color: #0c5a51;
            color: #fff;
        }

    #editUserModal .tab-content, #editUserModal .cd-card {
        min-height: 0 !important;
    }

    #editUserModal .cd-card {
        padding-bottom: .75rem;
    }

    #editUserModal .ms {
        position: relative;
    }

        #editUserModal .ms .ms-input {
            display: flex;
            align-items: center;
            min-height: 40px;
            border: 1.5px solid #7ca8a3;
            border-radius: .6rem;
            background: #fff;
            padding: .25rem .75rem;
            cursor: pointer;
        }

        #editUserModal .ms .ms-chips {
            display: flex;
            flex-wrap: wrap;
            gap: .35rem;
            flex: 1;
        }

        #editUserModal .ms .ms-chip {
            display: none;
            padding: .15rem .55rem;
            border-radius: 999px;
            border: 1px solid #0f766e;
            color: #0f766e;
            font-weight: 700;
            line-height: 1;
        }

        #editUserModal .ms .ms-cb:checked + .ms-chip {
            display: inline-flex;
        }

        #editUserModal .ms .ms-caret {
            margin-left: auto;
            opacity: .6;
        }

        #editUserModal .ms .ms-dropdown {
            position: absolute;
            z-index: 10;
            left: 0;
            right: 0;
            top: 100%;
            margin-top: .25rem;
            background: #fff;
            border: 1px solid #cfe0dd;
            border-radius: .5rem;
            box-shadow: 0 8px 22px rgba(0,0,0,.12);
            padding: .25rem;
            display: none;
        }

        #editUserModal .ms .ms-open:checked ~ .ms-dropdown {
            display: block;
        }

        #editUserModal .ms .ms-option {
            display: flex;
            align-items: center;
            gap: .6rem;
            padding: .40rem .55rem;
            border-radius: .4rem;
            cursor: pointer;
        }

            #editUserModal .ms .ms-option:hover {
                background: #f6fbfb;
            }

        #editUserModal .ms .ms-box {
            width: 18px;
            height: 18px;
            border: 2px solid #0f766e;
            border-radius: .25rem;
            display: inline-block;
        }
        #editUserModal .ms .ms-backdrop {
            position: fixed;
            inset: 0;
            display: none;
        }

        #editUserModal .ms .ms-open:checked ~ .ms-backdrop {
            display: block;
        }
    #editUserModal .btn-delete {
        background: #c47064;
        border: 2px solid #753232;
        color: #fff;
        border-radius: .65rem;
        padding: .5rem 1rem;
    }

        #editUserModal .btn-delete:hover {
            background: #b0413a;
            color: #fff;
        }
    #editUserModal .ms .ms-chip--locked {
        display: inline-flex !important;
        background: #f3f4f6;
        color: #6b7280;
        border: 1px solid #cbd5df;
        cursor: not-allowed;
        opacity: .85;
    }
    #editUserModal .ms .ms-chips,
    #newUserModal .ms .ms-chips {
        align-items: flex-end;
    }

    #editUserModal .ms .ms-chip--locked,
    #newUserModal .ms .ms-chip--locked {
        align-self: flex-end; 
        margin-bottom: 1px;
    }
#clientDetailsModal {
    --cd-pane-h: 420px;
}
    #clientDetailsModal .tab-content,
    #clientDetailsModal .cd-card {
        min-height: var(--cd-pane-h) !important; 
    }
#statusLegendaModal {
    --cd-ink: #223432;
}

    #statusLegendaModal .modal-dialog {
        --bs-modal-width: 980px; /* same width as other modals */
    }

    #statusLegendaModal .modal-content {
        max-height: calc(100dvh - 4rem); /* same overall height behavior */
        display: flex;
        flex-direction: column;
        border-radius: 18px;
        border: 1px solid #d7e3e1;
    }

    #statusLegendaModal .modal-body {
        flex: 1 1 auto;
        overflow: auto;
    }

    #statusLegendaModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #statusLegendaModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: #1aa5a0; 
    }

    #statusLegendaModal .cd-card {
        background: #fff;
        border: 1px solid #cfe0dd;
        border-radius: 14px;
        box-shadow: 0 1px 0 rgba(0,0,0,.02) inset;
        padding: 1rem;
    }

    #statusLegendaModal dt {
        font-weight: 700;
        color: #445b59;
        margin-bottom: .35rem;
    }

    #statusLegendaModal dd {
        color: #344b49;
        margin-bottom: .75rem;
    }
#ticketStatusLegendaModal .modal-dialog {
    --bs-modal-width: 980px;
}

#ticketStatusLegendaModal .modal-content {
    max-height: calc(100dvh - 4rem);
    display: flex;
    flex-direction: column;
    border-radius: 18px;
    border: 1px solid #d7e3e1;
}
#ticketStatusLegendaModal {
    --cd-teal: #1aa5a0; 
}

    #ticketStatusLegendaModal .cd-title-underline {
        background: var(--cd-teal) !important; 
    }
#editUserModal .cd-card {
    overflow: visible; 
}

#editUserModal .ms {
    position: relative;
}

#editUserModal .ms-dropdown {
    position: absolute;
    top: calc(100% + .5rem); 
    left: 0;
    right: 0;
    height: auto;
    max-height: 260px; 
    overflow-y: auto;
    z-index: 1060; 
    border-radius: 12px;
}

    #editUserModal .ms-dropdown .ms-option {
        display: flex;
        align-items: center;
        padding: .5rem .75rem;
    }
#editUserModal .modal,
#editUserModal .modal-dialog,
#editUserModal .modal-content,
#editUserModal .modal-body,
#editUserModal .cd-card,
#editUserModal .ms {
    overflow: visible !important;
}

#editUserModal .ms {
    position: relative;
}

#editUserModal .ms-dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    height: auto !important; 
    max-height: 320px; 
    overflow-y: auto;
    z-index: 2000; 
    -webkit-overflow-scrolling: touch; 
}

    #editUserModal .ms-dropdown .ms-option {
        display: flex;
        align-items: center;
        padding: .5rem .75rem;
    }
#newUserModal .modal,
#newUserModal .modal-dialog,
#newUserModal .modal-content,
#newUserModal .modal-body,
#newUserModal .cd-card,
#newUserModal .ms {
    overflow: visible !important;
}

#newUserModal .ms {
    position: relative;
}

#newUserModal .ms-dropdown {
    position: absolute;
    top: calc(100% + .5rem);
    left: 0;
    right: 0;
    z-index: 2000;
    background: #fff;
    border: 1px solid #9bb;
    border-radius: .5rem;
    box-shadow: 0 6px 18px rgba(0,0,0,.12);
    max-height: 320px; 
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

    #newUserModal .ms-dropdown.cd-card {
        max-height: 320px !important;
        overflow-y: auto !important;
    }

    #newUserModal .ms-dropdown .ms-option {
        display: flex;
        align-items: center;
        padding: .5rem .75rem;
    }
#ticketDetailsModal .btn.is-busy {
    opacity: .6;
    cursor: default;
}

    #ticketDetailsModal .btn.is-busy:disabled {
        pointer-events: none;
    }
#cd-modal .cd-tickets-table {
    table-layout: fixed;
    width: 100%;
}

    #cd-modal .cd-tickets-table th:nth-child(3),
    #cd-modal .cd-tickets-table td:nth-child(3) {
        width: 56%;
    }

#cd-modal .cd-inhoud-1l {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.row-disabled {
    opacity: .55;
}

    .row-disabled .btn.disabled {
        pointer-events: none;
    }
.badge-me {
    --teal: 15,118,110; 
    background: rgba(var(--teal), .15);
    color: rgb(var(--teal));
    border: 1px solid rgba(var(--teal), .35);
    font-weight: 600;
    padding: .25rem .4rem;
    font-size: .675rem;
    margin-right: 10px;
    vertical-align: middle;
    border-radius: .375rem;
}
.cell-flex {
    display: flex;
    align-items: center;
    white-space: nowrap;
}

    .cell-flex .pill {
        margin-left: auto; 
    }
.table thead th.th-followup {
    vertical-align: middle !important; /* vertical center */
    text-align: center; /* fallback horizontal center */
    padding-top: .25rem;
    padding-bottom: .25rem;
}

    .table thead th.th-followup .th-link {
        display: flex; /* precise centering */
        flex-direction: column;
        align-items: center; /* horizontal center */
        justify-content: center; /* vertical center */
        padding: 0;
        height: 100%;
        line-height: 1.15;
    }

        .table thead th.th-followup .th-link > .d-block {
            line-height: 1.1;
            margin: 0;
        }
.row-between .btn.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: auto;
    padding: 14px 24px;
    line-height: 1.1;
    white-space: nowrap;
    width: auto; 
}
#clientConvertToVptModal {
    --cd-ink: #223432;
    --cd-line: #cfe0dd; 
}

    #clientConvertToVptModal .modal-content {
        border-radius: 18px;
        border: 1px solid #d7e3e1;
        overflow: hidden; 
    }

    #clientConvertToVptModal .cd-title {
        font-weight: 700;
        margin-left: 1.5rem;
        color: var(--cd-ink);
    }

    #clientConvertToVptModal .cd-title-underline {
        height: 2px;
        width: 210px;
        margin-left: 1.5rem;
        border-radius: 2px;
        background: var(--cd-line); 
    }
    #clientConvertToVptModal .cd-title-underline {
        background: #1aa5a0 !important; 
        height: 2px;
        width: 210px;
        border-radius: 2px;
        margin-left: 1.5rem; 
    }

    #clientConvertToVptModal .cd-title {
        margin-left: 1.5rem;
        font-weight: 700;
        color: #223432;
    }

    #clientConvertToVptModal .modal-content {
        border-radius: 18px;
        border: 1px solid #d7e3e1;
        overflow: hidden;
    }
    #clientConvertToVptModal input[type="radio"] {
        outline: none !important;
        box-shadow: none !important;
    }

        #clientConvertToVptModal input[type="radio"]:focus,
        #clientConvertToVptModal input[type="radio"]:focus-visible {
            outline: none !important;
            box-shadow: none !important;
        }
#clientConvertToVptModal {
    --cd-gutter-x: 1.5rem;
    --cd-teal: #1aa5a0;
    --cd-teal-dark: #0c4443;
    --cd-line: #cfe0dd;
}

    #clientConvertToVptModal .cd-tabs-outer {
        margin: 0 0 -1px 0;
        padding: 0 var(--cd-gutter-x);
        display: flex;
        align-items: flex-end;
        gap: .6rem;
        border-bottom: 1px solid var(--cd-line);
        height: 48px;
        list-style: none;
    }

        #clientConvertToVptModal .cd-tabs-outer .nav-link {
            background: var(--cd-teal-dark);
            color: #fff;
            border: 1px solid var(--cd-line);
            border-bottom: none;
            border-top-left-radius: 12px;
            border-top-right-radius: 12px;
            height: 34px;
            line-height: 34px;
            padding: 0 1.25rem;
            font-weight: 800;
            display: inline-flex;
            align-items: center;
            cursor: default;
        }

            #clientConvertToVptModal .cd-tabs-outer .nav-link.active {
                background: #10a9a0;
                height: 42px;
                line-height: 42px;
                z-index: 2;
            }

    #clientConvertToVptModal .cd-card {
        border: 1px solid var(--cd-line);
        border-radius: 0 0 14px 14px;
        margin-top: -1px;
    }

/* Make modal fit nicely in the viewport */
.modal-scrollable .modal-content {
    max-height: calc(100vh - 4rem); /* room for top/bottom */
    display: flex;
    flex-direction: column;
}

/* Header stays at top, footer stays at bottom (if you have one) */
.modal-scrollable .modal-header {
    flex: 0 0 auto;
}

.modal-scrollable .modal-body {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}
#clientDetailsModal .modal-body {
    overflow: hidden; /* <- this blocks scroll no matter what */
}
#clientDetailsModal .modal-body {
    overflow: hidden;
}
