.password-field-parent {
    position: relative;
}

.password-field-input {
    padding-right: 2.75rem !important;
}

.password-field-input--with-generate {
    padding-right: 4.75rem !important;
}

.password-toggle-btn {
    position: absolute;
    right: 0.15rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem 0.65rem;
    line-height: 1;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: #2b4eff;
}

.form-floating > .password-toggle-btn,
.form-floating > .password-generate-btn--icon {
    top: 50%;
}

.password-generate-btn--icon {
    position: absolute;
    right: 2.35rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    color: #6c757d;
    text-decoration: none;
    padding: 0.25rem 0.5rem;
    line-height: 1;
}

.password-generate-btn--icon:hover,
.password-generate-btn--icon:focus {
    color: #2b4eff;
}

.password-field-label-row > label {
    margin-bottom: 0;
}

.password-generate-btn {
    padding: 0;
    color: #2b4eff;
    text-decoration: none;
    white-space: nowrap;
    font-size: 0.875rem;
}

.password-generate-btn:hover,
.password-generate-btn:focus {
    color: #1a3dff;
    text-decoration: underline;
}

.password-generate-hint {
    margin-top: 0.25rem;
}

.password-strength {
    margin-top: 0.45rem;
}

.password-strength-track {
    height: 6px;
    border-radius: 4px;
    background: #e9ecef;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    border-radius: 4px;
    transition: width 0.2s ease, background-color 0.2s ease;
    background: #dc3545;
}

.password-strength-label {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #6c757d;
}

.password-strength.is-weak .password-strength-bar { background: #dc3545; }
.password-strength.is-weak .password-strength-label { color: #dc3545; }

.password-strength.is-fair .password-strength-bar { background: #fd7e14; }
.password-strength.is-fair .password-strength-label { color: #fd7e14; }

.password-strength.is-good .password-strength-bar { background: #0d6efd; }
.password-strength.is-good .password-strength-label { color: #0d6efd; }

.password-strength.is-strong .password-strength-bar { background: #198754; }
.password-strength.is-strong .password-strength-label { color: #198754; }
