.campo-senha {
    position: relative;
    width: 100%;
    display: flex;
    align-items: center;
}

.campo-senha input {
    width: 100%;
    padding-right: 3.3rem;
}

.btn-toggle-senha {
    position: absolute;
    right: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.45rem;
    width: 1.9rem;
    height: 1.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
    opacity: 0.6;
}

.btn-toggle-senha:hover {
    opacity: 1;
}

.btn-toggle-senha:focus {
    outline: 2px solid #4da6ff;
    outline-offset: 2px;
    border-radius: 0.225rem;
    opacity: 1;
}

.btn-toggle-senha:active {
    transform: translateY(-50%) scale(0.95);
}

/* Ícone do botão */
.btn-toggle-senha::before {
    content: '';
    display: block;
    width: 1.15rem;
    height: 1.15rem;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'%3E%3C/path%3E%3Ccircle cx='12' cy='12' r='3'%3E%3C/circle%3E%3C/svg%3E");
}

.btn-toggle-senha[aria-label*="Ocultar"]::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24'%3E%3C/path%3E%3Cline x1='1' y1='1' x2='23' y2='23'%3E%3C/line%3E%3C/svg%3E");
}

.btn-toggle-senha:hover::before {
    filter: brightness(1.2);
}

.campo-senha input {
    flex: 1;
    margin-bottom: 0;
}

/*responsividade para desktops*/
@media (min-width: 901px) {
    .campo-senha input {
        padding-right: 3.5rem;
    }
    
    .btn-toggle-senha {
        right: 1rem;
        width: 2.2rem;
        height: 2.2rem;
    }
    
    .btn-toggle-senha::before {
        width: 1.35rem;
        height: 1.35rem;
    }
}
