/*
 * Admin shell geometry guard.
 *
 * The legacy Admin screens still render the shared application navigation,
 * unlike Admin Dashboard V2 which owns its own `.admin-v2-bottom-nav`.
 * Scope the guard to a shared navigation that actually contains Admin routes,
 * so student screens and the Dashboard V2 remain untouched.
 */
body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .mobile-header .avatar-sm {
    width: 32px;
    min-width: 32px;
    max-width: 32px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
    aspect-ratio: 1 / 1;
    flex: 0 0 32px;
    overflow: hidden;
    border-radius: 50%;
}

body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .mobile-header .avatar-sm > img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    aspect-ratio: 1 / 1;
    border-radius: inherit;
    object-fit: cover;
    object-position: center;
}

/*
 * `ThaysV2Orb` uses a 220px fallback while a legacy nav is being laid out.
 * The canvas used to remain at that inline size and overflow the circular
 * button. Establish one fixed square hit-area for all legacy Admin routes.
 */
body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .bottom-nav .hub-button-container,
body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .bottom-nav .tfit-hub-btn {
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    aspect-ratio: 1 / 1;
    flex: 0 0 72px !important;
    border-radius: 50%;
}

body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .bottom-nav .tfit-hub-btn {
    position: relative;
    display: grid !important;
    place-items: center;
    overflow: hidden;
    isolation: isolate;
}

body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .bottom-nav .thays-living-orb-mini {
    display: block;
    width: 72px !important;
    min-width: 72px !important;
    max-width: 72px !important;
    height: 72px !important;
    min-height: 72px !important;
    max-height: 72px !important;
    aspect-ratio: 1 / 1 !important;
    border-radius: 50%;
}

body:has(.bottom-nav .bottom-nav-item[onclick*="/admin/"]) .main-content {
    padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px));
}
