.roles-container {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: nowrap;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 1rem;
}

.roles-left {
    flex: 0 0 auto;
    min-width: 300px;
    overflow-x: visible;
}

.roles-right {
    flex: 1 1 auto;
    min-width: 200px;
    background: var(--bs-body-bg);
    border: none;
    padding: 12px;
    border-radius: 6px;
}

.roles-right svg {
    width: 100%;
    height: auto;
    display: block;
    background: var(--bs-body-bg);
    border: none;
}

.table {
    width: auto;
    white-space: nowrap;
    overflow: visible;
}

.roles-page-scroll {
    width: 100%;
    height: auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    padding-bottom: 1rem;
}

.roles-page-scroll .table {
    min-width: 1200px;
}

.roles-orgchart-page {
    width: 100%;
}

.roles-orgchart-wrap {
    width: 100%;
    height: calc(100vh - var(--topbar-h) - 7rem);
    min-height: 700px;
    overflow: auto;
    border: 1px solid var(--bs-border-color);
    border-radius: 8px;
    padding: 8px;
    background: var(--bs-body-bg);
}

.roles-orgchart-wrap #orgchart {
    width: 100%;
    height: 100%;
    min-height: 680px;
    display: block;
}

.roles-candidates-page {
    max-width: 1050px;
}

.roles-candidates-header h1 {
    font-size: 1.8rem;
    letter-spacing: 0.2px;
}

.roles-candidates-summary th {
    width: 22%;
    background: rgba(0, 0, 0, 0.03);
    font-weight: 600;
}

.roles-candidates-summary td {
    width: 28%;
}

.roles-candidates-table thead th {
    font-size: 0.86rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.roles-candidates-table tbody td {
    vertical-align: middle;
}

#create_role_form,
#edit_role_form {
    max-height: none;
    overflow: visible;
    padding-bottom: 1rem;
}

@media (max-width: 991.98px) {
    .roles-container {
        flex-direction: column;
    }

    #create_role_form,
    #edit_role_form {
        max-height: none;
        padding-bottom: 1rem;
    }

    .roles-left,
    .roles-right {
        width: 100%;
    }

    .roles-orgchart-wrap {
        min-height: 520px;
        height: calc(100vh - var(--topbar-h) - 8rem);
    }

    .roles-orgchart-wrap #orgchart {
        min-height: 500px;
    }

    .roles-candidates-header h1 {
        font-size: 1.45rem;
    }

    .roles-candidates-summary th,
    .roles-candidates-summary td {
        width: auto;
    }
}
