.bg-navbar {
    min-height: 58px;
    background: #563d7c !important;
}

.bg-navbar .navbar-brand,
.bg-navbar .nav-link {
    color: #fff;
}

.bg-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .55);
}

.bg-navbar .navbar-brand {
    display: flex;
    min-height: 42px;
    align-items: center;
    padding-right: 1rem;
    border-right: 1px solid rgba(255, 255, 255, .45);
}

.bg-navbar .nav-item > a:hover,
.bg-navbar .nav-item > button:hover {
    border-radius: .25rem;
    background-color: #463165;
    color: #fff;
}

.amec-connect-pending {
    visibility: hidden;
}

.amec-connect-nav {
    display: flex;
    min-height: 42px;
    align-items: center;
}

.amec-connect-nav[hidden],
.amec-signup-account-nav[hidden] {
    display: none !important;
}

.bg-navbar .amec-connect-nav > .nav-link {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border: 1px solid rgba(255, 255, 255, .75);
    border-radius: 999px;
    background: linear-gradient(135deg, #fff, #f1eaff);
    box-shadow: 0 2px 8px rgba(28, 16, 45, .2);
    color: #563d7c;
    font-weight: 600;
    line-height: 1.2;
    transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.amec-signup-account-nav .amec-profile-name {
    max-width: min(185px, 42vw);
}

.bg-navbar .amec-connect-nav > .nav-link:hover {
    transform: translateY(-1px);
    background: linear-gradient(135deg, #fff, #e6d7ff);
    box-shadow: 0 4px 12px rgba(28, 16, 45, .28);
    color: #422765;
}

.bg-navbar .amec-connect-nav > .nav-link:focus-visible {
    outline: 3px solid #fff;
    outline-offset: 3px;
    box-shadow: 0 0 0 5px rgba(255, 255, 255, .35);
    color: #422765;
}

.bg-navbar .amec-connect-nav > .nav-link:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(28, 16, 45, .2);
}

@media (prefers-reduced-motion: reduce) {
    .bg-navbar .amec-connect-nav > .nav-link {
        transition: none;
    }
}

.amec-connect-modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 0;
    background: transparent;
}

#googleSignupStatus {
    overflow-wrap: anywhere;
}

#googleSignupUsePassword {
    max-width: 100%;
    text-align: left;
    white-space: normal;
}

.amec-session-nav {
    display: flex;
    align-items: center;
    margin-left: 1rem;
    padding-left: 1rem;
    border-left: 1px solid rgba(255, 255, 255, .45);
}

.amec-profile-toggle {
    display: flex;
    align-items: center;
    gap: .55rem;
    max-width: 290px;
    padding: .35rem .5rem;
    border: 0;
    background: transparent;
    color: #fff;
    text-align: left;
    cursor: pointer;
}

.amec-profile-toggle::after {
    display: none;
}

.amec-profile-toggle:hover,
.amec-profile-toggle:focus {
    background: transparent !important;
    color: #fff;
    outline: none;
}

.amec-profile-avatar {
    display: flex;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .94);
    color: #273e99;
    font-weight: 600;
}

.amec-profile-identity {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.amec-profile-name,
.amec-profile-role {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.amec-profile-name {
    max-width: 185px;
}

.amec-profile-role {
    color: rgba(255, 255, 255, .8);
    font-size: .82rem;
}

.amec-profile-caret {
    margin-left: .25rem;
    font-size: .75rem;
    transition: transform .15s ease;
}

.amec-session-nav.show .amec-profile-caret {
    transform: rotate(180deg);
}

.amec-profile-menu {
    min-width: 190px;
    margin-top: .45rem;
    padding: .4rem 0;
    border: 0;
    border-radius: .25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .16);
}

.amec-profile-menu .dropdown-item {
    display: flex;
    align-items: center;
    gap: .7rem;
    padding: .55rem 1rem;
    color: #212529;
}

.amec-profile-menu .dropdown-item:hover,
.amec-profile-menu .dropdown-item:focus {
    background: #f2f3f5;
    color: #16181b;
}

.amec-profile-menu .dropdown-item i {
    width: 1rem;
    color: #68707a;
    text-align: center;
}

@media screen and (max-width: 991.98px) {
    .bg-navbar .navbar-collapse {
        max-height: calc(100vh - 58px);
        overflow-y: auto;
    }

    .amec-session-nav {
        align-items: stretch;
        margin: .5rem 0 0;
        padding: .5rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, .35);
        border-left: 0;
    }

    .amec-connect-nav {
        margin: .5rem 0 0;
        padding: .5rem 0 0;
        border-top: 1px solid rgba(255, 255, 255, .35);
    }

    .amec-signup-account-nav {
        margin: .5rem 0 0;
    }

    .amec-profile-toggle {
        max-width: 100%;
    }

    .amec-profile-name {
        max-width: calc(100vw - 120px);
    }

    .amec-profile-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: .25rem;
        background: rgba(255, 255, 255, .98);
    }
}
