/* Profile / user menu — top-right corner (avatar dropdown). */
.srv-top-right-user-menu {
    position: fixed;
    top: 1.25rem;
    right: 1rem;
    z-index: 40;
}

.srv-top-right-user-menu .fi-user-menu-trigger {
    border-radius: 9999px;
}

@media (min-width: 768px) {
    .srv-top-right-user-menu {
        top: 1.5rem;
        right: 3rem;
    }
}

/* Align listings and dashboard content beside the sidebar (alumni app style). */
.fi-main {
    margin-inline: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding-inline: 1rem;
    padding-block: 1.5rem;
}

@media (min-width: 768px) {
    .fi-main {
        padding: 3rem;
    }
}

.fi-page-content,
.fi-ta-ctn,
.fi-ta-content,
.fi-ta-table,
.fi-wi-widget {
    width: 100%;
}

.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-group-label,
.fi-sidebar .fi-sidebar-database-notifications-btn-label {
    overflow: visible;
    text-overflow: unset;
    white-space: normal;
    word-break: break-word;
}

.fi-sidebar .fi-sidebar-item-btn,
.fi-sidebar .fi-sidebar-group-btn {
    justify-content: flex-start;
}

/* Sticky table headers on listing pages (alumni portal style). */
.fi-resource-list-records-page .fi-ta-content-ctn {
    max-height: min(70vh, calc(100dvh - 16rem));
    overflow-y: auto;
    overflow-x: auto;
}

.fi-resource-list-records-page .fi-ta-table thead .fi-ta-header-cell,
.fi-resource-list-records-page .fi-ta-table thead .fi-ta-header-group-cell,
.fi-resource-list-records-page .fi-ta-table thead .fi-ta-selection-cell {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #ffffff;
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08);
}

.fi-resource-list-records-page:where(.dark, .dark *) .fi-ta-table thead .fi-ta-header-cell,
.fi-resource-list-records-page:where(.dark, .dark *) .fi-ta-table thead .fi-ta-header-group-cell,
.fi-resource-list-records-page:where(.dark, .dark *) .fi-ta-table thead .fi-ta-selection-cell {
    background-color: #111827;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
}

@media (max-width: 639px) {
    .fi-resource-list-records-page .fi-ta-content-ctn {
        max-height: none;
        overflow-y: visible;
    }

    .fi-resource-list-records-page .fi-ta-table-stacked-on-mobile thead .fi-ta-header-cell,
    .fi-resource-list-records-page .fi-ta-table-stacked-on-mobile thead .fi-ta-header-group-cell,
    .fi-resource-list-records-page .fi-ta-table-stacked-on-mobile thead .fi-ta-selection-cell {
        position: static;
        box-shadow: none;
    }
}
