.topbar.menu-open {
    z-index: 50;
}

.account-menu {
    position: relative;
    z-index: 2;
}

.account-menu .user-menu {
    min-height: 40px;
    padding: 4px 9px 4px 5px;
    border: 1px solid transparent;
    border-radius: 12px;
    transition: background .15s ease, border-color .15s ease;
}

.account-menu .user-menu:hover,
.account-menu .user-menu[aria-expanded="true"] {
    background: #f4f8fd;
    border-color: #e6edf5;
}

.account-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    cursor: default;
}

.account-popover {
    position: absolute;
    z-index: 2;
    top: calc(100% + 10px);
    right: 0;
    width: min(360px, calc(100vw - 28px));
    padding: 10px;
    border: 1px solid #e4eaf2;
    border-radius: 16px;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 20px 55px rgba(27, 52, 80, .18), 0 3px 10px rgba(27, 52, 80, .06);
    color: #193b5c;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.account-popover-profile {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 9px 14px;
}

.account-popover-profile .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex: none;
}

.account-popover-profile b,
.account-popover-profile small {
    display: block;
    max-width: 265px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-popover-profile b {
    font-size: 13px;
}

.account-popover-profile small {
    margin-top: 4px;
    color: #7b8da2;
    font-size: 11px;
}

.account-workspace {
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #e6eef7;
    border-radius: 11px;
    background: linear-gradient(120deg, #f6faff, #fff);
}

.account-workspace > small {
    color: #8293a6;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .1em;
}

.account-workspace > b {
    overflow: hidden;
    color: #254768;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-workspace > span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #8493a4;
    font-size: 10px;
}

.account-workspace > span i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #38aa80;
}

.account-menu-actions {
    display: grid;
    gap: 3px;
    margin: 8px 0;
    padding: 5px 0;
    border-bottom: 1px solid #edf1f5;
}

.account-menu-actions button {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    min-height: 48px;
    padding: 7px 9px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #42617f;
    text-align: left;
}

.account-menu-actions button:hover {
    background: #f3f7fc;
}

.account-menu-actions button > span:first-child {
    display: grid;
    width: 30px;
    height: 30px;
    flex: none;
    place-items: center;
    border-radius: 9px;
    background: #edf5ff;
    color: #3478bc;
    font-size: 15px;
}

.account-menu-actions b,
.account-menu-actions small {
    display: block;
}

.account-menu-actions b {
    color: #355675;
    font-size: 11px;
}

.account-menu-actions small {
    margin-top: 3px;
    color: #8a98a8;
    font-size: 9px;
}

.account-signout {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 11px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #a64242;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
}

.account-signout:hover {
    background: #fff2f1;
}

@media (max-width: 760px) {
    .account-popover {
        right: -5px;
        top: calc(100% + 8px);
    }
}
