.password-input-wrap {
    position: relative;
}

.password-input-wrap .form-control {
    padding-right: 64px;
}

.login-form .password-input-wrap .form-control {
    padding-inline-end: 4rem;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: #111827;
    font-weight: 700;
    font-size: 14px;
    padding: 0;
    cursor: pointer;
}

.password-popover {
    display: none;
    position: fixed;
    z-index: 1080;
    width: 270px;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(17, 24, 39, 0.14);
    padding: 14px 16px 12px;
}

.password-popover.is-open {
    display: block;
}

.password-popover.is-side::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 28px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-left: 1px solid #ececec;
    border-bottom: 1px solid #ececec;
    transform: rotate(45deg);
}

.password-strength-head {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    font-weight: 700;
    color: #111827;
}

.password-strength-label {
    display: none;
    background: #111827;
    color: #fff;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1;
    padding: 4px 8px;
}

.password-strength-label.is-visible {
    display: inline-block;
}

.password-strength-bars {
    display: flex;
    gap: 6px;
    margin-bottom: 12px;
}

.password-strength-bars span {
    height: 4px;
    flex: 1;
    border-radius: 4px;
    background: #e5e7eb;
}

.password-popover.is-weak .password-strength-bars span:nth-child(-n+1),
.password-popover.is-medium .password-strength-bars span:nth-child(-n+2) {
    background: #f5a524;
}

.password-popover.is-strong .password-strength-bars span {
    background: #16a34a;
}

.password-rules {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-rules li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    color: #4b5563;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 8px;
}

.password-rules li::before {
    content: "";
    width: 16px;
    height: 16px;
    min-width: 16px;
    margin-top: 1px;
    border-radius: 50%;
    border: 1.5px solid #d1d5db;
    background: #fff;
}

.password-rules li.is-met {
    color: #15803d;
}

.password-rules li.is-met::before {
    border-color: #16a34a;
    background: #16a34a url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M3.5 8.2 6.4 11l6.1-6.4'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.password-rules li.is-not-met {
    color: #dc2626;
}

.password-rules li.is-not-met::before {
    border-color: #dc2626;
    background: #dc2626 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='2' d='M4.5 4.5 11.5 11.5M11.5 4.5 4.5 11.5'/%3E%3C/svg%3E") center / 12px no-repeat;
}

.password-edge-whitespace-message {
    display: none;
    margin: 10px 0 0;
    color: #dc2626;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}

.password-edge-whitespace-message.is-visible {
    display: block;
}

@media (max-width: 767px) {
    .password-popover {
        width: auto;
        max-height: 42vh;
        overflow: auto;
    }
}
