/* Compact account menu polish. Keep overrides here so the main header files remain stable. */
.ss-profile-trigger {
    gap: 0.28rem !important;
    padding: 0.16rem 0.26rem 0.16rem 0.16rem !important;
    border-radius: 999px !important;
    transition: background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

.ss-profile-trigger:hover,
.ss-profile-trigger.active,
.ss-profile-trigger[aria-expanded="true"] {
    background: #f3f7ff !important;
}

.ss-profile-trigger:focus-visible {
    outline: 3px solid rgba(49, 89, 245, 0.22) !important;
    outline-offset: 3px !important;
}

.ss-profile-chevron {
    width: 24px !important;
    height: 24px !important;
    display: grid !important;
    place-items: center !important;
    border-radius: 999px !important;
    color: #66728f !important;
    line-height: 1 !important;
}

.ss-profile-chevron svg {
    width: 15px !important;
    height: 15px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 2.35 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
    transition: transform 0.18s ease, color 0.18s ease !important;
}

.ss-profile-trigger:hover .ss-profile-chevron,
.ss-profile-trigger[aria-expanded="true"] .ss-profile-chevron {
    color: #3159f5 !important;
}

.ss-profile-trigger[aria-expanded="true"] .ss-profile-chevron svg {
    transform: rotate(180deg) !important;
}

.ss-profile-menu {
    display: none;
    position: absolute !important;
    top: calc(100% + 0.65rem) !important;
    right: 0 !important;
    width: 264px !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0.42rem !important;
    border: 1px solid #e6ecfb !important;
    border-radius: 1rem !important;
    background: #ffffff !important;
    box-shadow: 0 18px 44px rgba(31, 45, 90, 0.13) !important;
    z-index: 140 !important;
}

.ss-profile-menu-compact {
    display: none;
}

.ss-profile-menu-compact.is-open,
.ss-profile-menu.is-open {
    display: block !important;
}

.ss-profile-menu-section {
    padding: 0.18rem 0 !important;
}

.ss-profile-menu-section + .ss-profile-menu-section {
    border-top: 1px solid #edf1fb !important;
}

.ss-profile-menu a,
.ss-profile-menu button,
.ss-profile-menu .ss-profile-menu-item {
    min-height: 42px !important;
    width: 100% !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.72rem !important;
    padding: 0.55rem 0.66rem !important;
    border: 0 !important;
    border-radius: 0.72rem !important;
    background: transparent !important;
    color: #17213d !important;
    font-size: 0.86rem !important;
    font-weight: 720 !important;
    line-height: 1.18 !important;
    text-align: left !important;
    text-decoration: none !important;
    cursor: pointer !important;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease !important;
}

.ss-profile-menu-icon {
    width: 20px !important;
    height: 20px !important;
    flex: 0 0 20px !important;
    display: grid !important;
    place-items: center !important;
    color: #66728f !important;
}

.ss-profile-menu-icon svg {
    width: 20px !important;
    height: 20px !important;
    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.9 !important;
    stroke-linecap: round !important;
    stroke-linejoin: round !important;
}

.ss-profile-menu-label {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
}

.ss-profile-menu a:hover,
.ss-profile-menu button:hover,
.ss-profile-menu a:focus-visible,
.ss-profile-menu button:focus-visible {
    background: #eef3ff !important;
    color: #3159f5 !important;
    outline: none !important;
}

.ss-profile-menu a:hover .ss-profile-menu-icon,
.ss-profile-menu button:hover .ss-profile-menu-icon,
.ss-profile-menu a:focus-visible .ss-profile-menu-icon,
.ss-profile-menu button:focus-visible .ss-profile-menu-icon {
    color: #3159f5 !important;
}

.ss-profile-menu form {
    margin: 0 !important;
}

.ss-logout-section button,
.ss-profile-menu .ss-logout-section button,
.ss-profile-menu .ss-profile-menu-item--logout {
    color: #df4052 !important;
}

.ss-logout-section button .ss-profile-menu-icon,
.ss-profile-menu .ss-profile-menu-item--logout .ss-profile-menu-icon {
    color: #df4052 !important;
}

.ss-logout-section button:hover,
.ss-profile-menu .ss-logout-section button:hover,
.ss-profile-menu .ss-profile-menu-item--logout:hover,
.ss-profile-menu .ss-profile-menu-item--logout:focus-visible {
    background: #fff1f3 !important;
    color: #c62f43 !important;
}

.ss-logout-section button:hover .ss-profile-menu-icon,
.ss-profile-menu .ss-profile-menu-item--logout:hover .ss-profile-menu-icon,
.ss-profile-menu .ss-profile-menu-item--logout:focus-visible .ss-profile-menu-icon {
    color: #c62f43 !important;
}

@media (max-height: 560px) {
    .ss-profile-menu {
        max-height: calc(100vh - 88px) !important;
        overflow-y: auto !important;
        scrollbar-width: thin;
    }
}

@media (max-width: 575.98px) {
    .ss-profile-menu {
        position: fixed !important;
        top: 76px !important;
        right: 12px !important;
        left: 12px !important;
        width: auto !important;
        max-height: calc(100vh - 92px) !important;
        overflow-y: auto !important;
    }
}
